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: [patch] not able to set pending breakpoint at qualified C++ function names


>>>>> "Karen" == Karen Osmond <karen.osmond@gmail.com> writes:

Hi.  I'm sorry nobody from GDB got back to you sooner.

Karen> I noticed that it's not possible to set a pending breakpoint of
Karen> the (C++) form "break X::Y::Z" (with breakpoint pending auto,
Karen> gdb doesn't ask, and with it on, no breakpoint is added).

Karen> Patch follows; I've only just met the gdb source so make of it
Karen> what you will :)

Karen>  * Removed cplusplus_error helper function, as these were the only uses. 
Karen> (Though, it was adding an extra hint to the error, which perhaps should 
Karen> still happen.  Erm, I must admit to not understanding the hint).

I'd prefer not to remove this hint since it does help people, in my
experience.  What it means is that you can sometimes find valid
completions by quoting the symbol.

I think this could be done by just changing cplusplus_error to end
with something like:

  message = ui_file_xstrdup (stream, &len);
  make_cleanup (xfree, message);
  throw_error (NOT_FOUND_ERROR, "%s", message);

The rest of it seems ok to me.

I assume you don't have a copyright assignment in place.  I think you
probably should; send me email off-list and I will get you started on
that.

A patch for gdb requires a ChangeLog entry.  The GNU Coding Standards
explain how to write one.

Finally, I found a couple of formatting nits.  GDB as a project is
particular about this.  The GNU standards also cover this pretty well.

Karen>   static struct symtabs_and_lines
Karen>   decode_compound (char **argptr, int funfirstline, char ***canonical,
Karen> ! 		 char *saved_arg, char *p, int* not_found_ptr)

Use "int *", not "int* ".

Karen> + 	if (not_found_ptr)
Karen> + 		*not_found_ptr = 1;

The indentation looks funny here; the second line should be 2 spaces
in from the 'if'.

Tom


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