Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Follow up to stabs deprecation - AIX regressions
@ 2025-02-13 12:25 Guinevere Larsen
  2025-02-13 16:48 ` Kevin Buettner
  0 siblings, 1 reply; 7+ messages in thread
From: Guinevere Larsen @ 2025-02-13 12:25 UTC (permalink / raw)
  To: gdb-patches

Hi all,

I've been working on the removal of stabs ahead of schedule, and testing 
what I could test.

I noticed that the debug experience in AIX is severely affected by the 
removal of stabs. The most noticeable things I've seen is:

* DWARF reading can sometimes fail in AIX. Currently, reading dwarf for 
xcoff inferiors is called on it's own, with no warning if dwarf fails 
(which probably makes sense, considering the default format in aix is 
still stabs). I added a warning when failing to read dwarf and noticed 
it being triggered on inferiors compiled with -gdwarf
* DWARF reading is also outdated. the dwarf2_xcoff_names struct is 
missing 4 section names based on IBM docs[1], the one I remember is 
.dwarnge.
* Dealing with C++ classes has 2 obvious issues: when a pointer of an 
inherited class is downcast, GDB is unable to find members of the 
original type (that should be accessible), and GDB doesn't quite 
understand class methods as functions - step will skip method calls - 
plus a few more issues ado with understanding inheritance, as tested in 
gdb.cp/casts.exp
* Fortran tests can't runto_main. This seems to be a compiler issue, as 
the fortran_runto_main identifies the main function as MAIN__, but 
examining the generated dwarf there is no symbol for that.
* You just can't call inferior functions by hand. Most of the time, it 
gets a segfault with a corrupted stack. Considering that this used to 
work when reading stabs, it feels like the dwarf isn't properly 
explaining something about the frame that GDB uses to create dummy 
frames for the hand call, and it looks like it'd require a lot of system 
knowledge to fix

I haven't looked too in-depth into all failures, this is the large-scale 
patterns and my best attempt at explaining why things are failing how 
they are. Considering the state that AIX was in before I started testing 
it (less than 40k passes, and simply compiling with dwarf we can move up 
to 74.5k), and considering that the current maintainer of AIX is Kevin - 
who from our conversations remembers very little of how xcoff and aix 
work - I don't think this would warrant delaying removing stabs, but I 
think we should be aware of it so that if folks are using AIX, or 
interested in fixing it, they have until the release of GDB 18 to get 
the regressions under control.

[1] 
https://www.ibm.com/docs/en/aix/7.3?topic=formats-xcoff-object-file-format

-- 
Cheers,
Guinevere Larsen
She/Her/Hers


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

end of thread, other threads:[~2025-02-14 17:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-13 12:25 Follow up to stabs deprecation - AIX regressions Guinevere Larsen
2025-02-13 16:48 ` Kevin Buettner
2025-02-13 17:21   ` Guinevere Larsen
2025-02-13 17:43     ` Kevin Buettner
2025-02-13 17:58       ` Guinevere Larsen
2025-02-13 20:21         ` Simon Marchi
2025-02-14 17:53           ` Guinevere Larsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox