From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31878 invoked by alias); 13 May 2008 20:52:25 -0000 Received: (qmail 31870 invoked by uid 22791); 13 May 2008 20:52:25 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 13 May 2008 20:52:08 +0000 Received: from zps77.corp.google.com (zps77.corp.google.com [172.25.146.77]) by smtp-out.google.com with ESMTP id m4DKpwbq021868 for ; Tue, 13 May 2008 21:51:58 +0100 Received: from yw-out-1718.google.com (ywm5.prod.google.com [10.192.13.5]) by zps77.corp.google.com with ESMTP id m4DKptvD011926 for ; Tue, 13 May 2008 13:51:57 -0700 Received: by yw-out-1718.google.com with SMTP id 5so2411302ywm.74 for ; Tue, 13 May 2008 13:51:57 -0700 (PDT) Received: by 10.150.83.22 with SMTP id g22mr318313ybb.146.1210711917265; Tue, 13 May 2008 13:51:57 -0700 (PDT) Received: by 10.151.99.13 with HTTP; Tue, 13 May 2008 13:51:57 -0700 (PDT) Message-ID: <8ac60eac0805131351s241d33a8pd7d9839c51e53a8d@mail.gmail.com> Date: Tue, 13 May 2008 23:02:00 -0000 From: "Paul Pluzhnikov" To: "Paul Pluzhnikov" , gdb-patches@sourceware.org, "Doug Evans" , "Michael Snyder" Subject: Re: [RFC] Fix for mishandling of "break 'pthread_create@GLIBC_2.2.5'" In-Reply-To: <20080513184447.GA12349@caradoc.them.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6785_5168881.1210711917271" References: <8ac60eac0805131135h5e9dd46ev8b7f39e660bf0bb7@mail.gmail.com> <20080513184447.GA12349@caradoc.them.org> 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 X-SW-Source: 2008-05/txt/msg00413.txt.bz2 ------=_Part_6785_5168881.1210711917271 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 1948 On Tue, May 13, 2008 at 11:44 AM, Daniel Jacobowitz wrote: > On Tue, May 13, 2008 at 11:35:53AM -0700, Paul Pluzhnikov wrote: > > 2008-05-13 Paul Pluzhnikov > > > > * linespec.c (locate_first_half): Rename to... > > (locate_first_half_1): ... this. > > (locate_first_half): New fn. > > > > Patch missing? Sorry 'bout that. It's attached now. > Rather than making versions special, can we suppress looking for > fields inside quoted strings? GCC names static variables "foo.1" and > it's hard to get GDB to display that. Actually, that appears to already work: $ cat t.c #include void *fn(void *p) { static int zzyx = 24; return 0; } int main() { static int zzyx = 42; pthread_t tid; pthread_create(&tid, 0, fn, 0); pthread_join(tid, 0); return 0; } $ gcc -g -o t t.c -pthread $ gdb/gdb -q ./t (gdb) b main Breakpoint 1 at 0x8048412: file t.c, line 12. (gdb) r [Thread debugging using libthread_db enabled] Breakpoint 1, main () at t.c:12 12 pthread_create(&tid, 0, fn, 0); (gdb) inf var zzyx All variables matching regular expression "zzyx": Non-debugging symbols: 0x08049650 zzyx.1565 0x08049654 zzyx.1570 (gdb) p 'zzyx.1565' $1 = 24 (gdb) p 'zzyx.1570' $2 = 42 (gdb) q On Tue, May 13, 2008 at 1:23 PM, Michael Snyder wrote: > > FYI, there's a sort-of work-around... That only sort-of-works because there is a matching non-versioned symbol. In addition, it's quite annoying for TAB-completion to complete the symbol, but the result of completion to then not work. Yes, I could also set breakpoints by address, etc. But I'd like to make it easy for non-gdb-experts to be able to set breakpoints. Thanks, -- Paul Pluzhnikov 2008-05-13 Paul Pluzhnikov * linespec.c (locate_first_half): Rename to... (locate_first_half_1): ... this. (locate_first_half): New fn. ------=_Part_6785_5168881.1210711917271 Content-Type: text/plain; name=gdb-20080513-patch.txt Content-Transfer-Encoding: base64 X-Attachment-Id: f_fg6yiu950 Content-Disposition: attachment; filename=gdb-20080513-patch.txt Content-length: 1717 MjAwOC0wNS0xMyAgUGF1bCBQb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