This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with exec-file when targetting remote machine


> > Can anyone give me an idea as to what gdb might be doing differently
when
> > exec-file has been set?
>
> This means shared library handling is messed up, I bet.  It only
> triggers based on exec_bfd.
>
> Probably the app is being relocated in memory by the shared library
> code, and ending up wrong.

I think I maybe misled you in the beginning with this.  I had been told that
it affected all targets but it seems that it affects sh4 but not x86.  I
don't know about our other platforms.

By brute force and stupidity I determined that in exec.c:exec_file_attach()
there is a call to set_gdbarch_from_file().  This is what causes the screw
up.  It looks like something is getting buggered up in there, possibly
because the architecture is not getting recognized properly from the file
and the defaults aren't working.

Can anyone tell me the possible ramifications of commenting out this line?
I wouldn't normally contemplate this kind of fix but I have only a short
while to get this in a patch.  In my preliminary tests, everything seems to
work but I'm worried that there might be other consequences.

cheers,

Kris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]