/* GNU/Linux native-dependent code for debugging multiple forks.
- Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GDB.
struct fork_info *next;
ptid_t ptid;
ptid_t parent_ptid;
- int num; /* Convenient handle (GDB fork id) */
+ int num; /* Convenient handle (GDB fork id). */
struct regcache *savedregs; /* Convenient for info fork, saves
having to actually switch contexts. */
int clobber_regs; /* True if we should restore saved regs. */
if (oldfp)
{
- /* Switch back to inferior_ptid. */
+ /* Switch back to inferior_ptid. */
remove_breakpoints ();
fork_load_infrun_state (oldfp);
insert_breakpoints ();
oldfp = find_fork_ptid (inferior_ptid);
gdb_assert (oldfp != NULL);
newfp = find_fork_ptid (pptid);
- gdb_assert (oldfp != NULL);
+ gdb_assert (newfp != NULL);
fork_save_infrun_state (oldfp, 1);
remove_breakpoints ();
fork_load_infrun_state (newfp);
sal = find_pc_line (pc, 0);
if (sal.symtab)
- {
- char *tmp = strrchr (sal.symtab->filename, '/');
-
- if (tmp)
- printf_filtered (_(", file %s"), tmp + 1);
- else
- printf_filtered (_(", file %s"), sal.symtab->filename);
- }
+ printf_filtered (_(", file %s"), lbasename (sal.symtab->filename));
if (sal.line)
printf_filtered (_(", line %d"), sal.line);
if (!sal.symtab && !sal.line)