X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Flinux-fork.c;h=2233d4429ce0a0fd4effd912ed5d7aa1f7e60285;hb=d11a9fabab657e592df9167535bc46804937cf18;hp=c77fb6c73ac98dbef349e4af30d357bd451f2670;hpb=5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index c77fb6c73a..2233d4429c 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -110,8 +110,7 @@ find_last_fork (void) static bool one_fork_p () { - return (!fork_list.empty () - && &fork_list.front () == &fork_list.back ()); + return fork_list.size () == 1; } /* Add a new fork to the internal fork list. */ @@ -664,7 +663,7 @@ checkpoint_command (const char *args, int from_tty) if (!fork_fn) error (_("checkpoint: can't find fork function in inferior.")); - gdbarch = get_objfile_arch (fork_objf); + gdbarch = fork_objf->arch (); ret = value_from_longest (builtin_type (gdbarch)->builtin_int, 0); /* Tell linux-nat.c that we're checkpointing this inferior. */ @@ -751,8 +750,9 @@ restart_command (const char *args, int from_tty) linux_fork_context (fp, from_tty); } +void _initialize_linux_fork (); void -_initialize_linux_fork (void) +_initialize_linux_fork () { /* Checkpoint command: create a fork of the inferior process and set it aside for later debugging. */