static void registers_info PARAMS ((char *, int));
+#if !defined (DO_REGISTERS_INFO)
static void do_registers_info PARAMS ((int, int));
+#endif
static void unset_environment_command PARAMS ((char *, int));
static void run_command PARAMS ((char *, int));
+#ifdef CALL_DUMMY_BREAKPOINT_OFFSET
+static void breakpoint_auto_delete_contents PARAMS ((PTR));
+#endif
+
#define ERROR_NO_INFERIOR \
if (!target_has_execution) error ("The program is not being run.");
dont_repeat ();
- if (inferior_pid)
+ if (inferior_pid != 0 && target_has_execution)
{
if (
!query ("The program being debugged has been started already.\n\
/* Call breakpoint_auto_delete on the current contents of the bpstat
pointed to by arg (which is really a bpstat *). */
-void
+
+#ifdef CALL_DUMMY_BREAKPOINT_OFFSET
+
+static void
breakpoint_auto_delete_contents (arg)
PTR arg;
{
breakpoint_auto_delete (*(bpstat *)arg);
}
+#endif /* CALL_DUMMY_BREAKPOINT_OFFSET */
+
/* Execute a "stack dummy", a piece of code stored in the stack
by the debugger to be executed in the inferior.
printf_filtered ("\t(raw 0x");
for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
- printf_filtered ("%02x", (unsigned char)raw_buffer[j]);
+ {
+ register int idx = TARGET_BYTE_ORDER == BIG_ENDIAN ? j
+ : REGISTER_RAW_SIZE (i) - 1 - j;
+ printf_filtered ("%02x", (unsigned char)raw_buffer[idx]);
+ }
printf_filtered (")");
}
/* Else if virtual format is too long for printf,
print in hex a byte at a time. */
- else if (REGISTER_VIRTUAL_SIZE (i) > sizeof (long))
+ else if (REGISTER_VIRTUAL_SIZE (i) > (int) sizeof (long))
{
register int j;
printf_filtered ("0x");
char *args;
int from_tty;
{
+#ifdef SOLIB_ADD
extern int auto_solib_add;
+#endif
dont_repeat (); /* Not for the faint of heart */
clear_proceed_status ();
stop_soon_quietly = 1;
-#ifndef MACH
- /* Mach 3 does not generate any traps when attaching to inferior,
- and to set up frames we can do this. */
-
+ /* No traps are generated when attaching to inferior under Mach 3
+ or GNU hurd. */
+#ifndef ATTACH_NO_WAIT
wait_for_inferior ();
#endif
#ifdef SOLIB_ADD
if (auto_solib_add)
- /* Add shared library symbols from the newly attached process, if any. */
- SOLIB_ADD ((char *)0, from_tty, (struct target_ops *)0);
+ {
+ /* Add shared library symbols from the newly attached process, if any. */
+ SOLIB_ADD ((char *)0, from_tty, (struct target_ops *)0);
+ re_enable_breakpoints_in_shlibs ();
+ }
#endif
normal_stop ();