diff options
author | Joel Brobecker <brobecker@gnat.com> | 2009-03-05 23:37:20 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2009-03-05 23:37:20 +0000 |
commit | b254c0b2b10bdc2862b9f3c83e34cb7eb3bf51b1 (patch) | |
tree | 9ee2b889d5488e2d8ef25454a38ec3a3c48836cb /gdb/solib-osf.c | |
parent | 32fc0df94ff6c3d88c6336e34a8e0b19045e5c83 (diff) | |
download | gdb-b254c0b2b10bdc2862b9f3c83e34cb7eb3bf51b1.zip gdb-b254c0b2b10bdc2862b9f3c83e34cb7eb3bf51b1.tar.gz gdb-b254c0b2b10bdc2862b9f3c83e34cb7eb3bf51b1.tar.bz2 |
Get rid of the global "base_target" and use "find_target_beneath"
to find the underlying target.
* dec-thread.c (base_target): Delete.
(enable_dec_thread): Remove assignement to base_target.
(dec_thread_detach, dec_thread_wait, dec_thread_wait)
(dec_thread_fetch_registers, dec_thread_store_registers)
(dec_thread_mourn_inferior, dec_thread_pid_to_str):
Update the function profile if necessary.
Use find_target_beneath to call the same method but from
the underlying target, removing the need for "base_target".
* dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
Fix a copy/paste error in a few debug traces...
* solib-osf.c (init_so): Use a simpler method for computing
the size of lm_info structure. This also gets rid of warning
emitted by the compiler.
Diffstat (limited to 'gdb/solib-osf.c')
-rw-r--r-- | gdb/solib-osf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c index 9fd52f8..dec737b 100644 --- a/gdb/solib-osf.c +++ b/gdb/solib-osf.c @@ -424,8 +424,8 @@ init_so (struct so_list *so, char *name, int isloader, int nsecs) memcpy (so->so_name, so->so_original_name, namelen + 1); /* Allocate section space. */ - so->lm_info = xmalloc ((unsigned) &(((struct lm_info *)0)->secs) + - nsecs * sizeof *so->lm_info); + so->lm_info = xmalloc (sizeof (struct lm_info) + + (nsecs - 1) * sizeof (struct lm_sec)); so->lm_info->isloader = isloader; so->lm_info->nsecs = nsecs; for (i = 0; i < nsecs; i++) |