diff options
author | Joel Brobecker <brobecker@gnat.com> | 2011-10-26 18:21:38 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2011-10-26 18:21:38 +0000 |
commit | 86ba104287c2df8fd675dc2791273037f2c153e7 (patch) | |
tree | e30ef655da18fe9fe296d240989c56fbdb51c0a8 /gdb | |
parent | c34fd85260102e2a68a248e13a4eb99a3dc8548b (diff) | |
download | gdb-86ba104287c2df8fd675dc2791273037f2c153e7.zip gdb-86ba104287c2df8fd675dc2791273037f2c153e7.tar.gz gdb-86ba104287c2df8fd675dc2791273037f2c153e7.tar.bz2 |
Fix 'sprintf' of potential NULL pointer in 'maint print arch'
gdb/
* gdbarch.sh (function_list): Use 'pstring' when printing
'gcore_bfd_target'.
* gdbarch.c: Regenerate.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbarch.c | 2 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5d60872..a10d060 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2011-10-26 Meador Inge <meadori@codesourcery.com> + + * gdbarch.sh (function_list): Use 'pstring' when printing + 'gcore_bfd_target'. + * gdbarch.c: Regenerate. + 2011-10-26 Ulrich Weigand <uweigand@de.ibm.com> * regcache.c (registers_changed_ptid): Invalidate thread architecture diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index ea48fa7..1ada504 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -953,7 +953,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) gdbarch_gcore_bfd_target_p (gdbarch)); fprintf_unfiltered (file, "gdbarch_dump: gcore_bfd_target = %s\n", - gdbarch->gcore_bfd_target); + pstring (gdbarch->gcore_bfd_target)); fprintf_unfiltered (file, "gdbarch_dump: gen_return_address = <%s>\n", host_address_to_string (gdbarch->gen_return_address)); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index bf78173..a9ca03d 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -640,7 +640,7 @@ M:LONGEST:core_xfer_shared_libraries:gdb_byte *readbuf, ULONGEST offset, LONGEST M:char *:core_pid_to_str:ptid_t ptid:ptid # BFD target to use when generating a core file. -V:const char *:gcore_bfd_target:::0:0:::gdbarch->gcore_bfd_target +V:const char *:gcore_bfd_target:::0:0:::pstring (gdbarch->gcore_bfd_target) # If the elements of C++ vtables are in-place function descriptors rather # than normal function pointers (which may point to code or a descriptor), |