projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix PR server/20414 - x32 gdbserver always crashes inferior
[deliverable/binutils-gdb.git]
/
gdb
/
progspace.c
diff --git
a/gdb/progspace.c
b/gdb/progspace.c
index ea2f8ec592098dc1dbb9d6323d64e890603e681c..59a784658cdc4e2e112ed074b8447b16e74267d7 100644
(file)
--- a/
gdb/progspace.c
+++ b/
gdb/progspace.c
@@
-1,6
+1,6
@@
/* Program and address space management, for GDB, the GNU debugger.
/* Program and address space management, for GDB, the GNU debugger.
- Copyright (C) 2009-201
5
Free Software Foundation, Inc.
+ Copyright (C) 2009-201
6
Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-133,8
+133,16
@@
add_program_space (struct address_space *aspace)
program_space_alloc_data (pspace);
program_space_alloc_data (pspace);
- pspace->next = program_spaces;
- program_spaces = pspace;
+ if (program_spaces == NULL)
+ program_spaces = pspace;
+ else
+ {
+ struct program_space *last;
+
+ for (last = program_spaces; last->next != NULL; last = last->next)
+ ;
+ last->next = pspace;
+ }
return pspace;
}
return pspace;
}
@@
-215,7
+223,7
@@
set_current_program_space (struct program_space *pspace)
static void
restore_program_space (void *arg)
{
static void
restore_program_space (void *arg)
{
- struct program_space *saved_pspace = arg;
+ struct program_space *saved_pspace =
(struct program_space *)
arg;
set_current_program_space (saved_pspace);
}
set_current_program_space (saved_pspace);
}
This page took
0.023572 seconds
and
4
git commands to generate.