This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Fix .text section offset for windows DLL (was Calling __stdcall functions in the inferior)
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 15 Oct 2012 19:23:13 +0200
- Subject: Re: [RFC] Fix .text section offset for windows DLL (was Calling __stdcall functions in the inferior)
- References: <83a9vs89r9.fsf@gnu.org> <201210120953.q9C9rqfu020865@glazunov.sibelius.xs4all.nl> <834nm07z0s.fsf@gnu.org> <5077FEB9.4030304@redhat.com> <83y5jb7rfe.fsf@gnu.org> <006001cdaada$00c81f00$02585d00$%muller@ics-cnrs.unistra.fr>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> Date: Mon, 15 Oct 2012 15:35:55 +0200
>
> After some investigation, I noticed that
> the minimal symbol GetLastError was offset by 0xf0000
> respective to the '_imp__GetLastError@0'.
>
> The patch attached allowed me to call
> (gdb) call GetLastError ()
> And get a simple
> $2 = 126
> (for instance, depending on when you do the call).
Thanks.
> Could someone please test the patch and
> confirm that it does fix the problem?
I will try that in a few days.
> + if (!section_found)
> + {
> + char * forward_name = (char *) (erva + func_rva);
> + char * funcname = (char *) (erva + name_rva);
> + if ((func_rva >= export_rva)
> + && (func_rva < export_rva + export_size))
> + printf ("%s is a forward to %s\n", funcname, forward_name);
Is this printf really necessary?