2003-04-04 Elena Zannoni <ezannoni@redhat.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Tue, 8 Apr 2003 01:40:31 +0000 (01:40 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Tue, 8 Apr 2003 01:40:31 +0000 (01:40 +0000)
* 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.

gdb/ChangeLog
gdb/disasm.c

index 587505702d07974d235428cc0d11b02b19b0e963..72ae7f6e79ef3f36e87e7e0b1c751ef863a366a1 100644 (file)
@@ -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
index e9aabc88ac7dbc17ee87a5a9cd95d86a80317d67..511855b5901eb1c76c2e9c4a2740b01be0f86fc6 100644 (file)
@@ -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 */
This page took 0.046813 seconds and 4 git commands to generate.