Thread backtrace termination

Steven Johnson sjohnson@sakuraindustries.com
Wed Jul 13 10:35:00 GMT 2005


Jonathan Larmour wrote:

> Daniel Jacobowitz wrote:
>
>> On Mon, Jul 11, 2005 at 06:52:13PM +0100, Jonathan Larmour wrote:
>>
>>> Daniel Jacobowitz wrote:
>>
[snip]

>>> Alternatively, how about adding a new command that allows you to 
>>> define a set of entry point symbol names? People can then put an 
>>> appropriate list for themselves or their OS in ~/.gdbinit. Or it can 
>>> be pre-initialised by the OS support within GDB if there is one. 
>>> e.g. nm-linux.h. Here's what I'm thinking of:
>>>
>>> set entry-point-name-list main _start _entry
>>>
>>> Although handling mangled symbols and multiple languages might be 
>>> fun. I'm not an expert on such things.
>>
>>
>>
>> *shrug* maybe.
>
>
> Well, I'm prepared to create a patch to add such a command if people 
> here think something with that principle would be accepted.

Instead of a "set" command, which sets an entire list, an "add" and 
"delete" command that adds to the list and deletes from the list 
respectively would be (in my opinion) more useful, because GDB could 
default to the standard entries for a target, and then extra's could be 
added to/removed from the list.

set entry-point-list add [name]
set entry-point-list delete [name]

(for example)

Alternatively there could be 2 lists, one full of default which you 
usually dont change, and one with user added entries.

set entry-point-name-list-default [list]
set entry-point-name-list-user [list]

By default user would be empty, and would be only set by the user (in a 
script or otherwise).  So the user could be assured they werent messing 
with any defaults they didnt want to change.

or the like.

supporting wildcards might also be useful, such as:

set entry-point-list add thread_*

or

set entry-point-list delete *

so if a programmer had a convention of calling all their threads 
"thread_blah" they wouldnt have to explicitly name them all, back trace 
would terminate at any function with that naming convention. 

Just some suggestions, if you are going to do this.  My opinion is such 
a feature would be worthwhile.  If the information can not be easily 
provided (or at all) from debug symbols, it would seem highly desirable 
to have a manual method of inserting the information.

Steven



More information about the Gdb mailing list