bugDDD - Bugs: bug #30579, incorrect gdb 'disassemble' command

 
 

bug #30579: incorrect gdb 'disassemble' command

Submitter:  None
Submitted:  Wed 28 Jul 2010 05:11:05 PM UTC
   
 
Category:  Gdb integration Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  eickeler
Open/Closed:  Closed Release:  3.3.12
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 25 Jan 2021 07:39:30 PM UTC, comment #4: 

pre 7.1 GDB (2009) should not be an issue anymore -> changed disassemble command from ' ' to ', '

Stefan Eickeler <eickeler>
Group administrator
Mon 25 Jan 2021 07:38:43 PM UTC, comment #3: 

pre 7.1 GDB (2009) should not be an issue anymore -> changed disassemble command from ' ' to ', '

Stefan Eickeler <eickeler>
Group administrator
Mon 09 Jan 2012 10:51:47 PM UTC, comment #2: 

I tried creating a patch that automatically queries the GDB
version, and then attempts to adjust the disassemble command
accordingly.  That way, when using different GDB backends
(e.g., for debugging on the host system vs. debugging on
cross-compilation targets), DDD would always do the right
thing.

Alas, somehow, things end up in the wrong sequence in the
event queue, so the code to query the GDB version is executed
only after the version information would already be needed.
Perhaps someone can find a trick to trigger the events in the
Xm event queue in a different sequence.

(file #24776)

Joerg Wunsch <joerg_wunsch>
Mon 27 Sep 2010 10:28:35 AM UTC, comment #1: 
Paolo Cancedda <pac72>
Wed 28 Jul 2010 05:11:05 PM UTC, original submission:  

Using ddd 3.3.12 with gdb 7.1, I found that trying to display disassembled code in the Machine Code window resulted in the error
message

   A syntax error in expression, near <2nd argument>

The problem is that when two arguments, e.g. addresses, are supplied to the gdb disassemble command gdb expects them to be separated by a comma, but ddd is constructing the command with no comma.

The fix is simple: in the method GDBAgent::disassemble_command in file GDBAgent.c, at line 3203, change

   cmd += ' ';

to

   cmd += ", ";

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #24776:  ddd.diff added by joerg_wunsch (2KiB - application/octet-stream - Attempted patch, see comment #2)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eickeler (Posted a comment)
  • -email is unavailable- added by joerg_wunsch (Updated the item)
  • -email is unavailable- added by pac72 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-01-25 eickeler StatusNone Fixed
        Assigned toNone eickeler
        Open/ClosedOpen Closed
    2012-01-09 joerg_wunsch Attached File- Added ddd.diff, #24776

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code