This is the mail archive of the gdb-patches@sourceware.org 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: [rfc] Relax "printf" function name check in annota* test cases


Daniel Jacobowitz wrote:
> On Wed, May 14, 2008 at 11:36:22PM +0200, Ulrich Weigand wrote:
> > Hello,
> > 
> > this patch fixes the last regression after Alan's patch was applied:
> > some sub-tests of annota1.exp and annota3.exp are now failing because
> > when stopped at the "printf" breakpoint, the current function is not
> > called printf, but printf@plt.
> 
> This is unrelated to the annota tests, as you said... but the
> breakpoint is at "printf", isn't it?  Why are we stopping at
> printf@plt instead of the definition when we know glibc is loaded?
> 
> Maybe this comes back to the two names trouble?

No, this is the symbol versioning problem; we do not find any exported
symbol named "printf" in glibc, and so the breakpoint remains on the
plt stub.

Note that before Alan's patch the breakpoint *also* remained on the
plt stub, it's just that the stub was then called "printf" (the solib
trampoline generated from the undefined symbol), not "printf@plt"
(from the synthetic symbol).

B.t.w. even if we were to handle versioned symbols (I have a patch
for that), the original annota test cases would still break -- 
because the function would then be called printf@GLIBC...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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