This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix solib-precsave.exp,solib-reverse.exp
- From: Pedro Alves <palves at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 15 Apr 2013 18:33:04 +0100
- Subject: Re: [RFA] Fix solib-precsave.exp,solib-reverse.exp
- References: <yjt2li8ns5p6 dot fsf at ruffy2 dot mtv dot corp dot google dot com>
On 04/13/2013 12:13 AM, Doug Evans wrote:
> Hi.
>
> These two tests are failing for me.
> They make the assumption that debug info for libc isn't installed.
>
> To fix this I've created a library of wrappers for the affected libc
> functions and compiled it without debug info.
>
> Ok to check in?
This the certainly the right idea for fixing the problem, but it took me a
while to realize that the fact that the functions currently called are
printf and sleep, and that the new library has wrappers for those has no
importance. They really are just used as proxy for "functions in library
with no debug info". Not even the output of printf is used. I think that
calling the library a syscall wrapper makes it prone to causing such doubt
and confusion in other readers (of either the patch or the resulting code
in the tree), as it has caused me.
How about we just call it "shr1", and have it export some non-libc related
functions like e.g., "shr1_foo" and "shr1_bar"?
> int main ()
> @@ -27,16 +31,25 @@ int main ()
> char* cptr = "String 1";
> int b[2] = {5,8};
>
> + /* Call these functions once before we start testing so that they get
> + resolved by the dynamic loader. If the system has debug info for
> + the dynamic loader installed, reverse-stepping for the first call
> + will otherwise record being in the dynamic loader, which is not what
reverse-stepping doesn't record. Did you mean "report", or even
"reverse-stepping the first call will otherwise stop in the
dynamic loader", perhaps?
--
Pedro Alves