This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 3/4] Explicit locations


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]