const gdb_byte *,
ULONGEST, LONGEST);
-static int debug_linux_nat;
+static unsigned int debug_linux_nat;
static void
show_debug_linux_nat (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
pid_t child_pid = GET_PID (inferior_ptid);
ptid_t child_ptid = ptid_build (child_pid, child_pid, 0);
- gdb_assert (!is_lwp (inferior_ptid));
gdb_assert (find_lwp_pid (child_ptid) == NULL);
child_lp = add_lwp (child_ptid);
child_lp->stopped = 1;
/* This won't actually modify the breakpoint list, but will
physically remove the breakpoints from the child. */
- detach_breakpoints (new_pid);
+ detach_breakpoints (ptid_build (new_pid, new_pid, 0));
/* Retain child fork in ptrace (stopped) state. */
if (!find_fork_pid (new_pid))
ptid_t event_ptid;
if (debug_linux_nat)
- fprintf_unfiltered (gdb_stdlog,
- "linux_nat_wait: [%s]\n", target_pid_to_str (ptid));
+ {
+ char *options_string;
+
+ options_string = target_options_to_string (target_options);
+ fprintf_unfiltered (gdb_stdlog,
+ "linux_nat_wait: [%s], [%s]\n",
+ target_pid_to_str (ptid),
+ options_string);
+ xfree (options_string);
+ }
/* Flush the async file first. */
if (target_can_async_p ())
void
_initialize_linux_nat (void)
{
- add_setshow_zinteger_cmd ("lin-lwp", class_maintenance,
- &debug_linux_nat, _("\
+ add_setshow_zuinteger_cmd ("lin-lwp", class_maintenance,
+ &debug_linux_nat, _("\
Set debugging of GNU/Linux lwp module."), _("\
Show debugging of GNU/Linux lwp module."), _("\
Enables printf debugging output."),
- NULL,
- show_debug_linux_nat,
- &setdebuglist, &showdebuglist);
+ NULL,
+ show_debug_linux_nat,
+ &setdebuglist, &showdebuglist);
/* Save this mask as the default. */
sigprocmask (SIG_SETMASK, NULL, &normal_mask);