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

 
 

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

Submitted by:  Peter Wainwright <pwainwright>
Submitted on:  Fri 19 Sep 2008 05:29:57 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  Peter Wainwright <pwainwright>
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.

 

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>In charge of this item.

 

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

    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.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-02-05 pwainwright StatusNone => Confirmed
        ReleaseNone => 3.3.12-rc2
    2008-11-15 pwainwright Assigned toNone => pwainwright

    Back to the top


    Powered by Savane 3.3