This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix c++/16597 (crash when inspecting lambda expression variables)
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Thu, 10 Apr 2014 10:58:15 -0600
- Subject: Re: [RFA] Fix c++/16597 (crash when inspecting lambda expression variables)
- Authentication-results: sourceware.org; auth=none
- References: <532C7A56 dot 8010201 at redhat dot com>
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> That was the easy part. The not-so-easy/questionable part is the test
Keith> case, which uses the (assembler) output of the compiler to run
Keith> against. Writing by hand is very time-consuming and tricky, because we
Keith> must be stopped inside the lambda function in order to trigger the
Keith> bug.
Keith> In any case, I thought I would submit this and see if anyone had any
Keith> better ideas.
I think it's fine to do this.
In the past we've done two additional things that make it slightly nicer.
First, we've checked in the original source file as a separate file, I
think along with a note in the .exp about it. This approach lets you
avoid this:
Keith> +# WARNING: This is hard-coded from the original source file! This
Keith> +# breakpoint should be set inside the lambda in A::doit().
... since you can refer to comments in the original source file IIRC.
Second, I think we've edited the compilation directory in the .S file,
and maybe other little details as well (I had to edit the files to avoid
'main' for some reason I cannot remember):
Keith> +.Linfo_string2:
Keith> + .asciz "/home/keiths/tmp/16597"
You can easily find some examples in gdb.dwarf2, just follow one of
those.
Tom