This is the mail archive of the
mailing list for the GDB project.
Re: Thread names in gdb7.7(using info threads command)
- From: Sreejith M M <sreejith dot mm at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 20 Aug 2014 11:38:06 +0530
- Subject: Re: Thread names in gdb7.7(using info threads command)
- Authentication-results: sourceware.org; auth=none
- References: <CAEDT3uRs2+mwV3_+2FNLchgNqQiLoip4x7_U4u6sRzSc=Seb0Q at mail dot gmail dot com> <CAEDT3uTC30arGwOJhqw-kL1T1sK=A5mzf-3hjnc6r6o6QfUuNg at mail dot gmail dot com> <53F37099 dot 9070307 at redhat dot com> <53F37252 dot 7070304 at redhat dot com>
Thanks Pedro for the reply.
To make things clearer, I get the thread names when I do live
debugging( Run the image from gdb and crash)
I am not getting the information only when I independently run the
image and take the core dump to be analyzed in gdb.
What my question is , whether coredump will have the required
information or not. Why I am asking this again is because I did not
understand how a gdb patch (as you have mentioned) can read the right
data from core dump. Could you please explain a bit more?
PS: I am newbie to gdb and dont understand the code quite well. If you
can give some pointers, I will try to implement the patch if it is
On Tue, Aug 19, 2014 at 9:20 PM, Pedro Alves <firstname.lastname@example.org> wrote:
> On 08/19/2014 04:43 PM, Pedro Alves wrote:
>> On 07/17/2014 06:07 PM, Sreejith M M wrote:
>>> I am trying to see thread names in gdb. Thread names are defined with
>>> prctl (PR_SET_NAME, "Mythread2", 0, 0, 0); //MyThread2 is my thread name
>>> the thread name after the application generates a core dump when I
>>> load core file using core-file command.
>>> I would like to understand how I can see the thread names when from
>>> the core file generated by the application
>> Unfortunately, I don't think this information is stored anywhere in the
>> core dump.
> Or maybe it is, in NT_PRPSINFO / prpsinfo->pr_fname ? In that case,
> all we'd need is a gdb patch to make use of it. See the
> target_thread_name target method. We'd need an implementation in
> Pedro Alves