Browse Source

gdb: update the comment on string_to_event_location

The comment on string_to_event_location is (I believe) out of date.
This commit fixes the two issues I see:

  1. This function can't return NULL any more.  The implementation
  calls string_to_explicit_location which can return NULL, but if this
  is the case we then call string_to_event_location_basic, which I
  don't believe can ever return NULL.

  2. I've removed the mention that the returned string is malloc'd,
  though this is true, now that we return a managed pointer, I believe
  the source of the memory allocation is irrelevant, and so, shouldn't
  be discussed in the header comment.

There should be no user visible changes after this commit.
gdb-12-branch
Andrew Burgess 4 years ago
parent
commit
b6e05abee3
  1. 9
      gdb/location.h

9
gdb/location.h

@ -205,12 +205,11 @@ extern event_location_up
copy_event_location (const struct event_location *src);
/* Attempt to convert the input string in *ARGP into an event_location.
ARGP is advanced past any processed input. Returns an event_location
(malloc'd) if an event location was successfully found in *ARGP,
NULL otherwise.
ARGP is advanced past any processed input. Always returns a non-nullptr
event_location unique pointer object.
This function may call error() if *ARGP looks like properly formed,
but invalid, input, e.g., if it is called with missing argument parameters
This function may call error() if *ARGP looks like properly formed, but
invalid, input, e.g., if it is called with missing argument parameters
or invalid options.
This function is intended to be used by CLI commands and will parse

Loading…
Cancel
Save