This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix up msymbol type of dll trampoline to mst_solib_trampoline
- From: asmwarrior <asmwarrior at gmail dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Yao Qi <yao at codesourcery dot com>, tromey at redhat dot com, gdb-patches at sourceware dot org
- Date: Sat, 06 Jul 2013 16:26:23 +0800
- Subject: Re: [PATCH] Fix up msymbol type of dll trampoline to mst_solib_trampoline
- References: <1372043502-4618-1-git-send-email-yao at codesourcery dot com> <874ncjmgkl dot fsf at fleche dot redhat dot com> <51CD0054 dot 9040401 at codesourcery dot com> <87ehbmkzqr dot fsf at fleche dot redhat dot com> <51D36FB3 dot 4070006 at codesourcery dot com> <51D688D3 dot 8000104 at gmail dot com> <51D6BA7A dot 7040500 at codesourcery dot com> <8361wpyta1 dot fsf at gnu dot org> <51D7C543 dot 7030905 at codesourcery dot com> <83sizsxhi3 dot fsf at gnu dot org>
On 2013-7-6 15:41, Eli Zaretskii wrote:
>> We can't set breakpoint on 'Add_S' in current GDB,
>> >
>> > (gdb) b Add_S
>> > Function "Add_S" not defined.
>> > Make breakpoint pending on future shared library load? (y or [n])
>> >
>> > IMO, It is expected that 'b Add_S' can set a breakpoint on Add_S.
> Then GDB should look for Add_S@n symbols, where n is the number of
> bytes in the function's arguments.
Currently, I think GDB did not have this function implemented.
But if I expilicity write the "b Add_S@8", then I can set the breakpoint correctly, see the log below:
---------------------------------------------------------------------
E:\code\cb\test_code\learndll>gdb main.exe
GNU gdb (GDB) 7.6.50.20130705-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from E:\code\cb\test_code\learndll\main.exe...done.
(gdb) b main.c:18
Breakpoint 1 at 0x4016f6: file main.c, line 18.
(gdb) r
Starting program: E:\code\cb\test_code\learndll\main.exe
[New Thread 4176.0x1048]
Breakpoint 1, main (argc=1, argv=0x3e3f80) at main.c:18
18 int a = Add_C(1, 2);
(gdb) b Add_S
Function "Add_S" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) b Add_S@8
Breakpoint 2 at 0x70f41710: file add.c, line 10.
(gdb) c
Continuing.
3
Breakpoint 2, Add_S@8 (a=3, b=4) at add.c:10
10 return (a + b);
(gdb)
----------------------------------------------------------------------
Yuanhui Zhang