* [PATCH]: Remove "xbreak" and "txbreak" to hppa target code.
@ 2002-01-31 18:08 Michael Snyder
2002-01-31 18:41 ` Andrew Cagney
2002-02-01 14:43 ` Michael Snyder
0 siblings, 2 replies; 3+ messages in thread
From: Michael Snyder @ 2002-01-31 18:08 UTC (permalink / raw)
To: gdb-patches; +Cc: gdb
These two commands were implemented in a completely non-portable
way, so that they might work on hppa architecture, but would not
be likely to work in general.
Removing them from core gdb and putting them in the hppa module.
Leaving the code in breakpoint.c (it certainly can't live
anywhere else), but it will not be called except from hppa-tdep.
2002-01-31 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (break_at_finish_command): Export.
(break_at_finish_at_depth_command): Export.
(tbreak_at_finish_command): Export.
(_initialize_breakpoint): Delete "xbreak" and "tbreak" commands.
* hppa-tdep.c (_initialize_hppa_tdep): Add "xbreak" and
"tbreak" commands, which are HPPA specific.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.59
diff -c -3 -p -r1.59 breakpoint.c
*** breakpoint.c 2002/02/01 01:08:05 1.59
--- breakpoint.c 2002/02/01 02:00:21
*************** break_command (char *arg, int from_tty)
*** 4961,4973 ****
break_command_1 (arg, 0, from_tty);
}
! static void
break_at_finish_command (char *arg, int from_tty)
{
break_at_finish_command_1 (arg, 0, from_tty);
}
! static void
break_at_finish_at_depth_command (char *arg, int from_tty)
{
break_at_finish_at_depth_command_1 (arg, 0, from_tty);
--- 4961,4973 ----
break_command_1 (arg, 0, from_tty);
}
! void
break_at_finish_command (char *arg, int from_tty)
{
break_at_finish_command_1 (arg, 0, from_tty);
}
! void
break_at_finish_at_depth_command (char *arg, int from_tty)
{
break_at_finish_at_depth_command_1 (arg, 0, from_tty);
*************** tbreak_command (char *arg, int from_tty)
*** 4979,4985 ****
break_command_1 (arg, BP_TEMPFLAG, from_tty);
}
! static void
tbreak_at_finish_command (char *arg, int from_tty)
{
break_at_finish_command_1 (arg, BP_TEMPFLAG, from_tty);
--- 4979,4985 ----
break_command_1 (arg, BP_TEMPFLAG, from_tty);
}
! void
tbreak_at_finish_command (char *arg, int from_tty)
{
break_at_finish_command_1 (arg, BP_TEMPFLAG, from_tty);
*************** so it will be deleted when hit. Equival
*** 7357,7367 ****
by using \"enable delete\" on the breakpoint number.");
c->completer = location_completer;
- c = add_com ("txbreak", class_breakpoint, tbreak_at_finish_command,
- "Set temporary breakpoint at procedure exit. Either there should\n\
- be no argument or the argument must be a depth.\n");
- c->completer = location_completer;
-
c = add_com ("hbreak", class_breakpoint, hbreak_command,
"Set a hardware assisted breakpoint. Args like \"break\" command.\n\
Like \"break\" except the breakpoint requires hardware support,\n\
--- 7357,7362 ----
*************** Do \"help breakpoints\" for info on othe
*** 7493,7522 ****
add_com_alias ("bre", "break", class_run, 1);
add_com_alias ("brea", "break", class_run, 1);
! add_com ("xbreak", class_breakpoint, break_at_finish_command,
! concat ("Set breakpoint at procedure exit. \n\
! Argument may be function name, or \"*\" and an address.\n\
! If function is specified, break at end of code for that function.\n\
! If an address is specified, break at the end of the function that contains \n\
! that exact address.\n",
! "With no arg, uses current execution address of selected stack frame.\n\
! This is useful for breaking on return to a stack frame.\n\
! \n\
! Multiple breakpoints at one place are permitted, and useful if conditional.\n\
! \n\
! Do \"help breakpoints\" for info on other commands dealing with breakpoints.", NULL));
! add_com_alias ("xb", "xbreak", class_breakpoint, 1);
! add_com_alias ("xbr", "xbreak", class_breakpoint, 1);
! add_com_alias ("xbre", "xbreak", class_breakpoint, 1);
! add_com_alias ("xbrea", "xbreak", class_breakpoint, 1);
!
! if (xdb_commands)
{
add_com_alias ("ba", "break", class_breakpoint, 1);
add_com_alias ("bu", "ubreak", class_breakpoint, 1);
- add_com ("bx", class_breakpoint, break_at_finish_at_depth_command,
- "Set breakpoint at procedure exit. Either there should\n\
- be no argument or the argument must be a depth.\n");
}
if (dbx_commands)
--- 7488,7497 ----
add_com_alias ("bre", "break", class_run, 1);
add_com_alias ("brea", "break", class_run, 1);
! if (xdb_commands)
{
add_com_alias ("ba", "break", class_breakpoint, 1);
add_com_alias ("bu", "ubreak", class_breakpoint, 1);
}
if (dbx_commands)
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.19
diff -c -3 -p -r1.19 hppa-tdep.c
*** hppa-tdep.c 2002/01/13 15:48:56 1.19
--- hppa-tdep.c 2002/02/01 02:00:21
*************** hppa_skip_permanent_breakpoint (void)
*** 4675,4685 ****
--- 4675,4717 ----
void
_initialize_hppa_tdep (void)
{
+ struct cmd_list_element *c;
+ void break_at_finish_command (char *arg, int from_tty);
+ void tbreak_at_finish_command (char *arg, int from_tty);
+ void break_at_finish_at_depth_command (char *arg, int from_tty);
+
tm_print_insn = print_insn_hppa;
add_cmd ("unwind", class_maintenance, unwind_command,
"Print unwind table entry at given address.",
&maintenanceprintlist);
+
+ add_com ("xbreak", class_breakpoint, break_at_finish_command,
+ concat ("Set breakpoint at procedure exit. \n\
+ Argument may be function name, or \"*\" and an address.\n\
+ If function is specified, break at end of code for that function.\n\
+ If an address is specified, break at the end of the function that contains \n\
+ that exact address.\n",
+ "With no arg, uses current execution address of selected stack frame.\n\
+ This is useful for breaking on return to a stack frame.\n\
+ \n\
+ Multiple breakpoints at one place are permitted, and useful if conditional.\n\
+ \n\
+ Do \"help breakpoints\" for info on other commands dealing with breakpoints.", NULL));
+ add_com_alias ("xb", "xbreak", class_breakpoint, 1);
+ add_com_alias ("xbr", "xbreak", class_breakpoint, 1);
+ add_com_alias ("xbre", "xbreak", class_breakpoint, 1);
+ add_com_alias ("xbrea", "xbreak", class_breakpoint, 1);
+
+ c = add_com ("txbreak", class_breakpoint, tbreak_at_finish_command,
+ "Set temporary breakpoint at procedure exit. Either there should\n\
+ be no argument or the argument must be a depth.\n");
+ c->completer = location_completer;
+
+ if (xdb_commands)
+ add_com ("bx", class_breakpoint, break_at_finish_at_depth_command,
+ "Set breakpoint at procedure exit. Either there should\n\
+ be no argument or the argument must be a depth.\n");
}
/* Copy the function value from VALBUF into the proper location
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]: Remove "xbreak" and "txbreak" to hppa target code.
2002-01-31 18:08 [PATCH]: Remove "xbreak" and "txbreak" to hppa target code Michael Snyder
@ 2002-01-31 18:41 ` Andrew Cagney
2002-02-01 14:43 ` Michael Snyder
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2002-01-31 18:41 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
> 2002-01-31 Michael Snyder <msnyder@redhat.com>
>
> * breakpoint.c (break_at_finish_command): Export.
> (break_at_finish_at_depth_command): Export.
> (tbreak_at_finish_command): Export.
> (_initialize_breakpoint): Delete "xbreak" and "tbreak" commands.
> * hppa-tdep.c (_initialize_hppa_tdep): Add "xbreak" and
> "tbreak" commands, which are HPPA specific.
>
Michael, can I suggest also deprecating it vis:
deprecate_cmd (c, NULL);
where C is the xbreak command handle returned by add_cmd(). I think
we're going to need to completely delete it so we should flag this now.
Consider a GDB with support for both PA an m68k - it would end up with
the xbreak command :-(
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]: Remove "xbreak" and "txbreak" to hppa target code.
2002-01-31 18:08 [PATCH]: Remove "xbreak" and "txbreak" to hppa target code Michael Snyder
2002-01-31 18:41 ` Andrew Cagney
@ 2002-02-01 14:43 ` Michael Snyder
1 sibling, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2002-02-01 14:43 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches, gdb
Michael Snyder wrote:
>
> These two commands were implemented in a completely non-portable
> way, so that they might work on hppa architecture, but would not
> be likely to work in general.
>
> Removing them from core gdb and putting them in the hppa module.
> Leaving the code in breakpoint.c (it certainly can't live
> anywhere else), but it will not be called except from hppa-tdep.
Sure. I'll send that separately.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-02-01 22:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-31 18:08 [PATCH]: Remove "xbreak" and "txbreak" to hppa target code Michael Snyder
2002-01-31 18:41 ` Andrew Cagney
2002-02-01 14:43 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox