public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Macro info NOT accessible with GDB-trunk
@ 2021-05-17 16:35 Tomar, Sourabh Singh
  2021-05-17 16:51 ` Keith Seitz
  0 siblings, 1 reply; 8+ messages in thread
From: Tomar, Sourabh Singh @ 2021-05-17 16:35 UTC (permalink / raw)
  To: gdb
  Cc: George, Jini Susan, Sharma, Alok Kumar, Kumar N, Bhuvanendra,
	Achra, Nitika

[AMD Public Use]

Hello Everyone,

With nearly-trunk based GDB, GDB is not able to show macro info for binaries compiled with
GCC & CLANG.

**NOTE**: It happens only for relative paths:
$tot-gcc -gdwarf-4 -g3 ./macro.c  // GDB able to show the 
OR
$clang -g -fdebug-macro ./macro.c  // -g defaults to Dwarfv4 in clang
GDB showing macro info **correctly**.

Details:
```
>llvm-dev>>>sourabh@llvm:~/work/dwarf/c_c++$ gdb --version
GNU gdb (GDB) 11.0.50.20210512-git
Using CLANG
>llvm-dev>>>sourabh@llvm:~/work/dwarf/c_c++$ clang --version
clang version 13.0.0 (https://github.com/llvm/llvm-project.git 5064a34165ccadf4718b2c159eff41f008261681)
>llvm-dev>>>sourabh@llvm:~/work/dwarf/c_c++$ clang -g -fdebug-macro macro.c
>llvm-dev>>>sourabh@llvm:~/work/dwarf/c_c++$ gdb a.out -q
Reading symbols from a.out...
(gdb) start
Temporary breakpoint 1 at 0x201664: file macro.c, line 2.
Starting program: /home/sourabh/work/dwarf/c_c++/a.out

Temporary breakpoint 1, main () at macro.c:2
2       int main() {}
(gdb) info macros
(gdb) q

Using GCC:
>llvm-dev>>>sourabh@llvm:~/work/dwarf/c_c++$ tot-gcc --version
gcc (GCC) 12.0.0 20210514 (experimental)
>llvm-dev>>>sourabh@llvm:~/work/dwarf/c_c++$ tot-gcc -gdwarf-4 -g3 macro.c
>llvm-dev>>>sourabh@llvm:~/work/dwarf/c_c++$ gdb a.out -q
Reading symbols from a.out...
(gdb) start
Temporary breakpoint 1 at 0x40048f: file macro.c, line 2.
Starting program: /home/sourabh/work/dwarf/c_c++/a.out

Temporary breakpoint 1, main () at macro.c:2
2       int main() {}
(gdb) info macros
(gdb) q
```
Can somebody please validate this ?

I wanted to know if anyone aware any macro related commit happened within last 10-20 days' time frame.
I'm investigating this, Any pointers greatly appreciated.

Thanks!
Sourabh.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Macro info NOT accessible with GDB-trunk
  2021-05-17 16:35 Macro info NOT accessible with GDB-trunk Tomar, Sourabh Singh
@ 2021-05-17 16:51 ` Keith Seitz
  2021-05-17 17:04   ` Tomar, Sourabh Singh
  2021-09-16  4:18   ` Achra, Nitika
  0 siblings, 2 replies; 8+ messages in thread
From: Keith Seitz @ 2021-05-17 16:51 UTC (permalink / raw)
  To: Tomar, Sourabh Singh, gdb
  Cc: George, Jini Susan, Achra, Nitika, Sharma, Alok Kumar, Kumar N,
	Bhuvanendra

On 5/17/21 9:35 AM, Tomar, Sourabh Singh via Gdb wrote:

> Can somebody please validate this ?
> 

Yes, I can verify this, and I've posted a tentative patch to fix this
in your gdb-patches thread titled "Fix macro info lookup for binaries
containing DWARFv5 line table."

It's here:

https://sourceware.org/pipermail/gdb-patches/2021-May/178871.html

This is also reported as gdb/27306.

Keith



​


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Macro info NOT accessible with GDB-trunk
  2021-05-17 16:51 ` Keith Seitz
@ 2021-05-17 17:04   ` Tomar, Sourabh Singh
  2021-05-17 17:17     ` Tomar, Sourabh Singh
  2021-05-17 17:22     ` Keith Seitz
  2021-09-16  4:18   ` Achra, Nitika
  1 sibling, 2 replies; 8+ messages in thread
From: Tomar, Sourabh Singh @ 2021-05-17 17:04 UTC (permalink / raw)
  To: Keith Seitz, gdb
  Cc: George, Jini Susan, Achra, Nitika, Sharma, Alok Kumar, Kumar N,
	Bhuvanendra

[AMD Public Use]

Thanks For the quick response keith!

Do you have any pointers to the base commit/change that might've caused this ?
IIRC, it was working fine couple og weeks back (That was the foundation of my initial patch that 
things were working fine with GCC and not with CLANG). Now as it seems GCC generated binaries are also 
not showing macro info at all ☹

Thanks!
Sourabh.

-----Original Message-----
From: Keith Seitz <keiths@redhat.com> 
Sent: Monday, May 17, 2021 10:21 PM
To: Tomar, Sourabh Singh <SourabhSingh.Tomar@amd.com>; gdb@sourceware.org
Cc: George, Jini Susan <JiniSusan.George@amd.com>; Achra, Nitika <Nitika.Achra@amd.com>; Sharma, Alok Kumar <AlokKumar.Sharma@amd.com>; Kumar N, Bhuvanendra <Bhuvanendra.KumarN@amd.com>
Subject: Re: Macro info NOT accessible with GDB-trunk

[CAUTION: External Email]

On 5/17/21 9:35 AM, Tomar, Sourabh Singh via Gdb wrote:

> Can somebody please validate this ?
>

Yes, I can verify this, and I've posted a tentative patch to fix this in your gdb-patches thread titled "Fix macro info lookup for binaries containing DWARFv5 line table."

It's here:

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fpipermail%2Fgdb-patches%2F2021-May%2F178871.html&amp;data=04%7C01%7Csourabhsingh.tomar%40amd.com%7C505927ec7b8b45e9579e08d91953f963%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637568670724930270%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=9ZB%2BPsvD9GZrlMZZpLE5Ild8mJVpjJzWxGq%2FcrSWOkY%3D&amp;reserved=0

This is also reported as gdb/27306.

Keith



​

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Macro info NOT accessible with GDB-trunk
  2021-05-17 17:04   ` Tomar, Sourabh Singh
@ 2021-05-17 17:17     ` Tomar, Sourabh Singh
  2021-05-17 17:22     ` Keith Seitz
  1 sibling, 0 replies; 8+ messages in thread
From: Tomar, Sourabh Singh @ 2021-05-17 17:17 UTC (permalink / raw)
  To: Keith Seitz, gdb
  Cc: George, Jini Susan, Achra, Nitika, Sharma, Alok Kumar, Kumar N,
	Bhuvanendra

[AMD Public Use]

>It's here:
>https://sourceware.org/pipermail/gdb-patches/2021-May/178871.html
?This is also reported as gdb/27306

Thanks for the patch, this seems to solve the all the problems associated/mentioned with previous thread.
Ran some macro associated test, all seemed good to me.

Thanks,
Sourabh.

-----Original Message-----
From: Tomar, Sourabh Singh 
Sent: Monday, May 17, 2021 10:35 PM
To: Keith Seitz <keiths@redhat.com>; gdb@sourceware.org
Cc: George, Jini Susan <JiniSusan.George@amd.com>; Achra, Nitika <Nitika.Achra@amd.com>; Sharma, Alok Kumar <AlokKumar.Sharma@amd.com>; Kumar N, Bhuvanendra <Bhuvanendra.KumarN@amd.com>
Subject: RE: Macro info NOT accessible with GDB-trunk

[AMD Public Use]

Thanks For the quick response keith!

Do you have any pointers to the base commit/change that might've caused this ?
IIRC, it was working fine couple og weeks back (That was the foundation of my initial patch that things were working fine with GCC and not with CLANG). Now as it seems GCC generated binaries are also not showing macro info at all ☹

Thanks!
Sourabh.

-----Original Message-----
From: Keith Seitz <keiths@redhat.com>
Sent: Monday, May 17, 2021 10:21 PM
To: Tomar, Sourabh Singh <SourabhSingh.Tomar@amd.com>; gdb@sourceware.org
Cc: George, Jini Susan <JiniSusan.George@amd.com>; Achra, Nitika <Nitika.Achra@amd.com>; Sharma, Alok Kumar <AlokKumar.Sharma@amd.com>; Kumar N, Bhuvanendra <Bhuvanendra.KumarN@amd.com>
Subject: Re: Macro info NOT accessible with GDB-trunk

[CAUTION: External Email]

On 5/17/21 9:35 AM, Tomar, Sourabh Singh via Gdb wrote:

> Can somebody please validate this ?
>

Yes, I can verify this, and I've posted a tentative patch to fix this in your gdb-patches thread titled "Fix macro info lookup for binaries containing DWARFv5 line table."

It's here:

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fpipermail%2Fgdb-patches%2F2021-May%2F178871.html&amp;data=04%7C01%7Csourabhsingh.tomar%40amd.com%7C505927ec7b8b45e9579e08d91953f963%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637568670724930270%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=9ZB%2BPsvD9GZrlMZZpLE5Ild8mJVpjJzWxGq%2FcrSWOkY%3D&amp;reserved=0

This is also reported as gdb/27306.

Keith



​

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Macro info NOT accessible with GDB-trunk
  2021-05-17 17:04   ` Tomar, Sourabh Singh
  2021-05-17 17:17     ` Tomar, Sourabh Singh
@ 2021-05-17 17:22     ` Keith Seitz
  1 sibling, 0 replies; 8+ messages in thread
From: Keith Seitz @ 2021-05-17 17:22 UTC (permalink / raw)
  To: Tomar, Sourabh Singh, gdb

On 5/17/21 10:04 AM, Tomar, Sourabh Singh wrote:
> [AMD Public Use]
> 
> Thanks For the quick response keith!
> 
> Do you have any pointers to the base commit/change that might've caused this ?

Sorry, I do not, but gdb/27306 was originally filed in February against 10.1.
So if it's a recent change, "recent" would necessarily mean at least 9+ months
ago when 10.1 was branched.

My feeling is that this is more a result of a gcc change than something in
gdb, but don't quote me on that. :-)
 
Keith


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Macro info NOT accessible with GDB-trunk
  2021-05-17 16:51 ` Keith Seitz
  2021-05-17 17:04   ` Tomar, Sourabh Singh
@ 2021-09-16  4:18   ` Achra, Nitika
  2021-10-04  3:46     ` Achra, Nitika
  1 sibling, 1 reply; 8+ messages in thread
From: Achra, Nitika @ 2021-09-16  4:18 UTC (permalink / raw)
  To: Keith Seitz, gdb
  Cc: George, Jini Susan, Sharma, Alok Kumar, Kumar N, Bhuvanendra

[AMD Official Use Only]

Hi Keith,

Is there any update on this issue? Please let me know.

Regards,
Nitika

-----Original Message-----
From: Keith Seitz <keiths@redhat.com> 
Sent: Monday, May 17, 2021 10:21 PM
To: Tomar, Sourabh Singh <SourabhSingh.Tomar@amd.com>; gdb@sourceware.org
Cc: George, Jini Susan <JiniSusan.George@amd.com>; Achra, Nitika <Nitika.Achra@amd.com>; Sharma, Alok Kumar <AlokKumar.Sharma@amd.com>; Kumar N, Bhuvanendra <Bhuvanendra.KumarN@amd.com>
Subject: Re: Macro info NOT accessible with GDB-trunk

[CAUTION: External Email]

On 5/17/21 9:35 AM, Tomar, Sourabh Singh via Gdb wrote:

> Can somebody please validate this ?
>

Yes, I can verify this, and I've posted a tentative patch to fix this in your gdb-patches thread titled "Fix macro info lookup for binaries containing DWARFv5 line table."

It's here:

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fpipermail%2Fgdb-patches%2F2021-May%2F178871.html&amp;data=04%7C01%7Cnitika.achra%40amd.com%7C605a17140f6242f4063b08d91953fa0b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637568671445777624%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=S4jgAPA75szjaYQ8tkCOaHyRoFJjjUEmXzZyiyWMzWM%3D&amp;reserved=0

This is also reported as gdb/27306.

Keith



​

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Macro info NOT accessible with GDB-trunk
  2021-09-16  4:18   ` Achra, Nitika
@ 2021-10-04  3:46     ` Achra, Nitika
  2021-10-06 16:11       ` Keith Seitz
  0 siblings, 1 reply; 8+ messages in thread
From: Achra, Nitika @ 2021-10-04  3:46 UTC (permalink / raw)
  To: Keith Seitz, gdb
  Cc: George, Jini Susan, Sharma, Alok Kumar, Kumar N, Bhuvanendra

[AMD Official Use Only]

Hi Keith,

Just a gentle reminder.

Regards,
Nitika

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Achra, Nitika
Sent: Thursday, September 16, 2021 9:48:15 AM
To: Keith Seitz <keiths@redhat.com>; gdb@sourceware.org <gdb@sourceware.org>
Cc: George, Jini Susan <JiniSusan.George@amd.com>; Sharma, Alok Kumar <AlokKumar.Sharma@amd.com>; Kumar N, Bhuvanendra <Bhuvanendra.KumarN@amd.com>
Subject: RE: Macro info NOT accessible with GDB-trunk

[AMD Official Use Only]

Hi Keith,

Is there any update on this issue? Please let me know.

Regards,
Nitika

-----Original Message-----
From: Keith Seitz <keiths@redhat.com>
Sent: Monday, May 17, 2021 10:21 PM
To: Tomar, Sourabh Singh <SourabhSingh.Tomar@amd.com>; gdb@sourceware.org
Cc: George, Jini Susan <JiniSusan.George@amd.com>; Achra, Nitika <Nitika.Achra@amd.com>; Sharma, Alok Kumar <AlokKumar.Sharma@amd.com>; Kumar N, Bhuvanendra <Bhuvanendra.KumarN@amd.com>
Subject: Re: Macro info NOT accessible with GDB-trunk

[CAUTION: External Email]

On 5/17/21 9:35 AM, Tomar, Sourabh Singh via Gdb wrote:

> Can somebody please validate this ?
>

Yes, I can verify this, and I've posted a tentative patch to fix this in your gdb-patches thread titled "Fix macro info lookup for binaries containing DWARFv5 line table."

It's here:

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceware.org%2Fpipermail%2Fgdb-patches%2F2021-May%2F178871.html&amp;data=04%7C01%7Cnitika.achra%40amd.com%7C605a17140f6242f4063b08d91953fa0b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637568671445777624%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=S4jgAPA75szjaYQ8tkCOaHyRoFJjjUEmXzZyiyWMzWM%3D&amp;reserved=0

This is also reported as gdb/27306.

Keith



​

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Macro info NOT accessible with GDB-trunk
  2021-10-04  3:46     ` Achra, Nitika
@ 2021-10-06 16:11       ` Keith Seitz
  0 siblings, 0 replies; 8+ messages in thread
From: Keith Seitz @ 2021-10-06 16:11 UTC (permalink / raw)
  To: Achra, Nitika, gdb
  Cc: George, Jini Susan, Sharma, Alok Kumar, Kumar N, Bhuvanendra

On 10/3/21 20:46, Achra, Nitika wrote:
> [AMD Official Use Only]
> 
> 
> Hi Keith,
> 
> Just a gentle reminder.

Thank you for the ping! I will attempt to get back to this Very
Soon Now (TM).

Keith


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-06 16:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 16:35 Macro info NOT accessible with GDB-trunk Tomar, Sourabh Singh
2021-05-17 16:51 ` Keith Seitz
2021-05-17 17:04   ` Tomar, Sourabh Singh
2021-05-17 17:17     ` Tomar, Sourabh Singh
2021-05-17 17:22     ` Keith Seitz
2021-09-16  4:18   ` Achra, Nitika
2021-10-04  3:46     ` Achra, Nitika
2021-10-06 16:11       ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).