This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Fix for mishandling of "break 'pthread_create@GLIBC_2.2.5'"
- From: Daniel Jacobowitz <drow at false dot org>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: gdb-patches at sourceware dot org, Doug Evans <dje at google dot com>, Michael Snyder <msnyder at specifix dot com>
- Date: Thu, 5 Jun 2008 15:13:40 -0400
- Subject: Re: [RFC] Fix for mishandling of "break 'pthread_create@GLIBC_2.2.5'"
- References: <8ac60eac0805131135h5e9dd46ev8b7f39e660bf0bb7@mail.gmail.com> <20080513184447.GA12349@caradoc.them.org> <8ac60eac0805131351s241d33a8pd7d9839c51e53a8d@mail.gmail.com> <20080513205941.GA21147@caradoc.them.org> <8ac60eac0805131411q443b8f3awa464e090a5a44aaf@mail.gmail.com> <8ac60eac0805131805m6216660ej7b8e859ce46cb084@mail.gmail.com>
On Tue, May 13, 2008 at 06:05:05PM -0700, Paul Pluzhnikov wrote:
> So the expression evaluation and the breakpoint evaluation go
> completely separate routes:
Ah, right. I tried nested functions in GCC, which have the same
problem.
(gdb) b 'bar.18<tab>
bar.1873 bar.1888
(gdb) b 'bar.1888'
Can't find member of namespace, class, struct, or union named "bar.1888"
> set_flags (*argptr, &is_quoted, &paren_pointer);
>
> - /* Check to see if it's a multipart linespec (with colons or
> - periods). */
> + if ((*argptr)[0] == '\'')
I believe this is the same as is_quoted. If I'm right, that implies
that this breaks:
(gdb) break 'foo.c':13
We need to call locate_first_half to separate the filename from the
line number. There's also the 'foo.c'::staticvar form to worry about.
I think locate_first_half is going to have to know whether is_quoted,
and if so, only look for the matching quote.
--
Daniel Jacobowitz
CodeSourcery