summaryrefslogtreecommitdiff
path: root/gdb/solib-osf.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2009-03-05 23:37:19 +0000
committerJoel Brobecker <brobecker@gnat.com>2009-03-05 23:37:19 +0000
commit3e5fb2e1453d9b8d09983a5a3d1d3ff203e8352a (patch)
tree61bba210c3bf2ffbb075557377fce3ffecd01776 /gdb/solib-osf.c
parent6e9407b3a655b3339a97bfeb9f79e6bf8e9a90ae (diff)
downloadgdb-3e5fb2e1453d9b8d09983a5a3d1d3ff203e8352a.tar.gz
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c
index 9fd52f8393c..dec737b8caa 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++)