X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdbserver%2Flinux-low.c;h=2cb592ae1da6d0f32ace50ffeae9b95780c759ed;hb=818dd999829879775f22b319e1fe2c8c3a7f77b9;hp=7048daf221e31aae2aac8de15847582a9165b698;hpb=2ee563b53258d390d7446e90a67f465d504ae44c;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 7048daf221..2cb592ae1d 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -149,6 +149,8 @@ linux_create_inferior (char *program, char **allargs) signal (SIGRTMIN + 1, SIG_DFL); + setpgid (0, 0); + execv (program, allargs); fprintf (stderr, "Cannot exec %s: %s.\n", program, @@ -160,7 +162,7 @@ linux_create_inferior (char *program, char **allargs) new_process = add_process (pid); add_thread (pid, new_process); - return 0; + return pid; } /* Attach to an inferior process. */ @@ -892,8 +894,6 @@ register_addr (int regnum) error ("Invalid register number %d.", regnum); addr = the_low_target.regmap[regnum]; - if (addr == -1) - addr = 0; return addr; } @@ -1228,34 +1228,6 @@ linux_look_up_symbols (void) #endif } -/* Return 1 if this process is not stopped. */ -static int -unstopped_p (struct inferior_list_entry *entry, void *dummy) -{ - struct process_info *process = (struct process_info *) entry; - - if (process->stopped) - return 0; - - return 1; -} - -static int -linux_signal_pid () -{ - struct inferior_list_entry *process; - - process = find_inferior (&all_processes, unstopped_p, NULL); - - if (process == NULL) - { - warning ("no unstopped process"); - return inferior_pid; - } - - return pid_of ((struct process_info *) process); -} - static struct target_ops linux_target_ops = { linux_create_inferior, @@ -1269,7 +1241,6 @@ static struct target_ops linux_target_ops = { linux_read_memory, linux_write_memory, linux_look_up_symbols, - linux_signal_pid, }; static void