From: asmwarrior <asmwarrior@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Yao Qi <yao@codesourcery.com>,
tromey@redhat.com, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix up msymbol type of dll trampoline to mst_solib_trampoline
Date: Sat, 06 Jul 2013 08:20:00 -0000 [thread overview]
Message-ID: <51D7D4AF.3000902@gmail.com> (raw)
In-Reply-To: <83sizsxhi3.fsf@gnu.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
next prev parent reply other threads:[~2013-07-06 8:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 4:24 Yao Qi
2013-06-27 20:43 ` Tom Tromey
2013-06-28 7:37 ` Yao Qi
2013-06-28 15:58 ` Tom Tromey
2013-07-03 0:26 ` Yao Qi
2013-07-05 8:44 ` asmwarrior
2013-07-05 12:22 ` Yao Qi
2013-07-05 14:30 ` Eli Zaretskii
2013-07-06 7:21 ` Yao Qi
2013-07-06 7:41 ` Eli Zaretskii
2013-07-06 8:20 ` asmwarrior [this message]
2013-07-10 6:21 ` Yao Qi
2013-07-10 16:56 ` Tom Tromey
2013-07-18 2:09 ` Yao Qi
2013-07-18 3:26 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51D7D4AF.3000902@gmail.com \
--to=asmwarrior@gmail.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox