1 FYI: fix possible crash in find_charset_names
2 http://sourceware.org/ml/gdb-patches/2012-02/msg00073.html
3 http://sourceware.org/ml/gdb-cvs/2012-02/msg00037.html
4 https://bugzilla.redhat.com/show_bug.cgi?id=786091
6 ### src/gdb/ChangeLog 2012/02/07 04:48:14 1.13810
7 ### src/gdb/ChangeLog 2012/02/07 15:42:33 1.13811
9 +2012-02-07 Tom Tromey <tromey@redhat.com>
11 + * charset.c (find_charset_names): Check 'in' against NULL.
13 2012-02-06 Doug Evans <dje@google.com>
15 * gdbtypes.h (struct main_type): Change type of name,tag_name,
16 --- src/gdb/charset.c 2012/01/24 21:36:37 1.47
17 +++ src/gdb/charset.c 2012/02/07 15:42:39 1.48
19 parse the glibc and libiconv formats; feel free to add others
23 + while (in != NULL && !feof (in))
25 /* The size of buf is chosen arbitrarily. */
30 http://sourceware.org/ml/gdb-patches/2012-02/msg00151.html
31 Subject: [patch] ppc-linux-nat.c: Fix gcc-4.7 aliasing warnings
35 ppc-linux-nat.c: In function 'fetch_register':
36 ppc-linux-nat.c:598:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
37 ppc-linux-nat.c: In function 'store_register':
38 ppc-linux-nat.c:1078:8: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
40 gcc-4.7.0-0.10.fc17.ppc64
42 Probably clear, I looked at making it using union instead of memcpy but that
45 No regressions on ppc64-fedorarawhide-linux-gnu only for gdb.base/*.exp.
55 2012-02-09 Jan Kratochvil <jan.kratochvil@redhat.com>
57 * ppc-linux-nat.c (fetch_register, store_register): Fix GCC aliasing
60 --- a/gdb/ppc-linux-nat.c
61 +++ b/gdb/ppc-linux-nat.c
62 @@ -593,9 +593,10 @@ fetch_register (struct regcache *regcache, int tid, int regno)
63 bytes_transferred < register_size (gdbarch, regno);
64 bytes_transferred += sizeof (long))
69 - *(long *) &buf[bytes_transferred]
70 - = ptrace (PTRACE_PEEKUSER, tid, (PTRACE_TYPE_ARG3) regaddr, 0);
71 + l = ptrace (PTRACE_PEEKUSER, tid, (PTRACE_TYPE_ARG3) regaddr, 0);
72 regaddr += sizeof (long);
75 @@ -604,6 +605,7 @@ fetch_register (struct regcache *regcache, int tid, int regno)
76 gdbarch_register_name (gdbarch, regno), regno);
77 perror_with_name (message);
79 + memcpy (&buf[bytes_transferred], &l, sizeof (l));
82 /* Now supply the register. Keep in mind that the regcache's idea
83 @@ -1073,9 +1075,11 @@ store_register (const struct regcache *regcache, int tid, int regno)
85 for (i = 0; i < bytes_to_transfer; i += sizeof (long))
89 + memcpy (&l, &buf[i], sizeof (l));
91 - ptrace (PTRACE_POKEUSER, tid, (PTRACE_TYPE_ARG3) regaddr,
93 + ptrace (PTRACE_POKEUSER, tid, (PTRACE_TYPE_ARG3) regaddr, l);
94 regaddr += sizeof (long);
100 http://sourceware.org/ml/gdb-patches/2012-02/msg00409.html
101 Subject: FYI: remove extraneous block from dw2_map_symtabs_matching_filename
102 http://sourceware.org/ml/gdb-cvs/2012-02/msg00117.html
103 commit 61d8161b33b1e7dbc80ba6f7a92500a1594da55c
105 ### src/gdb/ChangeLog 2012/02/20 09:42:34 1.13845
106 ### src/gdb/ChangeLog 2012/02/20 19:24:34 1.13846
108 +2012-02-20 Tom Tromey <tromey@redhat.com>
110 + * dwarf2read.c (dw2_map_symtabs_matching_filename): Remove
113 2012-02-20 Tristan Gingold <gingold@adacore.com>
115 * darwin-nat.h (enum darwin_msg_state): Add comments.
116 --- src/gdb/dwarf2read.c 2012/02/07 04:48:19 1.612
117 +++ src/gdb/dwarf2read.c 2012/02/20 19:24:39 1.613
118 @@ -2437,13 +2437,6 @@
123 - if (dw2_map_expand_apply (objfile, per_cu,
124 - name, full_path, real_path,
129 /* Before we invoke realpath, which can get expensive when many
130 files are involved, do a quick comparison of the basenames. */
131 if (! basenames_may_differ
135 FYI: fix some performance bugs with .gdb_index
136 http://sourceware.org/ml/gdb-patches/2012-02/msg00413.html
137 http://sourceware.org/ml/gdb-cvs/2012-02/msg00119.html
139 ### src/gdb/ChangeLog 2012/02/20 19:44:00 1.13847
140 ### src/gdb/ChangeLog 2012/02/20 20:56:12 1.13848
142 +2012-02-20 Tom Tromey <tromey@redhat.com>
145 + * dwarf2read.c (dw2_expand_symtabs_matching): Only visit a
146 + particular set of file names once.
147 + (dw2_map_symbol_filenames): Likewise.
149 2012-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
152 --- src/gdb/dwarf2read.c 2012/02/20 19:24:39 1.613
153 +++ src/gdb/dwarf2read.c 2012/02/20 20:56:12 1.614
154 @@ -2700,32 +2700,63 @@
155 index = dwarf2_per_objfile->index_table;
157 if (file_matcher != NULL)
158 - for (i = 0; i < (dwarf2_per_objfile->n_comp_units
159 - + dwarf2_per_objfile->n_type_units); ++i)
162 - struct dwarf2_per_cu_data *per_cu = dw2_get_cu (i);
163 - struct quick_file_names *file_data;
165 + struct cleanup *cleanup;
166 + htab_t visited_found, visited_not_found;
168 - per_cu->v.quick->mark = 0;
169 + visited_found = htab_create_alloc (10,
170 + htab_hash_pointer, htab_eq_pointer,
171 + NULL, xcalloc, xfree);
172 + cleanup = make_cleanup_htab_delete (visited_found);
173 + visited_not_found = htab_create_alloc (10,
174 + htab_hash_pointer, htab_eq_pointer,
175 + NULL, xcalloc, xfree);
176 + make_cleanup_htab_delete (visited_not_found);
178 - /* We only need to look at symtabs not already expanded. */
179 - if (per_cu->v.quick->symtab)
181 + for (i = 0; i < (dwarf2_per_objfile->n_comp_units
182 + + dwarf2_per_objfile->n_type_units); ++i)
185 + struct dwarf2_per_cu_data *per_cu = dw2_get_cu (i);
186 + struct quick_file_names *file_data;
189 - file_data = dw2_get_file_names (objfile, per_cu);
190 - if (file_data == NULL)
192 + per_cu->v.quick->mark = 0;
194 - for (j = 0; j < file_data->num_file_names; ++j)
196 - if (file_matcher (file_data->file_names[j], data))
198 - per_cu->v.quick->mark = 1;
203 + /* We only need to look at symtabs not already expanded. */
204 + if (per_cu->v.quick->symtab)
207 + file_data = dw2_get_file_names (objfile, per_cu);
208 + if (file_data == NULL)
211 + if (htab_find (visited_not_found, file_data) != NULL)
213 + else if (htab_find (visited_found, file_data) != NULL)
215 + per_cu->v.quick->mark = 1;
219 + for (j = 0; j < file_data->num_file_names; ++j)
221 + if (file_matcher (file_data->file_names[j], data))
223 + per_cu->v.quick->mark = 1;
228 + slot = htab_find_slot (per_cu->v.quick->mark
230 + : visited_not_found,
231 + file_data, INSERT);
235 + do_cleanups (cleanup);
238 for (iter = 0; iter < index->symbol_table_slots; ++iter)
240 @@ -2787,15 +2818,35 @@
241 void *data, int need_fullname)
244 + struct cleanup *cleanup;
245 + htab_t visited = htab_create_alloc (10, htab_hash_pointer, htab_eq_pointer,
246 + NULL, xcalloc, xfree);
248 + cleanup = make_cleanup_htab_delete (visited);
251 + /* We can ignore file names coming from already-expanded CUs. */
252 + for (i = 0; i < (dwarf2_per_objfile->n_comp_units
253 + + dwarf2_per_objfile->n_type_units); ++i)
255 + struct dwarf2_per_cu_data *per_cu = dw2_get_cu (i);
257 + if (per_cu->v.quick->symtab)
259 + void **slot = htab_find_slot (visited, per_cu->v.quick->file_names,
262 + *slot = per_cu->v.quick->file_names;
266 for (i = 0; i < (dwarf2_per_objfile->n_comp_units
267 + dwarf2_per_objfile->n_type_units); ++i)
270 struct dwarf2_per_cu_data *per_cu = dw2_get_cu (i);
271 struct quick_file_names *file_data;
274 /* We only need to look at symtabs not already expanded. */
275 if (per_cu->v.quick->symtab)
276 @@ -2805,6 +2856,14 @@
277 if (file_data == NULL)
280 + slot = htab_find_slot (visited, file_data, INSERT);
283 + /* Already visited. */
288 for (j = 0; j < file_data->num_file_names; ++j)
290 const char *this_real_name;
291 @@ -2816,6 +2875,8 @@
292 (*fun) (file_data->file_names[j], this_real_name, data);
296 + do_cleanups (cleanup);