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


bug #30579: incorrect gdb 'disassemble' command

Submitted by:  None
Submitted on:  Wed 28 Jul 2010 05:11:05 PM UTC  
Category:  Gdb integration Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  3.3.12-rc2

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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

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

   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 += ' ';


   cmd += ", ";



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

Attach Files:

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 joerg_wunsch (Updated the item)
  • -email is unavailable- added by pac72 (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-01-09 joerg_wunsch Attached File- => Added ddd.diff, #24776

    Back to the top

    Powered by Savane 3.5