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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Confirmed
Privacy: PublicAssigned to: Peter Wainwright <pwainwright>
Open/Closed: OpenRelease: 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pwainwright (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 05 Feb 2009 08:03:05 AM UTCpwainwrightStatusNone=>Confirmed
      ReleaseNone=>3.3.12-rc2
    Sat 15 Nov 2008 07:58:27 PM UTCpwainwrightAssigned toNone=>pwainwright

    Back to the top


    Powered by Savane 3.1-cleanup1