1 http://sourceware.org/ml/gdb-patches/2010-08/msg00559.html
2 http://sourceware.org/ml/gdb-cvs/2010-08/msg00199.html
4 ### src/gdb/ChangeLog 2010/08/31 18:08:42 1.12129
5 ### src/gdb/ChangeLog 2010/08/31 18:11:48 1.12130
7 2010-08-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9 + Make linux_get_siginfo_type `type *' unique.
10 + * linux-tdep.c (linux_gdbarch_data_handle, struct linux_gdbarch_data)
11 + (init_linux_gdbarch_data, get_linux_gdbarch_data): New.
12 + (linux_get_siginfo_type): New variable linux_gdbarch_data. Initialize
13 + it. Use linux_gdbarch_data->siginfo_type as a persistent storage.
14 + (_initialize_linux_tdep): New.
16 +2010-08-31 Jan Kratochvil <jan.kratochvil@redhat.com>
19 * defs.h (find_memory_region_ftype): New typedef.
20 (exec_set_find_memory_regions): Use it.
21 Index: gdb-7.2/gdb/linux-tdep.c
22 ===================================================================
23 --- gdb-7.2.orig/gdb/linux-tdep.c 2010-09-25 15:30:50.000000000 +0200
24 +++ gdb-7.2/gdb/linux-tdep.c 2010-09-25 15:31:54.000000000 +0200
29 +static struct gdbarch_data *linux_gdbarch_data_handle;
31 +struct linux_gdbarch_data
33 + struct type *siginfo_type;
37 +init_linux_gdbarch_data (struct gdbarch *gdbarch)
39 + return GDBARCH_OBSTACK_ZALLOC (gdbarch, struct linux_gdbarch_data);
42 +static struct linux_gdbarch_data *
43 +get_linux_gdbarch_data (struct gdbarch *gdbarch)
45 + return gdbarch_data (gdbarch, linux_gdbarch_data_handle);
48 /* This function is suitable for architectures that don't
49 extend/override the standard siginfo structure. */
52 linux_get_siginfo_type (struct gdbarch *gdbarch)
54 + struct linux_gdbarch_data *linux_gdbarch_data;
55 struct type *int_type, *uint_type, *long_type, *void_ptr_type;
56 struct type *uid_type, *pid_type;
57 struct type *sigval_type, *clock_type;
58 struct type *siginfo_type, *sifields_type;
61 + linux_gdbarch_data = get_linux_gdbarch_data (gdbarch);
62 + if (linux_gdbarch_data->siginfo_type != NULL)
63 + return linux_gdbarch_data->siginfo_type;
65 int_type = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
67 uint_type = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch),
68 @@ -137,6 +161,8 @@ linux_get_siginfo_type (struct gdbarch *
69 "_sifields", sifields_type,
70 TYPE_LENGTH (long_type));
72 + linux_gdbarch_data->siginfo_type = siginfo_type;
77 @@ -154,3 +180,10 @@ linux_has_shared_address_space (void)
79 return target_is_uclinux;
83 +_initialize_linux_tdep (void)
85 + linux_gdbarch_data_handle =
86 + gdbarch_data_register_post_init (init_linux_gdbarch_data);