This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 3/4] Explicit locations
- 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: Wed, 21 Aug 2013 14:22:24 -0600
- Subject: Re: [RFA 3/4] Explicit locations
- References: <514B9EAF dot 80705 at redhat dot com> <51C35B2C dot 2070502 at redhat dot com>
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> This is a rebased version of this patch. Unlike previous patches, this
Keith> one has changed a little bit from the previous (unreviewed) version:
Keith> It now contains a (very primitive) explicit location completer.
Keith> +/* An enumeration of the various things a user might
Keith> + attempt to complete for a location. */
Keith> +
Keith> +enum explicit_location_match_type
Keith> + {
Brace placement.
Keith> + if (e.reason < 0 && !dont_throw)
Keith> + throw_exception (e);
Keith> + xfree (oarg);
This can leak oarg in the throwing case.
Keith> - if (oind >= argc)
Keith> + if (oind >= argc && !is_explicit)
Keith> error (_("-%s-insert: Missing <location>"),
Keith> dprintf ? "dprintf" : "break");
I think this can leak various xstdup'd strings, e.g.,
explicit.label_name.
Keith> +set fd [open "bps" "r"]
Please use standard_output_file.
Keith> +# Now read in the file, and verify the contents line-by-line.
Keith> +set fd [open "pending-bps" "r"]
Ditto.
Keith> +set fd [open "bps" "r"]
Ditto.
Keith> + gdb_load $objdir/$subdir/$exefile
standard_output_file
It's best not to refer to objdir if at all possible.
Tom