From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17691 invoked by alias); 6 Jul 2013 08:20:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 17646 invoked by uid 89); 6 Jul 2013 08:20:11 -0000 X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-pd0-f177.google.com (HELO mail-pd0-f177.google.com) (209.85.192.177) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 06 Jul 2013 08:20:06 +0000 Received: by mail-pd0-f177.google.com with SMTP id p10so2571597pdj.8 for ; Sat, 06 Jul 2013 01:20:05 -0700 (PDT) X-Received: by 10.68.12.130 with SMTP id y2mr12910842pbb.49.1373098805272; Sat, 06 Jul 2013 01:20:05 -0700 (PDT) Received: from [192.168.1.101] ([219.82.146.93]) by mx.google.com with ESMTPSA id nr8sm98328pbc.6.2013.07.06.01.20.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 06 Jul 2013 01:20:04 -0700 (PDT) Message-ID: <51D7D4AF.3000902@gmail.com> Date: Sat, 06 Jul 2013 08:20:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0a1 MIME-Version: 1.0 To: Eli Zaretskii CC: Yao Qi , tromey@redhat.com, gdb-patches@sourceware.org Subject: Re: [PATCH] Fix up msymbol type of dll trampoline to mst_solib_trampoline References: <1372043502-4618-1-git-send-email-yao@codesourcery.com> <874ncjmgkl.fsf@fleche.redhat.com> <51CD0054.9040401@codesourcery.com> <87ehbmkzqr.fsf@fleche.redhat.com> <51D36FB3.4070006@codesourcery.com> <51D688D3.8000104@gmail.com> <51D6BA7A.7040500@codesourcery.com> <8361wpyta1.fsf@gnu.org> <51D7C543.7030905@codesourcery.com> <83sizsxhi3.fsf@gnu.org> In-Reply-To: <83sizsxhi3.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00219.txt.bz2 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 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: ... 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