bugDDD - Bugs: bug #24312, gdb_question() fails if...

 
 

bug #24312: gdb_question() fails if gdb_command() awaits reply

Submitter:  Peter Wainwright <pwainwright>
Submitted:  Fri 19 Sep 2008 05:29:57 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  3.3.12
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 07 Jan 2023 01:39:45 PM UTC, comment #1: 

This bug seems to b fixed in the current version. The .ddd/history file contains "file /bin/ls" after opening /bin/ls.

Stefan Eickeler <eickeler>
Group administrator
Fri 19 Sep 2008 05:29:57 PM UTC, original submission:  

gdb_question() fails if gdb_command() has been issued and DDD is awaiting reply.

In this case, can_do_gdb_command() is false, and gdb_question() returns immediately with NO_GDB_ANSWER.

This seems to be a subtle bug which for the most part goes unnoticed.  One instance in which it is noticeable is this:

If you open an executable file with no symbols (e.g. file /bin/ls) as the first Open command, that file will not appear on the history list.

The explanation seems to be this: After the file has been loaded, the callback extra_completed() is run. Because the file has no symbols, find_some_source() is called. This issues "list main" and various other "list symbol" commands.

Subsequently (in the block starting "if (extra_data->refresh_recent_files)") a ProgramInfo object is created. The constructor for this class executes gdb_question("info files"), which returns NO_GDB_ANSWER because state is not ReadyWithPrompt. Therefore, add_to_recent() is not called.

It seems that gdb_command() is used to execute commands asynchronously, whereas gdb_question() operates synchronously. I believe that it is necessary to ensure all the asynchronous gdb_commands() are completed before proceeding with gdb_question().


Peter Wainwright <pwainwright>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 pwainwright (Submitted the item)
  •  

    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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-07 eickeler StatusConfirmed Fixed
        Assigned topwainwright None
        Open/ClosedOpen Closed
    2009-02-05 pwainwright StatusNone Confirmed
        ReleaseNone 3.3.12
    2008-11-15 pwainwright Assigned toNone pwainwright

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code