This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] PR mi/2086 -break-insert missing error diagnostic
Daniel Jacobowitz writes:
> On Wed, Oct 18, 2006 at 12:44:20PM +1300, Nick Roberts wrote:
> > The name deprecated_set_gdb_event_hooks suggests that they're earmarked for
> > removal. These hooks only seem to get get in one place so presumably they
> > could be set up once at initialisation and left with that value.
>
> They're also used by insight. This is one of the sucky things about
> having insight directly linked to GDB.
OK, how about just using the hack in mi_cmd_thread_select for
mi_cmd_break_insert for the moment.
--
Nick http://www.inet.net.nz/~nickrob
*** mi-cmd-break.c 24 Dec 2005 07:57:46 +1300 1.13
--- mi-cmd-break.c 19 Oct 2006 04:46:35 +1300
***************
*** 25,30 ****
--- 25,31 ----
#include "mi-out.h"
#include "breakpoint.h"
#include "gdb_string.h"
+ #include "exceptions.h"
#include "mi-getopt.h"
#include "gdb-events.h"
#include "gdb.h"
*************** mi_cmd_break_insert (char *command, char
*** 164,170 ****
}
deprecated_set_gdb_event_hooks (old_hooks);
! if (rc == GDB_RC_FAIL)
return MI_CMD_ERROR;
else
return MI_CMD_DONE;
--- 165,175 ----
}
deprecated_set_gdb_event_hooks (old_hooks);
! /* RC is enum gdb_rc if it is successful (>=0)
! enum return_reason if not (<0). */
! if ((int) rc < 0 && (enum return_reason) rc == RETURN_ERROR)
! return MI_CMD_ERROR;
! else if ((int) rc >= 0 && rc == GDB_RC_FAIL)
return MI_CMD_ERROR;
else
return MI_CMD_DONE;