gdb/testsuite: attach to i386 process stopped in vDSO
commit93eb6c64ec4a6ea9f3c1722a894d72ef586d7523
authorAndrew Burgess <aburgess@redhat.com>
Fri, 15 Mar 2024 12:07:12 +0000 (15 12:07 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 18 Mar 2024 09:50:02 +0000 (18 09:50 +0000)
treee49032b6a550731fcbe81c26df84cc84001a33ac
parentfbedb145e49e949b06ed9e8b36c0d22e2e9d21cc
gdb/testsuite: attach to i386 process stopped in vDSO

Fedora GDB has carried around a patch for a while which tested
attaching to an i386 process which is stopped within the vDSO library
region.  Apparently, at some point in the distant past there was an
issue finding symbol information for this region in this situation.

I'm struggling to track down the precise details of what the original
bug was, however, acquiring symbol information for the vDSO region is
different than for "normal" shared libraries -- the vDSO information
is synthesised within GDB during the attach / inferior creation
process -- so it's not unreasonable to imagine that there could be a
bug specifically in this area of GDB which wouldn't impact "normal"
shared libraries.

I looked for references to vDSO in our testsuite and couldn't find
any tests that looked like they did the same sort of thing, so I'd
like to propose adding this test to our testsuite.

It's a pretty simple test, and doesn't take long to run, so the cost
of adding this is not huge.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.arch/i386-attach-see-vdso.c [new file with mode: 0644]
gdb/testsuite/gdb.arch/i386-attach-see-vdso.exp [new file with mode: 0644]