diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-04-08 01:40:31 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2003-04-08 01:40:31 +0000 |
commit | 1211bce379c9a4281cdf75593035c73da91b3d61 (patch) | |
tree | 21ee221383e5cb9dd17362cf541b48c506a21804 | |
parent | 8aa4c77d702ed72d06bb41639aab18a6c4c318b9 (diff) | |
download | gdb-1211bce379c9a4281cdf75593035c73da91b3d61.zip gdb-1211bce379c9a4281cdf75593035c73da91b3d61.tar.gz gdb-1211bce379c9a4281cdf75593035c73da91b3d61.tar.bz2 |
2003-04-04 Elena Zannoni <ezannoni@redhat.com>
* disasm.c (dump_insns): Move variables inside loop, or they will
be freed more than once, causing wild memory corruptions.
(gdb_disassembly): Look for the substring "-thread",
instead of "-threads" in the target name, to make sure to find
the 'multi-thread' target. Also, make sure we do the right thing
with the "core" target.
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/disasm.c | 8 |
2 files changed, 14 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5875057..72ae7f6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2003-04-07 Elena Zannoni <ezannoni@redhat.com> + + * disasm.c (dump_insns): Move variables inside loop, or they will + be freed more than once, causing wild memory corruptions. + (gdb_disassembly): Look for the substring "-thread", + instead of "-threads" in the target name, to make sure to find + the 'multi-thread' target. Also, make sure we do the right thing + with the "core" target. + 2003-04-07 Kevin Buettner <kevinb@redhat.com> * mips-tdep.c (mips_print_fp_register): New function, created from diff --git a/gdb/disasm.c b/gdb/disasm.c index e9aabc8..511855b 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -93,14 +93,15 @@ dump_insns (struct ui_out *uiout, disassemble_info * di, /* parts of the symbolic representation of the address */ int unmapped; - char *filename = NULL; - char *name = NULL; int offset; int line; struct cleanup *ui_out_chain; for (pc = low; pc < high;) { + char *filename = NULL; + char *name = NULL; + QUIT; if (how_many >= 0) { @@ -358,7 +359,8 @@ gdb_disassembly (struct ui_out *uiout, if (strcmp (target_shortname, "child") == 0 || strcmp (target_shortname, "procfs") == 0 || strcmp (target_shortname, "vxprocess") == 0 - || strstr (target_shortname, "-threads") != NULL) + || strcmp (target_shortname, "core") == 0 + || strstr (target_shortname, "-thread") != NULL) gdb_disassemble_from_exec = 0; /* It's a child process, read inferior mem */ else gdb_disassemble_from_exec = 1; /* It's remote, read the exec file */ |