question about why gdb needs executable's binary

Jirka Koutný <[email protected]> Wed, 13 Mar 2019 14:24:50 +0000
Newsgroups gmane.comp.gdb.devel,gmane.comp.gdb.general
Message-ID <CAH5nFm8dpqyFWuttO+aZOCBAAMjEeuEtv=xwhyFjjMpu8cTs3g@mail.gmail.com>
Hello,

If we assume debugging a core file generated by an excutable with stripped
symbols (that gdb is able to find and load correctly in my case),
I was wondering why does gdb still need the executable's binary as well? Is
there some additional information retrieved from the executable? It does
seem the stack trace does not get resolved if the executable file is not
specified, but if I understand it right, PT_NOTE contains address ranges
and shared libraries names as well, so the information to build the strack
trace is there already. So say if I only start gdb and then core-file
<corefilename>, why does 'where' return a list of question marks?
What is the missing bit of information there?

I'm not questioning correctness or anything, if it's like that from
historical reasons I'm cool with that, I'm just trying to understand the
thing.

Thank you,
Jirka