-Wwrite-strings: gdbserver's 'port' parsing
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-04-05 Pedro Alves <palves@redhat.com>
2
3 * remote-utils.c (remote_prepare, remote_open): Constify.
4 * remote-utils.h (remote_prepare, remote_open): Constify.
5 * server.c (captured_main): Constify 'port' handling.
6
7 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
8
9 * Makefile.in (clean): Clear .deps.
10
11 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * .gitignore: Remove generated files, replace with wildcard.
14 * (clean): Replace removal of generated files with wildcard.
15 (version.c): Replace with...
16 (version-generated.c): ...this.
17 (xml-builtin.c): Replace with...
18 (xml-builtin-generated.c): ...this.
19 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
20 (%.c: *regformats*): Replace with...
21 (%-generated.c: *regformats*): ...this.
22
23 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
24
25 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
26 (xtensa_fill_gregset): Call collect_register_by_name for
27 threadptr register.
28 (xtensa_store_gregset): Call supply_register_by_name for
29 threadptr register.
30
31 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
32
33 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
34 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
35 (xtensa_store_gregset): Call supply_register for all registers in
36 a0_regnum..a0_regnum + C0_NREGS range.
37
38 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
39
40 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
41 (ax-ipa.o: ax.c): Remove.
42 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
43 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
44 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
45 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
46 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
47
48 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
49
50 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
51 (print-utils-ipa.o: ../common/print-utils.c): Remove.
52 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
53 (errors-ipa.o: ../common/errors.c): Remove.
54 (format-ipa.o: ../common/format.c): Remove.
55 (common-utils-ipa.o: ../common/common-utils.c): Remove.
56
57 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
58
59 * Makefile.in (%-ipa.o: %.c): New rule.
60 (tracepoint-ipa.o: tracepoint.c): Remove.
61 (utils-ipa.o: utils.c): Remove.
62 (remote-utils-ipa.o: remote-utils.c): Remove.
63 (regcache-ipa.o: regcache.c): Remove.
64 (i386-linux-ipa.o: i386-linux.c): Remove.
65 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
66 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
67 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
68 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
69 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
70 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
71 (amd64-linux-ipa.o: amd64-linux.c): Remove.
72 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
73 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
74 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
75 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
76 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
77 (aarch64-ipa.o: aarch64.c): Remove.
78 (s390-linux32-ipa.o: s390-linux32.c): Remove.
79 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
80 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
81 (s390-linux64-ipa.o: s390-linux64.c): Remove.
82 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
83 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
84 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
85 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
86 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
87 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
88 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
89 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
90 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
91 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
92 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
93 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
94 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
95 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
96 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
97 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
98 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
99 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
100 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
101 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
102 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
103 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
104 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
105 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
106 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
107 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
108 (tdesc-ipa.o: tdesc.c): Remove.
109 (x32-linux-ipa.o: x32-linux.c): Remove.
110 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
111 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
112
113 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
114
115 * Makefile.in (%.o: ../arch/%.c): New rule.
116 (arm.o: ../arch/arm.c): Remove.
117 (arm-linux.o: ../arch/arm-linux.c): Remove.
118 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
119 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
120
121 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
122
123 * Makefile.in (%.o: ../nat/%.c): New rule.
124 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
125 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
126 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
127 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
128 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
129 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
130 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
131 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
132 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
133 (linux-personality.o: ../nat/linux-personality.c): Remove.
134 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
135 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
136 (x86-linux.o: ../nat/x86-linux.c): Remove.
137 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
138 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
139
140 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
141
142 * Makefile.in (%.o: ../common/%.c): New rule.
143 (signals.o: ../common/signals.c): Remove.
144 (print-utils.o: ../common/print-utils.c): Remove.
145 (rsp-low.o: ../common/rsp-low.c): Remove.
146 (common-utils.o: ../common/common-utils.c): Remove.
147 (posix-strerror.o: ../common/posix-strerror.c): Remove.
148 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
149 (vec.o: ../common/vec.c): Remove.
150 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
151 (xml-utils.o: ../common/xml-utils.c): Remove.
152 (ptid.o: ../common/ptid.c): Remove.
153 (buffer.o: ../common/buffer.c): Remove.
154 (format.o: ../common/format.c): Remove.
155 (filestuff.o: ../common/filestuff.c): Remove.
156 (agent.o: ../common/agent.c): Remove.
157 (errors.o: ../common/errors.c): Remove.
158 (environ.o: ../common/environ.c): Remove.
159 (common-debug.o: ../common/common-debug.c): Remove.
160 (cleanups.o: ../common/cleanups.c): Remove.
161 (common-exceptions.o: ../common/common-exceptions.c): Remove.
162 (fileio.o: ../common/fileio.c): Remove.
163 (common-regcache.o: ../common/common-regcache.c): Remove.
164 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
165 (new-op.o: ../common/new-op.c): Remove.
166 (btrace-common.o: ../common/btrace-common.c): Remove.
167
168 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
169
170 * Makefile.in (%.o: ../target/%.c): New rule.
171 (waitstatus.o: ../target/waitstatus.c): Remove.
172
173 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
174
175 * Makefile.in
176 (%.c: ../regformats/%.dat,
177 (%.c: ../regformats/arm/%.dat,
178 (%.c: ../regformats/i386/%.dat,
179 (%.c: ../regformats/rs6000/%.dat): New rules.
180 (aarch64.c): Remove.
181 (reg-arm.c): Remove.
182 (arm-with-iwmmxt.c): Remove.
183 (arm-with-vfpv2.c): Remove.
184 (arm-with-vfpv3.c): Remove.
185 (arm-with-neon.c): Remove.
186 (reg-bfin.c): Remove.
187 (reg-cris.c): Remove.
188 (reg-crisv32.c): Remove.
189 (i386.c): Remove.
190 (i386-linux.c): Remove.
191 (i386-avx.c): Remove.
192 (i386-avx-linux.c): Remove.
193 (i386-avx-avx512.c): Remove.
194 (i386-avx-avx512-linux.c): Remove.
195 (i386-mpx.c): Remove.
196 (i386-mpx-linux.c): Remove.
197 (i386-avx-mpx-avx512-pku.c): Remove.
198 (i386-avx-mpx-avx512-pku-linux.c): Remove.
199 (i386-avx-mpx.c): Remove.
200 (i386-avx-mpx-linux.c): Remove.
201 (i386-mmx.c): Remove.
202 (i386-mmx-linux.c): Remove.
203 (reg-ia64.c): Remove.
204 (reg-m32r.c): Remove.
205 (reg-m68k.c): Remove.
206 (reg-cf.c): Remove.
207 (mips-linux.c): Remove.
208 (mips-dsp-linux.c): Remove.
209 (mips64-linux.c): Remove.
210 (mips64-dsp-linux.c): Remove.
211 (nios2-linux.c): Remove.
212 (powerpc-32.c): Remove.
213 (powerpc-32l.c): Remove.
214 (powerpc-altivec32l.c): Remove.
215 (powerpc-cell32l.c): Remove.
216 (powerpc-vsx32l.c): Remove.
217 (powerpc-isa205-32l.c): Remove.
218 (powerpc-isa205-altivec32l.c): Remove.
219 (powerpc-isa205-vsx32l.c): Remove.
220 (powerpc-e500l.c): Remove.
221 (powerpc-64l.c): Remove.
222 (powerpc-altivec64l.c): Remove.
223 (powerpc-cell64l.c): Remove.
224 (powerpc-vsx64l.c): Remove.
225 (powerpc-isa205-64l.c): Remove.
226 (powerpc-isa205-altivec64l.c): Remove.
227 (powerpc-isa205-vsx64l.c): Remove.
228 (s390-linux32.c): Remove.
229 (s390-linux32v1.c): Remove.
230 (s390-linux32v2.c): Remove.
231 (s390-linux64.c): Remove.
232 (s390-linux64v1.c): Remove.
233 (s390-linux64v2.c): Remove.
234 (s390-te-linux64.c): Remove.
235 (s390-vx-linux64.c): Remove.
236 (s390-tevx-linux64.c): Remove.
237 (s390x-linux64.c): Remove.
238 (s390x-linux64v1.c): Remove.
239 (s390x-linux64v2.c): Remove.
240 (s390x-te-linux64.c): Remove.
241 (s390x-vx-linux64.c): Remove.
242 (s390x-tevx-linux64.c): Remove.
243 (tic6x-c64xp-linux.c): Remove.
244 (tic6x-c64x-linux.c): Remove.
245 (tic6x-c62x-linux.c): Remove.
246 (reg-sh.c): Remove.
247 (reg-sparc64.c): Remove.
248 (reg-spu.c): Remove.
249 (amd64.c): Remove.
250 (amd64-linux.c): Remove.
251 (amd64-avx.c): Remove.
252 (amd64-avx-linux.c): Remove.
253 (amd64-avx-avx512.c): Remove.
254 (amd64-avx-avx512-linux.c): Remove.
255 (amd64-mpx.c): Remove.
256 (amd64-mpx-linux.c): Remove.
257 (amd64-avx-mpx-avx512-pku.c): Remove.
258 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
259 (amd64-avx-mpx.c): Remove.
260 (amd64-avx-mpx-linux.c): Remove.
261 (x32.c): Remove.
262 (x32-linux.c): Remove.
263 (x32-avx.c): Remove.
264 (x32-avx-linux.c): Remove.
265 (x32-avx-avx512.c): Remove.
266 (x32-avx-avx512-linux.c): Remove.
267 (reg-xtensa.c): Remove.
268 (reg-tilegx.c): Remove.
269 (reg-tilegx32.c): Remove.
270
271 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
272
273 * Makefile.in (SFILES): Add "common/environ.c".
274 (OBJS): Add "common/environ.h".
275
276 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
277
278 * configure.ac: Check if the fs_base and gs_base members of
279 `struct user_regs_struct' exist.
280 * config.in: Regenerated.
281 * configure: Likewise.
282
283 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
284
285 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
286 target_read_memory.
287 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
288 (get_next_pcs_syscall_next_pc): Likewise.
289
290 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
291
292 * win32-i386-low.c: Fix incorrect reference to a couple source files.
293 * nto-x86-low.c: Likewise.
294
295 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
296
297 * Makefile.in: Include disable-implicit-rules.mk.
298
299 2016-11-23 Pedro Alves <palves@redhat.com>
300
301 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
302 (debug_vprintf): Use std::chrono::steady_clock instead of
303 gettimeofday. Use '.' instead of ':'.
304 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
305 (get_timestamp): Use std::chrono::steady_clock instead of
306 gettimeofday.
307
308 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
309
310 * Makefile.in: Fix whitespace formatting.
311
312 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
313
314 * Makefile.in (SFILES, OBS): Flatten list and order
315 alphabetically.
316
317 2016-11-23 Pedro Alves <palves@redhat.com>
318
319 * event-loop.c (handle_file_event): Use warning.
320 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
321 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
322 Use warning.
323
324 2016-11-23 Pedro Alves <palves@redhat.com>
325
326 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
327 output.
328 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
329 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
330 debug_printf and debug_flush for debug output.
331 * server.c (handle_general_set): Likewise.
332 * thread-db.c (try_thread_db_load): Use debug_printf for debug
333 output.
334
335 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
336
337 * Makefile.in (.c.o): Replace rule with ...
338 (%.o: %.c): ... this one.
339
340 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
341
342 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
343 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
344 make.
345 * configure.ac: Remove checks for the make program.
346 * configure: Re-generate.
347
348 2016-10-28 Pedro Alves <palves@redhat.com>
349
350 * Makefile.in (CXX_DIALECT): Get from configure.
351 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
352 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
353 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
354 * config.in: Regenerate.
355 * configure: Regenerate.
356
357 2016-10-27 Yao Qi <yao.qi@linaro.org>
358
359 * linux-low.c (linux_supports_range_stepping): Return true if
360 can_software_single_step return true.
361
362 2016-10-27 Yao Qi <yao.qi@linaro.org>
363
364 * inferiors.c (find_inferior_in_random): New function.
365 * inferiors.h (find_inferior_in_random): Declare.
366 * linux-low.c (linux_wait_for_event_filtered): Call
367 find_inferior_in_random instead of find_inferior.
368
369 2016-10-27 Yao Qi <yao.qi@linaro.org>
370
371 * linux-low.c (linux_wait_1): If single-step breakpoints are
372 inserted, remove them.
373
374 2016-10-26 Pedro Alves <palves@redhat.com>
375
376 * linux-low.c (handle_extended_wait): Link parent/child fork
377 threads.
378 (linux_wait_1): Unlink them.
379 (linux_set_resume_request): Ignore resume requests for
380 already-resumed and unhandled fork child threads.
381 * linux-low.h (struct lwp_info) <fork_relative>: New field.
382 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
383 New functions.
384 (handle_v_requests) <vCont>: Don't call require_running.
385 * server.h (in_queued_stop_replies): New declaration.
386
387 2016-10-24 Yao Qi <yao.qi@linaro.org>
388
389 PR server/20733
390 * linux-aarch64-low.c (append_insns): Cast the return value to
391 'uint32_t *'.
392
393 2016-10-10 Yao Qi <yao.qi@linaro.org>
394
395 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
396
397 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
398
399 * target.c (target_supports_multi_process): New function, moved
400 from...
401 * target.h (target_supports_multi_process): ... here. Remove
402 macro.
403
404 2016-10-05 Tom Tromey <tom@tromey.com>
405
406 PR remote/20655:
407 * tracepoint.c (handle_tracepoint_bkpts): Check
408 ipa_error_tracepoint, not ipa_stopping_tracepoint.
409
410 2016-10-05 Yao Qi <yao.qi@linaro.org>
411
412 * configure.srv: Update the path of arm-*.xml files.
413
414 2016-10-05 Terry Guo <terry.guo@arm.com>
415 Yao Qi <yao.qi@linaro.org>
416
417 * Makefile.in: Adjust the path of rules.
418 * configure.srv: Update the path of xml files.
419 * regformats/arm-with-iwmmxt.dat: Regenerated.
420 * regformats/arm-with-neon.dat: Likewise.
421 * regformats/arm-with-vfpv2.dat: Likewise.
422 * regformats/arm-with-vfpv3.dat Likewise.
423
424 2016-09-30 Yao Qi <yao.qi@linaro.org>
425
426 PR gdbserver/20627
427 * target.c (target_stop_and_wait): Don't call
428 target_continue_no_signal, use resume_stop instead.
429
430 2016-09-26 Yao Qi <yao.qi@linaro.org>
431
432 * linux-low.c (linux_wait_1): Call debug_exit.
433
434 2016-09-23 Pedro Alves <palves@redhat.com>
435
436 * Makefile.in (SFILES): Add common/new-op.c.
437 (OBS): Add common/new-op.o.
438 (new-op.o): New rule.
439
440 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
441
442 * .gitinore: Ignore more files.
443
444 2016-09-21 Yao Qi <yao.qi@linaro.org>
445
446 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
447 23.
448
449 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
450
451 * server.c (start_inferior): Call target_mourn_inferior instead of
452 mourn_inferior; pass ptid_t argument to it.
453 (resume): Likewise.
454 (handle_target_event): Likewise.
455 * target.c (target_mourn_inferior): New function.
456 * target.h (mourn_inferior): Delete macro.
457
458 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
459
460 * linux-low.c (lwp_is_stepping): New function.
461
462 2016-09-06 Carl Love <cel@us.ibm.com>
463
464 * server.c (start_inferior): Fixed comment, requested comment change
465 didn't get updated correctly. Removed reference to ptrace () call as
466 it is only true on Linux systems.
467
468 2016-09-06 Carl Love <cel@us.ibm.com>
469
470 * server.c (start_inferior): Do not call
471 function target_post_create_inferior () if the
472 inferior process has already exited.
473
474 2016-09-05 Pedro Alves <palves@redhat.com>
475
476 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
477 (COMPILE.pre, CC_LD): Use CXX directly.
478 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
479 * acinclude.m4: Don't include build-with-cxx.m4.
480 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
481 * configure: Regenerate.
482
483 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
484
485 PR gdb/19495
486 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
487 call writing data to own_buf.
488
489 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
490
491 * target.c (mywait): Call target_wait instead of
492 the_target->wait.
493 (target_wait): New function.
494
495 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
496
497 * server.c (start_inferior): New variable 'ptid'. Replace calls
498 to the_target->resume by target_continue{,_no_signal}, depending
499 on the case.
500 * target.c (target_stop_and_wait): Call target_continue_no_signal
501 instead of the_target->resume.
502 (target_continue): New function.
503
504 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
505
506 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
507
508 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
509
510 PR server/20491
511 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
512 ps_prochandle.
513 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
514 * linux-arm-low.c (ps_get_thread_area): Likewise.
515 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
516 * linux-m68k-low.c (ps_get_thread_area): Likewise.
517 * linux-mips-low.c (ps_get_thread_area): Likewise.
518 * linux-nios2-low.c (ps_get_thread_area): Likewise.
519 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
520 * linux-x86-low.c (ps_get_thread_area): Likewise.
521 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
522
523 2016-08-19 Pedro Alves <palves@redhat.com>
524
525 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
526
527 2016-08-19 Pedro Alves <palves@redhat.com>
528
529 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
530 comment. Use memcpy instead of casting through unsigned long.
531
532 2016-08-19 Pedro Alves <palves@redhat.com>
533
534 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
535 allocating around 0x80000000.
536
537 2016-08-19 Pedro Alves <palves@redhat.com>
538
539 PR gdb/20415
540 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
541 (x32-avx512-linux-ipa.o): New rules.
542 * configure.ac (x86_64-*-linux*): New x32 check.
543 * configure.srv (ipa_x32_linux_regobj): New.
544 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
545 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
546 descriptions.
547 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
548 descriptions.
549 * configure: Regenerate.
550
551 2016-08-09 Pedro Alves <palves@redhat.com>
552
553 PR gdb/18653
554 * Makefile.in (OBS): Add signals-state-save-restore.o.
555 (signals-state-save-restore.o): New rule.
556 * config.in: Regenerate.
557 * configure: Regenerate.
558 * linux-low.c: Include "signals-state-save-restore.h".
559 (linux_create_inferior): Call
560 restore_original_signals_state.
561 * server.c: Include "dispositions-save-restore.h".
562 (captured_main): Call save_original_signals_state.
563
564 2016-08-05 Pedro Alves <palves@redhat.com>
565
566 * configure: Regenerate.
567
568 2016-08-04 Yao Qi <yao.qi@linaro.org>
569
570 * linux-low.c (regsets_fetch_inferior_registers): Check
571 errno is ESRCH or not.
572
573 2016-08-02 Yao Qi <yao.qi@linaro.org>
574
575 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
576 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
577 (thread_db_load_search): Update.
578 (try_thread_db_load_1): Don't look for td_ta_event_addr,
579 td_ta_set_event and td_ta_event_getmsg.
580
581 2016-07-26 Pedro Alves <palves@redhat.com>
582
583 PR server/20414
584 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
585 of unsigned long for 64-bit registers and use uint32_t instead of
586 unsigned int for 32-bit registers.
587
588 2016-07-26 Pedro Alves <palves@redhat.com>
589
590 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
591 to 'ptrace'.
592
593 2016-07-21 Tom Tromey <tom@tromey.com>
594
595 * configure: Rebuild.
596
597 2016-07-21 Yao Qi <yao.qi@linaro.org>
598
599 * mem-break.c (find_gdb_breakpoint): Cast bp to
600 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
601
602 2016-07-21 Yao Qi <yao.qi@linaro.org>
603
604 * server.c (handle_v_requests): Support s and S actions
605 if target_supports_software_single_step return true.
606
607 2016-07-21 Yao Qi <yao.qi@linaro.org>
608
609 * linux-low.c (resume_stopped_resumed_lwps): If resume request
610 is resume_step, call maybe_hw_step.
611 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
612 and unstop them.
613 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
614 breakpoints or not.
615 (proceed_one_lwp): If resume request is resume_step, install
616 reinsert breakpoints and call maybe_hw_step.
617
618 2016-07-21 Yao Qi <yao.qi@linaro.org>
619
620 * linux-low.c (proceed_one_lwp): Declare.
621 (linux_resume_one_thread): Remove local variable 'step'.
622 Lift code enqueue signal. Call proceed_one_lwp instead of
623 linux_resume_one_lwp.
624
625 2016-07-21 Yao Qi <yao.qi@linaro.org>
626
627 * linux-low.c (linux_resume_one_thread): Call
628 enqueue_pending_signal.
629
630 2016-07-21 Yao Qi <yao.qi@linaro.org>
631
632 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
633 * inferiors.c (do_restore_current_thread_cleanup): New function.
634 (make_cleanup_restore_current_thread): Likewise.
635 * linux-low.c (install_software_single_step_breakpoints): Call
636 make_cleanup_restore_current_thread. Switch current_thread to
637 thread.
638
639 2016-07-21 Yao Qi <yao.qi@linaro.org>
640
641 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
642 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
643 (clone_one_breakpoint): Likewise.
644 (delete_reinsert_breakpoints): Change parameter to thread.
645 Callers updated.
646 (has_reinsert_breakpoints): Likewise.
647 (uninsert_reinsert_breakpoints): Likewise.
648 (reinsert_reinsert_breakpoints): Likewise.
649 * mem-break.h (set_reinsert_breakpoint): Update declaration.
650 (delete_reinsert_breakpoints): Likewise.
651 (reinsert_reinsert_breakpoints): Likewise.
652 (uninsert_reinsert_breakpoints): Likewise.
653 (has_reinsert_breakpoints): Likewise.
654
655 2016-07-21 Yao Qi <yao.qi@linaro.org>
656
657 * inferiors.c (get_thread_process): Make parameter const.
658 * inferiors.h (get_thread_process): Update declaration.
659 * mem-break.c (clone_all_breakpoints): Remove all parameters.
660 Add new parameters child_thread and parent_thread. Callers
661 updated.
662 * mem-break.h (clone_all_breakpoints): Update declaration.
663
664 2016-07-21 Yao Qi <yao.qi@linaro.org>
665
666 * mem-break.c (struct breakpoint) <cond_list>: Remove.
667 <command_list, handler>: Remove.
668 (struct gdb_breakpoint): New.
669 (struct other_breakpoint): New.
670 (struct reinsert_breakpoint): New.
671 (is_gdb_breakpoint): New function.
672 (any_persistent_commands): Update command_list if
673 is_gdb_breakpoint returns true.
674 (set_breakpoint): Create breakpoints according to their types.
675 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
676 (set_gdb_breakpoint_1): Likewise.
677 (set_gdb_breakpoint): Likewise.
678 (clear_breakpoint_conditions): Change parameter type to
679 'struct gdb_breakpoint *'.
680 (clear_breakpoint_commands): Likewise.
681 (clear_breakpoint_conditions_and_commands): Likewise.
682 (add_condition_to_breakpoint): Likewise.
683 (add_breakpoint_condition): Likewise.
684 (add_commands_to_breakpoint): Likewise.
685 (check_breakpoints): Check other_breakpoint.
686 (clone_one_breakpoint): Clone breakpopint according to its type.
687 * mem-break.h (struct gdb_breakpoint): Declare.
688 (set_gdb_breakpoint): Update declaration.
689 (clear_breakpoint_conditions_and_commands): Likewise.
690 (add_breakpoint_condition): Likewise.
691 (add_breakpoint_commands): Likewise.
692 * server.c (process_point_options): Change parameter type to
693 'struct gdb_breakpoint *'.
694
695 2016-07-21 Yao Qi <yao.qi@linaro.org>
696
697 * mem-break.c (set_breakpoint_at): Rename it to ...
698 (set_breakpoint_type_at): ... it.
699 (set_breakpoint_at): Call set_breakpoint_type_at.
700 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
701 * mem-break.h (set_breakpoint_at): Update comments.
702
703 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
704
705 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
706 to buf parameter.
707 (nios2_store_gregset): Likewise.
708
709 2016-07-01 Pedro Alves <palves@redhat.com>
710 Antoine Tremblay <antoine.tremblay@ericsson.com>
711
712 * linux-low.c: Change interface to take the target lwp_info
713 pointer directly and return void. Handle detaching from a zombie
714 thread.
715 (linux_detach_lwp_callback): New function.
716 (linux_detach): Detach from the leader thread after detaching from
717 the clone threads.
718
719 2016-06-28 Yao Qi <yao.qi@linaro.org>
720
721 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
722 for variable new_offset.
723 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
724 (aarch64_ftrace_insn_reloc_cb): Likewise.
725 (aarch64_ftrace_insn_reloc_tb): Likewise.
726 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
727 PRIx64 instead of PRIx32.
728
729 2016-06-28 Yao Qi <yao.qi@linaro.org>
730
731 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
732 (the_low_target): Install arm_get_syscall_trapinfo.
733
734 2016-06-28 Yao Qi <yao.qi@linaro.org>
735
736 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
737 function.
738 (the_low_target): Install aarch64_get_syscall_trapinfo.
739
740 2016-06-28 Yao Qi <yao.qi@linaro.org>
741
742 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
743 Callers updated.
744 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
745 Remove parameter sysno.
746 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
747 sysret.
748
749 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
750
751 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
752 (s390_emit_ne_goto): Likewise.
753 (s390_emit_lt_goto): Likewise.
754 (s390_emit_le_goto): Likewise.
755 (s390_emit_gt_goto): Likewise.
756 (s390_emit_ge_goto): Likewise.
757 (s390x_emit_eq_goto): Likewise.
758 (s390x_emit_ne_goto): Likewise.
759 (s390x_emit_lt_goto): Likewise.
760 (s390x_emit_le_goto): Likewise.
761 (s390x_emit_gt_goto): Likewise.
762 (s390x_emit_ge_goto): Likewise.
763 (s390_emit_ops_impl): Mark variable static.
764 (s390x_emit_ops): Likewise.
765
766 2016-06-17 Yao Qi <yao.qi@linaro.org>
767
768 * linux-low.c (handle_extended_wait): Call
769 uninsert_reinsert_breakpoints for the parent process. Remove
770 reinsert breakpoints from the child process. Reinsert them to
771 the parent process when vfork is done.
772 * mem-break.c (uninsert_reinsert_breakpoints): New function.
773 (reinsert_reinsert_breakpoints): New function.
774 * mem-break.h (uninsert_reinsert_breakpoints): Declare
775 (reinsert_reinsert_breakpoints): Declare.
776
777 2016-06-17 Yao Qi <yao.qi@linaro.org>
778
779 * linux-low.c (handle_extended_wait): If the parent is doing
780 step-over, remove the reinsert breakpoints from the forked child.
781
782 2016-06-17 Yao Qi <yao.qi@linaro.org>
783
784 * linux-low.c (unsuspend_all_lwps): Declare.
785 (linux_low_filter_event): If thread exited, call finish_step_over.
786 If step-over is finished, unsuspend other threads.
787
788 2016-06-17 Yao Qi <yao.qi@linaro.org>
789
790 * linux-low.c (linux_resume_one_lwp_throw): Assert
791 has_reinsert_breakpoints returns false.
792 * mem-break.c (delete_disabled_breakpoints): Assert
793 bp type isn't reinsert_breakpoint.
794
795 2016-06-17 Yao Qi <yao.qi@linaro.org>
796
797 * linux-low.c (maybe_hw_step): New function.
798 (linux_resume_one_lwp_throw): Call maybe_hw_step.
799 (finish_step_over): Switch current_thread to lwp temporarily,
800 and assert has_reinsert_breakpoints returns true.
801 (proceed_one_lwp): Call maybe_hw_step.
802 * mem-break.c (has_reinsert_breakpoints): New function.
803 * mem-break.h (has_reinsert_breakpoints): Declare.
804
805 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
806
807 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
808
809 2016-05-17 Yao Qi <yao.qi@linaro.org>
810
811 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
812 instead of find_inferior.
813
814 2016-05-05 Yao Qi <yao.qi@linaro.org>
815
816 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
817 Initialize res to zero.
818
819 2016-05-05 Yao Qi <yao.qi@linaro.org>
820
821 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
822 to uint32_t.
823
824 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
825
826 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
827 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
828 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
829
830 2016-04-28 Par Olsson <par.olsson@windriver.com>
831 Simon Marchi <simon.marchi@ericsson.com>
832
833 * tracepoint.c (write_inferior_int8): New function.
834 (cmd_qtenable_disable): Write enable flag using
835 write_inferior_int8.
836
837 2016-04-25 Yao Qi <yao.qi@linaro.org>
838
839 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
840 (need_step_over_p): Return zero if the LWP has pending signals
841 can be delivered on software single step target.
842
843 2016-04-25 Yao Qi <yao.qi@linaro.org>
844
845 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
846 return instead of error.
847
848 2016-04-22 Yao Qi <yao.qi@linaro.org>
849
850 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
851 to 23.
852
853 2016-04-22 Yao Qi <yao.qi@linaro.org>
854
855 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
856 signal when stepping over breakpoint with software single
857 step.
858
859 2016-04-21 Pedro Alves <palves@redhat.com>
860
861 * linux-s390-low.c (s390_collect_ptrace_register)
862 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
863 add casts.
864 (s390_check_regset): Use void * instead of gdb_byte *.
865
866 2016-04-20 Pedro Alves <palves@redhat.com>
867
868 * configure: Renegerate.
869
870 2016-04-20 Yao Qi <yao.qi@linaro.org>
871
872 * linux-aarch32-low.c: Include "arch/arm-linux.h".
873 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
874 number 16.
875 (arm_store_gregset): Likewise.
876
877 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
878
879 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
880 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
881 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
882 (amd64-avx-mpx-linux.c): New rules.
883 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
884 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
885 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
886 (srv_amd64_regobj): Add amd64-avx-mpx.o.
887 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
888 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
889 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
890 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
891 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
892 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
893 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
894 * linux-x86-low.c (x86_linux_read_description): Add case for
895 X86_XSTATE_AVX_MPX_MASK.
896 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
897 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
898 init_registers_i386_avx_mpx_linux.
899 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
900 (initialize_low_tracepoint): Call
901 init_registers_i386_avx_mpx_linux.
902 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
903 (initialize_low_tracepoint): Call
904 init_registers_amd64_avx_mpx_linux.
905 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
906 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
907 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
908 declarations.
909
910 2016-04-18 Pedro Alves <palves@redhat.com>
911
912 * configure: Regenerate.
913
914 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
915
916 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
917 (aarch64_emit_sub): Likewise.
918
919 2016-04-12 Pedro Alves <palves@redhat.com>
920
921 * utils.c (prepare_to_throw_exception): Delete.
922
923 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
924
925 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
926
927 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
928
929 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
930
931 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
932
933 * linux-aarch64-ipa.c: Add <elf.h> include.
934 * linux-ppc-ipa.c: Add <elf.h> include.
935 * linux-s390-ipa.c: Add <elf.h> include.
936
937 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
938
939 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
940 (get_raw_reg_ptr): Likewise.
941 (get_trace_state_variable_value_ptr): Likewise.
942 (set_trace_state_variable_value_ptr): Likewise.
943 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
944 char *.
945
946 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
947 Marcin Kościelnicki <koriakin@0x04.net>
948
949 PR/17221
950 * linux-ppc-low.c (emit_insns): New function.
951 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
952 (ppc_emit_prologue): New function.
953 (ppc_emit_epilogue): New function.
954 (ppc_emit_add): New function.
955 (ppc_emit_sub): New function.
956 (ppc_emit_mul): New function.
957 (ppc_emit_lsh): New function.
958 (ppc_emit_rsh_signed): New function.
959 (ppc_emit_rsh_unsigned): New function.
960 (ppc_emit_ext): New function.
961 (ppc_emit_zero_ext): New function.
962 (ppc_emit_log_not): New function.
963 (ppc_emit_bit_and): New function.
964 (ppc_emit_bit_or): New function.
965 (ppc_emit_bit_xor): New function.
966 (ppc_emit_bit_not): New function.
967 (ppc_emit_equal): New function.
968 (ppc_emit_less_signed): New function.
969 (ppc_emit_less_unsigned): New function.
970 (ppc_emit_ref): New function.
971 (ppc_emit_const): New function.
972 (ppc_emit_reg): New function.
973 (ppc_emit_pop): New function.
974 (ppc_emit_stack_flush): New function.
975 (ppc_emit_swap): New function.
976 (ppc_emit_stack_adjust): New function.
977 (ppc_emit_call): New function.
978 (ppc_emit_int_call_1): New function.
979 (ppc_emit_void_call_2): New function.
980 (ppc_emit_if_goto): New function.
981 (ppc_emit_goto): New function.
982 (ppc_emit_eq_goto): New function.
983 (ppc_emit_ne_goto): New function.
984 (ppc_emit_lt_goto): New function.
985 (ppc_emit_le_goto): New function.
986 (ppc_emit_gt_goto): New function.
987 (ppc_emit_ge_goto): New function.
988 (ppc_write_goto_address): New function.
989 (ppc_emit_ops_impl): New static variable.
990 (ppc64v1_emit_prologue): New function.
991 (ppc64v2_emit_prologue): New function.
992 (ppc64_emit_epilogue): New function.
993 (ppc64_emit_add): New function.
994 (ppc64_emit_sub): New function.
995 (ppc64_emit_mul): New function.
996 (ppc64_emit_lsh): New function.
997 (ppc64_emit_rsh_signed): New function.
998 (ppc64_emit_rsh_unsigned): New function.
999 (ppc64_emit_ext): New function.
1000 (ppc64_emit_zero_ext): New function.
1001 (ppc64_emit_log_not): New function.
1002 (ppc64_emit_bit_and): New function.
1003 (ppc64_emit_bit_or): New function.
1004 (ppc64_emit_bit_xor): New function.
1005 (ppc64_emit_bit_not): New function.
1006 (ppc64_emit_equal): New function.
1007 (ppc64_emit_less_signed): New function.
1008 (ppc64_emit_less_unsigned): New function.
1009 (ppc64_emit_ref): New function.
1010 (ppc64_emit_const): New function.
1011 (ppc64v1_emit_reg): New function.
1012 (ppc64v2_emit_reg): New function.
1013 (ppc64_emit_pop): New function.
1014 (ppc64_emit_stack_flush): New function.
1015 (ppc64_emit_swap): New function.
1016 (ppc64v1_emit_call): New function.
1017 (ppc64v2_emit_call): New function.
1018 (ppc64v1_emit_int_call_1): New function.
1019 (ppc64v2_emit_int_call_1): New function.
1020 (ppc64v1_emit_void_call_2): New function.
1021 (ppc64v2_emit_void_call_2): New function.
1022 (ppc64_emit_if_goto): New function.
1023 (ppc64_emit_eq_goto): New function.
1024 (ppc64_emit_ne_goto): New function.
1025 (ppc64_emit_lt_goto): New function.
1026 (ppc64_emit_le_goto): New function.
1027 (ppc64_emit_gt_goto): New function.
1028 (ppc64_emit_ge_goto): New function.
1029 (ppc64v1_emit_ops_impl): New static variable.
1030 (ppc64v2_emit_ops_impl): New static variable.
1031 (ppc_emit_ops): New function.
1032 (linux_low_target): Wire in ppc_emit_ops.
1033
1034 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1035 Marcin Kościelnicki <koriakin@0x04.net>
1036
1037 PR/17221
1038 * Makefile.in: Add powerpc-*-ipa.o
1039 * configure.srv: Add ipa_obj for powerpc*-linux.
1040 * linux-ppc-ipa.c: New file.
1041 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1042 includes.
1043 (PPC_FIELD): New macro.
1044 (PPC_SEXT): New macro.
1045 (PPC_OP6): New macro.
1046 (PPC_BO): New macro.
1047 (PPC_LI): New macro.
1048 (PPC_BD): New macro.
1049 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1050 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1051 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1052 (ppc_get_thread_area): New function.
1053 (is_elfv2_inferior): New function.
1054 (gen_ds_form): New function.
1055 (GEN_STD): New macro.
1056 (GEN_STDU): New macro.
1057 (GEN_LD): New macro.
1058 (GEN_LDU): New macro.
1059 (gen_d_form): New function.
1060 (GEN_ADDI): New macro.
1061 (GEN_ADDIS): New macro.
1062 (GEN_LI): New macro.
1063 (GEN_LIS): New macro.
1064 (GEN_ORI): New macro.
1065 (GEN_ORIS): New macro.
1066 (GEN_LWZ): New macro.
1067 (GEN_STW): New macro.
1068 (GEN_STWU): New macro.
1069 (gen_xfx_form): New function.
1070 (GEN_MFSPR): New macro.
1071 (GEN_MTSPR): New macro.
1072 (GEN_MFCR): New macro.
1073 (GEN_MTCR): New macro.
1074 (GEN_SYNC): New macro.
1075 (GEN_LWSYNC): New macro.
1076 (gen_x_form): New function.
1077 (GEN_OR): New macro.
1078 (GEN_MR): New macro.
1079 (GEN_LWARX): New macro.
1080 (GEN_STWCX): New macro.
1081 (GEN_CMPW): New macro.
1082 (gen_md_form): New function.
1083 (GEN_RLDICL): New macro.
1084 (GEN_RLDICR): New macro.
1085 (gen_i_form): New function.
1086 (GEN_B): New macro.
1087 (GEN_BL): New macro.
1088 (gen_b_form): New function.
1089 (GEN_BNE): New macro.
1090 (GEN_LOAD): New macro.
1091 (GEN_STORE): New macro.
1092 (gen_limm): New function.
1093 (gen_atomic_xchg): New function.
1094 (gen_call): New function.
1095 (ppc_relocate_instruction): New function.
1096 (ppc_install_fast_tracepoint_jump_pad): New function.
1097 (ppc_get_min_fast_tracepoint_insn_len): New function.
1098 (ppc_get_ipa_tdesc_idx): New function.
1099 (the_low_target): Wire in the new functions.
1100 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1101 tdescs.
1102 * linux-ppc-tdesc.h: New file.
1103
1104 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1105
1106 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1107 (alloc_jump_pad_buffer): New function.
1108 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1109 (alloc_jump_pad_buffer): New function.
1110 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1111 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1112 (alloc_jump_pad_buffer): New function.
1113 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1114 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1115 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1116 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1117
1118 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1119
1120 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1121 * linux-amd64-ipa.c: Likewise.
1122 * linux-i386-ipa.c: Likewise.
1123 * linux-s390-ipa.c: Likewise.
1124 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1125 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1126 set_trace_state_variable_value_ptr.
1127 (struct ipa_sym_addresses): Likewise.
1128 (symbol_list): Likewise.
1129 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1130 accessing gdb_collect directly.
1131 (gdb_collect_ptr_type): New typedef.
1132 (get_raw_reg_ptr_type): New typedef.
1133 (get_trace_state_variable_value_ptr_type): New typedef.
1134 (set_trace_state_variable_value_ptr_type): New typedef.
1135 (gdb_collect_ptr): New global.
1136 (get_raw_reg_ptr): New global.
1137 (get_trace_state_variable_value_ptr): New global.
1138 (set_trace_state_variable_value_ptr): New global.
1139 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1140 accessing get_raw_reg directly.
1141 (get_get_tsv_func_addr): Likewise for
1142 get_trace_state_variable_value_ptr.
1143 (get_set_tsv_func_addr): Likewise for
1144 set_trace_state_variable_value_ptr.
1145 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1146
1147 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1148
1149 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1150
1151 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1152
1153 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1154 packets.
1155 (relocate_instruction): Remove own_buf.
1156 * server.c (own_buf): Make global.
1157 (handle_v_requests): Make global.
1158 * server.h (own_buf): New declaration.
1159 (handle_v_requests): New prototype.
1160
1161 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1162
1163 PR 18377
1164 * linux-s390-low.c (add_insns): New function.
1165 (s390_emit_prologue): New function.
1166 (s390_emit_epilogue): New function.
1167 (s390_emit_add): New function.
1168 (s390_emit_sub): New function.
1169 (s390_emit_mul): New function.
1170 (s390_emit_lsh): New function.
1171 (s390_emit_rsh_signed): New function.
1172 (s390_emit_rsh_unsigned): New function.
1173 (s390_emit_ext): New function.
1174 (s390_emit_log_not): New function.
1175 (s390_emit_bit_and): New function.
1176 (s390_emit_bit_or): New function.
1177 (s390_emit_bit_xor): New function.
1178 (s390_emit_bit_not): New function.
1179 (s390_emit_equal): New function.
1180 (s390_emit_less_signed): New function.
1181 (s390_emit_less_unsigned): New function.
1182 (s390_emit_ref): New function.
1183 (s390_emit_if_goto): New function.
1184 (s390_emit_goto): New function.
1185 (s390_write_goto_address): New function.
1186 (s390_emit_litpool): New function.
1187 (s390_emit_const): New function.
1188 (s390_emit_call): New function.
1189 (s390_emit_reg): New function.
1190 (s390_emit_pop): New function.
1191 (s390_emit_stack_flush): New function.
1192 (s390_emit_zero_ext): New function.
1193 (s390_emit_swap): New function.
1194 (s390_emit_stack_adjust): New function.
1195 (s390_emit_set_r2): New function.
1196 (s390_emit_int_call_1): New function.
1197 (s390_emit_void_call_2): New function.
1198 (s390_emit_eq_goto): New function.
1199 (s390_emit_ne_goto): New function.
1200 (s390_emit_lt_goto): New function.
1201 (s390_emit_le_goto): New function.
1202 (s390_emit_gt_goto): New function.
1203 (s390_emit_ge_goto): New function.
1204 (s390x_emit_prologue): New function.
1205 (s390x_emit_epilogue): New function.
1206 (s390x_emit_add): New function.
1207 (s390x_emit_sub): New function.
1208 (s390x_emit_mul): New function.
1209 (s390x_emit_lsh): New function.
1210 (s390x_emit_rsh_signed): New function.
1211 (s390x_emit_rsh_unsigned): New function.
1212 (s390x_emit_ext): New function.
1213 (s390x_emit_log_not): New function.
1214 (s390x_emit_bit_and): New function.
1215 (s390x_emit_bit_or): New function.
1216 (s390x_emit_bit_xor): New function.
1217 (s390x_emit_bit_not): New function.
1218 (s390x_emit_equal): New function.
1219 (s390x_emit_less_signed): New function.
1220 (s390x_emit_less_unsigned): New function.
1221 (s390x_emit_ref): New function.
1222 (s390x_emit_if_goto): New function.
1223 (s390x_emit_const): New function.
1224 (s390x_emit_call): New function.
1225 (s390x_emit_reg): New function.
1226 (s390x_emit_pop): New function.
1227 (s390x_emit_stack_flush): New function.
1228 (s390x_emit_zero_ext): New function.
1229 (s390x_emit_swap): New function.
1230 (s390x_emit_stack_adjust): New function.
1231 (s390x_emit_int_call_1): New function.
1232 (s390x_emit_void_call_2): New function.
1233 (s390x_emit_eq_goto): New function.
1234 (s390x_emit_ne_goto): New function.
1235 (s390x_emit_lt_goto): New function.
1236 (s390x_emit_le_goto): New function.
1237 (s390x_emit_gt_goto): New function.
1238 (s390x_emit_ge_goto): New function.
1239 (s390_emit_ops): New function.
1240 (struct linux_target_ops): Fill in emit_ops hook.
1241
1242 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1243
1244 PR 18377
1245 * Makefile.in: Add s390 IPA files.
1246 * configure.srv: Build IPA for s390.
1247 * linux-s390-ipa.c: New file.
1248 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1249 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1250 (tdesc_s390_linux32): Likewise.
1251 (init_registers_s390_linux32v1): Likewise.
1252 (tdesc_s390_linux32v1): Likewise.
1253 (init_registers_s390_linux32v2): Likewise.
1254 (tdesc_s390_linux32v2): Likewise.
1255 (init_registers_s390_linux64): Likewise.
1256 (tdesc_s390_linux64): Likewise.
1257 (init_registers_s390_linux64v1): Likewise.
1258 (tdesc_s390_linux64v1): Likewise.
1259 (init_registers_s390_linux64v2): Likewise.
1260 (tdesc_s390_linux64v2): Likewise.
1261 (init_registers_s390_te_linux64): Likewise.
1262 (tdesc_s390_te_linux64): Likewise.
1263 (init_registers_s390_vx_linux64): Likewise.
1264 (tdesc_s390_vx_linux64): Likewise.
1265 (init_registers_s390_tevx_linux64): Likewise.
1266 (tdesc_s390_tevx_linux64): Likewise.
1267 (init_registers_s390x_linux64): Likewise.
1268 (tdesc_s390x_linux64): Likewise.
1269 (init_registers_s390x_linux64v1): Likewise.
1270 (tdesc_s390x_linux64v1): Likewise.
1271 (init_registers_s390x_linux64v2): Likewise.
1272 (tdesc_s390x_linux64v2): Likewise.
1273 (init_registers_s390x_te_linux64): Likewise.
1274 (tdesc_s390x_te_linux64): Likewise.
1275 (init_registers_s390x_vx_linux64): Likewise.
1276 (tdesc_s390x_vx_linux64): Likewise.
1277 (init_registers_s390x_tevx_linux64): Likewise.
1278 (tdesc_s390x_tevx_linux64): Likewise.
1279 (have_hwcap_s390_vx): New static variable.
1280 (s390_arch_setup): Fill have_hwcap_s390_vx.
1281 (s390_get_thread_area): New function.
1282 (s390_ft_entry_gpr_esa): New const.
1283 (s390_ft_entry_gpr_zarch): New const.
1284 (s390_ft_entry_misc): New const.
1285 (s390_ft_entry_fr): New const.
1286 (s390_ft_entry_vr): New const.
1287 (s390_ft_main_31): New const.
1288 (s390_ft_main_64): New const.
1289 (s390_ft_exit_fr): New const.
1290 (s390_ft_exit_vr): New const.
1291 (s390_ft_exit_misc): New const.
1292 (s390_ft_exit_gpr_esa): New const.
1293 (s390_ft_exit_gpr_zarch): New const.
1294 (append_insns): New function.
1295 (s390_relocate_instruction): New function.
1296 (s390_install_fast_tracepoint_jump_pad): New function.
1297 (s390_get_min_fast_tracepoint_insn_len): New function.
1298 (s390_get_ipa_tdesc_idx): New function.
1299 (struct linux_target_ops): Wire in the above functions.
1300 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1301 * linux-s390-tdesc.h: New file.
1302
1303 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1304
1305 * linux-s390-low.c (s390_supports_tracepoints): New function.
1306 (struct linux_target_ops): Fill supports_tracepoints hook.
1307
1308 2016-03-18 Yao Qi <yao.qi@linaro.org>
1309
1310 * linux-low.c (lwp_signal_can_be_delivered): New function.
1311 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1312
1313 2016-03-18 Yao Qi <yao.qi@linaro.org>
1314
1315 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1316 0 if signal is enqueued. Remove 'signal' from one debugging
1317 message. Move one debugging message to some lines below.
1318 Remove code setting 'signal' to 0.
1319
1320 2016-03-18 Yao Qi <yao.qi@linaro.org>
1321
1322 * linux-low.c (linux_low_filter_event): Remove redundant
1323 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1324
1325 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1326
1327 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1328 (struct linux_target_ops): Wire in the above.
1329
1330 2016-03-03 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-low.c: Update comments to start_step_over.
1333
1334 2016-03-03 Yao Qi <yao.qi@linaro.org>
1335
1336 PR server/19736
1337 * linux-low.c (handle_extended_wait): Set child suspended
1338 if event_lwp->bp_reinsert isn't zero.
1339
1340 2016-03-02 Yao Qi <yao.qi@linaro.org>
1341
1342 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1343 enqueue_pending_signal.
1344
1345 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1346
1347 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1348 is actually loaded.
1349
1350 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1351
1352 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1353 (s390_regmap_3264) [!__s390x__]: New global.
1354 (s390_collect_ptrace_register): Skip map entries containing -1.
1355 (s390_supply_ptrace_register): Ditto.
1356 (s390_fill_gprs_high): New function.
1357 (s390_store_gprs_high): New function.
1358 (s390_regsets): Add NT_S390_HIGH_GPRS.
1359 (s390_get_hwcap): Enable on 31-bit.
1360 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1361 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1362 Detect NT_S390_HIGH_GPRS.
1363 (s390_usrregs_info_3264): Enable on 31-bit.
1364 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1365 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1366
1367 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1368
1369 PR gdb/13808
1370 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1371 * configure.srv: Ditto.
1372 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1373 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1374 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1375 (init_registers_amd64_linux): Remove prototype.
1376 (tdesc_amd64_linux): Remove declaration.
1377 (get_ipa_tdesc): New function.
1378 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1379 initialize remaining tdescs.
1380 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1381 (init_registers_i386_linux): Remove prototype.
1382 (tdesc_i386_linux): Remove declaration.
1383 (get_ipa_tdesc): New function.
1384 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1385 initialize remaining tdescs.
1386 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1387 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1388 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1389 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1390 (x86_get_ipa_tdesc_idx): New function.
1391 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1392 * linux-x86-tdesc.h: New file.
1393 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1394 (target_get_ipa_tdesc_idx): New macro.
1395 * tracepoint.c (ipa_tdesc_idx): New macro.
1396 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1397 (symbol_list): Add ipa_tdesc_idx.
1398 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1399 (ipa_tdesc): Remove.
1400 (ipa_tdesc_idx): New variable.
1401 (get_context_regcache): Use get_ipa_tdesc.
1402 (gdb_collect): Ditto.
1403 (gdb_probe): Ditto.
1404 * tracepoint.h (get_ipa_tdesc): New prototype.
1405 (ipa_tdesc): Remove.
1406
1407 2016-02-24 Pedro Alves <palves@redhat.com>
1408
1409 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1410 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1411 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1412 Factor out common code between the USE_SIGTRAP_SIGINFO and
1413 !USE_SIGTRAP_SIGINFO blocks.
1414 (linux_low_filter_event): Call save_stop_reason instead of
1415 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1416 Update comments.
1417 (linux_wait_1): Update comments.
1418
1419 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1420
1421 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1422 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1423 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1424 ppc_insert_point, ppc_remove_point.
1425
1426 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1427
1428 * linux-s390-low.c (s390_supports_z_point_type): New function.
1429 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1430
1431 2016-02-16 Yao Qi <yao.qi@linaro.org>
1432
1433 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1434 PC. Get pc from regcache_read_pc.
1435
1436 2016-02-12 Yao Qi <yao.qi@linaro.org>
1437
1438 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1439 or linux_get_pc_32bit.
1440 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1441
1442 2016-02-12 Yao Qi <yao.qi@linaro.org>
1443
1444 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1445 arm_linux_get_next_pcs_fixup.
1446
1447 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1448
1449 * tracepoint.c (x_tracepoint_action_download): Change
1450 write_inferior_data_ptr to write_inferior_data_pointer.
1451 (cmd_qtstart): Likewise.
1452 (write_inferior_data_ptr): Remove.
1453 (download_agent_expr): Change write_inferior_data_ptr to
1454 write_inferior_data_pointer.
1455 (download_tracepoint_1): Likewise.
1456 (download_tracepoint): Likewise.
1457 (download_trace_state_variables): Likewise.
1458
1459 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1460 Marcin Kościelnicki <koriakin@0x04.net>
1461
1462 * tracepoint.c (struct tracepoint_action_ops): Remove.
1463 (struct tracepoint_action): Remove ops.
1464 (m_tracepoint_action_download, r_tracepoint_action_download)
1465 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1466 size and offset accordingly.
1467 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1468 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1469 (tracepoint_action_send, tracepoint_action_download): New functions.
1470 Helpers for trace action handlers.
1471 (add_tracepoint_action): Remove setup actions ops.
1472 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1473
1474 2016-02-10 Yao Qi <yao.qi@linaro.org>
1475
1476 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1477
1478 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1479
1480 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1481 to AC_OUTPUT.
1482 * configure: Regenerate.
1483
1484 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1485
1486 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1487 void * to gdb_byte *.
1488 * linux-low.c (siginfo_fixup): Likewise.
1489 (linux_xfer_siginfo): Likewise.
1490 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1491 Likewise.
1492 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1493
1494 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1495
1496 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1497 to srv_tgtobj.
1498 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1499 to srv_tgtobj.
1500 * linux-x86-low.c [__x86_64__]: Include
1501 "nat/amd64-linux-siginfo.h".
1502 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1503 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1504 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1505 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1506 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1507 (cpt_si_fd, si_timerid, si_overrun): Move from
1508 nat/amd64-linux-siginfo.c.
1509 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1510
1511 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1512
1513 * server.c (skip_to_semicolon): Remove.
1514 (process_point_options): Use strchrnul instead of
1515 skip_to_semicolon.
1516
1517 2016-01-26 Yao Qi <yao.qi@linaro.org>
1518
1519 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1520 * linux-low.c (install_software_single_step_breakpoints): Don't
1521 call regcache_read_pc.
1522 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1523 argument pc.
1524
1525 2016-01-26 Yao Qi <yao.qi@linaro.org>
1526
1527 * linux-low.c (install_software_single_step_breakpoints): Call
1528 regcache_read_pc instead of get_pc.
1529
1530 2016-01-26 Yao Qi <yao.qi@linaro.org>
1531
1532 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1533 (unblock_async_io): Rename to ...
1534 (block_unblock_async_io): ... it. New function.
1535 (enable_async_io): Don't install SIGIO handler. Unblock it
1536 instead.
1537 (disable_async_io): Don't ignore SIGIO. Block it instead.
1538 (initialize_async_io): Install SIGIO handler. Don't call
1539 unblock_async_io.
1540
1541 2016-01-26 Yao Qi <yao.qi@linaro.org>
1542
1543 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1544 first character is '\003', call *the_target->request_interrupt.
1545
1546 2016-01-25 Yao Qi <yao.qi@linaro.org>
1547
1548 * remote-utils.c (new_thread_notify): Remove.
1549 (dead_thread_notify): Likewise.
1550 * remote-utils.h (new_thread_notify): Remove declaration.
1551 (dead_thread_notify): Likewise.
1552
1553 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1554
1555 * gdb.trace/pending.exp: Fix expected message on continue.
1556
1557 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1558
1559 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1560 it works properly on big-endian machines where sizeof (CORE_ADDR)
1561 != sizeof (void *).
1562
1563 2016-01-21 Pedro Alves <palves@redhat.com>
1564
1565 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1566 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1567 * configure: Regenerate.
1568
1569 2016-01-21 Yao Qi <yao.qi@linaro.org>
1570
1571 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1572 is_thumb and set it according to CPSR saved on the stack.
1573 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1574 arm_sigreturn_next_pc.
1575
1576 2016-01-18 Yao Qi <yao.qi@linaro.org>
1577
1578 * linux-low.c (linux_set_pc_64bit): New function.
1579 (linux_get_pc_64bit): New function.
1580 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1581 Declare.
1582 * linux-sparc-low.c (debug_threads): Remove declaration.
1583 (sparc_get_pc): Remove.
1584 (the_low_target): Use linux_get_pc_64bit instead of
1585 sparc_get_pc.
1586 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1587 (the_low_target): Use linux_get_pc_64bit and
1588 linux_set_pc_64bit.
1589
1590 2016-01-18 Yao Qi <yao.qi@linaro.org>
1591
1592 * linux-arm-low.c (debug_threads): Remove declaration.
1593 (arm_get_pc, arm_set_pc): Remove.
1594 (the_low_target): Use linux_get_pc_32bit and
1595 linux_set_pc_32bit.
1596 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1597 (the_low_target): Use linux_get_pc_32bit and
1598 linux_set_pc_32bit.
1599 * linux-cris-low.c (debug_threads): Remove declaration.
1600 (cris_get_pc, cris_set_pc,): Remove.
1601 (the_low_target): Use linux_get_pc_32bit and
1602 linux_set_pc_32bit.
1603 * linux-crisv32-low.c (debug_threads): Remove declaration.
1604 (cris_get_pc, cris_set_pc): Remove.
1605 (the_low_target): Use linux_get_pc_32bit and
1606 linux_set_pc_32bit.
1607 * linux-low.c: Include inttypes.h.
1608 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1609 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1610 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1611 (the_low_target): Use linux_get_pc_32bit and
1612 linux_set_pc_32bit.
1613 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1614 (the_low_target): Use linux_get_pc_32bit and
1615 linux_set_pc_32bit.
1616 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1617 (the_low_target): Use linux_get_pc_32bit and
1618 linux_set_pc_32bit.
1619 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1620 (the_low_target): Use linux_get_pc_32bit and
1621 linux_set_pc_32bit.
1622 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1623 (the_low_target): Use linux_get_pc_32bit and
1624 linux_set_pc_32bit.
1625
1626 2016-01-18 Gary Benson <gbenson@redhat.com>
1627
1628 * configure.ac (AC_FUNC_FORK): New check.
1629 * config.in: Regenerate.
1630 * configure: Likewise.
1631
1632 2016-01-14 Yao Qi <yao.qi@linaro.org>
1633
1634 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1635 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1636 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1637 arm_get_next_pcs_ctor.
1638
1639 2016-01-12 Josh Stone <jistone@redhat.com>
1640 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1641
1642 * inferiors.h: Include "gdb_vecs.h".
1643 (struct process_info): Add syscalls_to_catch.
1644 * inferiors.c (remove_process): Free syscalls_to_catch.
1645 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1646 syscall_return stops.
1647 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1648 * server.c (handle_general_set): Handle QCatchSyscalls.
1649 (handle_query): Report support for QCatchSyscalls.
1650 * target.h (struct target_ops): Add supports_catch_syscall.
1651 (target_supports_catch_syscall): New macro.
1652 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1653 (struct lwp_info): Add syscall_state.
1654 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1655 Maintain syscall_state and syscalls_to_catch across exec.
1656 (get_syscall_trapinfo): New function, proxy to the_low_target.
1657 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1658 (linux_low_filter_event): Toggle syscall_state entry/return for
1659 syscall traps, and set it ignored for all others.
1660 (gdb_catching_syscalls_p): New function.
1661 (gdb_catch_this_syscall_p): New function.
1662 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1663 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1664 (linux_supports_catch_syscall): New function.
1665 (linux_target_ops): Install it.
1666 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1667 (the_low_target): Install it.
1668
1669 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1670
1671 * acinclude.m4: Include new ../warning.m4 file.
1672 * configure: Regenerated.
1673 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1674
1675 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1676
1677 * ax.c (is_goto_target): Mark static.
1678 * linux-low.c (register_addr): Likewise.
1679 (linux_fetch_registers, linux_store_registers): Likewise.
1680 * mem-break.c (any_persistent_commands): Fix old prototype.
1681 (add_commands_to_breakpoint): Mark static.
1682 * regcache.c (find_register_by_name): Delete unused func.
1683 * remote-utils.c (hex_or_minus_one): Mark static.
1684 * server.c (monitor_show_help): Mark static.
1685 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1686 handle_v_requests): Likewise.
1687
1688 2016-01-12 Pedro Alves <palves@redhat.com>
1689
1690 Remove use of the registered trademark symbol throughout.
1691
1692 2016-01-08 Yao Qi <yao.qi@linaro.org>
1693
1694 * remote-utils.c (getpkt): If c is '\003', call target hook
1695 request_interrupt.
1696
1697 2016-01-06 Yao Qi <yao.qi@linaro.org>
1698
1699 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1700 linux-aarch32-low.c.
1701 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1702 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1703 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1704 (thumb2_breakpoint): Declare.
1705 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1706 linux-aarch32-low.h.
1707 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1708 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1709 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1710
1711 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1712
1713 * gdbreplay.c (gdbreplay_version): Change copyright year in
1714 version message.
1715 * server.c (gdbserver_version): Likewise.
1716
1717 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1718
1719 * server.c (crc32_table): Delete.
1720 (crc32): Use libiberty's xcrc32 function.
1721
1722 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1723
1724 * lynx-low.c (lynx_delete_thread_callback): New function.
1725 (lynx_mourn): Properly delete our process and all of its
1726 threads. Remove call to clear_inferiors.
1727
1728 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1729
1730 * target.c (thread_search_callback): Add check that
1731 the thread_stopped target callback is not NULL before
1732 calling it.
1733
1734 2015-12-21 Yao Qi <yao.qi@linaro.org>
1735
1736 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1737 arm breakpoint.
1738
1739 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1740
1741 * server.c (handle_query): Call target_supports_software_single_step.
1742
1743 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1744
1745 * linux-low.c (single_step): New function.
1746 (linux_resume_one_lwp_throw): Call single_step.
1747 (start_step_over): Likewise.
1748
1749 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1750
1751 * Makefile.in (SFILES): Append arch/arm-linux.c,
1752 arch/arm-get-next-pcs.c.
1753 (arm-linux.o): New rule.
1754 (arm-get-next-pcs.o): New rule.
1755 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1756 arm-linux.o.
1757 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1758 to linux-aarch32-low.c.
1759 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1760 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1761 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1762 (thumb2_breakpoint_len): Likewise.
1763 (arm_is_thumb_mode): Make non-static.
1764 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1765 from linux-aarch32-low.c.
1766 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1767 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1768 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1769 (thumb2_breakpoint_len): Likewise.
1770 (arm_is_thumb_mode): New declaration.
1771 * linux-arm-low.c: Include arch/arm-linux.h
1772 aarch/arm-get-next-pcs.h, sys/syscall.h.
1773 (get_next_pcs_ops): New struct.
1774 (get_next_pcs_addr_bits_remove): New function.
1775 (get_next_pcs_is_thumb): New function.
1776 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1777 (arm_sigreturn_next_pc): Likewise.
1778 (get_next_pcs_syscall_next_pc): Likewise.
1779 (arm_gdbserver_get_next_pcs): Likewise.
1780 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1781 Initialize.
1782 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1783 * server.h: Include gdb_vecs.h.
1784
1785 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1786
1787 * Makefile.in (SFILES): Append common/common-regcache.c.
1788 (OBS): Append common-regcache.o.
1789 (common-regcache.o): New rule.
1790 * regcache.c (init_register_cache): Initialize cache to
1791 REG_UNAVAILABLE.
1792 (regcache_raw_read_unsigned): New function.
1793 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1794 register_status enum.
1795
1796 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1797
1798 * linux-aarch64-low.c (the_low_targets): Rename
1799 breakpoint_reinsert_addr to get_next_pcs.
1800 * linux-arm-low.c (the_low_targets): Likewise.
1801 * linux-bfin-low.c (the_low_targets): Likewise.
1802 * linux-cris-low.c (the_low_targets): Likewise.
1803 * linux-crisv32-low.c (the_low_targets): Likewise.
1804 * linux-low.c (can_software_single_step): Likewise.
1805 (install_software_single_step_breakpoints): New function.
1806 (start_step_over): Use install_software_single_step_breakpoints.
1807 * linux-low.h: New CORE_ADDR vector.
1808 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1809 get_next_pcs.
1810 * linux-mips-low.c (the_low_targets): Likewise.
1811 * linux-nios2-low.c (the_low_targets): Likewise.
1812 * linux-sparc-low.c (the_low_targets): Likewise.
1813
1814 2015-12-17 Pedro Alves <palves@redhat.com>
1815
1816 * linux-low.c (linux_kill_one_lwp): Remove references to
1817 LinuxThreads.
1818 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1819 to 'kill'.
1820 (linux_init_signals): Delete.
1821 (initialize_low): Adjust.
1822 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1823
1824 2015-12-16 Pedro Alves <palves@redhat.com>
1825
1826 * configure.ac (compiler warning flags): When testing a
1827 -Wno-foo option, check whether -Wfoo works instead.
1828 * configure: Regenerate.
1829
1830 2015-12-11 Don Breazeal <donb@codesourcery.com>
1831
1832 * server.c (process_serial_event): Don't exit from gdbserver
1833 in remote mode if there are still active inferiors.
1834
1835 2015-12-11 Yao Qi <yao.qi@linaro.org>
1836
1837 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1838 arm_breakpoint_at if the process is 32-bit.
1839
1840 2015-12-11 Yao Qi <yao.qi@linaro.org>
1841
1842 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1843 arm breakpoint.
1844
1845 2015-12-07 Yao Qi <yao.qi@linaro.org>
1846
1847 * configure.srv: Append arm.o to srv_tgtobj for
1848 aarch64*-*-linux* target.
1849 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1850 from linux-arm-low.c.
1851 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1852 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1853 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1854 (thumb2_breakpoint_len): Likewise.
1855 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1856 (arm_breakpoint_kinds): Likewise.
1857 (arm_breakpoint_kind_from_pc): Likewise.
1858 (arm_sw_breakpoint_from_kind): Likewise.
1859 (arm_breakpoint_kind_from_current_state): Likewise.
1860 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1861 (arm_sw_breakpoint_from_kind): Declare.
1862 (arm_breakpoint_kind_from_current_state): Declare.
1863 (arm_breakpoint_at): Declare.
1864 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1865 arm_sw_breakpoint_from_kind if process is 32-bit.
1866 (aarch64_breakpoint_kind_from_pc): New function.
1867 (aarch64_breakpoint_kind_from_current_state): New function.
1868 (the_low_target): Initialize fields breakpoint_kind_from_pc
1869 and breakpoint_kind_from_current_state.
1870 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1871 linux-aarch32-low.c.
1872 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1873 (arm_breakpoint, arm_breakpoint_len): Likewise.
1874 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1875 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1876 (arm_is_thumb_mode): Likewise.
1877 (arm_breakpoint_at): Likewise.
1878 (arm_breakpoint_kind_from_pc): Likewise.
1879 (arm_sw_breakpoint_from_kind): Likewise.
1880 (arm_breakpoint_kind_from_current_state): Likewise.
1881
1882 Revert:
1883 2015-08-04 Yao Qi <yao.qi@linaro.org>
1884
1885 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1886 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1887 * server.c (extended_protocol): Remove "static".
1888 * server.h (extended_protocol): Declare it.
1889
1890 2015-12-04 Josh Stone <jistone@redhat.com>
1891
1892 * target.h (struct target_ops) <arch_setup>: Rename to ...
1893 (struct target_ops) <post_create_inferior>: ... this.
1894 (target_arch_setup): Rename to ...
1895 (target_post_create_inferior): ... this, calling post_create_inferior.
1896 * server.c (start_inferior): Update target_arch_setup calls to
1897 target_post_create_inferior.
1898 * linux-low.c (linux_low_ptrace_options): Forward declare.
1899 (linux_arch_setup): Update its comment for general use.
1900 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1901 (struct linux_target_ops): Use linux_post_create_inferior.
1902 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1903 to post_create_inferior.
1904 * nto-low.c (struct nto_target_ops): Likewise.
1905 * spu-low.c (struct spu_target_ops): Likewise.
1906 * win32-low.c (struct win32_target_ops): Likewise.
1907
1908 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1909
1910 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1911
1912 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1913
1914 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1915 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1916 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1917 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1918 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1919 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1920 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1921 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1922 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1923 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1924 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1925 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1926
1927 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1928
1929 * linux-low.c (linux_look_up_symbols): Don't call
1930 linux_supports_traceclone.
1931 * linux-low.h (thread_db_init): Remove use_events argument.
1932 * thread-db.c (thread_db_use_event): Remove global variable.
1933 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1934 (struct thread_db) <td_create_bp>: Remove field.
1935 (thread_db_create_event): Remove function.
1936 (thread_db_enable_reporting): Likewise.
1937 (find_one_thread): Don't check for thread_db_use_events.
1938 (attach_thread): Likewise.
1939 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1940 (try_thread_db_load_1): Don't check for thread_db_use_events.
1941 (thread_db_init): Remove use_events argument and thread events
1942 handling.
1943 (remove_thread_event_breakpoints): Remove function.
1944 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1945
1946 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1947
1948 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1949 New function.
1950 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1951 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1952 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1953 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1954 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1955 Initialize.
1956 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1957 New function.
1958 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1959 * linux-low.c (can_hardware_single_step): Use
1960 supports_hardware_single_step.
1961 (can_software_single_step): New function.
1962 (start_step_over): Call can_software_single_step.
1963 (linux_supports_hardware_single_step): New function.
1964 (struct target_ops) <supports_software_single_step>: Initialize.
1965 * linux-low.h (struct linux_target_ops)
1966 <supports_hardware_single_step>: Initialize.
1967 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1968 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1969 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1970 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1971 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1972 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1973 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1974 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1975 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1976 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1977 Initialize.
1978 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1979 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1980 Initialize.
1981 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1982 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1983 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1984 New function.
1985 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1986 * target.h (struct target_ops): <supports_software_single_step>:
1987 New field.
1988 (target_supports_software_single_step): New macro.
1989
1990 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1991
1992 * linux-low.c (linux_wait_1): Fix pc advance condition.
1993 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1994 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1995
1996 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1997
1998 * linux-arm-low.c (arm_is_thumb_mode): New function.
1999 (arm_breakpoint_at): Use arm_is_thumb_mode.
2000 (arm_breakpoint_kind_from_current_state): New function.
2001 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2002 Initialize.
2003 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2004 (linux_breakpoint_kind_from_current_state): New function.
2005 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2006 * linux-low.h (struct linux_target_ops)
2007 <breakpoint_kind_from_current_state>: New field.
2008 * target.h (struct target_ops): Likewise.
2009 (target_breakpoint_kind_from_current_state): New macro.
2010
2011 2015-11-30 Pedro Alves <palves@redhat.com>
2012
2013 * linux-low.c (linux_resume): Wake up the event loop before
2014 returning.
2015
2016 2015-11-30 Pedro Alves <palves@redhat.com>
2017
2018 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2019 check.
2020 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2021 to -1.
2022 * target.c (struct thread_search): New structure.
2023 (thread_search_callback): New function.
2024 (prev_general_thread): New global.
2025 (prepare_to_access_memory, done_accessing_memory): New functions.
2026 * target.h (prepare_to_access_memory, done_accessing_memory):
2027 Replace macros with function declarations.
2028
2029 2015-11-30 Pedro Alves <palves@redhat.com>
2030
2031 PR 14618
2032 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2033 report TARGET_WAITKIND_NO_RESUMED.
2034 * remote-utils.c (prepare_resume_reply): Handle
2035 TARGET_WAITKIND_NO_RESUMED.
2036 * server.c (report_no_resumed): New global.
2037 (handle_query) <qSupported>: Handle "no-resumed+". Report
2038 "no-resumed+" support.
2039 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2040 return error if the client doesn't support no-resumed events.
2041 (push_stop_notification): New function.
2042 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2043 events if the client supports them.
2044
2045 2015-11-30 Pedro Alves <palves@redhat.com>
2046
2047 * linux-low.c (thread_still_has_status_pending_p): Don't check
2048 vCont;t here.
2049 (lwp_resumed): New function.
2050 (status_pending_p_callback): Return early if the LWP is not
2051 supposed to be resumed.
2052
2053 2015-11-30 Pedro Alves <palves@redhat.com>
2054
2055 * linux-low.c (handle_extended_wait): Assert that the LWP's
2056 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2057 thread create events, leave the new child's status pending.
2058 (linux_low_filter_event): If GDB wants to hear about thread exit
2059 events, leave the LWP marked dead and don't delete it.
2060 (linux_wait_for_event_filtered): Don't check for thread exit.
2061 (filter_exit_event): New function.
2062 (linux_wait_1): Use it, when returning an exit event.
2063 (linux_resume_one_lwp_throw): Assert that the LWP's
2064 waitstatus is TARGET_WAITKIND_IGNORE.
2065 * remote-utils.c (prepare_resume_reply): Handle
2066 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2067 * server.c (report_thread_events): New global.
2068 (handle_general_set): Handle QThreadEvents.
2069 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2070 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2071 TARGET_WAITKIND_THREAD_EXITED.
2072 * server.h (report_thread_events): Declare.
2073
2074 2015-11-30 Pedro Alves <palves@redhat.com>
2075
2076 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2077 the thread's last_resume_kind was resume_stop.
2078
2079 2015-11-30 Pedro Alves <palves@redhat.com>
2080
2081 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2082 before returning.
2083
2084 2015-11-30 Pedro Alves <palves@redhat.com>
2085
2086 * server.c (handle_v_requests): Handle vCtrlC.
2087
2088 2015-11-30 Pedro Alves <palves@redhat.com>
2089
2090 * gdbthread.h (find_any_thread_of_pid): Declare.
2091 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2092 functions.
2093 * server.c (handle_query): If current_thread is NULL, look for
2094 another thread of the selected process.
2095
2096 2015-11-26 Daniel Colascione <dancol@dancol.org>
2097 Simon Marchi <simon.marchi@ericsson.com>
2098
2099 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2100 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2101 name in reply.
2102 * target.h (struct target_ops) <thread_name>: New field.
2103 (target_thread_name): New macro.
2104
2105 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2106
2107 * regcache.h (regcache_invalidate_pid): Add declaration.
2108 * regcache.c (regcache_invalidate_pid): New function, extracted
2109 from regcache_invalidate.
2110 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2111 Add trivial documentation comment.
2112 * lynx-low.c: Use regcache_invalidate_pid instead of
2113 regcache_invalidate.
2114
2115 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2116
2117 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2118 and Elf64_auxv_t if the target is Android.
2119
2120 2015-11-22 Doug Evans <xdje42@gmail.com>
2121
2122 * target.h: #include <sys/types.h>.
2123
2124 2015-11-19 Pedro Alves <palves@redhat.com>
2125
2126 * linux-low.c (linux_process_qsupported): Change prototype.
2127 Adjust.
2128 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2129 Change prototype.
2130 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2131 and adjust to loop over all features.
2132 * server.c (handle_query) <qSupported>: Adjust to call
2133 target_process_qsupported once, passing it a vector of unprocessed
2134 features.
2135 * target.h (struct target_ops) <process_qsupported>: Change
2136 prototype.
2137 (target_process_qsupported): Adjust.
2138
2139 2015-11-19 Pedro Alves <palves@redhat.com>
2140
2141 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2142 mode.
2143 * configure: Regenerate.
2144
2145 2015-11-19 Pedro Alves <palves@redhat.com>
2146
2147 * configure: Regenerate.
2148
2149 2015-11-19 Yao Qi <yao.qi@linaro.org>
2150
2151 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2152 type to uint32_t.
2153
2154 2015-11-19 Yao Qi <yao.qi@linaro.org>
2155
2156 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2157 (struct aarch64_operand): Move enum out.
2158
2159 2015-11-19 Yao Qi <yao.qi@linaro.org>
2160
2161 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2162 struct user_fpsimd_state *.
2163 (aarch64_store_fpregset): Likewise.
2164
2165 2015-11-19 Yao Qi <yao.qi@linaro.org>
2166
2167 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2168 struct user_pt_regs *.
2169 (aarch64_store_gregset): Likewise.
2170
2171 2015-11-18 Pedro Alves <palves@redhat.com>
2172
2173 * Makefile.in (all_object_files): Add $IPA_OBJS.
2174
2175 2015-11-17 Pedro Alves <palves@redhat.com>
2176
2177 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2178 GDB_SIGNAL_0 and gdb_signal_to_string.
2179
2180 2015-11-17 Pedro Alves <palves@redhat.com>
2181
2182 * win32-low.c (handle_output_debug_string): Remove parameter.
2183 (win32_kill): Remove our_status local and adjust call to
2184 handle_output_debug_string.
2185 (get_child_debug_event): Adjust call to
2186 handle_output_debug_string.
2187
2188 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2189
2190 * linux-mips-low.c (mips_fill_gregset): Add cast.
2191 (mips_store_gregset): Likewise.
2192 (mips_fill_fpregset): Likewise.
2193 (mips_store_fpregset): Likewise.
2194
2195 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2196
2197 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2198 priv.
2199
2200 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2201
2202 * linux-mips-low.c (mips_linux_new_thread): Change type of
2203 watch_type to enum target_hw_bp_type.
2204
2205 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2206
2207 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2208 Change return type to arm_hwbp_type.
2209
2210 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2211
2212 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2213 (arm_store_gregset): Likewise.
2214 * linux-arm-low.c (arm_get_hwcap): Likewise.
2215 (arm_read_description): Likewise.
2216
2217 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2218
2219 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2220
2221 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2222
2223 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2224 (ppc_fill_vsxregset): Likewise.
2225 (ppc_store_vsxregset): Likewise.
2226 (ppc_fill_vrregset): Likewise.
2227 (ppc_store_vrregset): Likewise.
2228 (ppc_fill_evrregset): Likewise.
2229 (ppc_store_evrregset): Likewise.
2230
2231 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2232
2233 * linux-ppc-low.c (ppc_usrregs_info): Remove
2234 forward-declaration.
2235 (ppc_arch_setup): Move lower in file.
2236
2237 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2238
2239 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2240 (ps_pdwrite): Likewise.
2241
2242 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2243
2244 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2245 to after assert checks.
2246
2247 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2248
2249 * proc-service.c (ps_pdread): Add/adjust casts.
2250 (ps_pdwrite): Add/adjust casts.
2251
2252 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2253
2254 * server.c (handle_search_memory_1): Cast return value of
2255 memmem.
2256
2257 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2258
2259 * server.c (write_qxfer_response): Change type of data to
2260 gdb_byte *.
2261
2262 2015-10-29 Pedro Alves <palves@redhat.com>
2263
2264 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2265
2266 2015-10-29 Pedro Alves <palves@redhat.com>
2267
2268 * tracepoint.c (clear_installed_tracepoints): Add casts.
2269
2270 2015-10-29 Pedro Alves <palves@redhat.com>
2271
2272 * server.c (handle_v_cont, process_serial_event): Add enum
2273 gdb_signal casts to signal parsing code.
2274
2275 2015-10-29 Pedro Alves <palves@redhat.com>
2276
2277 * linux-low.h (NULL_REGSET): Define.
2278 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2279 * linux-arm-low.c (arm_regsets): Likewise.
2280 * linux-crisv32-low.c (cris_regsets): Likewise.
2281 * linux-m68k-low.c (m68k_regsets): Likewise.
2282 * linux-mips-low.c (mips_regsets): Likewise.
2283 * linux-nios2-low.c (nios2_regsets): Likewise.
2284 * linux-ppc-low.c (ppc_regsets): Likewise.
2285 * linux-s390-low.c (s390_regsets): Likewise.
2286 * linux-sh-low.c (sh_regsets): Likewise.
2287 * linux-sparc-low.c (sparc_regsets): Likewise.
2288 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2289 * linux-tile-low.c (tile_regsets): Likewise.
2290 * linux-x86-low.c (x86_regsets): Likewise.
2291 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2292
2293 2015-10-29 Pedro Alves <palves@redhat.com>
2294
2295 * linux-low.h (NULL_REGSET): Define.
2296 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2297 * linux-arm-low.c (arm_regsets): Likewise.
2298 * linux-crisv32-low.c (cris_regsets): Likewise.
2299 * linux-m68k-low.c (m68k_regsets): Likewise.
2300 * linux-mips-low.c (mips_regsets): Likewise.
2301 * linux-nios2-low.c (nios2_regsets): Likewise.
2302 * linux-ppc-low.c (ppc_regsets): Likewise.
2303 * linux-s390-low.c (s390_regsets): Likewise.
2304 * linux-sh-low.c (sh_regsets): Likewise.
2305 * linux-sparc-low.c (sparc_regsets): Likewise.
2306 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2307 * linux-tile-low.c (tile_regsets): Likewise.
2308 * linux-x86-low.c (x86_regsets): Likewise.
2309 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2310
2311 2015-10-26 Doug Evans <dje@google.com>
2312
2313 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2314
2315 2015-10-26 Doug Evans <dje@google.com>
2316
2317 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2318
2319 2015-10-26 Doug Evans <dje@google.com>
2320
2321 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2322 for debug_printf.
2323 (attach_thread, find_new_threads_callback): Ditto.
2324
2325 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2326
2327 * mem-break.h (set_breakpoint_data): Remove.
2328
2329 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2330
2331 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2332 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2333 (initialize_low): Remove set_breakpoint_data call.
2334 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2335 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2336 (initialize_low): Remove set_breakpoint_data call.
2337 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2338 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2339 (initialize_low): Remove set_breakpoint_data call.
2340
2341 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2342
2343 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2344 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2345 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2346 * target.h (target_breakpoint_kind_from_pc): New macro.
2347
2348 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2349
2350 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2351 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2352 the default breakpoint kind.
2353
2354 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2355
2356 * linux-arm-low.c (arm_supports_z_point_type): Add software
2357 breakpoint support.
2358
2359 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2360
2361 * linux-arm-low.c: Refactor breakpoint definitions.
2362 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2363 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2364
2365 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2366
2367 * Makefile.in: Add arm.c/o.
2368 * configure.srv: Likewise.
2369 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2370 (arm_breakpoint_kind_from_pc): New function.
2371 (arm_sw_breakpoint_from_kind): Return proper kind.
2372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2373
2374 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2375
2376 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2377 removal.
2378 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2379 (struct raw_breakpoint) <size>: Remove.
2380 (struct raw_breakpoint) <kind>: Add.
2381 (bp_size): New function.
2382 (bp_opcode): Likewise.
2383 (find_raw_breakpoint_at): Adjust for kind.
2384 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2385 (remove_memory_breakpoint): Adjust for kind call bp_size.
2386 (set_raw_breakpoint_at): Adjust for kind.
2387 (set_breakpoint): Likewise.
2388 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2389 (delete_raw_breakpoint): Adjust for kind.
2390 (delete_breakpoint): Likewise.
2391 (find_gdb_breakpoint): Likewise.
2392 (set_gdb_breakpoint_1): Likewise.
2393 (set_gdb_breakpoint): Likewise.
2394 (delete_gdb_breakpoint_1): Likewise.
2395 (delete_gdb_breakpoint): Likewise.
2396 (uninsert_raw_breakpoint): Likewise.
2397 (reinsert_raw_breakpoint): Likewise.
2398 (set_breakpoint_data): Remove.
2399 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2400 (check_mem_read): Adjust for kind call bp_size.
2401 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2402 (clone_one_breakpoint): Adjust for kind.
2403 * mem-break.h (set_gdb_breakpoint): Likewise.
2404 (delete_gdb_breakpoint): Likewise.
2405 * server.c (process_serial_event): Likewise.
2406
2407 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2408
2409 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2410 (struct linux_target_ops) <breakpoint>: Remove.
2411 (struct linux_target_ops) <breakpoint_len>: Remove.
2412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2414 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2415 (arm_sw_breakpoint_from_kind): New function.
2416 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2417 (struct linux_target_ops) <breakpoint>: Remove.
2418 (struct linux_target_ops) <breakpoint_len>: Remove.
2419 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2420 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2421 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2422 (struct linux_target_ops) <breakpoint>: Remove.
2423 (struct linux_target_ops) <breakpoint_len>: Remove.
2424 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2425 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2426 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2427 (struct linux_target_ops) <breakpoint>: Remove.
2428 (struct linux_target_ops) <breakpoint_len>: Remove.
2429 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2430 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2431 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2432 and sw_breakpoint_from_kind to increment the pc.
2433 (linux_breakpoint_kind_from_pc): New function.
2434 (linux_sw_breakpoint_from_kind): New function.
2435 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2436 (initialize_low): Call breakpoint_kind_from_pc and
2437 sw_breakpoint_from_kind to replace breakpoint_data/len.
2438 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2439 New field.
2440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2441 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2442 (struct linux_target_ops) <breakpoint>: Remove.
2443 (struct linux_target_ops) <breakpoint_len>: Remove.
2444 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2446 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2447 (struct linux_target_ops) <breakpoint>: Remove.
2448 (struct linux_target_ops) <breakpoint_len>: Remove.
2449 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2450 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2451 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2452 (struct linux_target_ops) <breakpoint>: Remove.
2453 (struct linux_target_ops) <breakpoint_len>: Remove.
2454 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2455 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2456 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2457 (struct linux_target_ops) <breakpoint>: Remove.
2458 (struct linux_target_ops) <breakpoint_len>: Remove.
2459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2461 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2462 (struct linux_target_ops) <breakpoint>: Remove.
2463 (struct linux_target_ops) <breakpoint_len>: Remove.
2464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2466 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2467 (struct linux_target_ops) <breakpoint>: Remove.
2468 (struct linux_target_ops) <breakpoint_len>: Remove.
2469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2471 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2472 (struct linux_target_ops) <breakpoint>: Remove.
2473 (struct linux_target_ops) <breakpoint_len>: Remove.
2474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2476 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2477 (struct linux_target_ops) <breakpoint>: Remove.
2478 (struct linux_target_ops) <breakpoint_len>: Remove.
2479 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2480 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2481 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2482 (struct linux_target_ops) <breakpoint>: Remove.
2483 (struct linux_target_ops) <breakpoint_len>: Remove.
2484 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2486 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2487 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2488 (struct linux_target_ops) <breakpoint>: Remove.
2489 (struct linux_target_ops) <breakpoint_len>: Remove.
2490 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2491 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2492 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2493 (struct linux_target_ops) <breakpoint>: Remove.
2494 (struct linux_target_ops) <breakpoint_len>: Remove.
2495 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2496 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2497
2498 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2499
2500 * linux-cris-low.c (cris_get_pc): Remove void arg.
2501
2502 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2503
2504 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2505 variable name.
2506
2507 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2508
2509 * inferiors.c (thread_pid_matches_callback): New function.
2510 (find_thread_process): New function.
2511 (remove_thread): Reset current_thread.
2512 (remove_process): Assert threads have been removed first.
2513
2514 2015-10-15 Yao Qi <yao.qi@linaro.org>
2515
2516 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2517 if it is 3.
2518 (aarch64_remove_point): Likewise.
2519 * regcache.c (regcache_register_size): New function.
2520
2521 2015-10-12 Yao Qi <yao.qi@linaro.org>
2522
2523 * linux-aarch64-low.c: Update all callers as emit_load_store
2524 is renamed to aarch64_emit_load_store.
2525
2526 2015-10-12 Yao Qi <yao.qi@linaro.org>
2527
2528 * linux-aarch64-low.c: Update all callers of function renaming
2529 from emit_insn to aarch64_emit_insn.
2530
2531 2015-10-12 Yao Qi <yao.qi@linaro.org>
2532
2533 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2534 arch/aarch64-insn.h.
2535 (struct aarch64_memory_operand): Likewise.
2536 (ENCODE): Likewise.
2537 (emit_insn): Move to arch/aarch64-insn.c.
2538 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2539 (emit_load_store): Move to arch/aarch64-insn.c.
2540 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2541 (can_encode_int32): Remove.
2542
2543 2015-10-12 Yao Qi <yao.qi@linaro.org>
2544
2545 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2546 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2547 (aarch64_relocate_instruction): Likewise.
2548 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2549 (struct aarch64_insn_visitor): Likewise.
2550
2551 2015-10-12 Yao Qi <yao.qi@linaro.org>
2552
2553 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2554 (struct aarch64_insn_visitor): New.
2555 (struct aarch64_insn_relocation_data): New.
2556 (aarch64_ftrace_insn_reloc_b): New function.
2557 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2558 (aarch64_ftrace_insn_reloc_cb): Likewise.
2559 (aarch64_ftrace_insn_reloc_tb): Likewise.
2560 (aarch64_ftrace_insn_reloc_adr): Likewise.
2561 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2562 (aarch64_ftrace_insn_reloc_others): Likewise.
2563 (visitor): New.
2564 (aarch64_relocate_instruction): Use visitor.
2565
2566 2015-10-12 Yao Qi <yao.qi@linaro.org>
2567
2568 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2569 int. Add argument buf.
2570 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2571 aarch64_relocate_instruction.
2572
2573 2015-10-12 Yao Qi <yao.qi@linaro.org>
2574
2575 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2576 argument insn. Remove local variable insn. Don't call
2577 target_read_uint32.
2578 (aarch64_install_fast_tracepoint_jump_pad): Call
2579 target_read_uint32.
2580
2581 2015-09-30 Yao Qi <yao.qi@linaro.org>
2582
2583 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2584 (emit_load_store_pair): Likewise.
2585
2586 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2587
2588 * dll.c (match_dll): Add cast(s).
2589 (unloaded_dll): Likewise.
2590 * linux-low.c (second_thread_of_pid_p): Likewise.
2591 (delete_lwp_callback): Likewise.
2592 (count_events_callback): Likewise.
2593 (select_event_lwp_callback): Likewise.
2594 (linux_set_resume_request): Likewise.
2595 * server.c (accumulate_file_name_length): Likewise.
2596 (emit_dll_description): Likewise.
2597 (handle_qxfer_threads_worker): Likewise.
2598 (visit_actioned_threads): Likewise.
2599 * thread-db.c (any_thread_of): Likewise.
2600 * tracepoint.c (same_process_p): Likewise.
2601 (match_blocktype): Likewise.
2602 (build_traceframe_info_xml): Likewise.
2603
2604 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2605
2606 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2607 assignment.
2608 (gdb_unparse_agent_expr): Likewise.
2609 * hostio.c (require_data): Likewise.
2610 (handle_pread): Likewise.
2611 * linux-low.c (disable_regset): Likewise.
2612 (fetch_register): Likewise.
2613 (store_register): Likewise.
2614 (get_dynamic): Likewise.
2615 (linux_qxfer_libraries_svr4): Likewise.
2616 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2617 (set_fast_tracepoint_jump): Likewise.
2618 (uninsert_fast_tracepoint_jumps_at): Likewise.
2619 (reinsert_fast_tracepoint_jumps_at): Likewise.
2620 (validate_inserted_breakpoint): Likewise.
2621 (clone_agent_expr): Likewise.
2622 * regcache.c (init_register_cache): Likewise.
2623 * remote-utils.c (putpkt_binary_1): Likewise.
2624 (decode_M_packet): Likewise.
2625 (decode_X_packet): Likewise.
2626 (look_up_one_symbol): Likewise.
2627 (relocate_instruction): Likewise.
2628 (monitor_output): Likewise.
2629 * server.c (handle_search_memory): Likewise.
2630 (handle_qxfer_exec_file): Likewise.
2631 (handle_qxfer_libraries): Likewise.
2632 (handle_qxfer): Likewise.
2633 (handle_query): Likewise.
2634 (handle_v_cont): Likewise.
2635 (handle_v_run): Likewise.
2636 (captured_main): Likewise.
2637 * target.c (write_inferior_memory): Likewise.
2638 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2639 * tracepoint.c (init_trace_buffer): Likewise.
2640 (add_tracepoint_action): Likewise.
2641 (add_traceframe): Likewise.
2642 (add_traceframe_block): Likewise.
2643 (cmd_qtdpsrc): Likewise.
2644 (cmd_qtdv): Likewise.
2645 (cmd_qtstatus): Likewise.
2646 (response_source): Likewise.
2647 (response_tsv): Likewise.
2648 (cmd_qtnotes): Likewise.
2649 (gdb_collect): Likewise.
2650 (initialize_tracepoint): Likewise.
2651
2652 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2653
2654 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2655 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2656 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2657 <NOP>: New.
2658 (enum aarch64_condition_codes): New enum.
2659 (w0): New static global.
2660 (fp): Likewise.
2661 (lr): Likewise.
2662 (struct aarch64_memory_operand) <type>: New
2663 MEMORY_OPERAND_POSTINDEX type.
2664 (postindex_memory_operand): New helper function.
2665 (emit_ret): New function.
2666 (emit_load_store_pair): New function, factored out of emit_stp
2667 with support for MEMORY_OPERAND_POSTINDEX.
2668 (emit_stp): Rewrite using emit_load_store_pair.
2669 (emit_ldp): New function.
2670 (emit_load_store): Likewise.
2671 (emit_ldr): Mention post-index instruction in comment.
2672 (emit_ldrh): New function.
2673 (emit_ldrb): New function.
2674 (emit_ldrsw): Mention post-index instruction in comment.
2675 (emit_str): Likewise.
2676 (emit_subs): New function.
2677 (emit_cmp): Likewise.
2678 (emit_and): Likewise.
2679 (emit_orr): Likewise.
2680 (emit_orn): Likewise.
2681 (emit_eor): Likewise.
2682 (emit_mvn): Likewise.
2683 (emit_lslv): Likewise.
2684 (emit_lsrv): Likewise.
2685 (emit_asrv): Likewise.
2686 (emit_mul): Likewise.
2687 (emit_sbfm): Likewise.
2688 (emit_sbfx): Likewise.
2689 (emit_ubfm): Likewise.
2690 (emit_ubfx): Likewise.
2691 (emit_csinc): Likewise.
2692 (emit_cset): Likewise.
2693 (emit_nop): Likewise.
2694 (emit_ops_insns): New helper function.
2695 (emit_pop): Likewise.
2696 (emit_push): Likewise.
2697 (aarch64_emit_prologue): New function.
2698 (aarch64_emit_epilogue): Likewise.
2699 (aarch64_emit_add): Likewise.
2700 (aarch64_emit_sub): Likewise.
2701 (aarch64_emit_mul): Likewise.
2702 (aarch64_emit_lsh): Likewise.
2703 (aarch64_emit_rsh_signed): Likewise.
2704 (aarch64_emit_rsh_unsigned): Likewise.
2705 (aarch64_emit_ext): Likewise.
2706 (aarch64_emit_log_not): Likewise.
2707 (aarch64_emit_bit_and): Likewise.
2708 (aarch64_emit_bit_or): Likewise.
2709 (aarch64_emit_bit_xor): Likewise.
2710 (aarch64_emit_bit_not): Likewise.
2711 (aarch64_emit_equal): Likewise.
2712 (aarch64_emit_less_signed): Likewise.
2713 (aarch64_emit_less_unsigned): Likewise.
2714 (aarch64_emit_ref): Likewise.
2715 (aarch64_emit_if_goto): Likewise.
2716 (aarch64_emit_goto): Likewise.
2717 (aarch64_write_goto_address): Likewise.
2718 (aarch64_emit_const): Likewise.
2719 (aarch64_emit_call): Likewise.
2720 (aarch64_emit_reg): Likewise.
2721 (aarch64_emit_pop): Likewise.
2722 (aarch64_emit_stack_flush): Likewise.
2723 (aarch64_emit_zero_ext): Likewise.
2724 (aarch64_emit_swap): Likewise.
2725 (aarch64_emit_stack_adjust): Likewise.
2726 (aarch64_emit_int_call_1): Likewise.
2727 (aarch64_emit_void_call_2): Likewise.
2728 (aarch64_emit_eq_goto): Likewise.
2729 (aarch64_emit_ne_goto): Likewise.
2730 (aarch64_emit_lt_goto): Likewise.
2731 (aarch64_emit_le_goto): Likewise.
2732 (aarch64_emit_gt_goto): Likewise.
2733 (aarch64_emit_ge_got): Likewise.
2734 (aarch64_emit_ops_impl): New static global variable.
2735 (aarch64_emit_ops): New target function, return
2736 &aarch64_emit_ops_impl.
2737 (struct linux_target_ops): Install it.
2738
2739 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2740
2741 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2742 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2743 aarch64-ipa.o.
2744 * linux-aarch64-ipa.c: New file.
2745 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2746 and endian.h.
2747 (aarch64_get_thread_area): New target method.
2748 (extract_signed_bitfield): New helper function.
2749 (aarch64_decode_ldr_literal): New function.
2750 (enum aarch64_opcodes): New enum.
2751 (struct aarch64_register): New struct.
2752 (struct aarch64_operand): New struct.
2753 (x0): New static global.
2754 (x1): Likewise.
2755 (x2): Likewise.
2756 (x3): Likewise.
2757 (x4): Likewise.
2758 (w2): Likewise.
2759 (ip0): Likewise.
2760 (sp): Likewise.
2761 (xzr): Likewise.
2762 (aarch64_register): New helper function.
2763 (register_operand): Likewise.
2764 (immediate_operand): Likewise.
2765 (struct aarch64_memory_operand): New struct.
2766 (offset_memory_operand): New helper function.
2767 (preindex_memory_operand): Likewise.
2768 (enum aarch64_system_control_registers): New enum.
2769 (ENCODE): New macro.
2770 (emit_insn): New helper function.
2771 (emit_b): New function.
2772 (emit_bcond): Likewise.
2773 (emit_cb): Likewise.
2774 (emit_tb): Likewise.
2775 (emit_blr): Likewise.
2776 (emit_stp): Likewise.
2777 (emit_ldp_q_offset): Likewise.
2778 (emit_stp_q_offset): Likewise.
2779 (emit_load_store): Likewise.
2780 (emit_ldr): Likewise.
2781 (emit_ldrsw): Likewise.
2782 (emit_str): Likewise.
2783 (emit_ldaxr): Likewise.
2784 (emit_stxr): Likewise.
2785 (emit_stlr): Likewise.
2786 (emit_data_processing_reg): Likewise.
2787 (emit_data_processing): Likewise.
2788 (emit_add): Likewise.
2789 (emit_sub): Likewise.
2790 (emit_mov): Likewise.
2791 (emit_movk): Likewise.
2792 (emit_mov_addr): Likewise.
2793 (emit_mrs): Likewise.
2794 (emit_msr): Likewise.
2795 (emit_sevl): Likewise.
2796 (emit_wfe): Likewise.
2797 (append_insns): Likewise.
2798 (can_encode_int32_in): New helper function.
2799 (aarch64_relocate_instruction): New function.
2800 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2801 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2802 (struct linux_target_ops): Install aarch64_get_thread_area,
2803 aarch64_install_fast_tracepoint_jump_pad and
2804 aarch64_get_min_fast_tracepoint_insn_len.
2805
2806 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2807
2808 * Makefile.in (aarch64-insn.o): New rule.
2809 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2810
2811 2015-09-21 Yao Qi <yao.qi@linaro.org>
2812
2813 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2814
2815 2015-09-21 Yao Qi <yao.qi@linaro.org>
2816
2817 * tracepoint.c (max_jump_pad_size): Remove.
2818
2819 2015-09-18 Yao Qi <yao.qi@linaro.org>
2820
2821 * linux-aarch64-low.c: Don't include sys/uio.h.
2822 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2823
2824 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2825
2826 * tracepoint.c (eval_result_type): Change prototype.
2827 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2828
2829 2015-09-15 Pedro Alves <palves@redhat.com>
2830
2831 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2832 Check whether to report exec events instead of checking whether
2833 multiprocess is enabled.
2834
2835 2015-09-15 Pedro Alves <palves@redhat.com>
2836
2837 PR remote/18965
2838 * remote-utils.c (prepare_resume_reply): Merge
2839 TARGET_WAITKIND_VFORK_DONE switch case with the
2840 TARGET_WAITKIND_FORKED case.
2841
2842 2015-09-15 Yao Qi <yao.qi@linaro.org>
2843
2844 * server.c (handle_query): Check string comparison using
2845 "else if" instead of "if".
2846
2847 2015-09-15 Yao Qi <yao.qi@linaro.org>
2848
2849 * server.c (vCont_supported): New global variable.
2850 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2851 matches. Append ";vContSupported+" to own_buf.
2852 (handle_v_requests): Append ";s;S" to own_buf if target supports
2853 hardware single step or vCont_supported is false.
2854 (capture_main): Set vCont_supported to zero.
2855
2856 2015-09-15 Yao Qi <yao.qi@linaro.org>
2857
2858 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2859 it to ...
2860 (linux_supports_hardware_single_step): ... New function.
2861 (linux_target_ops): Update.
2862 * lynx-low.c (lynx_target_ops): Set field
2863 supports_hardware_single_step to target_can_do_hardware_single_step.
2864 * nto-low.c (nto_target_ops): Likewise.
2865 * spu-low.c (spu_target_ops): Likewise.
2866 * win32-low.c (win32_target_ops): Likewise.
2867 * target.c (target_can_do_hardware_single_step): New function.
2868 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2869 Remove. <supports_hardware_single_step>: New field.
2870 (target_supports_conditional_breakpoints): Remove.
2871 (target_supports_hardware_single_step): New macro.
2872 (target_can_do_hardware_single_step): Declare.
2873 * server.c (handle_query): Use target_supports_hardware_single_step
2874 instead of target_supports_conditional_breakpoints.
2875
2876 2015-09-15 Yao Qi <yao.qi@linaro.org>
2877
2878 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2879 function.
2880 (struct linux_target_ops the_low_target): Install
2881 aarch64_linux_siginfo_fixup.
2882
2883 2015-09-11 Don Breazeal <donb@codesourcery.com>
2884 Luis Machado <lgustavo@codesourcery.com>
2885
2886 * linux-low.c (linux_mourn): Static declaration.
2887 (linux_arch_setup): Move in front of
2888 handle_extended_wait.
2889 (linux_arch_setup_thread): New function.
2890 (handle_extended_wait): Handle exec events. Call
2891 linux_arch_setup_thread. Make event_lwp argument a
2892 pointer-to-a-pointer.
2893 (check_zombie_leaders): Do not check stopped threads.
2894 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2895 (linux_low_filter_event): Add lwp and thread for exec'ing
2896 non-leader thread if leader thread has been deleted.
2897 Refactor code into linux_arch_setup_thread and call it.
2898 Pass child lwp pointer by reference to handle_extended_wait.
2899 (linux_wait_for_event_filtered): Update comment.
2900 (linux_wait_1): Prevent clobbering exec event status.
2901 (linux_supports_exec_events): New function.
2902 (linux_target_ops) <supports_exec_events>: Initialize new member.
2903 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2904 new member.
2905 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2906 * server.c (report_exec_events): New global variable.
2907 (handle_query): Handle qSupported query for exec-events feature.
2908 (captured_main): Initialize report_exec_events.
2909 * server.h (report_exec_events): Declare new global variable.
2910 * target.h (struct target_ops) <supports_exec_events>: New
2911 member.
2912 (target_supports_exec_events): New macro.
2913 * win32-low.c (win32_target_ops) <supports_exec_events>:
2914 Initialize new member.
2915
2916 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2917
2918 * linux-low.c (linux_low_enable_btrace): Remove.
2919 (linux_target_ops): Replace linux_low_enable_btrace with
2920 linux_enable_btrace.
2921
2922 2015-09-03 Yao Qi <yao.qi@linaro.org>
2923
2924 * linux-aarch64-low.c (aarch64_insert_point): Call
2925 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2926 returns true.
2927
2928 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2929
2930 * linux-low.c (check_stopped_by_breakpoint): Use
2931 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2932
2933 2015-08-27 Pedro Alves <palves@redhat.com>
2934
2935 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2936
2937 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2938
2939 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2940 the XNEW-family equivalent.
2941 (compile_bytecodes): Likewise.
2942 * dll.c (loaded_dll): Likewise.
2943 * event-loop.c (append_callback_event): Likewise.
2944 (create_file_handler): Likewise.
2945 (create_file_event): Likewise.
2946 * hostio.c (handle_open): Likewise.
2947 * inferiors.c (add_thread): Likewise.
2948 (add_process): Likewise.
2949 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2950 * linux-arm-low.c (arm_new_process): Likewise.
2951 (arm_new_thread): Likewise.
2952 * linux-low.c (add_to_pid_list): Likewise.
2953 (linux_add_process): Likewise.
2954 (handle_extended_wait): Likewise.
2955 (add_lwp): Likewise.
2956 (enqueue_one_deferred_signal): Likewise.
2957 (enqueue_pending_signal): Likewise.
2958 (linux_resume_one_lwp_throw): Likewise.
2959 (linux_resume_one_thread): Likewise.
2960 (linux_read_memory): Likewise.
2961 (linux_write_memory): Likewise.
2962 * linux-mips-low.c (mips_linux_new_process): Likewise.
2963 (mips_linux_new_thread): Likewise.
2964 (mips_add_watchpoint): Likewise.
2965 * linux-x86-low.c (initialize_low_arch): Likewise.
2966 * lynx-low.c (lynx_add_process): Likewise.
2967 * mem-break.c (set_raw_breakpoint_at): Likewise.
2968 (set_breakpoint): Likewise.
2969 (add_condition_to_breakpoint): Likewise.
2970 (add_commands_to_breakpoint): Likewise.
2971 (clone_agent_expr): Likewise.
2972 (clone_one_breakpoint): Likewise.
2973 * regcache.c (new_register_cache): Likewise.
2974 * remote-utils.c (look_up_one_symbol): Likewise.
2975 * server.c (queue_stop_reply): Likewise.
2976 (start_inferior): Likewise.
2977 (queue_stop_reply_callback): Likewise.
2978 (handle_target_event): Likewise.
2979 * spu-low.c (fetch_ppc_memory): Likewise.
2980 (store_ppc_memory): Likewise.
2981 * target.c (set_target_ops): Likewise.
2982 * thread-db.c (thread_db_load_search): Likewise.
2983 (try_thread_db_load_1): Likewise.
2984 * tracepoint.c (add_tracepoint): Likewise.
2985 (add_tracepoint_action): Likewise.
2986 (create_trace_state_variable): Likewise.
2987 (cmd_qtdpsrc): Likewise.
2988 (cmd_qtro): Likewise.
2989 (add_while_stepping_state): Likewise.
2990 * win32-low.c (child_add_thread): Likewise.
2991 (get_image_name): Likewise.
2992
2993 2015-08-25 Yao Qi <yao.qi@linaro.org>
2994
2995 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2996
2997 2015-08-25 Yao Qi <yao.qi@linaro.org>
2998
2999 * Makefile.in (aarch64-linux.o): New rule.
3000 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3001 srv_tgtobj.
3002 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3003 (aarch64_init_debug_reg_state): Make it extern.
3004 (aarch64_linux_prepare_to_resume): Remove.
3005
3006 2015-08-25 Yao Qi <yao.qi@linaro.org>
3007
3008 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3009 lwp_arch_private_info and ptid_of_lwp.
3010
3011 2015-08-25 Yao Qi <yao.qi@linaro.org>
3012
3013 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3014 Find proc_info by find_process_pid. All callers updated.
3015
3016 2015-08-25 Yao Qi <yao.qi@linaro.org>
3017
3018 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3019 Remove.
3020 (debug_reg_change_callback): Remove.
3021 (aarch64_notify_debug_reg_change): Remove.
3022
3023 2015-08-25 Yao Qi <yao.qi@linaro.org>
3024
3025 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3026 Call current_lwp_ptid.
3027
3028 2015-08-25 Yao Qi <yao.qi@linaro.org>
3029
3030 * linux-aarch64-low.c (debug_reg_change_callback): Use
3031 debug_printf.
3032
3033 2015-08-25 Yao Qi <yao.qi@linaro.org>
3034
3035 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3036
3037 2015-08-25 Yao Qi <yao.qi@linaro.org>
3038
3039 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3040
3041 2015-08-25 Yao Qi <yao.qi@linaro.org>
3042
3043 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3044 the code.
3045
3046 2015-08-25 Yao Qi <yao.qi@linaro.org>
3047
3048 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3049 Remove.
3050 (debug_reg_change_callback): Remove argument entry and add argument
3051 lwp. Remove local variable thread. Don't print thread id in the
3052 debugging output. Don't check whether pid of thread equals to pid.
3053 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3054 iterate_over_lwps instead find_inferior.
3055
3056 2015-08-24 Pedro Alves <palves@redhat.com>
3057
3058 * inferiors.c (get_first_process): New function.
3059 * inferiors.h (get_first_process): New declaration.
3060 * remote-utils.c (read_ptid): Default to the first process in the
3061 list, instead of to the current thread's process.
3062
3063 2015-08-24 Pedro Alves <palves@redhat.com>
3064
3065 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3066 * event-loop.c: Likewise.
3067 * remote-utils.c: Likewise.
3068 * tracepoint.c: Likewise.
3069
3070 2015-08-24 Pedro Alves <palves@redhat.com>
3071
3072 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3073 ptid_get_lwp.
3074
3075 2015-08-21 Pedro Alves <palves@redhat.com>
3076
3077 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3078 instead of literal 1.
3079
3080 2015-08-21 Pedro Alves <palves@redhat.com>
3081
3082 * tdesc.c (default_description): Explicitly zero-initialize.
3083
3084 2015-08-21 Pedro Alves <palves@redhat.com>
3085
3086 PR gdb/18749
3087 * inferiors.c (remove_thread): Discard any pending stop reply for
3088 this thread.
3089 * server.c (remove_all_on_match_pid): Rename to ...
3090 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3091 instead of a pid.
3092 (discard_queued_stop_replies): Change parameter to a ptid. Now
3093 extern.
3094 (handle_v_kill, kill_inferior_callback, captured_main)
3095 (process_serial_event): Adjust.
3096 * server.h (discard_queued_stop_replies): Declare.
3097
3098 2015-08-21 Pedro Alves <palves@redhat.com>
3099
3100 * linux-low.c (wait_for_sigstop): Always switch to no thread
3101 selected if the previously current thread dies.
3102 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3103 process instead of the current thread's.
3104 * remote-utils.c (input_interrupt): Don't check if there's no
3105 current thread.
3106 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3107 current thread to the general thread fails, error out.
3108 (handle_qxfer_auxv, handle_qxfer_libraries)
3109 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3110 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3111 (handle_query): Check if there's a thread selected instead of
3112 checking whether there's any thread in the thread list.
3113 (handle_qxfer_threads, handle_qxfer_btrace)
3114 (handle_qxfer_btrace_conf): Don't error out early if there's no
3115 thread in the thread list.
3116 (handle_v_cont, myresume): Don't set the current thread to the
3117 continue thread.
3118 (process_serial_event) <Hg handling>: Also set thread_id if the
3119 previous general thread is still alive.
3120 (process_serial_event) <g/G handling>: If setting the current
3121 thread to the general thread fails, error out.
3122 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3123 thread's lwp instead of the current thread's.
3124 * target.c (set_desired_thread): If the desired thread was not
3125 found, leave the current thread pointing to NULL. Return an int
3126 (boolean) indicating success.
3127 * target.h (set_desired_thread): Change return type to int.
3128
3129 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3130
3131 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3132 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3133 #includes.
3134 (ps_get_thread_area): New function.
3135
3136 2015-08-19 Gary Benson <gbenson@redhat.com>
3137
3138 * hostio.c (handle_pread): Do not attempt to read more data
3139 than hostio_reply_with_data can fit in a packet.
3140
3141 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3142
3143 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3144
3145 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3146
3147 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3148
3149 2015-08-06 Pedro Alves <palves@redhat.com>
3150
3151 * tracepoint.c (expr_eval_result): Now an int.
3152
3153 2015-08-06 Pedro Alves <palves@redhat.com>
3154
3155 * gdbthread.h (struct regcache): Forward declare.
3156 (struct thread_info) <regcache_data>: Now a struct regcache
3157 pointer.
3158 * inferiors.c (inferior_regcache_data)
3159 (set_inferior_regcache_data): Now work with struct regcache
3160 pointers.
3161 * inferiors.h (struct regcache): Forward declare.
3162 (inferior_regcache_data, set_inferior_regcache_data): Now work
3163 with struct regcache pointers.
3164 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3165 (free_register_cache_thread): Remove struct regcache pointer
3166 casts.
3167
3168 2015-08-06 Pedro Alves <palves@redhat.com>
3169
3170 * server.c (captured_main): On error, print the exception message
3171 to stderr, and if run_once is set, throw a quit.
3172
3173 2015-08-06 Pedro Alves <palves@redhat.com>
3174
3175 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3176 the current thread.
3177
3178 2015-08-06 Pedro Alves <palves@redhat.com>
3179
3180 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3181 reading beyond the passed in buffer length.
3182
3183 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3184
3185 * tracepoint.c (symbol_list) <required>: Remove.
3186
3187 2015-08-06 Pedro Alves <palves@redhat.com>
3188
3189 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3190 count if stopping and suspending threads.
3191 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3192 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3193 (linux_detach): Complete an ongoing step-over.
3194 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3195 throughout.
3196 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3197 (linux_wait_1): If passing a signal to the inferior after
3198 finishing a step-over, unsuspend and re-resume all lwps. If we
3199 see a single-step event but the thread should be continuing, don't
3200 pass the trap to gdb.
3201 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3202 internal_error instead of gdb_assert.
3203 (enqueue_pending_signal): New function.
3204 (check_ptrace_stopped_lwp_gone): Add debug output.
3205 (start_step_over): Use internal_error instead of gdb_assert.
3206 (complete_ongoing_step_over): New function.
3207 (linux_resume_one_thread): Don't resume a suspended thread.
3208 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3209 it stepping.
3210
3211 2015-08-06 Pedro Alves <palves@redhat.com>
3212
3213 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3214 (linux_thread_alive): Use lwp_is_marked_dead.
3215 (extended_event_reported): Delete.
3216 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3217 instead of extended_event_reported.
3218 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3219 as well.
3220 (lwp_is_marked_dead): New function.
3221 (lwp_running): Use lwp_is_marked_dead.
3222 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3223 comment.
3224
3225 2015-08-06 Pedro Alves <palves@redhat.com>
3226
3227 * linux-low.c (linux_wait_1): Move fork event output out of the
3228 !report_to_gdb check. Pass event_child->waitstatus to
3229 target_waitstatus_to_string instead of ourstatus.
3230
3231 2015-08-04 Yao Qi <yao.qi@linaro.org>
3232
3233 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3234 if current_thread is 32 bit.
3235
3236 2015-08-04 Yao Qi <yao.qi@linaro.org>
3237
3238 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3239 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3240 * server.c (extended_protocol): Remove "static".
3241 * server.h (extended_protocol): Declare it.
3242
3243 2015-08-04 Yao Qi <yao.qi@linaro.org>
3244
3245 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3246 both aarch64 and aarch32.
3247 (aarch64_set_pc): Likewise.
3248
3249 2015-08-04 Yao Qi <yao.qi@linaro.org>
3250
3251 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3252 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3253 arm-with-neon.xml to srv_xmlfiles.
3254 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3255 (is_64bit_tdesc): New function.
3256 (aarch64_linux_read_description): New function.
3257 (aarch64_arch_setup): Call aarch64_linux_read_description.
3258 (regs_info): Rename to regs_info_aarch64.
3259 (aarch64_regs_info): Return right regs_info.
3260 (initialize_low_arch): Call initialize_low_arch_aarch32.
3261
3262 2015-08-04 Yao Qi <yao.qi@linaro.org>
3263
3264 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3265 * linux-aarch32-low.c: New file.
3266 * linux-aarch32-low.h: New file.
3267 * linux-arm-low.c (arm_fill_gregset): Move it to
3268 linux-aarch32-low.c.
3269 (arm_store_gregset): Likewise.
3270 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3271 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3272 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3273 (regs_info): Rename to regs_info_arm.
3274 (arm_regs_info): Return regs_info_aarch32 if
3275 have_ptrace_getregset is 1 and target description is
3276 arm_with_neon or arm_with_vfpv3.
3277 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3278 Call initialize_low_arch_aarch32 instead.
3279
3280 2015-08-04 Yao Qi <yao.qi@linaro.org>
3281
3282 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3283 * linux-low.c: ... here.
3284 * linux-low.h (have_ptrace_getregset): Declare it.
3285
3286 2015-08-04 Pedro Alves <palves@redhat.com>
3287
3288 * thread-db.c (struct thread_db): Use new typedefs.
3289 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3290 CHK calls.
3291 (disable_thread_event_reporting): Cast result of dlsym to
3292 destination function pointer type.
3293 (thread_db_mourn): Use td_ta_delete_ftype.
3294
3295 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3296
3297 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3298 arch variant.
3299 (CDX_BREAKPOINT): Define for R2.
3300 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3301 (the_low_target): Add comments.
3302
3303 2015-07-30 Yao Qi <yao.qi@linaro.org>
3304
3305 * linux-arm-low.c (arm_hwcap): Remove it.
3306 (arm_read_description): New local variable arm_hwcap. Don't
3307 set arm_hwcap to zero.
3308
3309 2015-07-30 Yao Qi <yao.qi@linaro.org>
3310
3311 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3312 Use regcache->tdesc instead.
3313 (arm_store_wmmxregset): Likewise.
3314 (arm_fill_vfpregset): Likewise.
3315 (arm_store_vfpregset): Likewise.
3316
3317 2015-07-30 Yao Qi <yao.qi@linaro.org>
3318
3319 * linux-arm-low.c: Include arch/arm.h.
3320 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3321 (arm_store_gregset): Likewise.
3322
3323 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3324
3325 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3326 ptrace's 4th parameter.
3327
3328 2015-07-27 Yao Qi <yao.qi@linaro.org>
3329
3330 * configure.srv (case aarch64*-*-linux*): Don't set
3331 srv_linux_usrregs.
3332
3333 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3334
3335 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3336 sys/ptrace.h.
3337 * linux-arm-low.c: Likewise.
3338 * linux-cris-low.c: Likewise.
3339 * linux-crisv32-low.c: Likewise.
3340 * linux-low.c: Likewise.
3341 * linux-m68k-low.c: Likewise.
3342 * linux-mips-low.c: Likewise.
3343 * linux-nios2-low.c: Likewise.
3344 * linux-s390-low.c: Likewise.
3345 * linux-sparc-low.c: Likewise.
3346 * linux-tic6x-low.c: Likewise.
3347 * linux-tile-low.c: Likewise.
3348 * linux-x86-low.c: Likewise.
3349
3350 2015-07-24 Pedro Alves <palves@redhat.com>
3351
3352 * config.in: Regenerate.
3353 * configure: Regenerate.
3354
3355 2015-07-24 Pedro Alves <palves@redhat.com>
3356
3357 * acinclude.m4: Include ../ptrace.m4.
3358 * configure.ac: Call GDB_AC_PTRACE.
3359 * config.in, configure: Regenerate.
3360
3361 2015-07-24 Yao Qi <yao.qi@linaro.org>
3362
3363 * linux-low.c (linux_create_inferior): Remove setting to
3364 proc->priv->new_inferior.
3365 (linux_attach): Likewise.
3366 (linux_low_filter_event): Likewise.
3367 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3368
3369 2015-07-24 Yao Qi <yao.qi@linaro.org>
3370
3371 * linux-low.c (linux_arch_setup): New function.
3372 (linux_low_filter_event): If proc->tdesc is NULL and
3373 proc->attached is true, call the_low_target.arch_setup.
3374 Otherwise, keep status pending, and return.
3375 (linux_resume_one_lwp_throw): Don't call get_pc if
3376 thread->while_stepping isn't NULL. Don't call
3377 get_thread_regcache if proc->tdesc is NULL.
3378 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3379 (linux_target_ops): Install arch_setup.
3380 * server.c (start_inferior): Call the_target->arch_setup.
3381 * target.h (struct target_ops) <arch_setup>: New field.
3382 (target_arch_setup): New marco.
3383 * lynx-low.c (lynx_target_ops): Update.
3384 * nto-low.c (nto_target_ops): Update.
3385 * spu-low.c (spu_target_ops): Update.
3386 * win32-low.c (win32_target_ops): Update.
3387
3388 2015-07-24 Yao Qi <yao.qi@linaro.org>
3389
3390 * linux-low.c (linux_add_process): Don't set
3391 proc->priv->new_inferior.
3392 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3393 (linux_attach): Likewise.
3394
3395 2015-07-24 Yao Qi <yao.qi@linaro.org>
3396
3397 * server.c (start_inferior): Code refactor.
3398
3399 2015-07-24 Yao Qi <yao.qi@linaro.org>
3400
3401 * server.c (process_serial_event): Set general_thread.
3402
3403 2015-07-21 Yao Qi <yao.qi@linaro.org>
3404
3405 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3406 aarch64_linux_get_debug_reg_capacity.
3407
3408 2015-07-17 Yao Qi <yao.qi@linaro.org>
3409
3410 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3411 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3412 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3413 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3414 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3415 (AARCH64_HWP_ALIGNMENT): Likewise.
3416 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3417 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3418 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3419 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3420 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3421 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3422 (struct aarch64_debug_reg_state): Likewise.
3423 (struct arch_lwp_info): Likewise.
3424 (aarch64_align_watchpoint): Likewise.
3425 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3426 (aarch64_watchpoint_length): Likewise.
3427 (aarch64_point_encode_ctrl_reg): Likewise
3428 (aarch64_point_is_aligned): Likewise.
3429 (aarch64_align_watchpoint): Likewise.
3430 (aarch64_linux_set_debug_regs):
3431 (aarch64_dr_state_insert_one_point): Likewise.
3432 (aarch64_dr_state_remove_one_point): Likewise.
3433 (aarch64_handle_breakpoint): Likewise.
3434 (aarch64_handle_aligned_watchpoint): Likewise.
3435 (aarch64_handle_unaligned_watchpoint): Likewise.
3436 (aarch64_handle_watchpoint): Likewise.
3437
3438 2015-07-17 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3441 and don't aarch64_get_debug_reg_state. All callers update.
3442 (aarch64_handle_aligned_watchpoint): Likewise.
3443 (aarch64_handle_unaligned_watchpoint): Likewise.
3444 (aarch64_handle_watchpoint): Likewise.
3445 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3446 (aarch64_remove_point): Likewise.
3447
3448 2015-07-17 Yao Qi <yao.qi@linaro.org>
3449
3450 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3451 debug_printf.
3452 (aarch64_handle_unaligned_watchpoint): Likewise.
3453
3454 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3455
3456 Revert the previous 3 commits:
3457 Move gdb_regex* to common/
3458 Move linux_find_memory_regions_full & co.
3459 gdbserver build-id attribute generator
3460
3461 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3462 Jan Kratochvil <jan.kratochvil@redhat.com>
3463
3464 gdbserver build-id attribute generator.
3465 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3466 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3467 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3468 (find_phdr): New.
3469 (get_dynamic): Use find_pdhr to traverse program headers.
3470 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3471 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3472 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3473 (get_hex_build_id): New.
3474 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3475 to reply XML document.
3476
3477 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3478 Jan Kratochvil <jan.kratochvil@redhat.com>
3479
3480 * target.c: Include target/target-utils.h and fcntl.h.
3481 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3482 (target_fileio_read_stralloc): New functions.
3483
3484 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3485
3486 * Makefile.in (OBS): Add gdb_regex.o.
3487 (gdb_regex.o): New.
3488 * config.in: Rebuilt.
3489 * configure: Rebuilt.
3490
3491 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3492 Jan Kratochvil <jan.kratochvil@redhat.com>
3493
3494 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3495 * Makefile.in (OBS): Add target-utils.o.
3496 (linux-maps.o, target-utils.o): New.
3497 * configure.srv (srv_linux_obj): Add linux-maps.o.
3498
3499 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3500
3501 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3502 function, return 1.
3503 (the_low_target): Install it.
3504
3505 2015-07-14 Pedro Alves <palves@redhat.com>
3506
3507 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3508 Instead, ignore ECHILD, and throw an error for other errnos.
3509
3510 2015-07-10 Pedro Alves <palves@redhat.com>
3511
3512 * event-loop.c (struct callback_event) <data>: Change type to
3513 gdb_client_data instance instead of gdb_client_data pointer.
3514 (append_callback_event): Adjust.
3515
3516 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3517
3518 * linux-aarch64-low.c: Add comments for each linux_target_ops
3519 method. Remove comments already covered in target_ops and
3520 linux_target_ops definitions.
3521 (the_low_target): Add comments for each unimplemented method.
3522
3523 2015-07-09 Yao Qi <yao.qi@linaro.org>
3524
3525 * linux-aarch64-low.c (aarch64_regmap): Remove.
3526 (aarch64_usrregs_info): Remove.
3527 (regs_info): Set field usrregs to NULL.
3528
3529 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3530
3531 * linux-low.c: Include "rsp-low.h"
3532 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3533 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3534 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3535 (handle_btrace_enable_pt): New.
3536 (handle_btrace_general_set): Support "pt".
3537 (handle_btrace_conf_general_set): Support "pt:size".
3538
3539 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3540
3541 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3542 Z_PACKET_SW_BP.
3543
3544 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3545
3546 * linux-aarch64-low.c: Remove comment about endianness.
3547 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3548 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3549 memcmp.
3550
3551 2015-06-24 Gary Benson <gbenson@redhat.com>
3552
3553 * linux-i386-ipa.c (stdint.h): Do not include.
3554 * lynx-i386-low.c (stdint.h): Likewise.
3555 * lynx-ppc-low.c (stdint.h): Likewise.
3556 * mem-break.c (stdint.h): Likewise.
3557 * thread-db.c (stdint.h): Likewise.
3558 * tracepoint.c (stdint.h): Likewise.
3559 * win32-low.c (stdint.h): Likewise.
3560
3561 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3562
3563 * server.c (write_qxfer_response): Update call to
3564 remote_escape_output.
3565
3566 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3567 Jan Kratochvil <jan.kratochvil@redhat.com>
3568
3569 Merge multiple hex conversions.
3570 * gdbreplay.c (tohex): Rename to 'fromhex'.
3571 (logchar): Use fromhex.
3572
3573 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3574
3575 * server.c (handle_qxfer_libraries): Set `version' attribute for
3576 <library-list>.
3577
3578 2015-06-10 Gary Benson <gbenson@redhat.com>
3579
3580 * target.h (struct target_ops) <multifs_open>: New field.
3581 <multifs_unlink>: Likewise.
3582 <multifs_readlink>: Likewise.
3583 * linux-low.c (nat/linux-namespaces.h): New include.
3584 (linux_target_ops): Initialize the_target->multifs_open,
3585 the_target->multifs_unlink and the_target->multifs_readlink.
3586 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3587 * hostio.c (hostio_fs_pid): New static variable.
3588 (hostio_handle_new_gdb_connection): New function.
3589 (handle_setfs): Likewise.
3590 (handle_open): Use the_target->multifs_open as appropriate.
3591 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3592 (handle_readlink): Use the_target->multifs_readlink as
3593 appropriate.
3594 (handle_vFile): Handle vFile:setfs packets.
3595 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3596 after target_handle_new_gdb_connection.
3597
3598 2015-06-10 Gary Benson <gbenson@redhat.com>
3599
3600 * configure.ac (AC_CHECK_FUNCS): Add setns.
3601 * config.in: Regenerate.
3602 * configure: Likewise.
3603 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3604 (linux-namespaces.o): New rule.
3605 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3606
3607 2015-06-09 Gary Benson <gbenson@redhat.com>
3608
3609 * hostio.c (handle_open): Process mode argument with
3610 fileio_to_host_mode.
3611
3612 2015-06-01 Yao Qi <yao.qi@linaro.org>
3613
3614 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3615 * linux-x86-low.c: Likewise.
3616
3617 2015-05-28 Don Breazeal <donb@codesourcery.com>
3618
3619 * linux-low.c (handle_extended_wait): Initialize
3620 thread_info.last_resume_kind for new fork children.
3621
3622 2015-05-15 Pedro Alves <palves@redhat.com>
3623
3624 * target.h (target_handle_new_gdb_connection): Rewrite using if
3625 wrapped in do/while.
3626
3627 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3628
3629 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3630 * configure, config.in: Regenerate.
3631 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3632 Declare typedef.
3633
3634 2015-05-12 Don Breazeal <donb@codesourcery.com>
3635
3636 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3637 PTRACE_EVENT_VFORK_DONE.
3638 (linux_low_ptrace_options, extended_event_reported): Add vfork
3639 events.
3640 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3641 and "vforkdone" for RSP 'T' Stop Reply Packet.
3642 * server.h (report_vfork_events): Declare
3643 global variable.
3644
3645 2015-05-12 Don Breazeal <donb@codesourcery.com>
3646
3647 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3648 (the_low_target) <new_fork>: Initialize new member.
3649 * linux-arm-low.c (arm_new_fork): New function.
3650 (the_low_target) <new_fork>: Initialize new member.
3651 * linux-low.c (handle_extended_wait): Call new target function
3652 new_fork.
3653 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3654 * linux-mips-low.c (mips_add_watchpoint): New function
3655 extracted from mips_insert_point.
3656 (the_low_target) <new_fork>: Initialize new member.
3657 (mips_linux_new_fork): New function.
3658 (mips_insert_point): Call mips_add_watchpoint.
3659 * linux-x86-low.c (x86_linux_new_fork): New function.
3660 (the_low_target) <new_fork>: Initialize new member.
3661
3662 2015-05-12 Don Breazeal <donb@codesourcery.com>
3663
3664 * linux-low.c (handle_extended_wait): Implement return value,
3665 rename argument 'event_child' to 'event_lwp', handle
3666 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3667 (linux_low_ptrace_options): New function.
3668 (linux_low_filter_event): Call linux_low_ptrace_options,
3669 use different argument fo linux_enable_event_reporting,
3670 use return value from handle_extended_wait.
3671 (extended_event_reported): New function.
3672 (linux_wait_1): Call extended_event_reported and set
3673 status to report fork events.
3674 (linux_write_memory): Add pid to debug message.
3675 (reset_lwp_ptrace_options_callback): New function.
3676 (linux_handle_new_gdb_connection): New function.
3677 (linux_target_ops): Initialize new structure member.
3678 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3679 * lynx-low.c: Initialize new structure member.
3680 * remote-utils.c (prepare_resume_reply): Implement stop reason
3681 "fork" for "T" stop message.
3682 * server.c (handle_query): Call handle_new_gdb_connection.
3683 * server.h (report_fork_events): Declare global flag.
3684 * target.h (struct target_ops) <handle_new_gdb_connection>:
3685 New member.
3686 (target_handle_new_gdb_connection): New macro.
3687 * win32-low.c: Initialize new structure member.
3688
3689 2015-05-12 Don Breazeal <donb@codesourcery.com>
3690
3691 * mem-break.c (APPEND_TO_LIST): Define macro.
3692 (clone_agent_expr): New function.
3693 (clone_one_breakpoint): New function.
3694 (clone_all_breakpoints): New function.
3695 * mem-break.h: Declare new functions.
3696
3697 2015-05-12 Don Breazeal <donb@codesourcery.com>
3698
3699 * linux-low.c (linux_supports_fork_events): New function.
3700 (linux_supports_vfork_events): New function.
3701 (linux_target_ops): Initialize new structure members.
3702 (initialize_low): Call linux_check_ptrace_features.
3703 * lynx-low.c (lynx_target_ops): Initialize new structure
3704 members.
3705 * server.c (report_fork_events, report_vfork_events):
3706 New global flags.
3707 (handle_query): Add new features to qSupported packet and
3708 response.
3709 (captured_main): Initialize new global variables.
3710 * target.h (struct target_ops) <supports_fork_events>:
3711 New member.
3712 <supports_vfork_events>: New member.
3713 (target_supports_fork_events): New macro.
3714 (target_supports_vfork_events): New macro.
3715 * win32-low.c (win32_target_ops): Initialize new structure
3716 members.
3717
3718 2015-05-12 Gary Benson <gbenson@redhat.com>
3719
3720 * server.c (handle_qxfer_exec_file): Use current process
3721 if annex is empty.
3722
3723 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3724
3725 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3726 Remove HAVE_PTRACE_GETREGS conditionals.
3727 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3728 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3729
3730 2015-05-08 Yao Qi <yao.qi@linaro.org>
3731
3732 * linux-low.c (linux_supports_conditional_breakpoints): New
3733 function.
3734 (linux_target_ops): Install new target method.
3735 * lynx-low.c (lynx_target_ops): Install NULL hook for
3736 supports_conditional_breakpoints.
3737 * nto-low.c (nto_target_ops): Likewise.
3738 * spu-low.c (spu_target_ops): Likewise.
3739 * win32-low.c (win32_target_ops): Likewise.
3740 * server.c (handle_query): Check
3741 target_supports_conditional_breakpoints.
3742 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3743 New field.
3744 (target_supports_conditional_breakpoints): New macro.
3745
3746 2015-05-06 Pedro Alves <palves@redhat.com>
3747
3748 PR server/18081
3749 * server.c (start_inferior): If the process exits, mourn it.
3750
3751 2015-04-21 Gary Benson <gbenson@redhat.com>
3752
3753 * hostio.c (fileio_open_flags_to_host): Factored out to
3754 fileio_to_host_openflags in common/fileio.c. Single use
3755 updated.
3756
3757 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3758
3759 * linux-xtensa-low.c (xtensa_fill_gregset)
3760 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3761 XCHAL_HAVE_LOOP.
3762
3763 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3764
3765 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3766 (regs_info): Replace usrregs pointer with NULL.
3767
3768 2015-04-17 Gary Benson <gbenson@redhat.com>
3769
3770 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3771 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3772 * server.c (handle_qxfer_exec_file): New function.
3773 (qxfer_packets): Add exec-file entry.
3774 (handle_query): Report qXfer:exec-file:read as supported packet.
3775
3776 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3777
3778 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3779
3780 2015-04-09 Gary Benson <gbenson@redhat.com>
3781
3782 * hostio-errno.c (errno_to_fileio_error): Remove function.
3783 Update caller to use remote_fileio_to_fio_error.
3784
3785 2015-04-09 Yao Qi <yao.qi@linaro.org>
3786
3787 * linux-low.c (linux_insert_point): Call
3788 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3789 (linux_remove_point): Call remove_memory_breakpoint if type is
3790 raw_bkpt_type_sw.
3791 * linux-x86-low.c (x86_insert_point): Don't call
3792 insert_memory_breakpoint.
3793 (x86_remove_point): Don't call remove_memory_breakpoint.
3794
3795 2015-04-01 Pedro Alves <palves@redhat.com>
3796 Cleber Rosa <crosa@redhat.com>
3797
3798 * server.c (gdbserver_usage): Reorganize and extend the usage
3799 message.
3800
3801 2015-03-24 Pedro Alves <palves@redhat.com>
3802
3803 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3804 output. Also dump TRAP_TRACE.
3805 (linux_low_filter_event): In debug output, distinguish a
3806 resume_stop SIGSTOP from a delayed SIGSTOP.
3807
3808 2015-03-24 Gary Benson <gbenson@redhat.com>
3809
3810 * linux-x86-low.c (x86_linux_new_thread): Moved to
3811 nat/x86-linux.c.
3812 (x86_linux_prepare_to_resume): Likewise.
3813
3814 2015-03-24 Gary Benson <gbenson@redhat.com>
3815
3816 * Makefile.in (x86-linux-dregs.o): New rule.
3817 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3818 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3819 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3820 (x86_linux_dr_get): Likewise.
3821 (x86_linux_dr_set): Likewise.
3822 (update_debug_registers_callback): Likewise.
3823 (x86_linux_dr_set_addr): Likewise.
3824 (x86_linux_dr_get_addr): Likewise.
3825 (x86_linux_dr_set_control): Likewise.
3826 (x86_linux_dr_get_control): Likewise.
3827 (x86_linux_dr_get_status): Likewise.
3828 (x86_linux_update_debug_registers): Likewise.
3829
3830 2015-03-24 Gary Benson <gbenson@redhat.com>
3831
3832 * linux-x86-low.c (x86_linux_update_debug_registers):
3833 New function, factored out from...
3834 (x86_linux_prepare_to_resume): ...this.
3835
3836 2015-03-24 Gary Benson <gbenson@redhat.com>
3837
3838 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3839 (x86_linux_dr_set): Likewise.
3840 (update_debug_registers_callback): Likewise.
3841 (x86_linux_dr_set_addr): Likewise.
3842 (x86_linux_dr_get_addr): Likewise.
3843 (x86_linux_dr_set_control): Likewise.
3844 (x86_linux_dr_get_control): Likewise.
3845 (x86_linux_dr_get_status): Likewise.
3846 (x86_linux_prepare_to_resume): Likewise.
3847
3848 2015-03-24 Gary Benson <gbenson@redhat.com>
3849
3850 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3851 Use perror_with_name. Pass string through gettext.
3852 (x86_linux_dr_set): Likewise.
3853
3854 2015-03-24 Gary Benson <gbenson@redhat.com>
3855
3856 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3857 (x86_linux_dr_set_addr): ...this.
3858 (x86_dr_low_get_addr): Rename to...
3859 (x86_linux_dr_get_addr): ...this.
3860 (x86_dr_low_set_control): Rename to...
3861 (x86_linux_dr_set_control): ...this.
3862 (x86_dr_low_get_control): Rename to...
3863 (x86_linux_dr_get_control): ...this.
3864 (x86_dr_low_get_status): Rename to...
3865 (x86_linux_dr_get_status): ...this.
3866 (x86_dr_low): Update with new function names.
3867
3868 2015-03-24 Gary Benson <gbenson@redhat.com>
3869
3870 * Makefile.in (x86-linux.o): New rule.
3871 * configure.srv: Add x86-linux.o to relevant targets.
3872 * linux-low.c (lwp_set_arch_private_info): New function.
3873 (lwp_arch_private_info): Likewise.
3874 * linux-x86-low.c: Include nat/x86-linux.h.
3875 (arch_lwp_info): Removed structure.
3876 (update_debug_registers_callback):
3877 Use lwp_set_debug_registers_changed.
3878 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3879 and lwp_set_debug_registers_changed.
3880 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3881
3882 2015-03-24 Gary Benson <gbenson@redhat.com>
3883
3884 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3885 * linux-arm-low.c (arm_new_thread): Likewise.
3886 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3887 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3888 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3889 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3890
3891 2015-03-24 Gary Benson <gbenson@redhat.com>
3892
3893 * linux-low.c (ptid_of_lwp): New function.
3894 (lwp_is_stopped): Likewise.
3895 (lwp_stop_reason): Likewise.
3896 * linux-x86-low.c (update_debug_registers_callback):
3897 Use lwp_is_stopped.
3898 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3899 lwp_stop_reason.
3900
3901 2015-03-24 Gary Benson <gbenson@redhat.com>
3902
3903 * linux-low.h (linux_stop_lwp): Remove declaration.
3904
3905 2015-03-24 Gary Benson <gbenson@redhat.com>
3906
3907 * linux-low.h: Include nat/linux-nat.h.
3908 * linux-low.c (iterate_over_lwps_args): New structure.
3909 (iterate_over_lwps_filter): New function.
3910 (iterate_over_lwps): Likewise.
3911 * linux-x86-low.c (update_debug_registers_callback):
3912 Update signature to what iterate_over_lwps expects.
3913 Remove PID check that iterate_over_lwps now performs.
3914 (x86_dr_low_set_addr): Use iterate_over_lwps.
3915 (x86_dr_low_set_control): Likewise.
3916
3917 2015-03-24 Gary Benson <gbenson@redhat.com>
3918
3919 * linux-x86-low.c (x86_debug_reg_state): New function.
3920 (x86_linux_prepare_to_resume): Use the above.
3921
3922 2015-03-24 Gary Benson <gbenson@redhat.com>
3923
3924 * linux-low.c (current_lwp_ptid): New function.
3925 * linux-x86-low.c: Include nat/linux-nat.h.
3926 (x86_dr_low_get_addr): Use current_lwp_ptid.
3927 (x86_dr_low_get_control): Likewise.
3928 (x86_dr_low_get_status): Likewise.
3929
3930 2015-03-20 Pedro Alves <palves@redhat.com>
3931
3932 * tracepoint.c (cmd_qtstatus): Make "str" const.
3933
3934 2015-03-20 Pedro Alves <palves@redhat.com>
3935
3936 * server.c (handle_general_set): Make "req_str" const.
3937
3938 2015-03-19 Pedro Alves <palves@redhat.com>
3939
3940 * linux-low.c (linux_resume_one_lwp): Rename to ...
3941 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3942 instead call perror_with_name.
3943 (check_ptrace_stopped_lwp_gone): New function.
3944 (linux_resume_one_lwp): Reimplement as wrapper around
3945 linux_resume_one_lwp_throw that swallows errors if the LWP is
3946 gone.
3947
3948 2015-03-19 Pedro Alves <palves@redhat.com>
3949
3950 * linux-low.c (count_events_callback, select_event_lwp_callback):
3951 No longer check whether the thread has resume_stop as last resume
3952 kind.
3953
3954 2015-03-19 Pedro Alves <palves@redhat.com>
3955
3956 * linux-low.c (count_events_callback, select_event_lwp_callback):
3957 Use the lwp's status_pending_p field, not the thread's.
3958
3959 2015-03-19 Pedro Alves <palves@redhat.com>
3960
3961 * linux-low.c (select_event_lwp_callback): Update comments to
3962 no longer mention SIGTRAP.
3963
3964 2015-03-18 Gary Benson <gbenson@redhat.com>
3965
3966 * server.c (handle_query): Do not report vFile:fstat as supported.
3967
3968 2015-03-11 Gary Benson <gbenson@redhat.com>
3969
3970 * hostio.c (sys/types.h): New include.
3971 (sys/stat.h): Likewise.
3972 (common-remote-fileio.h): Likewise.
3973 (handle_fstat): New function.
3974 (handle_vFile): Handle vFile:fstat packets.
3975
3976 2015-03-11 Gary Benson <gbenson@redhat.com>
3977
3978 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3979 struct stat.st_blocks and struct stat.st_blksize.
3980 * configure: Regenerate.
3981 * config.in: Likewise.
3982 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3983 (OBS): Add common-remote-fileio.o.
3984 (common-remote-fileio.o): New rule.
3985
3986 2015-03-09 Pedro Alves <palves@redhat.com>
3987
3988 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3989 'struct sockaddr' pointer in 'accept' call.
3990
3991 2015-03-09 Pedro Alves <palves@redhat.com>
3992
3993 Revert:
3994 2015-03-07 Pedro Alves <palves@redhat.com>
3995 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3996 or <winsock2.h> here. Instead include "gdb_socket.h".
3997 (remote_open): Use union gdb_sockaddr_u.
3998 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3999 or <winsock2.h> here. Instead include "gdb_socket.h".
4000 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4001 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4002 or <sys/un.h>.
4003 (init_named_socket, gdb_agent_helper_thread): Use union
4004 gdb_sockaddr_u.
4005
4006 2015-03-07 Pedro Alves <palves@redhat.com>
4007
4008 * configure.ac (build_warnings): Move
4009 -Wdeclaration-after-statement to the C-specific set.
4010 * configure: Regenerate.
4011
4012 2015-03-07 Pedro Alves <palves@redhat.com>
4013
4014 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4015 or <winsock2.h> here. Instead include "gdb_socket.h".
4016 (remote_open): Use union gdb_sockaddr_u.
4017 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4018 or <winsock2.h> here. Instead include "gdb_socket.h".
4019 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4020 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4021 or <sys/un.h>.
4022 (init_named_socket, gdb_agent_helper_thread): Use union
4023 gdb_sockaddr_u.
4024
4025 2015-03-07 Pedro Alves <palves@redhat.com>
4026
4027 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4028 instead.
4029
4030 2015-03-06 Yao Qi <yao.qi@linaro.org>
4031
4032 * linux-aarch64-low.c (aarch64_insert_point): Use
4033 show_debug_regs as a boolean.
4034 (aarch64_remove_point): Likewise.
4035
4036 2015-03-05 Pedro Alves <palves@redhat.com>
4037
4038 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4039 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4040 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4041 * nto-low.c (nto_target_ops): Likewise.
4042 * spu-low.c (spu_target_ops): Likewise.
4043 * win32-low.c (win32_target_ops): Likewise.
4044
4045 2015-03-04 Pedro Alves <palves@redhat.com>
4046
4047 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4048 Decide whether a breakpoint triggered based on the SIGTRAP's
4049 siginfo.si_code.
4050 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4051 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4052 (linux_low_filter_event): Check for breakpoints before checking
4053 watchpoints.
4054 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4055 siginfo.si_code.
4056 (linux_stopped_by_sw_breakpoint)
4057 (linux_supports_stopped_by_sw_breakpoint)
4058 (linux_stopped_by_hw_breakpoint)
4059 (linux_supports_stopped_by_hw_breakpoint): New functions.
4060 (linux_target_ops): Install new target methods.
4061
4062 2015-03-04 Pedro Alves <palves@redhat.com>
4063
4064 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4065 * server.c (swbreak_feature, hwbreak_feature): New globals.
4066 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4067 (captured_main): Clear swbreak_feature and hwbreak_feature.
4068 * server.h (swbreak_feature, hwbreak_feature): Declare.
4069 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4070 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4071 supports_stopped_by_hw_breakpoint>: New fields.
4072 (target_supports_stopped_by_sw_breakpoint)
4073 (target_stopped_by_sw_breakpoint)
4074 (target_supports_stopped_by_hw_breakpoint)
4075 (target_stopped_by_hw_breakpoint): Declare.
4076
4077 2015-03-04 Pedro Alves <palves@redhat.com>
4078
4079 enum lwp_stop_reason -> enum target_stop_reason
4080 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4081 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4082 (linux_wait_1, stuck_in_jump_pad_callback)
4083 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4084 (linux_stopped_by_watchpoint):
4085 * linux-low.h (enum lwp_stop_reason): Delete.
4086 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4087 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4088
4089 2015-03-04 Yao Qi <yao.qi@linaro.org>
4090
4091 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4092
4093 2015-03-03 Gary Benson <gbenson@redhat.com>
4094
4095 * hostio.c (handle_vFile): Fix prefix lengths.
4096
4097 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4098
4099 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4100 ptr_bits.
4101
4102 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4103
4104 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4105 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4106 (clean): Add "rm -f" for above C files.
4107 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4108 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4109 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4110 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4111 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4112 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4113 (init_registers_s390x_vx_linux64)
4114 (init_registers_s390x_tevx_linux64)
4115 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4116 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4117 declarations.
4118 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4119 (s390_store_vxrs_high): New functions.
4120 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4121 NT_S390_VXRS_HIGH.
4122 (s390_arch_setup): Add logic for selecting one of the new target
4123 descriptions. Activate the new vector regsets if applicable.
4124 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4125 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4126 and init_registers_s390x_tevx_linux64.
4127
4128 2015-03-01 Pedro Alves <palves@redhat.com>
4129
4130 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4131 parameter.
4132
4133 2015-02-27 Pedro Alves <palves@redhat.com>
4134
4135 * linux-x86-low.c (u_debugreg_offset): New function.
4136 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4137
4138 2015-02-27 Pedro Alves <palves@redhat.com>
4139
4140 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4141 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4142 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4143 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4144 (ps_lsetfpregs, ps_getpid)
4145 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4146 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4147 (ps_lsetxregs, ps_plog): Declare.
4148
4149 2015-02-27 Pedro Alves <palves@redhat.com>
4150
4151 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4152 IP_AGENT_EXPORT_FUNC.
4153 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4154 IP_AGENT_EXPORT_FUNC.
4155 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4156 (IP_AGENT_EXPORT): Delete.
4157 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4158 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4159 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4160 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4161 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4162 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4163 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4164 (traceframe_read_count, traceframe_write_count)
4165 (traceframes_created, trace_state_variables, get_raw_reg)
4166 (get_trace_state_variable_value, set_trace_state_variable_value)
4167 (ust_loaded, helper_thread_id, cmd_buf): Use
4168 IPA_SYM_EXPORTED_NAME.
4169 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4170 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4171 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4172 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4173 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4174 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4175 EXTERN_C_PUSH/EXTERN_C_POP.
4176 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4177 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4178 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4179 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4180 (traceframe_write_count, traceframe_read_count)
4181 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4182 (about_to_request_buffer_space, get_trace_state_variable_value)
4183 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4184 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4185 EXTERN_C_PUSH/EXTERN_C_POP.
4186 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4187 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4188 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4189 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4190 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4191 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4192 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4193 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4194 Define.
4195 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4196 (IP_AGENT_EXPORT_VAR_DECL): Define.
4197 (tracing): Declare.
4198 (gdb_agent_get_raw_reg): Declare.
4199
4200 2015-02-27 Tom Tromey <tromey@redhat.com>
4201 Pedro Alves <palves@redhat.com>
4202
4203 Rename symbols whose names are reserved C++ keywords throughout.
4204
4205 2015-02-27 Pedro Alves <palves@redhat.com>
4206
4207 * Makefile.in (COMPILER): New, get it from autoconf.
4208 (CXX): Get from autoconf instead.
4209 (COMPILE.pre): Use COMPILER.
4210 (CC-LD): Rename to ...
4211 (CC_LD): ... this. Use COMPILER.
4212 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4213 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4214 * acinclude.m4: Include build-with-cxx.m4.
4215 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4216 Disable -Werror by default if building in C++ mode.
4217 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4218 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4219 the C++ compiler. Save/restore CXXFLAGS too.
4220 * configure: Regenerate.
4221
4222 2015-02-27 Pedro Alves <palves@redhat.com>
4223
4224 * acinclude.m4: Include libiberty.m4.
4225 * configure.ac: Call libiberty_INIT.
4226 * config.in, configure: Regenerate.
4227
4228 2015-02-26 Pedro Alves <palves@redhat.com>
4229
4230 * linux-low.c (linux_wait_1): When incrementing the PC past a
4231 program breakpoint always use the_low_target.breakpoint_len as
4232 increment, rather than the maximum between that and
4233 the_low_target.decr_pc_after_break.
4234
4235 2015-02-23 Pedro Alves <palves@redhat.com>
4236
4237 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4238 thread was doing a step-over; always adjust the PC if
4239 we stepped over a permanent breakpoint.
4240 (linux_wait_1): If we stepped over breakpoint that was on top of a
4241 permanent breakpoint, manually advance the PC past it.
4242
4243 2015-02-23 Pedro Alves <palves@redhat.com>
4244
4245 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4246 modes.
4247 (x86_fill_gregset, x86_store_gregset): Use it when handling
4248 $orig_eax.
4249
4250 2015-02-20 Pedro Alves <palves@redhat.com>
4251
4252 * thread-db.c: Include "nat/linux-procfs.h".
4253 (thread_db_init): Skip listing new threads if the kernel supports
4254 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4255
4256 2015-02-20 Pedro Alves <palves@redhat.com>
4257
4258 * linux-low.c (status_pending_p_callback): Use ptid_match.
4259
4260 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4261
4262 PR breakpoints/16812
4263 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4264 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4265 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4266
4267 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4268
4269 PR breakpoints/15956
4270 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4271
4272 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4273
4274 * linux-low.c (linux_low_btrace_conf): Print size.
4275 * server.c (handle_btrace_conf_general_set): New.
4276 (hanle_general_set): Call handle_btrace_conf_general_set.
4277 (handle_query): Report Qbtrace-conf:bts:size as supported.
4278
4279 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4280
4281 * linux-low.c (linux_low_enable_btrace): Update parameters.
4282 (linux_low_btrace_conf): New.
4283 (linux_target_ops)<to_btrace_conf>: Initialize.
4284 * server.c (current_btrace_conf): New.
4285 (handle_btrace_enable): Rename to ...
4286 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4287 to target_enable_btrace. Update comment. Update users.
4288 (handle_qxfer_btrace_conf): New.
4289 (qxfer_packets): Add btrace-conf entry.
4290 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4291 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4292 (target_ops)<read_btrace_conf>: New.
4293 (target_enable_btrace): Update parameters.
4294 (target_read_btrace_conf): New.
4295
4296 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4297
4298 * server.c (handle_btrace_general_set): Remove call to
4299 target_supports_btrace.
4300 (supported_btrace_packets): New.
4301 (handle_query): Call supported_btrace_packets.
4302 * target.h: include btrace-common.h.
4303 (btrace_target_info): Removed.
4304 (supports_btrace, target_supports_btrace): Update parameters.
4305
4306 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4307
4308 * Makefile.in (SFILES): Add common/btrace-common.c.
4309 (OBS): Add common/btrace-common.o.
4310 (btrace-common.o): Add build rules.
4311 * linux-low: Include btrace-common.h.
4312 (linux_low_read_btrace): Use struct btrace_data. Call
4313 btrace_data_init and btrace_data_fini.
4314
4315 2015-02-06 Pedro Alves <palves@redhat.com>
4316
4317 * thread-db.c (find_new_threads_callback): Add debug output.
4318
4319 2015-02-04 Pedro Alves <palves@redhat.com>
4320
4321 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4322 (resume_stopped_resumed_lwps): New function.
4323 (linux_wait_for_event_filtered): Use it.
4324
4325 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4326
4327 * Makefile.in (SFILES): Add linux-personality.c.
4328 (linux-personality.o): New rule.
4329 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4330 list of objects to be built.
4331 * linux-low.c: Include nat/linux-personality.h.
4332 (linux_create_inferior): Remove code to disable address space
4333 randomization (moved to ../nat/linux-personality.c). Create
4334 cleanup to disable address space randomization.
4335
4336 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4337
4338 * Makefile.in (posix-strerror.o): New rule.
4339 (mingw-strerror.o): Likewise.
4340 * configure: Regenerated.
4341 * configure.ac: Source file ../common/common.host. Initialize new
4342 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4343
4344 2015-01-14 Yao Qi <yao@codesourcery.com>
4345
4346 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4347 (ppc-linux.o): New rule.
4348 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4349 * configure.ac: AC_CHECK_FUNCS(getauxval).
4350 * config.in: Re-generated.
4351 * configure: Re-generated.
4352 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4353 ppc64_64bit_inferior_p
4354
4355 2015-01-14 Yao Qi <yao@codesourcery.com>
4356
4357 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4358 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4359 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4360 (PT_ORIG_R3, PT_TRAP): Likewise.
4361 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4362 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4363 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4364
4365 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4366
4367 * i387-fp.c (i387_cache_to_xsave): In look over
4368 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4369 zmmh_low_space field by use of zmmh_high_space.
4370
4371 2015-01-09 Pedro Alves <palves@redhat.com>
4372
4373 * linux-low.c (step_over_bkpt): Move higher up in the file.
4374 (handle_extended_wait): Don't store the stop_pc here.
4375 (get_stop_pc): Adjust comments and rename to ...
4376 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4377 stopped for a software breakpoint or hardware breakpoint.
4378 (thread_still_has_status_pending_p): New function.
4379 (status_pending_p_callback): Use
4380 thread_still_has_status_pending_p. If the event is no longer
4381 interesting, resume the LWP.
4382 (handle_tracepoints): Add assert.
4383 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4384 (wstatus_maybe_breakpoint): New function.
4385 (cancel_breakpoint): Delete function.
4386 (check_stopped_by_watchpoint): New function, factored out from
4387 linux_low_filter_event.
4388 (lp_status_maybe_breakpoint): Delete function.
4389 (linux_low_filter_event): Remove filter_ptid argument.
4390 Leave thread group exits pending here. Store the LWP's stop PC.
4391 Always leave events pending.
4392 (linux_wait_for_event_filtered): Pull all events out of the
4393 kernel, and leave them all pending.
4394 (count_events_callback, select_event_lwp_callback): Consider all
4395 events.
4396 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4397 (select_event_lwp): Only give preference to the stepping LWP in
4398 all-stop mode. Adjust comments.
4399 (ignore_event): New function.
4400 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4401 references to cancel_breakpoints. Adjust to renames. Also give
4402 equal priority to all LWPs that have had events in non-stop mode.
4403 If reporting a software breakpoint event, unadjust the LWP's PC.
4404 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4405 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4406 Adjust.
4407 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4408 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4409 (linux_stopped_by_watchpoint): Adjust.
4410 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4411 * linux-low.h (enum lwp_stop_reason): New.
4412 (struct lwp_info) <stop_pc>: Adjust comment.
4413 <stopped_by_watchpoint>: Delete field.
4414 <stop_reason>: New field.
4415 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4416 * mem-break.c (software_breakpoint_inserted_here)
4417 (hardware_breakpoint_inserted_here): New function.
4418 * mem-break.h (software_breakpoint_inserted_here)
4419 (hardware_breakpoint_inserted_here): Declare.
4420 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4421 (cancel_breakpoints): Delete.
4422 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4423 (upload_fast_traceframes): Remove references to
4424 cancel_breakpoints.
4425
4426 2015-01-09 Pedro Alves <palves@redhat.com>
4427
4428 * thread-db.c (find_new_threads_callback): Ignore thread if the
4429 kernel thread ID is -1.
4430
4431 2015-01-09 Pedro Alves <palves@redhat.com>
4432
4433 * linux-low.c (linux_attach_fail_reason_string): Move to
4434 nat/linux-ptrace.c, and rename.
4435 (linux_attach_lwp): Update comment.
4436 (attach_proc_task_lwp_callback): New function.
4437 (linux_attach): Adjust to rename and use
4438 linux_proc_attach_tgid_threads.
4439 (linux_attach_fail_reason_string): Delete declaration.
4440
4441 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4442
4443 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4444 * server.c (gdbserver_version): Likewise.
4445
4446 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4447
4448 * remote-utils.c: Include ctype.h.
4449 (input_interrupt): Explicitly handle the case when the char
4450 received is the NUL byte. Improve the printing of non-ASCII
4451 characters.
4452
4453 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4454
4455 * linux-low.c (linux_low_filter_event): Update call to
4456 linux_enable_event_reporting following the addition of
4457 a new parameter to that function.
4458
4459 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4460
4461 PR server/17457
4462 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4463 (AARCH64_FPCR_REGNO): Likewise.
4464 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4465 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4466 (aarch64_store_fpregset): Likewise.
4467
4468 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4469
4470 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4471 Remove FIXME comment about assumption about N.
4472
4473 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4474
4475 * configure.ac: If large-file support is disabled in GDBserver,
4476 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4477 * configure: Regenerate.
4478
4479 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4480
4481 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4482 warning upon ENODATA from ptrace.
4483 * linux-s390-low.c (s390_store_tdb): New.
4484 (s390_regsets): Add regset for NT_S390_TDB.
4485
4486 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4487
4488 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4489 without a fill_function.
4490 * linux-s390-low.c (s390_fill_last_break): Remove.
4491 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4492 (s390_arch_setup): Use regset's size instead of fill_function for
4493 loop end condition.
4494
4495 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4496
4497 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4498 the regset's store function when ptrace returned an error.
4499 * regcache.c (get_thread_regcache): Invalidate register cache
4500 before fetching inferior's registers.
4501
4502 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4503
4504 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4505 while-loop as for-loop.
4506 (regsets_store_inferior_registers): Likewise.
4507
4508 2014-11-28 Yao Qi <yao@codesourcery.com>
4509
4510 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4511 * config.in, configure: Re-generate.
4512 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4513 is defined.
4514
4515 2014-11-21 Yao Qi <yao@codesourcery.com>
4516
4517 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4518 (AC_CHECK_HEADERS): Remove malloc.h.
4519 * configure: Re-generated.
4520 * config.in: Re-generated.
4521 * server.h: Don't include alloca.h and malloc.h.
4522 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4523 Don't include malloc.h.
4524
4525 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4526
4527 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4528 corresponding ERRNO check in same block.
4529
4530 2014-11-12 Pedro Alves <palves@redhat.com>
4531
4532 * server.c (cont_thread): Update comment.
4533 (start_inferior, attach_inferior): No longer clear cont_thread.
4534 (handle_v_cont): No longer set cont_thread.
4535 (captured_main): Clear cont_thread each time a GDB connects.
4536
4537 2014-11-12 Pedro Alves <palves@redhat.com>
4538
4539 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4540 thread, and don't resume all threads if the Hc thread has exited.
4541
4542 2014-11-12 Pedro Alves <palves@redhat.com>
4543
4544 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4545 the process group instead of to a specific LWP.
4546
4547 2014-10-15 Pedro Alves <palves@redhat.com>
4548
4549 PR server/17487
4550 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4551 parameter.
4552 (arm_set_thread_context): Delete.
4553 (the_low_target): Adjust.
4554 * win32-i386-low.c (debug_registers_changed)
4555 (debug_registers_used): Delete.
4556 (update_debug_registers_callback): New function.
4557 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4558 needing to update their debug registers.
4559 (win32_get_current_dr): New function.
4560 (x86_dr_low_get_addr, x86_dr_low_get_control)
4561 (x86_dr_low_get_status): Fetch the debug register from the thread
4562 record's context.
4563 (i386_initial_stuff): Adjust.
4564 (i386_get_thread_context): Remove current_event parameter. Don't
4565 clear debug_registers_changed nor copy DR values to
4566 debug_reg_state.
4567 (i386_set_thread_context): Delete.
4568 (i386_prepare_to_resume): New function.
4569 (i386_thread_added): Mark the thread as needing to update irs
4570 debug registers.
4571 (the_low_target): Remove i386_set_thread_context and install
4572 i386_prepare_to_resume.
4573 * win32-low.c (win32_get_thread_context): Adjust.
4574 (win32_set_thread_context): Use SetThreadContext
4575 directly.
4576 (win32_prepare_to_resume): New function.
4577 (win32_require_context): New function, factored out from ...
4578 (thread_rec): ... this.
4579 (continue_one_thread): Call win32_prepare_to_resume on each thread
4580 we're about to continue.
4581 (win32_resume): Call win32_prepare_to_resume on the event thread.
4582 * win32-low.h (struct win32_thread_info)
4583 <debug_registers_changed>: New field.
4584 (struct win32_target_ops): Change prototype of set_thread_context,
4585 delete set_thread_context and add prepare_to_resume.
4586 (win32_require_context): New declaration.
4587
4588 2014-10-08 Gary Benson <gbenson@redhat.com>
4589
4590 * server.h: Do not include common-exceptions.h.
4591
4592 2014-10-08 Gary Benson <gbenson@redhat.com>
4593
4594 * server.h: Do not include cleanups.h.
4595
4596 2014-09-30 James Hogan <james.hogan@imgtec.com>
4597
4598 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4599 mips64-dsp-linux.c.
4600
4601 2014-09-23 Yao Qi <yao@codesourcery.com>
4602
4603 * linux-low.c (lp_status_maybe_breakpoint): New function.
4604 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4605 (count_events_callback): Likewise.
4606 (select_event_lwp_callback): Likewise.
4607 (cancel_breakpoints_callback): Likewise.
4608
4609 2014-09-19 Don Breazeal <donb@codesourcery.com>
4610
4611 * linux-low.c (handle_extended_wait): Call
4612 linux_ptrace_get_extended_event.
4613 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4614 linux_is_extended_waitstatus.
4615
4616 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4617
4618 * Makefile.in (CPPFLAGS): Define.
4619 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4620 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4621
4622 2014-09-16 Gary Benson <gbenson@redhat.com>
4623
4624 * inferiors.h (current_inferior): Renamed as...
4625 (current_thread): New variable. All uses updated.
4626 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4627 (maybe_move_out_of_jump_pad): Likewise.
4628 (cancel_breakpoint): Likewise.
4629 (linux_low_filter_event): Likewise.
4630 (wait_for_sigstop): Likewise.
4631 (linux_resume_one_lwp): Likewise.
4632 (need_step_over_p): Likewise.
4633 (start_step_over): Likewise.
4634 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4635 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4636 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4637 and save_inferior as saved_thread.
4638 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4639 saved_thread.
4640 (regcache_invalidate_thread): Likewise.
4641 * remote-utils.c (prepare_resume_reply): Likewise.
4642 * thread-db.c (thread_db_get_tls_address): Likewise.
4643 (disable_thread_event_reporting): Likewise.
4644 (remove_thread_event_breakpoints): Likewise.
4645 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4646 as saved_thread.
4647 * target.h (set_desired_inferior): Renamed as...
4648 (set_desired_thread): New declaration. All uses updated.
4649 * server.c (myresume): Updated comment to reference thread instead
4650 of inferior.
4651 (handle_serial_event): Likewise.
4652 (handle_target_event): Likewise.
4653
4654 2014-09-12 Tom Tromey <tromey@redhat.com>
4655 Gary Benson <gbenson@redhat.com>
4656
4657 * regcache.h: Include common-regcache.h.
4658 (regcache_read_pc): Don't declare.
4659 * regcache.c (get_thread_regcache_for_ptid): New function.
4660
4661 2014-09-11 Tom Tromey <tromey@redhat.com>
4662 Gary Benson <gbenson@redhat.com>
4663
4664 * symbol.c: New file.
4665 * Makefile.in (SFILES): Add symbol.c.
4666 (OBS): Add symbol.o.
4667
4668 2014-09-11 Gary Benson <gbenson@redhat.com>
4669
4670 * target.c (target_stop_ptid, target_continue_ptid): New
4671 functions.
4672
4673 2014-09-11 Tom Tromey <tromey@redhat.com>
4674 Gary Benson <gbenson@redhat.com>
4675
4676 * target.h: Include target/target.h.
4677 * target.c (target_read_memory, target_read_uint32)
4678 (target_write_memory): New functions.
4679
4680 2014-09-11 Gary Benson <gbenson@redhat.com>
4681
4682 * server.h (debug_hw_points): Don't declare.
4683 * server.c (debug_hw_points): Don't define. Replace all uses
4684 with show_debug_regs.
4685 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4686 all uses with show_debug_regs.
4687
4688 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4689
4690 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4691 endianness into account.
4692 (ppc_supply_ptrace_register): Likewise.
4693
4694 2014-09-03 James Hogan <james.hogan@imgtec.com>
4695
4696 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4697 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4698
4699 2014-09-03 Gary Benson <gbenson@redhat.com>
4700
4701 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4702 ALL_DEBUG_ADDRESS_REGISTERS.
4703
4704 2014-09-02 Gary Benson <gbenson@redhat.com>
4705
4706 * i386-low.h: Renamed as...
4707 * x86-low.h: New file. All type, function and variable name
4708 prefixes changed from "i386_" to "x86_". All references updated.
4709 * i386-low.c: Renamed as...
4710 * x86-low.c: New file. All type, function and variable name
4711 prefixes changed from "i386_" to "x86_". All references updated.
4712
4713 2014-09-02 Gary Benson <gbenson@redhat.com>
4714
4715 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4716 (x86_linux_new_thread): Likewise.
4717
4718 2014-08-29 Gary Benson <gbenson@redhat.com>
4719
4720 * server.h (setjmp.h): Do not include.
4721 (toplevel): Do not declare.
4722 (common-exceptions.h): Include.
4723 (cleanups.h): Likewise.
4724 * server.c (toplevel): Do not define.
4725 (exit_code): New static global.
4726 (detach_or_kill_for_exit_cleanup): New function.
4727 (main): New function. Original main renamed to...
4728 (captured_main): New function.
4729 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4730
4731 2014-08-29 Gary Benson <gbenson@redhat.com>
4732
4733 * Makefile.in (SFILES): Add common/common-exceptions.c.
4734 (OBS): Add common-exceptions.o.
4735 (common-exceptions.o): New rule.
4736 * utils.c (prepare_to_throw_exception): New function.
4737
4738 2014-08-29 Gary Benson <gbenson@redhat.com>
4739
4740 * config.in: Regenerate.
4741 * configure: Likewise.
4742
4743 2014-08-29 Gary Benson <gbenson@redhat.com>
4744
4745 * Makefile.in (SFILES): Add common/cleanups.c.
4746 (OBS): cleanups.o.
4747 (cleanups.o): New rule.
4748
4749 2014-08-29 Gary Benson <gbenson@redhat.com>
4750
4751 * utils.c (internal_vwarning): New function.
4752
4753 2014-08-28 Gary Benson <gbenson@redhat.com>
4754
4755 * utils.h (fatal): Remove declaration.
4756 * utils.c (fatal): Remove function.
4757
4758 2014-08-28 Gary Benson <gbenson@redhat.com>
4759
4760 * tracepoint.c (gdb_agent_init): Replace fatal with
4761 perror_with_name.
4762 (initialize_tracepoint): Likewise.
4763
4764 2014-08-28 Gary Benson <gbenson@redhat.com>
4765
4766 * remote-utils.c (remote_prepare): Replace fatal with error.
4767
4768 2014-08-28 Gary Benson <gbenson@redhat.com>
4769
4770 * linux-low.c (linux_async): Replace fatal with warning.
4771 Tidy up and return.
4772 (linux_start_non_stop): Return -1 if linux_async failed.
4773
4774 2014-08-28 Gary Benson <gbenson@redhat.com>
4775
4776 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4777 gdb_assert.
4778 (i386_dr_low_get_addr): Remove vague comment.
4779 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4780 gdb_assert.
4781
4782 2014-08-28 Gary Benson <gbenson@redhat.com>
4783
4784 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4785 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4786 internal_error.
4787 (linux_resume_one_lwp): Likewise.
4788 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4789 gdb_assert.
4790 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4791 with internal_error.
4792 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4793 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4794 (find_register_by_name): Replace fatal with internal_error.
4795 (find_regno): Likewise.
4796 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4797 * thread-db.c (thread_db_create_event): Likewise.
4798 (thread_db_load_search): Likewise.
4799 (try_thread_db_load_1): Likewise.
4800 * tracepoint.c (get_jump_space_head): Replace fatal with
4801 internal_error.
4802 (claim_trampoline_space): Likewise.
4803 (have_fast_tracepoint_trampoline_buffer): Likewise.
4804 (cmd_qtstart): Likewise.
4805 (stop_tracing): Likewise.
4806 (fast_tracepoint_collecting): Likewise.
4807 (target_malloc): Likewise.
4808 (download_tracepoint): Likewise.
4809 (download_trace_state_variables): Replace check with gdb_assert.
4810 (upload_fast_traceframes): Replace fatal with internal_error.
4811
4812 2014-08-19 Tom Tromey <tromey@redhat.com>
4813 Gary Benson <gbenson@redhat.com>
4814
4815 * Makefile.in (SFILES): Add common/common-debug.c.
4816 (OBS): Add common-debug.o.
4817 (common-debug.o): New rule.
4818 * debug.h (debug_printf): Don't declare.
4819 * debug.c (debug_printf): Renamed and rewritten as...
4820 (debug_vprintf): New function.
4821
4822 2014-08-19 Gary Benson <gbenson@redhat.com>
4823
4824 * utils.h: Do not include print-utils.h.
4825
4826 2014-08-19 Tom Tromey <tromey@redhat.com>
4827 Gary Benson <gbenson@redhat.com>
4828
4829 * server.h: Add static assertion.
4830 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4831
4832 2014-08-19 Tom Tromey <tromey@redhat.com>
4833 Gary Benson <gbenson@redhat.com>
4834
4835 * Makefile.in (SFILES): Add common/errors.c.
4836 (OBS): Add errors.o.
4837 (IPA_OBS): Add errors-ipa.o.
4838 (errors.o): New rule.
4839 (errors-ipa.o): Likewise.
4840 * utils.h (perror_with_name, error, warning): Don't declare.
4841 * utils.c (warning): Renamed and rewritten as...
4842 (vwarning): New function.
4843 (error): Renamed and rewritten as...
4844 (verror): New function.
4845 (internal_error): Renamed and rewritten as...
4846 (internal_verror): New function.
4847
4848 2014-08-07 Gary Benson <gbenson@redhat.com>
4849
4850 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4851 * configure: Regenerate.
4852 * config.in: Likewise.
4853 * server.h: Do not include errno.h.
4854 * event-loop.c: Likewise.
4855 * hostio-errno.c: Likewise.
4856 * linux-low.c: Likewise.
4857 * remote-utils.c: Likewise.
4858 * spu-low.c: Likewise.
4859 * utils.c: Likewise.
4860 * gdbreplay.c: Unconditionally include errno.h.
4861
4862 2014-08-07 Gary Benson <gbenson@redhat.com>
4863
4864 * server.h: Do not include string.h.
4865 * event-loop.c: Likewise.
4866 * linux-low.c: Likewise.
4867 * regcache.c: Likewise.
4868 * remote-utils.c: Likewise.
4869 * spu-low.c: Likewise.
4870 * utils.c: Likewise.
4871
4872 2014-08-07 Gary Benson <gbenson@redhat.com>
4873
4874 * server.h: Do not include gdb_assert.h.
4875
4876 2014-08-07 Gary Benson <gbenson@redhat.com>
4877
4878 * server.h: Do not include common-utils.h.
4879
4880 2014-08-07 Gary Benson <gbenson@redhat.com>
4881
4882 * server.h: Do not include ptid.h.
4883 * notif.h: Likewise.
4884
4885 2014-08-07 Gary Benson <gbenson@redhat.com>
4886
4887 * server.h: Do not include gdb_locale.h.
4888
4889 2014-08-07 Gary Benson <gbenson@redhat.com>
4890
4891 * server.h: Do not include gdb/signals.h.
4892 * win32-low.c: Likewise.
4893
4894 2014-08-07 Gary Benson <gbenson@redhat.com>
4895
4896 * server.h: Do not include pathmax.h.
4897
4898 2014-08-07 Gary Benson <gbenson@redhat.com>
4899
4900 * server.h: Do not include libiberty.h.
4901 * linux-bfin-low.c: Likewise.
4902
4903 2014-08-07 Gary Benson <gbenson@redhat.com>
4904
4905 * server.h: Do not include ansidecl.h.
4906
4907 2014-08-07 Gary Benson <gbenson@redhat.com>
4908
4909 * linux-x86-low.c: Do not include stddef.h.
4910 * lynx-ppc-low.c: Likewise.
4911 * tracepoint.c: Likewise.
4912
4913 2014-08-07 Gary Benson <gbenson@redhat.com>
4914
4915 * server.h: Do not include stdarg.h.
4916 * nto-low.c: Likewise.
4917
4918 2014-08-07 Gary Benson <gbenson@redhat.com>
4919
4920 * server.h: Do not include stdlib.h.
4921 * inferiors.c: Likewise.
4922 * linux-low.c: Likewise.
4923 * regcache.c: Likewise.
4924 * spu-low.c: Likewise.
4925 * tracepoint.c: Likewise.
4926 * utils.c: Likewise.
4927
4928 2014-08-07 Gary Benson <gbenson@redhat.com>
4929
4930 * server.h: Do not include stdio.h.
4931 * linux-low.c: Likewise.
4932 * remote-utils.c: Likewise.
4933 * spu-low.c: Likewise.
4934 * utils.c: Likewise.
4935 * wincecompat.c: Likewise.
4936
4937 2014-08-06 Gary Benson <gbenson@redhat.com>
4938
4939 * regcache.c (init_register_cache): Move conditionals inside if.
4940
4941 2014-08-06 Gary Benson <gbenson@redhat.com>
4942
4943 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4944
4945 2014-07-31 Gary Benson <gbenson@redhat.com>
4946
4947 * ax.h: Do not include server.h.
4948 * gdbthread.h: Likewise.
4949 * lynx-low.h: Likewise.
4950 * notif.h: Likewise.
4951
4952 2014-07-30 Gary Benson <gbenson@redhat.com>
4953
4954 * server.h: Include common-defs.h.
4955 Do not include config.h or build-gnulib-gdbserver/config.h.
4956
4957 2014-07-30 Gary Benson <gbenson@redhat.com>
4958
4959 * hostio-errno.c: Move server.h to top of includes list.
4960 * inferiors.c: Likewise.
4961 * linux-x86-low.c: Likewise.
4962 * notif.c: Include server.h.
4963
4964 2014-07-24 Tom Tromey <tromey@redhat.com>
4965 Gary Benson <gbenson@redhat.com>
4966
4967 * server.h (CORE_ADDR): Now unsigned.
4968
4969 2014-07-16 Pedro Alves <palves@redhat.com>
4970
4971 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4972
4973 2014-07-15 Pedro Alves <palves@redhat.com>
4974
4975 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4976 copy.
4977
4978 2014-07-11 Pedro Alves <palves@redhat.com>
4979
4980 * linux-low.c (kill_wait_lwp): New function, based on
4981 kill_one_lwp_callback, but use my_waitpid directly.
4982 (kill_one_lwp_callback, linux_kill): Use it.
4983
4984 2014-06-23 Pedro Alves <palves@redhat.com>
4985
4986 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4987 before setting DR0..DR3.
4988
4989 2014-06-20 Gary Benson <gbenson@redhat.com>
4990
4991 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4992 * configure: Regenerated.
4993 * config.in: Likewise.
4994
4995 2014-06-20 Gary Benson <gbenson@redhat.com>
4996
4997 * Makefile.in (SFILES): Update locations for files moved
4998 from common to nat.
4999 (object file files): Reordered.
5000
5001 2014-06-20 Gary Benson <gbenson@redhat.com>
5002
5003 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5004 (i386_dr_low_set_addr): Likewise.
5005 (i386_dr_low_get_addr): Likewise.
5006 (i386_dr_low_can_set_control): Likewise.
5007 (i386_dr_low_set_control): Likewise.
5008 (i386_dr_low_get_control): Likewise.
5009 (i386_dr_low_get_status): Likewise.
5010 (i386_get_debug_register_length): Likewise.
5011 * linux-x86-low.c (i386_dr_low_set_addr):
5012 Changed signature. Made static.
5013 (i386_dr_low_get_addr): Likewise.
5014 (i386_dr_low_set_control): Likewise.
5015 (i386_dr_low_get_control): Likewise.
5016 (i386_dr_low_get_status): Likewise.
5017 (i386_dr_low): New global variable.
5018 * win32-i386-low.c (i386_dr_low_set_addr):
5019 Changed signature. Made static.
5020 (i386_dr_low_get_addr): Likewise.
5021 (i386_dr_low_set_control): Likewise.
5022 (i386_dr_low_get_control): Likewise.
5023 (i386_dr_low_get_status): Likewise.
5024 (i386_dr_low): New global variable.
5025
5026 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5027
5028 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5029 * Makefile.in (AR, AR_FLAGS): Define.
5030 * configure: Regenerate.
5031
5032 2014-06-19 Gary Benson <gbenson@redhat.com>
5033
5034 * Makefile.in (i386-dregs.o): New rule.
5035 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5036 * i386-low.c (target.h): Remove include.
5037 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5038 (DR_CONTROL_SHIFT): Likewise.
5039 (DR_CONTROL_SIZE): Likewise.
5040 (DR_RW_EXECUTE): Likewise.
5041 (DR_RW_WRITE): Likewise.
5042 (DR_RW_READ): Likewise.
5043 (DR_RW_IORW): Likewise.
5044 (DR_LEN_1): Likewise.
5045 (DR_LEN_2): Likewise.
5046 (DR_LEN_4): Likewise.
5047 (DR_LEN_8): Likewise.
5048 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5049 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5050 (DR_ENABLE_SIZE): Likewise.
5051 (DR_LOCAL_SLOWDOWN): Likewise.
5052 (DR_GLOBAL_SLOWDOWN): Likewise.
5053 (DR_CONTROL_RESERVED): Likewise.
5054 (I386_DR_CONTROL_MASK): Likewise.
5055 (I386_DR_VACANT): Likewise.
5056 (I386_DR_LOCAL_ENABLE): Likewise.
5057 (I386_DR_GLOBAL_ENABLE): Likewise.
5058 (I386_DR_DISABLE): Likewise.
5059 (I386_DR_SET_RW_LEN): Likewise.
5060 (I386_DR_GET_RW_LEN): Likewise.
5061 (I386_DR_WATCH_HIT): Likewise.
5062 (i386_wp_op_t): Likewise.
5063 (i386_show_dr): Likewise.
5064 (i386_length_and_rw_bits): Likewise.
5065 (i386_insert_aligned_watchpoint): Likewise.
5066 (i386_remove_aligned_watchpoint): Likewise.
5067 (i386_handle_nonaligned_watchpoint): Likewise.
5068 i386_update_inferior_debug_regs(): Likewise.
5069 (i386_dr_insert_watchpoint): Likewise.
5070 (i386_dr_remove_watchpoint): Likewise.
5071 (i386_dr_region_ok_for_watchpoint): Likewise.
5072 (i386_dr_stopped_data_address): Likewise.
5073 (i386_dr_stopped_by_watchpoint): Likewise.
5074
5075 2014-06-19 Gary Benson <gbenson@redhat.com>
5076
5077 * i386-low.c (i386_dr_show): Renamed to
5078 i386_show_dr and made static. All uses updated.
5079 (i386_dr_length_and_rw_bits): Renamed to
5080 i386_length_and_rw_bits and made static.
5081 All uses updated.
5082 (i386_dr_insert_aligned_watchpoint): Renamed to
5083 i386_insert_aligned_watchpoint and made static.
5084 All uses updated.
5085 (i386_dr_remove_aligned_watchpoint): Renamed to
5086 i386_remove_aligned_watchpoint and made static.
5087 All uses updated.
5088 (i386_dr_update_inferior_debug_regs): Renamed to
5089 i386_update_inferior_debug_regs and made static.
5090 All uses updated.
5091
5092 2014-06-18 Gary Benson <gbenson@redhat.com>
5093
5094 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5095 (i386_dr_low_can_set_control): Likewise.
5096 (i386_get_debug_register_length): Likewise.
5097 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5098 (i386_dr_low_can_set_control): Likewise.
5099 (i386_get_debug_register_length): Likewise.
5100
5101 2014-06-17 Gary Benson <gbenson@redhat.com>
5102
5103 * i386-low.h (i386-dregs.h): New include.
5104 (DR_FIRSTADDR): Now in i386-dregs.h.
5105 (DR_LASTADDR): Likewise.
5106 (DR_NADDR): Likewise.
5107 (DR_STATUS): Likewise.
5108 (DR_CONTROL): Likewise.
5109 (i386_debug_reg_state): Likewise.
5110 (i386_dr_insert_watchpoint): Likewise.
5111 (i386_dr_remove_watchpoint): Likewise.
5112 (i386_dr_region_ok_for_watchpoint): Likewise.
5113 (i386_dr_stopped_data_address): Likewise.
5114 (i386_dr_stopped_by_watchpoint): Likewise.
5115 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5116
5117 2014-06-18 Gary Benson <gbenson@redhat.com>
5118
5119 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5120 i386_dr_insert_watchpoint.
5121 (i386_low_remove_watchpoint): Renamed to
5122 i386_dr_remove_watchpoint.
5123 (i386_low_region_ok_for_watchpoint): Renamed to
5124 i386_dr_region_ok_for_watchpoint.
5125 (i386_low_stopped_data_address): Renamed to
5126 i386_dr_stopped_data_address.
5127 (i386_low_stopped_by_watchpoint): Renamed to
5128 i386_dr_stopped_by_watchpoint.
5129 * i386-low.c (i386_show_dr): Renamed to
5130 i386_dr_show and made nonstatic. All uses updated.
5131 (i386_length_and_rw_bits): Renamed to
5132 i386_dr_length_and_rw_bits and made nonstatic.
5133 All uses updated.
5134 (i386_insert_aligned_watchpoint): Renamed to
5135 i386_dr_insert_aligned_watchpoint and made nonstatic.
5136 All uses updated.
5137 (i386_remove_aligned_watchpoint): Renamed to
5138 i386_dr_remove_aligned_watchpoint and made nonstatic.
5139 All uses updated.
5140 (i386_update_inferior_debug_regs): Renamed to
5141 i386_dr_update_inferior_debug_regs and made nonstatic.
5142 All uses updated.
5143 (i386_low_insert_watchpoint): Renamed to
5144 i386_dr_insert_watchpoint. All uses updated.
5145 (i386_low_remove_watchpoint): Renamed to
5146 i386_dr_remove_watchpoint. All uses updated.
5147 (i386_low_region_ok_for_watchpoint): Renamed to
5148 i386_dr_region_ok_for_watchpoint. All uses updated.
5149 (i386_low_stopped_data_address): Renamed to
5150 i386_dr_stopped_data_address. All uses updated.
5151 (i386_low_stopped_by_watchpoint): Renamed to
5152 i386_dr_stopped_by_watchpoint. All uses updated.
5153
5154 2014-06-18 Gary Benson <gbenson@redhat.com>
5155
5156 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5157 (i386_dr_low_can_set_control): Likewise.
5158 (i386_insert_aligned_watchpoint): New check.
5159
5160 2014-06-18 Gary Benson <gbenson@redhat.com>
5161
5162 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5163 Renamed to state.
5164
5165 2014-06-18 Gary Benson <gbenson@redhat.com>
5166
5167 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5168 instead of fatal and error.
5169 (i386_handle_nonaligned_watchpoint): Likewise.
5170
5171 2014-06-18 Gary Benson <gbenson@redhat.com>
5172
5173 * i386-low.c (i386_get_debug_register_length): New macro.
5174 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5175 (i386_show_dr): Use debug_printf instead of fprintf. Use
5176 phex to format values.
5177
5178 2014-06-18 Gary Benson <gbenson@redhat.com>
5179
5180 * i386-low.h: Comment changes.
5181 * i386-low.c: Likewise.
5182
5183 2014-06-18 Gary Benson <gbenson@redhat.com>
5184
5185 * i386-low.c: Whitespace changes.
5186
5187 2014-06-12 Tom Tromey <tromey@redhat.com>
5188
5189 * utils.c (freeargv): Remove.
5190
5191 2014-06-12 Tom Tromey <tromey@redhat.com>
5192
5193 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5194 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5195 (parse_debug_format_options): Likewise.
5196 (gdbserver_usage): Likewise.
5197 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5198 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5199 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5200 against libiberty.
5201 ($(LIBGNU)): Depend on libiberty.
5202 (all-lib): Recurse into all subdirs.
5203 (install-only): Invoke "install" target in subdirs.
5204 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5205 targets.
5206 * configure: Rebuild.
5207 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5208 for vasprintf, vsnprintf, or gettimeofday.
5209 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5210 srv_tgtobj.
5211
5212 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5213
5214 * development.sh: Delete.
5215 * Makefile.in (config.status): Adjust dependency on development.sh.
5216 * configure.ac: Adjust development.sh source call.
5217 * configure: Regenerate.
5218
5219 2014-06-02 Pedro Alves <palves@redhat.com>
5220
5221 * ax.c (gdb_free_agent_expr): New function.
5222 * ax.h (gdb_free_agent_expr): New declaration.
5223 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5224 list.
5225 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5226 static.
5227 (clear_breakpoint_conditions_and_commands): New function.
5228 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5229 (clear_breakpoint_conditions_and_commands): New declaration.
5230
5231 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5232
5233 * linux-aarch64-low.c (asm/ptrace.h): Include.
5234
5235 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5236
5237 Fix TLS access for -static -pthread.
5238 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5239 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5240 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5241
5242 2014-05-20 Pedro Alves <palves@redhat.com>
5243
5244 * linux-aarch64-low.c (aarch64_insert_point)
5245 (aarch64_remove_point): No longer check whether the type is
5246 supported here. Adjust to new interface.
5247 (the_low_target): Install aarch64_supports_z_point_type as
5248 supports_z_point_type method.
5249 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5250 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5251 instead of a Z packet char. Adjust.
5252 (arm_supports_z_point_type): New function.
5253 (arm_insert_point, arm_remove_point): Adjust to new interface.
5254 (the_low_target): Install arm_supports_z_point_type.
5255 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5256 (cris_insert_point, cris_remove_point): Adjust to new interface.
5257 Don't check whether the type is supported here.
5258 (the_low_target): Install cris_supports_z_point_type.
5259 * linux-low.c (linux_supports_z_point_type): New function.
5260 (linux_insert_point, linux_remove_point): Adjust to new interface.
5261 * linux-low.h (struct linux_target_ops) <insert_point,
5262 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5263 raw_breakpoint pointer parameter.
5264 <supports_z_point_type>: New method.
5265 * linux-mips-low.c (mips_supports_z_point_type): New function.
5266 (mips_insert_point, mips_remove_point): Adjust to new interface.
5267 Use mips_supports_z_point_type.
5268 (the_low_target): Install mips_supports_z_point_type.
5269 * linux-ppc-low.c (the_low_target): Install NULL as
5270 supports_z_point_type method.
5271 * linux-s390-low.c (the_low_target): Install NULL as
5272 supports_z_point_type method.
5273 * linux-sparc-low.c (the_low_target): Install NULL as
5274 supports_z_point_type method.
5275 * linux-x86-low.c (x86_supports_z_point_type): New function.
5276 (x86_insert_point): Adjust to new insert_point interface. Use
5277 insert_memory_breakpoint. Adjust to new
5278 i386_low_insert_watchpoint interface.
5279 (x86_remove_point): Adjust to remove_point interface. Use
5280 remove_memory_breakpoint. Adjust to new
5281 i386_low_remove_watchpoint interface.
5282 (the_low_target): Install x86_supports_z_point_type.
5283 * lynx-low.c (lynx_target_ops): Install NULL as
5284 supports_z_point_type callback.
5285 * nto-low.c (nto_supports_z_point_type): New.
5286 (nto_insert_point, nto_remove_point): Adjust to new interface.
5287 (nto_target_ops): Install nto_supports_z_point_type.
5288 * mem-break.c: Adjust intro comment.
5289 (struct raw_breakpoint) <raw_type, size>: New fields.
5290 <inserted>: Update comment.
5291 <shlib_disabled>: Delete field.
5292 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5293 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5294 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5295 (raw_bkpt_type_to_target_hw_bp_type): New function.
5296 (find_enabled_raw_code_breakpoint_at): New function.
5297 (find_raw_breakpoint_at): New type and size parameters. Use them.
5298 (insert_memory_breakpoint): New function, based off
5299 set_raw_breakpoint_at.
5300 (remove_memory_breakpoint): New function.
5301 (set_raw_breakpoint_at): Reimplement.
5302 (set_breakpoint): New, based on set_breakpoint_at.
5303 (set_breakpoint_at): Reimplement.
5304 (delete_raw_breakpoint): Go through the_target->remove_point
5305 instead of assuming memory breakpoints.
5306 (find_gdb_breakpoint_at): Delete.
5307 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5308 (find_gdb_breakpoint): New function.
5309 (set_gdb_breakpoint_at): Delete.
5310 (z_type_supported): New function.
5311 (set_gdb_breakpoint_1): New function, loosely based off
5312 set_gdb_breakpoint_at.
5313 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5314 (delete_gdb_breakpoint_at): Delete.
5315 (delete_gdb_breakpoint_1): New function, loosely based off
5316 delete_gdb_breakpoint_at.
5317 (delete_gdb_breakpoint): New function.
5318 (clear_gdb_breakpoint_conditions): Rename to ...
5319 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5320 breakpoint.
5321 (add_condition_to_breakpoint): Make static.
5322 (add_breakpoint_condition): Take a struct breakpoint pointer
5323 instead of an address. Adjust.
5324 (gdb_condition_true_at_breakpoint): Rename to ...
5325 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5326 z_type parameter.
5327 (gdb_condition_true_at_breakpoint): Reimplement.
5328 (add_breakpoint_commands): Take a struct breakpoint pointer
5329 instead of an address. Adjust.
5330 (gdb_no_commands_at_breakpoint): Rename to ...
5331 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5332 parameter. Return true if no breakpoint was found. Change debug
5333 output.
5334 (gdb_no_commands_at_breakpoint): Reimplement.
5335 (run_breakpoint_commands): Rename to ...
5336 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5337 and change return type to boolean.
5338 (run_breakpoint_commands): New function.
5339 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5340 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5341 breakpoint. Go through the_target->remove_point instead of
5342 assuming memory breakpoint.
5343 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5344 software and hardware breakpoints.
5345 (reinsert_raw_breakpoint): Go through the_target->insert_point
5346 instead of assuming memory breakpoint.
5347 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5348 software and hardware breakpoints.
5349 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5350 Check both software and hardware breakpoints.
5351 (validate_inserted_breakpoint): Assert the breakpoint is a
5352 software breakpoint. Set the inserted flag to -1 instead of
5353 setting shlib_disabled.
5354 (delete_disabled_breakpoints): Adjust.
5355 (validate_breakpoints): Only validate software breakpoints.
5356 Adjust to inserted flag change.
5357 (check_mem_read, check_mem_write): Skip breakpoint types other
5358 than software breakpoints. Adjust to inserted flag change.
5359 * mem-break.h (enum raw_bkpt_type): New enum.
5360 (raw_breakpoint, struct process_info): Forward declare.
5361 (Z_packet_to_target_hw_bp_type): Delete declaration.
5362 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5363 (set_gdb_breakpoint, delete_gdb_breakpoint)
5364 (clear_breakpoint_conditions): New declarations.
5365 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5366 (breakpoint_inserted_here): Update comment.
5367 (add_breakpoint_condition, add_breakpoint_commands): Replace
5368 address parameter with a breakpoint pointer parameter.
5369 (gdb_breakpoint_here): Update comment.
5370 (delete_gdb_breakpoint_at): Delete.
5371 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5372 * server.c (process_point_options): Take a struct breakpoint
5373 pointer instead of an address. Adjust.
5374 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5375 delete_gdb_breakpoint.
5376 * spu-low.c (spu_target_ops): Install NULL as
5377 supports_z_point_type method.
5378 * target.h: Include mem-break.h.
5379 (struct target_ops) <prepare_to_access_memory>: Update comment.
5380 <supports_z_point_type>: New field.
5381 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5382 instead of a char. Also take a raw breakpoint pointer.
5383 * win32-arm-low.c (the_low_target): Install NULL as
5384 supports_z_point_type.
5385 * win32-i386-low.c (i386_supports_z_point_type): New function.
5386 (i386_insert_point, i386_remove_point): Adjust to new interface.
5387 (the_low_target): Install i386_supports_z_point_type.
5388 * win32-low.c (win32_supports_z_point_type): New function.
5389 (win32_insert_point, win32_remove_point): Adjust to new interface.
5390 (win32_target_ops): Install win32_supports_z_point_type.
5391 * win32-low.h (struct win32_target_ops):
5392 <supports_z_point_type>: New method.
5393 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5394 instead of a char. Also take a raw breakpoint pointer.
5395
5396 2014-05-20 Pedro Alves <palves@redhat.com>
5397
5398 * mem-break.h: Include break-common.h.
5399 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5400 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5401 (Z_packet_to_target_hw_bp_type): New declaration.
5402 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5403 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5404 (Z_PACKET_ACCESS_WP): Delete macros.
5405 (Z_packet_to_hw_type): Delete function.
5406 * i386-low.h: Don't include break-common.h here.
5407 (Z_packet_to_hw_type): Delete declaration.
5408 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5409 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5410 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5411 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5412 * linux-aarch64-low.c: Don't include break-common.h here.
5413 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5414 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5415 (Z_packet_to_target_hw_bp_type): Delete function.
5416 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5417 function.
5418 (mips_insert_point, mips_remove_point): Use
5419 Z_packet_to_target_hw_bp_type.
5420
5421 2014-05-20 Pedro Alves <palves@redhat.com>
5422
5423 * linux-aarch64-low.c: Include break-common.h.
5424 (enum target_point_type): Delete.
5425 (Z_packet_to_point_type): Rename to ...
5426 (Z_packet_to_target_hw_bp_type): ... this, and return a
5427 target_hw_bp_type instead.
5428 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5429 instead of an enum target_point_type.
5430 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5431 breakpoint type.
5432 (aarch64_dr_state_insert_one_point)
5433 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5434 (aarch64_handle_aligned_watchpoint)
5435 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5436 Take an enum target_hw_bp_type instead of an enum
5437 target_point_type.
5438 (aarch64_supports_z_point_type): New function.
5439 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5440 use Z_packet_to_target_hw_bp_type.
5441
5442 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5443
5444 * configure.ac: Only use -Werror by default when DEVELOPMENT
5445 is true.
5446 * configure: Regenerate.
5447
5448 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5449
5450 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5451 * linux-x86-low.c (X86_64_USER_REGS): New.
5452 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5453
5454 2014-04-28 Yao Qi <yao@codesourcery.com>
5455
5456 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5457 name.
5458
5459 2014-04-25 Pedro Alves <palves@redhat.com>
5460
5461 PR server/16255
5462 * linux-low.c (linux_attach_fail_reason_string): New function.
5463 (linux_attach_lwp): Delete.
5464 (linux_attach_lwp_1): Rename to ...
5465 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5466 argument. Remove "initial" parameter. Return int instead of
5467 void. Don't error or warn here.
5468 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5469 failure to attach to the tgid. Call warning when failing to
5470 attach to an lwp.
5471 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5472 argument. Remove "initial" parameter. Return int instead of
5473 void. Don't error or warn here.
5474 (linux_attach_fail_reason_string): New declaration.
5475 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5476 interface change. Use linux_attach_fail_reason_string.
5477
5478 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5479 Walfred Tedeschi <walfred.tedeschi@intel.com>
5480
5481 * Makefile.in: Added rules to handle new files
5482 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5483 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5484 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5485 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5486 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5487 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5488 x32-avx512-linux.o.
5489 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5490 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5491 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5492 i386/x32-avx512.xml.
5493 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5494 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5495 i386/x32-avx512-linux.xml.
5496 * i387-fp.c (num_avx512_k_registers): New constant for number
5497 of K registers.
5498 (num_avx512_zmmh_low_registers): New constant for number of
5499 lower ZMM registers (0-15).
5500 (num_avx512_zmmh_high_registers): New constant for number of
5501 higher ZMM registers (16-31).
5502 (num_avx512_ymmh_registers): New contant for number of higher
5503 YMM registers (ymm16-31 added by avx521 on x86_64).
5504 (num_avx512_xmm_registers): New constant for number of higher
5505 XMM registers (xmm16-31 added by AVX512 on x86_64).
5506 (struct i387_xsave): Add space for AVX512 registers.
5507 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5508 Add code to handle AVX512 registers.
5509 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5510 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5511 prototypei from generated file.
5512 (tdesc_amd64_avx512_linux): Likewise.
5513 (init_registers_x32_avx512_linux): Likewise.
5514 (tdesc_x32_avx512_linux): Likewise.
5515 (init_registers_i386_avx512_linux): Likewise.
5516 (tdesc_i386_avx512_linux): Likewise.
5517 (x86_64_regmap): Add AVX512 registers.
5518 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5519 mask.
5520 (initialize_low_arch): Add code to initialize AVX512 registers.
5521
5522 2014-04-23 Pedro Alves <palves@redhat.com>
5523
5524 * mem-break.c (find_gdb_breakpoint_at): Make static.
5525 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5526
5527 2014-04-23 Pedro Alves <palves@redhat.com>
5528
5529 * i386-low.c: Don't include break-common.h here.
5530 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5531 prototype to take target_hw_bp_type as argument instead of a Z
5532 packet char.
5533 * i386-low.h: Include break-common.h here.
5534 (Z_packet_to_hw_type): Declare.
5535 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5536 prototypes.
5537 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5538 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5539 (x86_remove_point): Convert the packet number to a
5540 target_hw_bp_type before calling i386_low_remove_watchpoint.
5541 * win32-i386-low.c (i386_insert_point): Convert the packet number
5542 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5543 (i386_remove_point): Convert the packet number to a
5544 target_hw_bp_type before calling i386_low_remove_watchpoint.
5545
5546 2014-04-23 Pedro Alves <palves@redhat.com>
5547
5548 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5549
5550 2014-04-10 Pedro Alves <palves@redhat.com>
5551
5552 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5553 Check if the condition or command is NULL before checking if the
5554 breakpoint is known. On success, return true.
5555 * mem-break.h (add_breakpoint_condition): Document return.
5556 (add_breakpoint_commands): Add describing comment.
5557 * server.c (skip_to_semicolon): New function.
5558 (process_point_options): Use it.
5559
5560 2014-04-09 Pedro Alves <palves@redhat.com>
5561
5562 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5563 to lwpid_of.
5564
5565 2014-02-27 Pedro Alves <palves@redhat.com>
5566
5567 PR 12702
5568 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5569 macros.
5570 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5571 output.
5572 (last_thread_of_process_p): Take a PID argument instead of a
5573 thread pointer.
5574 (linux_wait_for_lwp): Delete.
5575 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5576 functions.
5577 (linux_low_filter_event): New function, party factored out from
5578 linux_wait_for_event.
5579 (linux_wait_for_event): Rename to ...
5580 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5581 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5582 sigsuspend. Check for zombie leaders.
5583 (linux_wait_for_event): Reimplement as wrapper around
5584 linux_wait_for_event_filtered.
5585 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5586 a normal or signal exit is seen, it's the whole process exiting.
5587 (wait_for_sigstop): No longer a for_each_inferior callback.
5588 Rewrite on top of linux_wait_for_event_filtered.
5589 (stop_all_lwps): Call wait_for_sigstop directly.
5590 * server.c (resume, handle_target_event): Handle
5591 TARGET_WAITKIND_NO_RESUMED.
5592
5593 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5594
5595 * win32-low.c (psapi_get_dll_name,
5596 * win32_CreateToolhelp32Snapshot): Delete.
5597 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5598 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5599 Delete.
5600 (handle_load_dll): Add function description.
5601 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5602
5603 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5604
5605 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5606 Add comment.
5607 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5608 base address when calling win32_add_one_solib.
5609 (handle_load_dll): Delete local variable load_addr.
5610 Remove 0x1000 offset applied to DLL base address when calling
5611 win32_add_one_solib.
5612 (handle_unload_dll): Add comment.
5613
5614 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5615
5616 * win32-low.c (win32_add_all_dlls): Renames
5617 win32_ensure_ntdll_loaded. Rewrite function documentation.
5618 Adjust implementation to always load all DLLs.
5619 Add 0x1000 offset to DLL base address when calling
5620 win32_add_one_solib.
5621 (child_initialization_done): New static global.
5622 (do_initial_child_stuff): Set child_initialization_done to
5623 zero during child initialization, and 1 after. Replace call
5624 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5625 Add comment.
5626 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5627 (handle_unload_dll): Add function documentation.
5628 (get_child_debug_event): Ignore load and unload DLL events
5629 during child initialization.
5630
5631 2014-02-20 Doug Evans <dje@google.com>
5632
5633 Remove global all_lwps.
5634 * inferiors.h (ptid_of): Move here from linux-low.h.
5635 (pid_of, lwpid_of): Ditto.
5636 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5637 parameter is a struct thread_info * now.
5638 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5639 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5640 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5641 directly.
5642 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5643 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5644 * linux-arm-low.c (update_registers_callback): Update, "entry"
5645 parameter is a struct thread_info * now.
5646 Fetch lwpid from current_inferior directly.
5647 (arm_insert_point): Pass &all_threads to find_inferior instead of
5648 &all_lwps.
5649 (arm_remove_point): Ditto.
5650 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5651 (arm_prepare_to_resume): Fetch pid from thread.
5652 (arm_read_description): Fetch lwpid from current_inferior directly.
5653 * linux-low.c (all_lwps): Delete.
5654 (delete_lwp): Delete call to remove_inferior.
5655 (handle_extended_wait): Fetch lwpid from thread.
5656 (add_lwp): Don't set lwp->entry.id. Remove call to
5657 add_inferior_to_list.
5658 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5659 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5660 (kill_one_lwp_callback): Ditto.
5661 (linux_kill): Don't dereference NULL pointer.
5662 Fetch ptid,lwpid from thread.
5663 (get_detach_signal): Fetch ptid from thread.
5664 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5665 Simplify call to regcache_invalidate_thread.
5666 (delete_lwp_callback): Update, "entry" parameter is a
5667 struct thread_info * now. Fetch pid from thread.
5668 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5669 (status_pending_p_callback): Update, "entry" parameter is a
5670 struct thread_info * now. Fetch ptid from thread.
5671 (find_lwp_pid): Update, "entry" parameter is a
5672 struct thread_info * now.
5673 (linux_wait_for_lwp): Fetch pid from thread.
5674 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5675 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5676 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5677 (dequeue_one_deferred_signal): Ditto.
5678 (cancel_breakpoint): Fetch ptid from current_inferior.
5679 (linux_wait_for_event): Pass &all_threads to find_inferior,
5680 not &all_lwps. Fetch ptid, lwpid from thread.
5681 (count_events_callback): Update, "entry" parameter is a
5682 struct thread_info * now.
5683 (select_singlestep_lwp_callback): Ditto.
5684 (select_event_lwp_callback): Ditto.
5685 (cancel_breakpoints_callback): Ditto.
5686 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5687 not &all_lwps.
5688 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5689 (unsuspend_one_lwp): Update, "entry" parameter is a
5690 struct thread_info * now.
5691 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5692 not &all_lwps.
5693 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5694 Fetch lwpid from thread, not lwp.
5695 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5696 Pass &all_threads to find_inferior, not &all_lwps.
5697 (send_sigstop): Fetch lwpid from thread, not lwp.
5698 (send_sigstop_callback): Update, "entry" parameter is a
5699 struct thread_info * now.
5700 (suspend_and_send_sigstop_callback): Ditto.
5701 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5702 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5703 struct thread_info * now.
5704 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5705 from thread, lwp.
5706 (lwp_running): Update, "entry" parameter is a
5707 struct thread_info * now.
5708 (stop_all_lwps): Fetch ptid from thread.
5709 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5710 (linux_resume_one_lwp): Fetch lwpid from thread.
5711 (linux_set_resume_request): Update, "entry" parameter is a
5712 struct thread_info * now. Fetch pid, lwpid from thread.
5713 (resume_status_pending_p): Update, "entry" parameter is a
5714 struct thread_info * now.
5715 (need_step_over_p): Ditto. Fetch lwpid from thread.
5716 (start_step_over): Fetch lwpid from thread.
5717 (linux_resume_one_thread): Update, "entry" parameter is a
5718 struct thread_info * now. Fetch lwpid from thread.
5719 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5720 (proceed_one_lwp): Update, "entry" parameter is a
5721 struct thread_info * now. Fetch lwpid from thread.
5722 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5723 struct thread_info * now.
5724 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5725 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5726 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5727 directly.
5728 (regsets_store_inferior_registers): Ditto.
5729 (fetch_register, store_register): Ditto.
5730 (linux_read_memory, linux_write_memory): Ditto.
5731 (linux_request_interrupt): Ditto.
5732 (linux_read_auxv): Ditto.
5733 (linux_xfer_siginfo): Ditto.
5734 (linux_qxfer_spu): Ditto.
5735 (linux_qxfer_libraries_svr4): Ditto.
5736 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5737 moved to inferiors.h.
5738 (get_lwp): Delete.
5739 (get_thread_lwp): Update.
5740 (struct lwp_info): Delete member "entry". Simplify comment for
5741 member "thread".
5742 (all_lwps): Delete.
5743 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5744 current_inferior directly.
5745 (update_watch_registers_callback): Update, "entry" parameter is a
5746 struct thread_info * now. Fetch pid from thread.
5747 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5748 (mips_insert_point): Fetch lwpid from current_inferior.
5749 Pass &all_threads to find_inferior, not &all_lwps.
5750 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5751 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5752 directly.
5753 (mips_stopped_data_address): Ditto.
5754 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5755 directly.
5756 * linux-tile-low.c (tile_arch_setup): Ditto.
5757 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5758 (update_debug_registers_callback): Update, "entry" parameter is a
5759 struct thread_info * now. Fetch pid from thread.
5760 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5761 Pass &all_threads to find_inferior, not &all_lwps.
5762 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5763 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5764 Pass &all_threads to find_inferior, not &all_lwps.
5765 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5766 (i386_dr_low_get_status): Ditto.
5767 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5768 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5769 (x86_linux_read_description): Ditto.
5770 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5771
5772 2014-02-20 Doug Evans <dje@google.com>
5773
5774 * inferiors.c (get_first_inferior): Fix buglet.
5775
5776 2014-02-19 Doug Evans <dje@google.com>
5777
5778 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5779 * inferiors.c (add_thread): Change result type to struct thread_info *.
5780 All callers updated.
5781 (add_lwp): Call add_thread here instead of in callers.
5782 All callers updated.
5783 * linux-low.h (get_lwp_thread): Rewrite.
5784 (struct lwp_info): New member "thread".
5785
5786 2014-02-19 Doug Evans <dje@google.com>
5787
5788 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5789 All callers updated.
5790
5791 2014-02-19 Doug Evans <dje@google.com>
5792
5793 * inferiors.c (add_thread): Fix whitespace.
5794
5795 2014-02-19 Doug Evans <dje@google.com>
5796
5797 * dll.c (clear_dlls): Replace accessing list implemention details
5798 with API function.
5799 * gdbthread.h (get_first_thread): Declare.
5800 * inferiors.c (for_each_inferior_with_data): New function.
5801 (get_first_thread): New function.
5802 (find_thread_ptid): Simplify.
5803 (get_first_inferior): New function.
5804 (clear_list): Delete.
5805 (one_inferior_p): New function.
5806 (clear_inferior_list): New function.
5807 (clear_inferiors): Update.
5808 * inferiors.h (for_each_inferior_with_data): Declare.
5809 (clear_inferior_list): Declare.
5810 (one_inferior_p): Declare.
5811 (get_first_inferior): Declare.
5812 * linux-low.c (linux_wait_for_event): Replace accessing list
5813 implemention details with API function.
5814 * server.c (target_running): Ditto.
5815 (accumulate_file_name_length): New function.
5816 (emit_dll_description): New function.
5817 (handle_qxfer_libraries): Replace accessing list implemention
5818 details with API function.
5819 (handle_qxfer_threads_worker): New function.
5820 (handle_qxfer_threads_proper): Replace accessing list implemention
5821 details with API function.
5822 (handle_query): Ditto.
5823 (visit_actioned_threads_callback_ftype): New typedef.
5824 (visit_actioned_threads_data): New struct.
5825 (visit_actioned_threads): Rewrite to be find_inferior callback.
5826 (resume): Call find_inferior.
5827 (handle_status): Replace accessing list implemention
5828 details with API function.
5829 (process_serial_event): Replace accessing list implemention details
5830 with API function.
5831 * target.c (set_desired_inferior): Replace accessing list implemention
5832 details with API function.
5833 * tracepoint.c (same_process_p): New function.
5834 (gdb_agent_about_to_close): Replace accessing list implemention
5835 details with API function.
5836 * win32-low.c (child_delete_thread): Replace accessing list
5837 implemention details with API function.
5838 (match_dll_by_basename): New function.
5839 (dll_is_loaded_by_basename): New function.
5840 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5841 details call to dll_is_loaded_by_basename.
5842
5843 2014-02-19 Doug Evans <dje@google.com>
5844
5845 * dll.h (struct dll_info): Add comment.
5846 * gdbthread.h (struct thread_info): Add comment.
5847 (current_ptid): Simplify.
5848 * inferiors.c (add_process): Update.
5849 (remove_process): Update.
5850 * inferiors.h (struct process_info): Rename member "head" to "entry".
5851 * linux-low.c (delete_lwp): Update.
5852 (add_lwp): Update.
5853 (last_thread_of_process_p): Update.
5854 (kill_one_lwp_callback, linux_kill): Update.
5855 (status_pending_p_callback): Update.
5856 (wait_for_sigstop): Update. Simplify read of ptid.
5857 (start_step_over): Update.
5858 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5859 (get_lwp_thread): Update.
5860 (struct lwp_info): Rename member "head" to "entry".
5861 * regcache.h (inferior_list_entry): Delete.
5862 * server.c (kill_inferior_callback): Update.
5863 (detach_or_kill_inferior_callback): Update.
5864 (print_started_pid): Update.
5865 (print_attached_pid): Update.
5866 (process_serial_event): Simplify read of ptid.
5867 * thread-db.c (thread_db_create_event): Update.
5868 (thread_db_get_tls_address): Update.
5869 * win32-low.c (current_inferior_ptid): Simplify.
5870
5871 2014-02-19 Tom Tromey <tromey@redhat.com>
5872
5873 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5874 argument.
5875 (target_supports_btrace): Update.
5876
5877 2014-02-14 Yao Qi <yao@codesourcery.com>
5878
5879 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5880 (rsp-low-ipa.o): New target.
5881
5882 2014-02-12 Tom Tromey <tromey@redhat.com>
5883
5884 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5885 convert_ascii_to_int.
5886 * regcache.c (registers_to_string): Likewise.
5887 * remote-utils.c (decode_M_packet): Likewise.
5888 * server.c (process_serial_event): Likewise.
5889
5890 2014-02-12 Tom Tromey <tromey@redhat.com>
5891
5892 * server.c (handle_query, handle_v_run): Use hex2bin, not
5893 unhexify.
5894 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5895
5896 2014-02-12 Tom Tromey <tromey@redhat.com>
5897
5898 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5899 convert_int_to_ascii.
5900 * regcache.c (registers_to_string, collect_register_as_string):
5901 Likewise.
5902 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5903 Likewise.
5904 * server.c (process_serial_event): Likewise.
5905 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5906 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5907
5908 2014-02-12 Tom Tromey <tromey@redhat.com>
5909
5910 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5911 bin2hex, not hexify.
5912 * tracepoint.c (cmd_qtstatus): Likewise.
5913
5914 2014-02-12 Tom Tromey <tromey@redhat.com>
5915
5916 * remote-utils.c (monitor_output): Pass explicit length to
5917 hexify.
5918
5919 2014-02-12 Tom Tromey <tromey@redhat.com>
5920
5921 * tracepoint.c: Include rsp-low.h.
5922 * server.c: Include rsp-low.h.
5923 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5924 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5925 declare.
5926 * remote-utils.c: Include rsp-low.h.
5927 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5928 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5929 (convert_int_to_ascii, convert_ascii_to_int): Move to
5930 common/rsp-low.c.
5931 * regcache.c: Include rsp-low.h.
5932 * ax.c: Include rsp-low.h.
5933 * Makefile.in (SFILES): Add common/rsp-low.c.
5934 (OBS): Add rsp-low.o.
5935 (rsp-low.o): New target.
5936
5937 2014-02-12 Tom Tromey <tromey@redhat.com>
5938
5939 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5940 Include print-utils.h.
5941 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5942 (plongest, thirty_two, phex_nz): Remove.
5943 * Makefile.in (SFILES): Add common/print-utils.c.
5944 (OBS): Add print-utils.o.
5945 (print-utils-ipa.o): New target.
5946 (print-utils.o): New target.
5947 (IPA_OBJS): Add print-utils-ipa.o.
5948
5949 2014-02-06 Tom Tromey <tromey@redhat.com>
5950
5951 * Makefile.in (SFILES): Fix indentation.
5952
5953 2014-02-05 Doug Evans <dje@google.com>
5954
5955 * linux-low.c (linux_wait_for_event): Improve comment.
5956 (linux_wait_1): Keep current_inferior in sync with event_child.
5957
5958 2014-01-22 Doug Evans <dje@google.com>
5959
5960 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5961
5962 2014-01-22 Doug Evans <dje@google.com>
5963
5964 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5965 * configure: Regenerate.
5966 * config.in: Regenerate.
5967 * Makefile.in (SFILES): Add debug.c.
5968 (OBS): Add debug.o.
5969 * debug.c: New file.
5970 * debug.h: New file.
5971 * linux-aarch64-low.c (*): Update all debugging printfs to use
5972 debug_printf instead of fprintf.
5973 * linux-arm-low.c (*): Ditto.
5974 * linux-cris-low.c (*): Ditto.
5975 * linux-crisv32-low.c (*): Ditto.
5976 * linux-m32r-low.c (*): Ditto.
5977 * linux-sparc-low.c (*): Ditto.
5978 * linux-x86.c (*): Ditto.
5979 * linux-low.c (*): Ditto.
5980 (linux_wait_1): Add calls to debug_enter, debug_exit.
5981 (linux_wait): Remove redundant debugging printf.
5982 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5983 (linux_resume, unstop_all_lwps): Ditto.
5984 * mem-break.c (*): Update all debugging printfs to use
5985 debug_printf instead of fprintf.
5986 * remote-utils.c (*): Ditto.
5987 * thread-db.c (*): Ditto.
5988 * server.c #include <ctype.h>, "gdb_vecs.h".
5989 (debug_threads): Moved to debug.c.
5990 (*): Update all debugging printfs to use debug_printf instead of
5991 fprintf.
5992 (start_inferior): Replace call to fflush with call to debug_flush.
5993 (monitor_show_help): Mention set debug-format.
5994 (parse_debug_format_options): New function.
5995 (handle_monitor_command): Handle "monitor set debug-format".
5996 (gdbserver_usage): Mention --debug-format.
5997 (main): Parse --debug-format.
5998 * server.h (debug_threads): Declaration moved to debug.h.
5999 #include "debug.h".
6000 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6001 trace_debug_1 that uses debug_printf.
6002 (tracepoint_look_up_symbols): Update all debugging printfs to use
6003 debug_printf instead of fprintf.
6004
6005 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6006
6007 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6008 sys/ptrace.h.
6009
6010 2014-01-17 Pedro Alves <palves@redhat.com>
6011
6012 PR build/16445
6013 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6014 defined after including gdb_proc_service.h.
6015
6016 2014-01-16 Doug Evans <dje@google.com>
6017
6018 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6019 (match_dll): Use it.
6020
6021 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6022
6023 * target.h (target_ops) <read_btrace>: Change parameters and
6024 return type to allow error reporting.
6025 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6026 trace reading errors on.
6027 * linux-low.c (linux_low_read_btrace): Pass trace reading
6028 errors on.
6029 (linux_low_disable_btrace): New.
6030
6031 2014-01-15 Doug Evans <dje@google.com>
6032
6033 * inferiors.c (thread_id_to_gdb_id): Delete.
6034 * inferiors.h (thread_id_to_gdb_id): Delete.
6035
6036 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6037
6038 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6039 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6040 versions.
6041
6042 2014-01-08 Pedro Alves <palves@redhat.com>
6043
6044 * server.c (handle_status): Don't discard previous queued stop
6045 replies or thread's pending status here.
6046 (main) <disconnection>: Do it here instead.
6047
6048 2014-01-08 Pedro Alves <palves@redhat.com>
6049
6050 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6051 * server.c (visit_actioned_threads, handle_pending_status): New
6052 function.
6053 (handle_v_cont): Factor out parts to ...
6054 (resume): ... this new function. If in all-stop, and a thread
6055 being resumed has a pending status, report it without actually
6056 resuming.
6057 (myresume): Adjust to use the new 'resume' function.
6058 (clear_pending_status_callback, set_pending_status_callback)
6059 (find_status_pending_thread_callback): New functions.
6060 (handle_status): Handle the case of multiple threads having
6061 interesting statuses to report. Report threads' real last signal
6062 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6063 with an interesting thread to report the status for, instead of
6064 always reporting the status of the first thread.
6065
6066 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6067
6068 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6069 * gdbreplay.c (gdbreplay_version): Likewise.
6070
6071 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6072
6073 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6074 iov.iov_len with the real length in use.
6075
6076 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6077
6078 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6079 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6080 for all targets that use win32-low.c.
6081 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6082 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6083
6084 2013-12-13 Pedro Alves <palves@redhat.com>
6085
6086 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6087 if equal to TARGET_WAITKIND_LOADED.
6088 * win32-low.c (cached_status): New static global.
6089 (win32_wait): Add declaration.
6090 (do_initial_child_stuff): Flush all initial pending debug events
6091 up to the initial breakpoint.
6092 (win32_wait): If CACHED_STATUS was set, return that instead
6093 of doing a real wait. Remove the code resuming the execution
6094 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6095 during the initial phase. Also remove the code changing
6096 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6097 TARGET_WAITKIND_STOPPED.
6098
6099 2013-12-11 Yao Qi <yao@codesourcery.com>
6100
6101 * notif.c (handle_notif_ack): Return 0 if no notification
6102 matches.
6103
6104 2013-11-20 Doug Evans <dje@google.com>
6105
6106 * linux-low.c (linux_set_resume_request): Fix comment.
6107
6108 2013-11-20 Doug Evans <dje@google.com>
6109
6110 * linux-low.c (resume_status_pending_p): Tweak comment.
6111
6112 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6113
6114 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6115 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6116 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6117 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6118 (srv_amd64_regobj): Add amd64-mpx.o.
6119 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6120 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6121 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6122 * i387-fp.c (num_pl_bnd_register) Added constant.
6123 (num_pl_bnd_cfg_registers) Added constant.
6124 (struct i387_xsave) Added reserved area and MPX fields.
6125 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6126 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6127 function.
6128 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6129 (init_registers_amd64_mpx_linux): Declare new function.
6130 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6131 (x86_64_regmap): Add MPX registers.
6132 (x86_linux_read_description): Add MPX case.
6133 (initialize_low_arch): Initialize MPX targets.
6134
6135 2013-11-18 Tom Tromey <tromey@redhat.com>
6136
6137 * configure: Rebuild.
6138 * configure.ac: Don't check for stdlib.h.
6139 * gdbreplay.c: Unconditionally include stdlib.h.
6140
6141 2013-11-18 Tom Tromey <tromey@redhat.com>
6142
6143 * config.in: Rebuild.
6144 * configure: Rebuild.
6145 * configure.ac: Don't use AC_HEADER_DIRENT.
6146
6147 2013-11-18 Tom Tromey <tromey@redhat.com>
6148
6149 * server.h: Don't check HAVE_STRING_H.
6150 * gdbreplay.c: Don't check HAVE_STRING_H.
6151 * configure: Rebuild.
6152
6153 2013-11-18 Tom Tromey <tromey@redhat.com>
6154
6155 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6156 LIBGNU.
6157
6158 2013-11-08 Tom Tromey <tromey@redhat.com>
6159
6160 * configure, config.in: Rebuild.
6161 * configure.ac: Remove unused configury.
6162
6163 2013-11-08 Tom Tromey <tromey@redhat.com>
6164
6165 * acinclude.m4: Include common.m4, codeset.m4.
6166 * configure, config.in: Rebuild.
6167 * configure.ac: Use GDB_AC_COMMON.
6168
6169 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6170
6171 * linux-s390-low.c (HWCAP_S390_TE): New define.
6172 (s390_arch_setup): Consider the TE field in the HWCAP for
6173 determining 'have_regset_tdb'.
6174
6175 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6176
6177 PR gdb/16014
6178 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6179 call to sizeof.
6180
6181 2013-10-02 Pedro Alves <palves@redhat.com>
6182
6183 * server.c (process_serial_event): Don't output "GDBserver
6184 exiting" if GDB is connected through stdio.
6185 * target.c (mywait): Likewise, be silent if GDB is connected
6186 through stdio.
6187
6188 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6189
6190 * lynx-low.c (lynx_add_threads_after_attach): New function.
6191 (lynx_attach): Remove call to add_thread. Add call to
6192 lynx_add_threads_after_attach instead.
6193
6194 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6195
6196 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6197 * config.in, configure: Regenerated.
6198
6199 2013-09-18 Yao Qi <yao@codesourcery.com>
6200
6201 PR server/15959
6202 * server.c (start_inferior): Clear 'resume_info'.
6203
6204 2013-09-16 Jiong Wang <jiwang@tilera.com>
6205
6206 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6207 for each register.
6208
6209 2013-09-16 Jiong Wang <jiwang@tilera.com>
6210
6211 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6212 linux-tile-low.o to srv_tgtobj.
6213
6214 2013-09-16 Will Newton <will.newton@linaro.org>
6215
6216 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6217 out regs.
6218
6219 2013-09-06 Pedro Alves <palves@redhat.com>
6220
6221 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6222 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6223 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6224 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6225 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6226 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6227
6228 2013-09-06 Pedro Alves <palves@redhat.com>
6229
6230 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6231 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6232
6233 2013-09-06 Pedro Alves <palves@redhat.com>
6234
6235 * linux-amd64-ipa.c: Include tracepoint.h.
6236 * linux-i386-ipa.c: Include tracepoint.h.
6237
6238 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6239
6240 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6241 (ps_get_thread_area): New function.
6242
6243 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6244
6245 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6246 (initialize_low_arch): Call init_registers_crisv32 rather than
6247 init_register_crisv32.
6248
6249 2013-09-05 Pedro Alves <palves@redhat.com>
6250
6251 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6252 to ...
6253 * hostio.h: ... this new file.
6254 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6255 win32-low.c: Include hostio.h.
6256
6257 2013-09-05 Pedro Alves <palves@redhat.com>
6258
6259 * server.h (gdb_client_data, handler_func, callback_handler_func)
6260 (delete_file_handler, add_file_handler, append_callback_event)
6261 (delete_callback_event, start_event_loop, initialize_event_loop):
6262 Move to event-loop.h and include it.
6263 * event-loop.h: New file.
6264
6265 2013-09-05 Pedro Alves <palves@redhat.com>
6266
6267 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6268 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6269 (loaded_dll, unloaded_dll): Move to ...
6270 * dll.h: ... this new file.
6271 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6272
6273 2013-09-05 Pedro Alves <palves@redhat.com>
6274
6275 * server.h (current_process, get_thread_process, all_processes)
6276 (add_inferior_to_list, for_each_inferior, current_inferior)
6277 (remove_inferior, add_process, remove_process, find_process_pid)
6278 (have_started_inferiors_p, have_attached_inferiors_p)
6279 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6280 (clear_inferiors, find_inferior, find_inferior_id)
6281 (inferior_target_data, set_inferior_target_data)
6282 (inferior_regcache_data, set_inferior_regcache_data): Move to
6283 inferiors.h, and include it.
6284 * inferiors.h: New file.
6285
6286 2013-09-05 Pedro Alves <palves@redhat.com>
6287
6288 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6289 Move ...
6290 * ax.h: ... here.
6291
6292 2013-09-05 Pedro Alves <palves@redhat.com>
6293
6294 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6295 tracepoint.h.
6296 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6297 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6298 (handle_tracepoint_general_set, handle_tracepoint_query)
6299 (tracepoint_finished_step, tracepoint_was_hit)
6300 (release_while_stepping_state_list, current_traceframe)
6301 (in_readonly_region, traceframe_read_mem)
6302 (fetch_traceframe_registers, traceframe_read_sdata)
6303 (traceframe_read_info, struct fast_tpoint_collect_status)
6304 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6305 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6306 (supply_fast_tracepoint_registers)
6307 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6308 (ipa_tdesc, claim_trampoline_space)
6309 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6310 (agent_mem_read, agent_get_trace_state_variable_value)
6311 (agent_set_trace_state_variable_value, agent_tsv_read)
6312 (agent_mem_read_string, get_raw_reg_func_addr)
6313 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6314 * tracepoint.h: ... this new file.
6315
6316 2013-09-05 Pedro Alves <palves@redhat.com>
6317
6318 * server.h (perror_with_name, error, fatal, warning, paddress)
6319 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6320 include it.
6321 * utils.h: New file.
6322
6323 2013-09-05 Pedro Alves <palves@redhat.com>
6324
6325 * server.h (remote_debug, noack_mode, transport_is_reliable)
6326 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6327 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6328 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6329 (write_enn, initialize_async_io, enable_async_io)
6330 (disable_async_io, check_remote_input_interrupt_request)
6331 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6332 (dead_thread_notify, prepare_resume_reply)
6333 (decode_address_to_semicolon, decode_address, decode_m_packet)
6334 (decode_M_packet, decode_X_packet, decode_xfer_write)
6335 (decode_search_memory_packet, unhexify, hexify)
6336 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6337 (look_up_one_symbol, relocate_instruction)
6338 (monitor_output): Move to remote-utils.h, and include it.
6339 * remote-utils.h: New file.
6340
6341 2013-09-05 Pedro Alves <palves@redhat.com>
6342
6343 * server.h (_): Delete.
6344
6345 2013-09-02 Pedro Alves <palves@redhat.com>
6346
6347 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6348 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6349 allocated.
6350 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6351
6352 2013-09-02 Pierre Muller <muller@sourceware.org>
6353
6354 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6355 or WriteProcessMemory complete successfully and handle
6356 ERROR_PARTIAL_COPY error.
6357
6358 2013-09-02 Pedro Alves <palves@redhat.com>
6359
6360 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6361 error instead of EIO.
6362
6363 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6364
6365 PR server/15604
6366 * linux-low.c: Include filestuff.h.
6367 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6368 * lynx-low.c: Include filestuff.h.
6369 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6370 * server.c: Include filestuff.h.
6371 (main): Call notice_open_fds.
6372 * spu-low.c: Include filestuff.h.
6373 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6374
6375 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6376
6377 * Makefile.in: Explain why ../target and ../nat are not
6378 listed as include file search paths.
6379 (linux-waitpid.o): New object file rule.
6380 * configure.srv (srv_native_linux_obj): New variable.
6381 Replace all occurrences of linux native object files with
6382 $srv_native_linux_obj.
6383 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6384 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6385 (linux_enable_event_reporting): Remove declaration.
6386 (my_waitpid): Moved to common/linux-waitpid.c.
6387 (linux_wait_for_event): Pass ptid when calling
6388 linux_enable_event_reporting.
6389 (linux_supports_tracefork_flag): Remove.
6390 (linux_enable_event_reporting): Likewise.
6391 (linux_tracefork_grandchild): Remove.
6392 (STACK_SIZE): Moved to common/linux-ptrace.c.
6393 (linux_tracefork_child): Remove.
6394 (linux_test_for_tracefork): Remove.
6395 (linux_look_up_symbols): Call linux_supports_traceclone.
6396 (initialize_low): Remove call to linux_test_for_tracefork.
6397 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6398 common/linux-ptrace.h.
6399 (PTRACE_TYPE_ARG4): Likewise.
6400 Include linux-ptrace.h.
6401
6402 2013-08-21 Pedro Alves <palves@redhat.com>
6403
6404 * config.in: Renegerate.
6405
6406 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6407
6408 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6409 (SFILES): Remove $(srcdir)/common/target-common.c and
6410 add $(srcdir)/target/waitstatus.c.
6411 (OBS): Remove target-common.o and add waitstatus.o.
6412 (server_h): Remove $(srcdir)/../common/target-common.h and
6413 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6414 and $(srcdir)/../target/waitstatus.h.
6415 (target-common.o): Remove.
6416 (waitstatus.o): New target object file.
6417 * target.h: Do not include target-common.h and
6418 include target/resume.h, target/wait.h and
6419 target/waitstatus.h.
6420
6421 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6422
6423 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6424 to PTRACE_TYPE_ARG3.
6425 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6426 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6427 PTRACE_TYPE_ARG4.
6428 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6429 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6430
6431 2013-07-27 Jie Zhang <jie@codesourcery.com>
6432 Daniel Jacobowitz <dan@codesourcery.com>
6433 Yao Qi <yao@codesourcery.com>
6434
6435 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6436 (mips-linux-watch.o): New rule.
6437 (mips_linux_watch_h): New variable.
6438 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6439 srv_tgtobj.
6440 * linux-mips-low.c: Include mips-linux-watch.h.
6441 (struct arch_process_info, struct arch_lwp_info): New.
6442 (update_watch_registers_callback): New function.
6443 (mips_linux_new_process, mips_linux_new_thread) New functions.
6444 (mips_linux_prepare_to_resume, mips_insert_point): New
6445 functions.
6446 (mips_remove_point, mips_stopped_by_watchpoint): New
6447 functions.
6448 (rsp_bp_type_to_target_hw_bp_type): New function.
6449 (mips_stopped_data_address): New function.
6450 (the_low_target): Add watchpoint support functions.
6451
6452 2013-07-27 Yao Qi <yao@codesourcery.com>
6453
6454 * i386-low.c: Include break-common.h.
6455 (enum target_hw_bp_type): Remove.
6456
6457 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6458
6459 * Makefile.in (SFILES): /common/target-common.c.
6460 (OBS): Add target-common.o.
6461 (server_h): Add $(srcdir)/../common/target-common.h.
6462 (target-common.o): New target.
6463 * server.c (queue_stop_reply_callback): Free
6464 status string after use.
6465 * target.c (target_waitstatus_to_string): Remove.
6466 * target.h: Include target-common.h.
6467 (resume_kind): Likewise.
6468 (target_waitkind): Likewise.
6469 (target_waitstatus): Likewise.
6470 (TARGET_WNOHANG): Likewise.
6471
6472 2013-07-04 Yao Qi <yao@codesourcery.com>
6473
6474 * Makefile.in (host_alias): Use @host_noncanonical@.
6475 (target_alias): Use @target_noncanonical@.
6476 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6477 ACX_NONCANONICAL_HOST.
6478 * configure: Regenerated.
6479
6480 Revert:
6481 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6482
6483 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6484 * configure: Rebuild.
6485 * Makefile.in (version_host, version_target): Get from configure.
6486 (version.c): Use $(version_host) and $(version_target).
6487
6488 2013-07-03 Pedro Alves <palves@redhat.com>
6489
6490 * Makefile.in (config.status): Depend on development.sh.
6491 * acinclude.m4: Include libmcheck.m4.
6492 * configure: Regenerate.
6493
6494 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6495
6496 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6497 attribute inside the parentheses.
6498 (winapi_DebugSetProcessKillOnExit): Ditto.
6499 (winapi_DebugBreakProcess): Ditto.
6500 (winapi_GenerateConsoleCtrlEvent): Ditto.
6501
6502 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6503
6504 * notif.h (notif_event): Add a dummy member to avoid compiler
6505 errors.
6506
6507 2013-07-01 Pedro Alves <palves@redhat.com>
6508
6509 * hostio.c (HOSTIO_PATH_MAX): Define.
6510 (require_filename, handle_open, handle_unlink, handle_readlink):
6511 Use it.
6512
6513 2013-07-01 Pedro Alves <palves@redhat.com>
6514
6515 * server.h: Include "pathmax.h".
6516 * linux-low.c: Don't include sys/param.h.
6517 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6518 MAXPATHLEN.
6519 * win32-low.c: Don't include sys/param.h.
6520 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6521
6522 2013-07-01 Pedro Alves <palves@redhat.com>
6523
6524 * event-loop.c: Don't check HAVE_UNISTD_H before including
6525 <unistd.h>.
6526 * gdbreplay.c: Likewise.
6527 * remote-utils.c: Likewise.
6528 * server.c: Likewise.
6529 * configure.ac: Don't check for unistd.h.
6530 * configure: Regenerate.
6531
6532 2013-06-28 Tom Tromey <tromey@redhat.com>
6533
6534 * Makefile.in (version.c): Use version.in, not
6535 common/version.in.
6536
6537 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6538
6539 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6540 * configure: Rebuild.
6541 * Makefile.in (version_host, version_target): Get from configure.
6542 (version.c): Use $(version_host) and $(version_target).
6543
6544 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6545
6546 Fix trace-status to output user name without trailing colon.
6547 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6548
6549 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6550
6551 Fix trace-status to output proper start-time and stop-time.
6552 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6553 output start time and stop time in hex as gdb expects.
6554
6555 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6556
6557 * tracepoint.c (build_traceframe_info_xml): Output trace state
6558 variables present in the trace buffer.
6559
6560 2013-06-24 Tom Tromey <tromey@redhat.com>
6561
6562 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6563 create-version.sh.
6564 (version.o): Remove.
6565 * gdbreplay.c: Include version.h.
6566 (version, host_name): Don't declare.
6567 * server.h: Include version.h.
6568 (version, host_name): Don't declare.
6569
6570 2013-06-12 Pedro Alves <palves@redhat.com>
6571
6572 * linux-x86-low.c (linux_is_elf64): Delete global.
6573 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6574 with local linux_pid_exe_is_elf_64_file use.
6575
6576 2013-06-11 Pedro Alves <palves@redhat.com>
6577
6578 * linux-low.c (regset_disabled, disable_regset): New functions.
6579 (regsets_fetch_inferior_registers)
6580 (regsets_store_inferior_registers): Use them.
6581 (initialize_regsets_info); Don't allocate the disabled_regsets
6582 array here.
6583 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6584 comment.
6585
6586 2013-06-11 Pedro Alves <palves@redhat.com>
6587
6588 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6589 xmalloc.
6590
6591 2013-06-11 Pedro Alves <palves@redhat.com>
6592
6593 * linux-x86-low.c (initialize_low_arch): Call
6594 init_registers_x32_avx_linux.
6595
6596 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6597
6598 Fix compatibility with Android Bionic.
6599 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6600 it is not empty.
6601
6602 2013-06-07 Pedro Alves <palves@redhat.com>
6603
6604 PR server/14823
6605 * Makefile.in (OBS): Add tdesc.o.
6606 (IPA_OBJS): Add tdesc-ipa.o.
6607 (tdesc-ipa.o): New rule.
6608 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6609 interface.
6610 * linux-low.c (new_inferior): Delete.
6611 (disabled_regsets, num_regsets): Delete.
6612 (linux_add_process): Adjust to set the new per-process
6613 new_inferior flag.
6614 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6615 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6616 was a stop. When calling arch_setup, switch the current inferior
6617 to the thread that got an event.
6618 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6619 (regsets_fetch_inferior_registers)
6620 (regsets_store_inferior_registers): New regsets_info parameter.
6621 Adjust to use it.
6622 (linux_register_in_regsets): New regs_info parameter. Adjust to
6623 use it.
6624 (register_addr, fetch_register, store_register): New usrregs_info
6625 parameter. Adjust to use it.
6626 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6627 parameter regs_info. Adjust to use it.
6628 (linux_fetch_registers): Get the current inferior's regs_info, and
6629 adjust to use it.
6630 (linux_store_registers): Ditto.
6631 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6632 (initialize_low): Don't initialize the target_regsets here. Call
6633 initialize_low_arch.
6634 * linux-low.h (target_regsets): Delete declaration.
6635 (struct regsets_info): New.
6636 (struct usrregs_info): New.
6637 (struct regs_info): New.
6638 (struct process_info_private) <new_inferior>: New field.
6639 (struct linux_target_ops): Delete the num_regs, regmap, and
6640 regset_bitmap fields. New field regs_info.
6641 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6642 * i387-fp.c (num_xmm_registers): Delete.
6643 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6644 calls to new interface.
6645 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6646 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6647 Infer the number of xmm registers from the regcache's target
6648 description.
6649 * i387-fp.h (num_xmm_registers): Delete.
6650 * inferiors.c (add_thread): Don't install the thread's regcache
6651 here.
6652 * proc-service.c (gregset_info): Fetch the current inferior's
6653 regs_info. Adjust to use it.
6654 * regcache.c: Include tdesc.h.
6655 (register_bytes, reg_defs, num_registers)
6656 (gdbserver_expedite_regs): Delete.
6657 (get_thread_regcache): If the thread doesn't have a regcache yet,
6658 create one, instead of aborting gdbserver.
6659 (regcache_invalidate_one): Rename to ...
6660 (regcache_invalidate_thread): ... this.
6661 (regcache_invalidate_one): New.
6662 (regcache_invalidate): Only invalidate registers of the current
6663 process.
6664 (init_register_cache): Add target_desc parameter, and use it.
6665 (new_register_cache): Ditto. Assert the target description has a
6666 non zero registers_size.
6667 (regcache_cpy): Add assertions. Adjust.
6668 (realloc_register_cache, set_register_cache): Delete.
6669 (registers_to_string, registers_from_string): Adjust.
6670 (find_register_by_name, find_regno, find_register_by_number)
6671 (register_cache_size): Add target_desc parameter, and use it.
6672 (free_register_cache_thread, free_register_cache_thread_one)
6673 (regcache_release, register_cache_size): New.
6674 (register_size): Add target_desc parameter, and use it.
6675 (register_data, supply_register, supply_register_zeroed)
6676 (supply_regblock, supply_register_by_name, collect_register)
6677 (collect_register_as_string, collect_register_by_name): Adjust.
6678 * regcache.h (struct target_desc): Forward declare.
6679 (struct regcache) <tdesc>: New field.
6680 (init_register_cache, new_register_cache): Add target_desc
6681 parameter.
6682 (regcache_invalidate_thread): Declare.
6683 (regcache_invalidate_one): Delete declaration.
6684 (regcache_release): Declare.
6685 (find_register_by_number, register_cache_size, register_size)
6686 (find_regno): Add target_desc parameter.
6687 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6688 declarations.
6689 * remote-utils.c: Include tdesc.h.
6690 (outreg, prepare_resume_reply): Adjust.
6691 * server.c: Include tdesc.h.
6692 (gdbserver_xmltarget): Delete declaration.
6693 (get_features_xml, process_serial_event): Adjust.
6694 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6695 declare.
6696 (struct process_info) <tdesc>: New field.
6697 (ipa_tdesc): Declare.
6698 * tdesc.c: New file.
6699 * tdesc.h: New file.
6700 * tracepoint.c: Include tdesc.h.
6701 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6702 (get_context_regcache): Adjust to pass ipa_tdesc down.
6703 (do_action_at_tracepoint): Adjust to get the register cache size
6704 from the context regcache's description.
6705 (traceframe_walk_blocks): Adjust to get the register cache size
6706 from the current trace frame's description.
6707 (traceframe_get_pc): Adjust to get current trace frame's
6708 description and pass it down.
6709 (gdb_collect): Adjust to get the register cache size from the
6710 IPA's description.
6711 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6712 (gdbserver_xmltarget): Delete.
6713 (initialize_low_tracepoint): Set the ipa's target description.
6714 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6715 (initialize_low_tracepoint): Set the ipa's target description.
6716 * linux-x86-low.c: Include tdesc.h.
6717 [__x86_64__] (is_64bit_tdesc): New.
6718 (ps_get_thread_area, x86_get_thread_area): Use it.
6719 (i386_cannot_store_register): Rename to ...
6720 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6721 (i386_cannot_fetch_register): Rename to ...
6722 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6723 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6724 to new interface.
6725 (target_regsets): Rename to ...
6726 (x86_regsets): ... this.
6727 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6728 interface.
6729 (x86_siginfo_fixup): Use is_64bit_tdesc.
6730 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6731 (tdesc_x32_avx_linux, tdesc_x32_linux)
6732 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6733 Declare.
6734 (x86_linux_update_xmltarget): Delete.
6735 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6736 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6737 (AMD64_LINUX_USER64_CS): New.
6738 (x86_linux_read_description): New, based on
6739 x86_linux_update_xmltarget.
6740 (same_process_callback): New.
6741 (x86_arch_setup_process_callback): New.
6742 (x86_linux_update_xmltarget): New.
6743 (x86_regsets_info): New.
6744 (amd64_linux_regs_info): New.
6745 (i386_linux_usrregs_info): New.
6746 (i386_linux_regs_info): New.
6747 (x86_linux_regs_info): New.
6748 (x86_arch_setup): Reimplement.
6749 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6750 (x86_emit_ops): Ditto.
6751 (the_low_target): Adjust. Install x86_linux_regs_info,
6752 x86_cannot_fetch_register, and x86_cannot_store_register.
6753 (initialize_low_arch): New.
6754 * linux-ia64-low.c (tdesc_ia64): Declare.
6755 (ia64_fetch_register): Adjust.
6756 (ia64_usrregs_info, regs_info): New globals.
6757 (ia64_regs_info): New function.
6758 (the_low_target): Adjust.
6759 (initialize_low_arch): New function.
6760 * linux-sparc-low.c (tdesc_sparc64): Declare.
6761 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6762 Adjust.
6763 (sparc_arch_setup): New function.
6764 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6765 (the_low_target): Adjust.
6766 (initialize_low_arch): New function.
6767 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6768 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6769 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6770 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6771 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6772 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6773 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6774 (tdesc_powerpc_isa205_vsx64l): Declare.
6775 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6776 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6777 (ppc_set_pc, ppc_get_hwcap): Adjust.
6778 (ppc_usrregs_info): Forward declare.
6779 (!__powerpc64__) ppc_regmap_adjusted: New global.
6780 (ppc_arch_setup): Adjust to the current process'es target
6781 description.
6782 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6783 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6784 (ppc_store_evrregset): Adjust.
6785 (target_regsets): Rename to ...
6786 (ppc_regsets): ... this, and make static.
6787 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6788 (ppc_regs_info): New function.
6789 (the_low_target): Adjust.
6790 (initialize_low_arch): New function.
6791 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6792 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6793 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6794 (tdesc_s390x_linux64v2): Declare.
6795 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6796 (s390_fill_gregset, s390_store_last_break): Adjust.
6797 (target_regsets): Rename to ...
6798 (s390_regsets): ... this, and make static.
6799 (s390_get_pc, s390_set_pc): Adjust.
6800 (s390_get_hwcap): New target_desc parameter, and use it.
6801 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6802 (s390_arch_setup): Adjust to set the current process'es target
6803 description. Don't adjust the regmap.
6804 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6805 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6806 (regs_info_3264): New globals.
6807 (s390_regs_info): New function.
6808 (the_low_target): Adjust.
6809 (initialize_low_arch): New function.
6810 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6811 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6812 [__mips64] (init_registers_mips_linux)
6813 (init_registers_mips_dsp_linux): Delete defines.
6814 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6815 (have_dsp): New global.
6816 (mips_read_description): New, based on mips_arch_setup.
6817 (mips_arch_setup): Reimplement.
6818 (get_usrregs_info): New function.
6819 (mips_cannot_fetch_register, mips_cannot_store_register)
6820 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6821 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6822 (target_regsets): Rename to ...
6823 (mips_regsets): ... this, and make static.
6824 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6825 (dsp_regs_info, regs_info): New globals.
6826 (mips_regs_info): New function.
6827 (the_low_target): Adjust.
6828 (initialize_low_arch): New function.
6829 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6830 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6831 Declare.
6832 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6833 (arm_read_description): New, with bits factored from
6834 arm_arch_setup.
6835 (arm_arch_setup): Reimplement.
6836 (target_regsets): Rename to ...
6837 (arm_regsets): ... this, and make static.
6838 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6839 (arm_regs_info): New function.
6840 (the_low_target): Adjust.
6841 (initialize_low_arch): New function.
6842 * linux-m68k-low.c (tdesc_m68k): Declare.
6843 (target_regsets): Rename to ...
6844 (m68k_regsets): ... this, and make static.
6845 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6846 (m68k_regs_info): New function.
6847 (m68k_arch_setup): New function.
6848 (the_low_target): Adjust.
6849 (initialize_low_arch): New function.
6850 * linux-sh-low.c (tdesc_sharch): Declare.
6851 (target_regsets): Rename to ...
6852 (sh_regsets): ... this, and make static.
6853 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6854 (sh_regs_info, sh_arch_setup): New functions.
6855 (the_low_target): Adjust.
6856 (initialize_low_arch): New function.
6857 * linux-bfin-low.c (tdesc_bfin): Declare.
6858 (bfin_arch_setup): New function.
6859 (bfin_usrregs_info, regs_info): New globals.
6860 (bfin_regs_info): New function.
6861 (the_low_target): Adjust.
6862 (initialize_low_arch): New function.
6863 * linux-cris-low.c (tdesc_cris): Declare.
6864 (cris_arch_setup): New function.
6865 (cris_usrregs_info, regs_info): New globals.
6866 (cris_regs_info): New function.
6867 (the_low_target): Adjust.
6868 (initialize_low_arch): New function.
6869 * linux-cris-low.c (tdesc_crisv32): Declare.
6870 (cris_arch_setup): New function.
6871 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6872 (cris_regs_info): New function.
6873 (the_low_target): Adjust.
6874 (initialize_low_arch): New function.
6875 * linux-m32r-low.c (tdesc_m32r): Declare.
6876 (m32r_arch_setup): New function.
6877 (m32r_usrregs_info, regs_info): New globals.
6878 (m32r_regs_info): Adjust.
6879 (initialize_low_arch): New function.
6880 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6881 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6882 (tic6x_usrregs_info): Forward declare.
6883 (tic6x_read_description): New function, based on ...
6884 (tic6x_arch_setup): ... this. Reimplement.
6885 (target_regsets): Rename to ...
6886 (tic6x_regsets): ... this, and make static.
6887 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6888 (tic6x_regs_info): New function.
6889 (the_low_target): Adjust.
6890 (initialize_low_arch): New function.
6891 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6892 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6893 (target_regsets): Rename to ...
6894 (xtensa_regsets): ... this, and make static.
6895 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6896 globals.
6897 (xtensa_arch_setup, xtensa_regs_info): New functions.
6898 (the_low_target): Adjust.
6899 (initialize_low_arch): New function.
6900 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6901 (nios2_arch_setup): Set the current process'es tdesc.
6902 (target_regsets): Rename to ...
6903 (nios2_regsets): ... this.
6904 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6905 (nios2_regs_info): New function.
6906 (the_low_target): Adjust.
6907 (initialize_low_arch): New function.
6908 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6909 (aarch64_arch_setup): Set the current process'es tdesc.
6910 (target_regsets): Rename to ...
6911 (aarch64_regsets): ... this.
6912 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6913 (aarch64_regs_info): New function.
6914 (the_low_target): Adjust.
6915 (initialize_low_arch): New function.
6916 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6917 globals.
6918 (target_regsets): Rename to ...
6919 (tile_regsets): ... this.
6920 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6921 (tile_regs_info): New function.
6922 (tile_arch_setup): Set the current process'es tdesc.
6923 (the_low_target): Adjust.
6924 (initialize_low_arch): New function.
6925 * spu-low.c (tdesc_spu): Declare.
6926 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6927 * win32-arm-low.c (tdesc_arm): Declare.
6928 (arm_arch_setup): New function.
6929 (the_low_target): Install arm_arch_setup instead of
6930 init_registers_arm.
6931 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6932 (init_windows_x86): Rename to ...
6933 (i386_arch_setup): ... this. Set `win32_tdesc'.
6934 (the_low_target): Adjust.
6935 * win32-low.c (win32_tdesc): New global.
6936 (child_add_thread): Don't create the thread cache here.
6937 (do_initial_child_stuff): Set the new process'es tdesc.
6938 * win32-low.h (struct target_desc): Forward declare.
6939 (win32_tdesc): Declare.
6940 * lynx-i386-low.c (tdesc_i386): Declare global.
6941 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6942 * lynx-low.c (lynx_tdesc): New global.
6943 (lynx_add_process): Set the new process'es tdesc.
6944 * lynx-low.h (struct target_desc): Forward declare.
6945 (lynx_tdesc): Declare global.
6946 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6947 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6948 * nto-low.c (nto_tdesc): New global.
6949 (do_attach): Set the new process'es tdesc.
6950 * nto-low.h (struct target_desc): Forward declare.
6951 (nto_tdesc): Declare.
6952 * nto-x86-low.c (tdesc_i386): Declare.
6953 (nto_x86_arch_setup): Set `nto_tdesc'.
6954
6955 2013-06-04 Gary Benson <gbenson@redhat.com>
6956
6957 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6958 to qSupported response when appropriate.
6959 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6960 with nonzero-length annex.
6961 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6962 arguments supplied in annex.
6963
6964 2013-05-31 Doug Evans <dje@google.com>
6965
6966 PR server/15594
6967 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6968 64 bits in 64-cross-32 environment.
6969
6970 2013-05-28 Pedro Alves <palves@redhat.com>
6971
6972 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6973 (aarch64-without-fpu.c): Delete rule.
6974 * configure.srv (aarch64*-*-linux*): Remove references to
6975 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6976 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6977 declaration.
6978
6979 2013-05-24 Pedro Alves <palves@redhat.com>
6980
6981 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6982 instead of strchr/decode_address. Error if the range isn't split
6983 with a ','. Don't assume there's be a ':' in the action.
6984
6985 2013-05-23 Yao Qi <yao@codesourcery.com>
6986 Pedro Alves <palves@redhat.com>
6987
6988 * linux-low.c (lwp_in_step_range): New function.
6989 (linux_wait_1): If the thread was range stepping and stopped
6990 outside the stepping range, report the stop to GDB. Otherwise,
6991 continue stepping. Add range stepping debug output.
6992 (linux_set_resume_request): Copy the step range from the resume
6993 request to the lwp.
6994 (linux_supports_range_stepping): New.
6995 (linux_target_ops) <supports_range_stepping>: Set to
6996 linux_supports_range_stepping.
6997 * linux-low.h (struct linux_target_ops)
6998 <supports_range_stepping>: New field.
6999 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7000 * linux-x86-low.c (x86_supports_range_stepping): New.
7001 (the_low_target) <supports_range_stepping>: Set to
7002 x86_supports_range_stepping.
7003 * server.c (handle_v_cont): Handle 'r' action.
7004 (handle_v_requests): Append ";r" if the target supports range
7005 stepping.
7006 * target.h (struct thread_resume) <step_range_start,
7007 step_range_end>: New fields.
7008 (struct target_ops) <supports_range_stepping>:
7009 New field.
7010 (target_supports_range_stepping): New macro.
7011
7012 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7013
7014 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7015 confusion in comment.
7016
7017 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7018
7019 * lynx-low.c (struct process_info_private): New type.
7020 (lynx_add_process): New function.
7021 (lynx_create_inferior, lynx_attach): Replace calls to
7022 add_process by calls to lynx_add_process.
7023 (lynx_resume): If PTID is null, then try using
7024 current_process()->private->last_wait_event_ptid.
7025 Add comments.
7026 (lynx_clear_inferiors): Delete. The contents of that function
7027 has been inlined in lynx_mourn;
7028 (lynx_wait_1): Save the ptid in the process's private data.
7029 (lynx_mourn): Free the process' private data. Replace call
7030 to lynx_clear_inferiors by call to clear_inferiors.
7031
7032 2013-05-17 Yao Qi <yao@codesourcery.com>
7033
7034 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7035 the right place.
7036
7037 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7038
7039 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7040 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7041 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7042 PT_TEXT_END_ADDR guards. Update comments.
7043 (linux_target_op) <read_offsets>: Conditionally define to
7044 linux_read_offsets if the target is UCLIBC and if it defines
7045 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7046
7047 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7048 Andrew Jenner <andrew@codesourcery.com>
7049
7050 * Makefile.in (SFILES): Add linux-nios2-low.c.
7051 (clean): Add action to delete nios2-linux.c.
7052 (nios2-linux.c): New rule.
7053 * configure.srv: Add nios2*-*-linux*.
7054 * linux-nios2-low.c: New.
7055
7056 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7057
7058 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7059
7060 2013-04-25 Hui Zhu <hui@codesourcery.com>
7061
7062 PR gdb/15186
7063 * ax.c (ax_printf): Add fflush.
7064
7065 2013-04-22 Tom Tromey <tromey@redhat.com>
7066
7067 * Makefile.in (SFILES): Add filestuff.c.
7068 (OBS): Add filestuff.o.
7069 (filestuff.o): New target.
7070 * config.in, configure: Rebuild.
7071 * configure.ac: Check for fdwalk, pipe2.
7072
7073 2013-04-17 Pedro Alves <palves@redhat.com>
7074
7075 * configure.ac (USE_THREAD_DB): Delete variable.
7076 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7077 Don't AC_SUBST USE_THREAD_DB.
7078 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7079 * config.in, configure: Regenerate.
7080
7081 2013-04-16 Pedro Alves <palves@redhat.com>
7082
7083 * linux-low.h (struct lwp_info) <thread_known>: Move under
7084 the USE_THREAD_DB #ifdef.
7085
7086 2013-04-16 Pedro Alves <palves@redhat.com>
7087
7088 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7089 (linux-low.o): Delete rule.
7090 * linux-low.h: Always include "gdb_thread_db.h" instead of
7091 conditionally including thread_db.h.
7092 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7093 HAVE_THREAD_DB_H.
7094
7095 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7096
7097 * Makefile.in (install-only): Fix make install regression.
7098
7099 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7100
7101 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7102 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7103 installation.
7104 * gdbserver.1: Remove.
7105
7106 2013-03-22 Pedro Alves <palves@redhat.com>
7107
7108 * linux-low.c (handle_extended_wait): Don't call
7109 linux_enable_event_reporting.
7110
7111 2013-03-15 Tony Theodore <tonyt@logyst.com>
7112
7113 PR build/9098:
7114 * Makefile.in (SHELL): Use @SHELL@.
7115
7116 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7117
7118 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7119 compiler warning.
7120
7121 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7122
7123 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7124 Remove extraneous NULL element.
7125
7126 2013-03-13 Yao Qi <yao@codesourcery.com>
7127
7128 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7129 'V' block in trace frame.
7130
7131 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7132
7133 * target.h (struct target_ops): Add btrace ops.
7134 (target_supports_btrace): New macro.
7135 (target_enable_btrace): New macro.
7136 (target_disable_btrace): New macro.
7137 (target_read_btrace): New macro.
7138 * gdbthread.h (struct thread_info): Add btrace field.
7139 * server.c: Include btrace-common.h.
7140 (handle_btrace_general_set): New function.
7141 (handle_btrace_enable): New function.
7142 (handle_btrace_disable): New function.
7143 (handle_general_set): Call handle_btrace_general_set.
7144 (handle_qxfer_btrace): New function.
7145 (struct qxfer qxfer_packets[]): Add btrace entry.
7146 * inferiors.c (remove_thread): Disable btrace.
7147 * linux-low: Include linux-btrace.h.
7148 (linux_low_enable_btrace): New function.
7149 (linux_low_read_btrace): New function.
7150 (linux_target_ops): Add btrace ops.
7151 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7152 Add srv_linux_btrace=yes.
7153 (x86_64-*-linux*): Add linux-btrace.o.
7154 Add srv_linux_btrace=yes.
7155 * configure.ac: Define HAVE_LINUX_BTRACE.
7156 * config.in: Regenerated.
7157 * configure: Regenerated.
7158
7159 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7160
7161 * server.c (handle_qxfer): Preserve error message if -3 is
7162 returned.
7163 (qxfer): Document the -3 return value.
7164
7165 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7166
7167 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7168 (linux_btrace_h): New variable.
7169 (linux-btrace.o): New rule.
7170
7171 2013-03-08 Stan Shebs <stan@codesourcery.com>
7172 Hafiz Abid Qadeer <abidh@codesourcery.com>
7173
7174 * tracepoint.c (trace_buffer_size): New global.
7175 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7176 (init_trace_buffer): Change to one-argument function. Allocate
7177 trace buffer memory.
7178 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7179 handle QTBuffer:size packet.
7180 (cmd_bigqtbuffer_size): New function.
7181 (initialize_tracepoint): Call init_trace_buffer with
7182 DEFAULT_TRACE_BUFFER_SIZE.
7183 * server.c (handle_query): Add QTBuffer:size in the
7184 supported packets.
7185
7186 2013-03-07 Yao Qi <yao@codesourcery.com>
7187
7188 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7189 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7190 of -1.
7191 (cmd_qtsp): Adjust condition. Do post increment.
7192 Set cur_action and cur_step_action back to 0.
7193
7194 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7195
7196 PR server/15236
7197 * linux-low.c (linux_write_memory): Return early success if LEN is
7198 zero.
7199
7200 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7201
7202 * configure.srv: Add x86_64-*-cygwin* as target.
7203
7204 2013-02-28 Tom Tromey <tromey@redhat.com>
7205
7206 * configure.ac: Invoke AC_SYS_LARGEFILE.
7207 * configure, config.in: Rebuild.
7208
7209 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7210
7211 * win32-low.c: Throughout, fix format strings and casts of
7212 printf-like functions to avoid type related warnings on all
7213 platforms.
7214 (get_child_debug_event): Print dwDebugEventCode as hex since
7215 that's how it's usually documented.
7216
7217 2013-02-28 Yao Qi <yao@codesourcery.com>
7218
7219 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7220 pulongest.
7221
7222 2013-02-27 Jiong Wang <jiwang@tilera.com>
7223
7224 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7225 (reg-tilegx32.c): New rule.
7226 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7227 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7228 different register info initializer according to elf class.
7229 (init_registers_tilgx32): New function. The tilegx32 register info
7230 initializer.
7231 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7232 (tile_store_gregset): Likewise.
7233
7234 2013-02-27 Yao Qi <yao@codesourcery.com>
7235
7236 * server.c (process_point_options): Print debug message when
7237 debug_threads is true.
7238
7239 2013-02-26 Yao Qi <yao@codesourcery.com>
7240
7241 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7242
7243 2013-02-19 Pedro Alves <palves@redhat.com>
7244 Kai Tietz <ktietz@redhat.com>
7245
7246 PR gdb/15161
7247
7248 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7249 instead of strtoul to extract address from packet.
7250 (process_serial_event) <'z'>: Likewise.
7251
7252 2013-02-18 Yao Qi <yao@codesourcery.com>
7253
7254 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7255
7256 2013-02-14 Pedro Alves <palves@redhat.com>
7257
7258 Plug memory leak.
7259
7260 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7261 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7262
7263 2013-02-14 Pedro Alves <palves@redhat.com>
7264
7265 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7266
7267 2013-02-14 Pedro Alves <palves@redhat.com>
7268
7269 * tracepoint.c (save_string): Delete.
7270 (add_tracepoint_action): Use savestring instead of save_string.
7271
7272 2013-02-12 Pedro Alves <palves@redhat.com>
7273
7274 * linux-xtensa-low.c: Ditto.
7275 * xtensa-xtregs.c: Ditto.
7276
7277 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7278
7279 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7280 thread_db.
7281
7282 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7283
7284 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7285 aarch64_num_wp_regs and aarch64_num_bp_regs to
7286 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7287
7288 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7289
7290 * linux-aarch64-low.c (ps_get_thread_area): Replace
7291 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7292
7293 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7294 Marcus Shawcroft <marcus.shawcroft@arm.com>
7295 Nigel Stephens <nigel.stephens@arm.com>
7296 Yufeng Zhang <yufeng.zhang@arm.com>
7297
7298 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7299 (aarch64.c, aarch64-without-fpu.c): New targets.
7300 * configure.srv (aarch64*-*-linux*): New.
7301 * linux-aarch64-low.c: New file.
7302
7303 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7304
7305 * linux-low.c (handle_extended_wait, linux_create_inferior)
7306 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7307 (dequeue_one_deferred_signal, linux_resume_one_thread)
7308 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7309 (linux_tracefork_grandchild, linux_test_for_tracefork)
7310 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7311 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7312 where the argument is 0.
7313
7314 2013-01-25 Yao Qi <yao@codesourcery.com>
7315
7316 * event-loop.c: Include "queue.h".
7317 (gdb_event_p): New typedef.
7318 (struct gdb_event) <next_event>: Remove.
7319 (event_queue): Change to QUEUE(gdb_event_p).
7320 (async_queue_event): Remove.
7321 (gdb_event_xfree): New.
7322 (initialize_event_loop): New.
7323 (process_event): Use API from QUEUE.
7324 (wait_for_event): Likewise.
7325 * server.c (main): Call initialize_event_loop.
7326 * server.h (initialize_event_loop): Declare.
7327
7328 2013-01-18 Yao Qi <yao@codesourcery.com>
7329
7330 * ax.h (struct eval_agent_expr_context): New.
7331 (gdb_eval_agent_expr): Update declaration.
7332 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7333 TFRAME. Add new argument CTX.
7334 * server.h (struct eval_agent_expr_context): Declare.
7335 (agent_mem_read, agent_tsv_read): Update declaration.
7336 (agent_mem_read_string): Likewise.
7337 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7338 (add_traceframe_block): Add new argument TPOINT.
7339 Increase TPOINT->traceframe_usage.
7340 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7341 eval_tracepoint_agent_expr.
7342 (condition_true_at_tracepoint): Likewise.
7343 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7344 (agent_mem_read_string, agent_tsv_read): Likewise.
7345
7346 2013-01-16 Yao Qi <yao@codesourcery.com>
7347
7348 * linux-low.c (linux_resume_one_lwp): Don't check
7349 'lwp->bp_reinsert != 0'.
7350
7351 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7352 Pedro Alves <palves@redhat.com>
7353
7354 * lynx-low.c (ptrace_request_to_str): Define a temporary
7355 macro and use it to simplify this function's implementation.
7356
7357 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7358
7359 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7360 sets errno.
7361
7362 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7363
7364 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7365
7366 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7367
7368 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7369
7370 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7371
7372 * lynx-low.c (lynx_resume): Use the resume_info parameter
7373 to determine the ptid for the lynx_ptrace call, unless
7374 it is equal to minus_one_ptid, in which case we use the
7375 ptid of the current_inferior.
7376 (lynx_wait_1): After having received a thread create/exit
7377 event, resume the inferior's execution using the signaling
7378 thread's ptid, rather than the old ptid.
7379
7380 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7381
7382 * lynx-low.c (lynx_resume): Delete variable ret.
7383
7384 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7385
7386 * gdbreplay.c (gdbreplay_version): Update copyright year.
7387 * server.c (gdbserver_version): Likewise.
7388
7389 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7390
7391 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7392 new thread.
7393
7394 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7395
7396 * lynx-low.c (ptrace_request_to_str): Add handling for
7397 PTRACE_GETTRACESIG.
7398
7399 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7400
7401 * lynx-low.c (lynx_attach): Delete variable new_process.
7402
7403 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7404
7405 * lynx-low.c (lynx_create_inferior): Delete variable
7406 new_process.
7407
7408 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7409
7410 * lynx-low.c (ptrace_request_to_str): Do not handle
7411 PTRACE_GETTHREADLIST if this macro does not exist.
7412
7413 2012-12-15 Yao Qi <yao@codesourcery.com>
7414
7415 * Makefile.in (OBS): Add notif.o.
7416 * notif.c, notif.h: New.
7417 * server.c: Include "notif.h".
7418 (struct vstop_notif) <next>: Remove.
7419 <base>: New field.
7420 (queue_stop_reply): Update.
7421 (push_event, send_next_stop_reply): Remove.
7422 (discard_queued_stop_replies): Update.
7423 (notif_stop): New variable.
7424 (handle_v_stopped): Remove.
7425 (handle_v_requests): Don't call handle_v_stopped. Call
7426 handle_ack_notif instead.
7427 (queue_stop_reply_callback): Call notif_event_enque instead
7428 of queue_stop_reply.
7429 (handle_status): Don't call send_next_stop_reply, call
7430 notif_write_event instead.
7431 (kill_inferior_callback): Likewise.
7432 (detach_or_kill_inferior_callback): Likewise.
7433 (main): Call initialize_notif.
7434 (process_serial_event): Call QUEUE_is_empty.
7435 (handle_target_event): Call notif_push instead of push event.
7436 * server.h (push_event): Remove declaration.
7437
7438 2012-12-10 Tom Tromey <tromey@redhat.com>
7439
7440 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7441 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7442 macros.
7443 (.c.o): Rewrite.
7444 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7445 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7446 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7447 (amd64-linux-ipa.o, ax.o): Rewrite.
7448 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7449 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7450 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7451 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7452 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7453 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7454 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7455 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7456 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7457 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7458 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7459 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7460 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7461 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7462 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7463 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7464 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7465 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7466 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7467 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7468 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7469 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7470 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7471 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7472 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7473 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7474 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7475 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7476 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7477 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7478 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7479 (reg-tilegx.o): Remove.
7480 (all_object_files): New macro.
7481 Include .deps files.
7482 * aclocal.m4, configure: Rebuild.
7483 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7484 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7485 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7486
7487 2012-12-05 Tom Tromey <tromey@redhat.com>
7488
7489 PR gdb/14917:
7490 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7491
7492 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7493
7494 * configure.ac: Check for linux/perf_event.h.
7495 * config.in: Regenerated.
7496 * configure: Regenerated.
7497
7498 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7499
7500 * hostio.c (handle_readlink): Decrease buffer size
7501 parameter passed to readlink by one byte.
7502
7503 2012-11-26 Yao Qi <yao@codesourcery.com>
7504
7505 * configure.ac (build_warnings): Append '-Wempty-body'.
7506 * configure: Regenerated.
7507 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7508 body.
7509
7510 2012-11-15 Pierre Muller <muller@sourceware.org>
7511
7512 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7513 * config.in: Regenerate.
7514 * configure: Regenerate.
7515 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7516 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7517 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7518 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7519 header.
7520 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7521 instead of <sys/wait.h> header.
7522 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7523
7524 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7525
7526 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7527 (various make rules): Remove -DGDBSERVER
7528
7529 2012-11-09 Yao Qi <yao@codesourcery.com>
7530
7531 * spu-low.c (current_ptid): Move it to ..
7532 * gdbthread.h: ... here. New.
7533 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7534 * server.c (myresume, process_serial_event): Likewise.
7535 * thread-db.c (thread_db_find_new_threads): Likewise.
7536 * tracepoint.c (run_inferior_command): Likewise.
7537
7538 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7539
7540 * server.c (handle_search_memory_1): Include access length in
7541 warning message.
7542
7543 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7544
7545 * linux-crisv32-low.c: Fix compile errors.
7546
7547 2012-09-04 Yao Qi <yao@codesourcery.com>
7548
7549 * tracepoint.c (cmd_qtsv): Adjust debug message.
7550 Don't check CUR_TPOINT.
7551
7552 2012-08-28 Yao Qi <yao@codesourcery.com>
7553
7554 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7555 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7556 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7557 Remove declarations of xmalloc, xreallloc, xstrdup and
7558 freeargv.
7559 * Makefile.in (libiberty_h): New.
7560 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7561 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7562
7563 2012-08-23 Yao Qi <yao@codesourcery.com>
7564
7565 * server.h: Remove declaration of 'xsnprintf'.
7566
7567 2012-08-22 Keith Seitz <keiths@redhat.com>
7568
7569 * server.h: Include build-gnulib-gbserver/config.h.
7570 * gdbreplay.c: Likewise.
7571
7572 2012-08-08 Doug Evans <dje@google.com>
7573
7574 * Makefile.in (SFILES): Add gdb_vecs.c.
7575 (OBS): Add gdb_vecs.o.
7576 (gdb_vecs_h, host_defs_h): New variables.
7577 (thread-db.o): Add $(gdb_vecs_h) dependency.
7578 (gdb_vecs.o): New rule.
7579 * thread-db.c: #include "gdb_vecs.h".
7580 (thread_db_load_search): Use a vector to iterate over path elements.
7581 Handle text appearing after "$pdir".
7582
7583 * configure.ac: Add check for strstr.
7584 * config.in: Regenerate.
7585 * configure: Regenerate.
7586
7587 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7588
7589 * hostio.c (handle_pread): If pread fails, fall back to attempting
7590 lseek/read.
7591 (handle_pwrite): Likewise for pwrite.
7592
7593 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7594
7595 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7596 between unsupported TYPE and unimplementable ADDR/LEN combination.
7597 (arm_insert_point): Act on new return value.
7598
7599 2012-07-31 Pedro Alves <palves@redhat.com>
7600
7601 * server.c (process_point_options): Only skip tokens if we find
7602 one that is unrecognized. Don't treat 'X' specially while
7603 skipping unrecognized tokens.
7604
7605 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7606
7607 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7608 to 4-byte-align HW breakpoint addresses for Thumb.
7609
7610 2012-07-27 Yao Qi <yao@codesourcery.com>
7611
7612 PR remote/14161.
7613
7614 * server.h: Declare gdb_agent_about_to_close.
7615 * target.c (kill_inferior): Include "agent.h".
7616 New. Send command 'kill'.
7617 * target.h (kill_inferior): Removed macro.
7618 * tracepoint.c (gdb_agent_about_to_close): New.
7619 (gdb_agent_helper_thread): Handle command 'close'.
7620 Wait endlessly until the inferior stops.
7621 Install gdb_agent_remove_socket to atexit hook.
7622 (agent_socket_name): New static variable.
7623 (gdb_agent_socket_init): Replace local variable 'name' with
7624 'agent_socket_name'.
7625 (gdb_agent_remove_socket): New.
7626
7627 2012-07-27 Yao Qi <yao@codesourcery.com>
7628
7629 * server.c (process_point_options): Stop at 'X' when parsing.
7630
7631 2012-07-19 Michael Eager <eager@eagercon.com>
7632
7633 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7634 to hw_execute.
7635 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7636 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7637 hardware breakpoint.
7638
7639 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7640
7641 * gdbserver/linux-low.c (initialize_low): Call
7642 linux_ptrace_init_warnings.
7643
7644 2012-07-02 Doug Evans <dje@google.com>
7645
7646 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7647 pointer to int.
7648
7649 2012-07-02 Stan Shebs <stan@codesourcery.com>
7650
7651 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7652 (ax.o): Add it to build rule.
7653 (ax-ipa.o): Ditto.
7654 (OBS): Add format.o.
7655 (IPA_OBS): Add format.o.
7656 * server.c (handle_query): Claim support for breakpoint commands.
7657 (process_point_options): Add command case.
7658 (process_serial_event): Leave running if there are printfs in
7659 effect.
7660 * mem-break.h (any_persistent_commands): Declare.
7661 (add_breakpoint_commands): Declare.
7662 (gdb_no_commands_at_breakpoint): Declare.
7663 (run_breakpoint_commands): Declare.
7664 * mem-break.c (struct point_command_list): New struct.
7665 (struct breakpoint): New field command_list.
7666 (any_persistent_commands): New function.
7667 (add_commands_to_breakpoint): New function.
7668 (add_breakpoint_commands): New function.
7669 (gdb_no_commands_at_breakpoint): New function.
7670 (run_breakpoint_commands): New function.
7671 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7672 locally.
7673 * ax.c: Include format.h.
7674 (ax_printf): New function.
7675 (gdb_eval_agent_expr): Add printf opcode.
7676
7677 2012-06-13 Yao Qi <yao@codesourcery.com>
7678
7679 * server.c (start_inferior): Remove duplicated writes to fields
7680 'last_resume_kind' and 'last_status' of 'current_inferior'.
7681
7682 2012-06-12 Yao Qi <yao@codesourcery.com>
7683 Pedro Alves <palves@redhat.com>
7684
7685 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7686 comment.
7687 * server.c (handle_v_cont): Extend comment.
7688
7689 2012-06-11 Yao Qi <yao@codesourcery.com>
7690
7691 * linux-low.c (linux_attach): Add 'static'.
7692
7693 2012-06-06 Yao Qi <yao@codesourcery.com>
7694
7695 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7696
7697 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7698
7699 Fix gcc -flto compilation warning.
7700 * server.c (main): Make variable multi_mode and attach volatile.
7701
7702 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7703
7704 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7705 if the platform doesn't know about it.
7706
7707 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7708
7709 * Makefile.in (SFILES): Add linux-tile-low.c.
7710 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7711 * configure.srv: Handle tilegx-*-linux*.
7712 * linux-tile-low.c: New file.
7713
7714 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7715
7716 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7717
7718 2012-05-24 Pedro Alves <palves@redhat.com>
7719
7720 PR gdb/7205
7721
7722 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7723
7724 2012-05-24 Pedro Alves <palves@redhat.com>
7725
7726 PR gdb/7205
7727
7728 Replace target_signal with gdb_signal throughout.
7729
7730 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7731
7732 * linux-low.c (linux_store_registers): Avoid the copying sequence
7733 when no data has been retrieved by ptrace.
7734
7735 2012-05-22 Will Deacon <will.deacon@arm.com>
7736
7737 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7738 Include asm/ptrace.h.
7739 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7740 already defined.
7741
7742 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7743
7744 * linux-low.c (linux_store_registers): Don't re-retrieve data
7745 with ptrace that has already been obtained from /proc. Always
7746 copy any data retrieved with ptrace to the buffer supplied.
7747
7748 2012-05-11 Yao Qi <yao@codesourcery.com>
7749 Pedro Alves <palves@redhat.com>
7750
7751 * linux-low.c (enum stopping_threads_kind): New.
7752 (stopping_threads): Change type to `enum stopping_threads_kind'.
7753 (handle_extended_wait): If stopping and suspending threads, leave
7754 the new_lwp suspended too.
7755 (linux_wait_for_event): Adjust.
7756 (stop_all_lwps): Set `stopping_threads' to
7757 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7758 whether we're suspending threads or just stopping them. Assert no
7759 recursion happens.
7760
7761 2012-04-29 Yao Qi <yao@codesourcery.com>
7762
7763 * server.h: Move some code to ...
7764 * gdbthread.h: ... here. New.
7765 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7766 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7767 (nto-low.o, win32-low.o): Likewise.
7768 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7769 * regcache.c, remote-utils.c, server.c: Likewise.
7770 * target.c, tracepoint.c, win32-low.c: Likewise.
7771
7772 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7773
7774 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7775 (PTRACE_ARG4_TYPE): Likewise.
7776 (PTRACE_XFER_TYPE): Likewise.
7777 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7778 ptrace to PTRACE_ARG3_TYPE.
7779 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7780 (PTRACE_ARG4_TYPE): Likewise.
7781 (PTRACE_XFER_TYPE): Likewise.
7782 (linux_detach_one_lwp): Cast fourth argument of
7783 ptrace to long then PTRACE_ARG4_TYPE.
7784 (regsets_fetch_inferior_registers): Cast third argument of
7785 ptrace to long then PTRACE_ARG3_TYPE.
7786 (regsets_store_inferior_registers): Likewise.
7787
7788 2012-04-20 Pedro Alves <palves@redhat.com>
7789
7790 * configure: Regenerate.
7791
7792 2012-04-19 Pedro Alves <palves@redhat.com>
7793
7794 * Makefile.in (GNULIB_BUILDDIR): New.
7795 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7796 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7797 (all, install-only, uninstall, clean-info, all-lib, clean): No
7798 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7799 (maintainer-clean realclean distclean): Use subdir_do.
7800 (subdir_do): New.
7801 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7802 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7803 * acinclude.m4: Include acx_configure_dir.m4.
7804 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7805 calls. Call AC_PROG_RANLIB. Configure gnulib using
7806 ACX_CONFIGURE_DIR.
7807 (GNULIB): New.
7808 (GNULIB_STDINT_H): Adjust.
7809 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7810 * gdbreplay.c: Include build-gnulib/config.h.
7811 * server.h: Likewise.
7812 * aclocal.m4: Regenerate.
7813 * config.in: Regenerate.
7814 * configure: Regenerate.
7815
7816 2012-04-19 Pedro Alves <palves@redhat.com>
7817
7818 * Makefile.in (LIBGNU, INCGNU): Adjust.
7819 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7820 (all, install-only, uninstall, clean-info, all-lib, clean)
7821 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7822 * configure.ac: Adjust AC_OUTPUT output.
7823 * aclocal.m4: Regenerate.
7824 * configure: Regenerate.
7825
7826 2012-04-19 Pedro Alves <palves@redhat.com>
7827
7828 * Makefile.in (generated_files): New.
7829 (server_h): Remove the explicit dependency on config.h, and depend
7830 on $generated_files.
7831
7832 2012-04-19 Pedro Alves <palves@redhat.com>
7833
7834 * Makefile.in (INCGNU): Add -Ignulib.
7835
7836 2012-04-19 Pedro Alves <palves@redhat.com>
7837
7838 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7839 (INCGNU): ... this, and spell out -I here.
7840 (GNULIB_LIB): Rename to ...
7841 (LIBGNU): ... this.
7842 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7843
7844 2012-04-19 Pedro Alves <palves@redhat.com>
7845
7846 * config.in: Regenerate.
7847
7848 2012-04-19 Pedro Alves <palves@redhat.com>
7849
7850 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7851 * server.h (memmem): Remove declaration.
7852 * config.in: Regenerate.
7853 * configure: Regenerate.
7854
7855 2012-04-19 Yao Qi <yao@codesourcery.com>
7856
7857 * Makefile.in (SFILES): Add common/vec.c.
7858 (OBS): Add vec.o.
7859 (vec.o): New rule.
7860
7861 2012-04-19 Yao Qi <yao@codesourcery.com>
7862
7863 * remote-utils.c (prepare_resume_reply): Replace with macro
7864 target_core_of_thread.
7865 * server.c (handle_qxfer_threads_proper): Likewise.
7866 * target.h (traget_core_of_thread): New macro.
7867
7868 2012-04-18 Pedro Alves <palves@redhat.com>
7869
7870 * aclocal.m4: Regenerate.
7871 * configure: Regenerate.
7872
7873 2012-04-16 Yao Qi <yao@codesourcery.com>
7874
7875 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7876 duplicated on address.
7877
7878 2012-04-16 Yao Qi <yao@codesourcery.com>
7879
7880 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7881 (struct tracepoint_action_ops) <send>: New field.
7882 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7883 (agent_expr_send, x_tracepoint_action_send): New.
7884 (l_tracepoint_action_send): New.
7885 (cmd_qtdp): Download and install tracepoint
7886 according to `use_agent'.
7887 (run_inferior_command): Add one more parameter `len'.
7888 Update callers.
7889 (tracepoint_send_agent): New.
7890 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7891
7892 2012-04-16 Yao Qi <yao@codesourcery.com>
7893
7894 * tracepoint.c (download_tracepoints): Moved to ...
7895 (cmd_qtstart): ... here.
7896
7897 2012-04-14 Yao Qi <yao@codesourcery.com>
7898
7899 * tracepoint.c: Include inttypes.h.
7900 (struct collect_memory_action): Use sized types.
7901 (struct tracepoint): Likewise.
7902 (cmd_qtdp, stop_tracing): Update print specifiers.
7903 (cmd_qtp, response_tracepoint): Likewise.
7904 (collect_data_at_tracepoint): Likewise.
7905 (collect_data_at_step): Likewise.
7906
7907 2012-04-14 Yao Qi <yao@codesourcery.com>
7908
7909 Import gnulib module inttypes.
7910 * aclocal.m4, config.in, configure: Regenerated.
7911
7912 2012-04-14 Yao Qi <yao@codesourcery.com>
7913
7914 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7915 Makefile and config.status at last.
7916
7917 2012-04-13 Yao Qi <yao@codesourcery.com>
7918
7919 * tracepoint.c: Include stdint.h unconditionally.
7920
7921 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7922
7923 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7924 on BFD_HAVE_SYS_PROCFS_TYPE.
7925 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7926 * configure: Regenerate.
7927 * config.in: Likewise.
7928
7929 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7930
7931 * Makefile.in (clean): Also remove x32.c x32-linux.c
7932 x32-avx.c x32-avx-linux.c.
7933 (x32.o): New target.
7934 (x32.c): Likewise.
7935 (x32-linux.o): Likewise.
7936 (x32-linux.c): Likewise.
7937 (x32-avx.o): Likewise.
7938 (x32-avx.c): Likewise.
7939 (x32-avx-linux.o): Likewise.
7940 (x32-avx-linux.c): Likewise.
7941
7942 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7943 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7944 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7945 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7946 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7947 i386/x32-avx-linux.xml.
7948
7949 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7950 (init_registers_x32_avx_linux): Likwise.
7951 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7952 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7953
7954 2012-04-13 Pedro Alves <palves@redhat.com>
7955
7956 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7957 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7958 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7959 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7960 the sub-make.
7961
7962 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7963
7964 * linux-x86-low.c (compat_x32_clock_t): New.
7965 (compat_x32_siginfo_t): Likewise.
7966 (compat_x32_siginfo_from_siginfo): Likewise.
7967 (siginfo_from_compat_x32_siginfo): Likewise.
7968 (linux_is_elf64): Likewise.
7969 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7970 and siginfo_from_compat_x32_siginfo for x32.
7971 (x86_arch_setup): Set linux_is_elf64.
7972
7973 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7974
7975 PR gdb/13969
7976 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7977 e_machine field.
7978 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7979 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7980 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7981 compatible with process.
7982
7983 2012-04-12 Yao Qi <yao@codesourcery.com>
7984
7985 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7986 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7987 (install-only, install-info, clean): Handle sub dir gnulib.
7988 (all-lib, am--refresh): New targets.
7989 (memmem.o): Remove target.
7990 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7991 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7992 (AC_REPLACE_FUNCS): Remove memmem.
7993 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7994 (AC_OUTPUT): Generate Makefile in gnulib/.
7995 * aclocal.m4, config.in, configure: Regenerated.
7996
7997 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7998
7999 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8000
8001 2012-04-05 Pedro Alves <palves@redhat.com>
8002
8003 -Werror=strict-aliasing
8004
8005 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8006 pointer.
8007
8008 2012-04-04 Pedro Alves <palves@redhat.com>
8009
8010 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8011 (sparc_store_gregset_from_stack, sparc_store_gregset)
8012 (sparc_breakpoint_at): Fix formatting.
8013
8014 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8015
8016 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8017 are available.
8018 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8019 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8020 * config.in: Regenerate.
8021 * configure: Likewise.
8022
8023 2012-03-29 Pedro Alves <palves@redhat.com>
8024
8025 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8026 Correct ptrace arguments.
8027
8028 2012-03-28 Pedro Alves <palves@redhat.com>
8029
8030 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8031 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8032 (IA64_FR1_REGNUM): New defines.
8033 (ia64_fetch_register): New.
8034 (the_low_target): Install it.
8035 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8036 field.
8037 * linux-low.c (linux_fetch_registers): Try the
8038 the_low_target.fetch_register hook first.
8039
8040 * linux-arm-low.c (the_low_target): Adjust.
8041 * linux-bfin-low.c (the_low_target): Adjust.
8042 * linux-cris-low.c (the_low_target): Adjust.
8043 * linux-crisv32-low.c (the_low_target): Adjust.
8044 * linux-m32r-low.c (the_low_target): Adjust.
8045 * linux-m68k-low.c (the_low_target): Adjust.
8046 * linux-mips-low.c (the_low_target): Adjust.
8047 * linux-ppc-low.c (the_low_target): Adjust.
8048 * linux-s390-low.c (the_low_target): Adjust.
8049 * linux-sh-low.c (the_low_target): Adjust.
8050 * linux-sparc-low.c (the_low_target): Adjust.
8051 * linux-tic6x-low.c (the_low_target): Adjust.
8052 * linux-x86-low.c (the_low_target): Adjust.
8053 * linux-xtensa-low.c (the_low_target): Adjust.
8054
8055 2012-03-26 Pedro Alves <palves@redhat.com>
8056
8057 * server.c (handle_qxfer_libraries): Don't bail early if
8058 the_target->qxfer_libraries_svr4 is not NULL.
8059
8060 2012-03-26 Pedro Alves <palves@redhat.com>
8061
8062 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8063
8064 2012-03-23 Pedro Alves <palves@redhat.com>
8065
8066 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8067 "library-list-svr4" element's start tag when the the DSO list is
8068 empty.
8069
8070 2012-03-23 Pedro Alves <palves@redhat.com>
8071
8072 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8073 a variable whose type size is the same as the inferior's pointer
8074 size.
8075
8076 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8077
8078 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8079 struct siginfo.
8080 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8081 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8082 * linux-low.h: Include <signal.h>.
8083 (struct siginfo): Remove forward declaration.
8084 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8085 struct siginfo.
8086
8087 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8088
8089 * .gitignore: Ignore more files.
8090
8091 2012-03-19 Pedro Alves <palves@redhat.com>
8092 Jan Kratochvil <jan.kratochvil@redhat.com>
8093
8094 * server.c (cont_thread, general_thread): Add describing comments.
8095 (start_inferior): Clear `cont_thread'.
8096 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8097 of a process.
8098
8099 2012-03-15 Yao Qi <yao@codesourcery.com>
8100
8101 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8102 handling to ...
8103 (cmd_qtdp): ... here.
8104
8105 2012-03-15 Yao Qi <yao@codesourcery.com>
8106
8107 * tracepoint.c (struct tracepoint_action_ops): New.
8108 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8109 (m_tracepoint_action_download): New.
8110 (r_tracepoint_action_download): New.
8111 (x_tracepoint_action_download): New.
8112 (l_tracepoint_action_download): New.
8113 (add_tracepoint_action): Install `action->ops' according type.
8114 (download_tracepoint_1): Move code `download' function pointer
8115 of various tracepoint_action_ops.
8116
8117 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8118
8119 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8120 linux_ptrace_attach_warnings.
8121
8122 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8123
8124 * Makefile.in (linux-ptrace.o): New.
8125 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8126 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8127 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8128 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8129 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8130 of these targets.
8131 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8132
8133 2012-03-08 Yao Qi <yao@codesourcery.com>
8134 Pedro Alves <palves@redhat.com>
8135
8136 Fix PR server/13392.
8137 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8138 offset of JMP insn.
8139 * tracepoint.c (remove_tracepoint): New.
8140 (cmd_qtdp): Call remove_tracepoint when failed to install.
8141
8142 2012-03-07 Pedro Alves <palves@redhat.com>
8143
8144 * linux-low.c (get_detach_signal): New.
8145 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8146 Pass on pending signals to PTRACE_DETACH. Check the result of the
8147 ptrace call.
8148 * server.c (program_signals, program_signals_p): New.
8149 (handle_general_set): Handle QProgramSignals.
8150 * server.h (program_signals, program_signals_p): Declare.
8151
8152 2012-03-05 Pedro Alves <palves@redhat.com>
8153 Jan Kratochvil <jan.kratochvil@redhat.com>
8154
8155 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8156 New comment why.
8157
8158 2012-03-03 Yao Qi <yao@codesourcery.com>
8159
8160 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8161 agent_look_up_symbols.
8162
8163 2012-03-03 Yao Qi <yao@codesourcery.com>
8164
8165 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8166 (linux-x86-low.o): Likewise.
8167 * server.h: Remove in_process_agent_loaded.
8168 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8169 common/agent.c.
8170 Update callers.
8171
8172 2012-03-03 Yao Qi <yao@codesourcery.com>
8173
8174 * tracepoint.c (gdb_agent_capability): New global.
8175 (in_process_agent_loaded_ust): Renamed to
8176 `in_process_agent_supports_ust'.
8177 Update callers.
8178 (in_process_agent_supports_ust): Call agent_capability_check.
8179 (clear_installed_tracepoints): Assert that agent supports
8180 agent.
8181
8182 2012-03-03 Yao Qi <yao@codesourcery.com>
8183
8184 * linux-low.c (linux_supports_agent): New.
8185 (linux_target_ops): Initialize field `supports_agent' with
8186 linux_supports_agent.
8187 * target.h (struct target_ops) <supports_agent>: New.
8188 (target_supports_agent): New macro.
8189 * server.c (handle_general_set): Handle packet 'QAgent'.
8190 (handle_query): Send `QAgent+'.
8191 * Makefile.in (server.o): Depends on agent.h.
8192
8193 2012-03-03 Yao Qi <yao@codesourcery.com>
8194
8195 * Makefile.in (OBS): Add agent.o.
8196 Add new rule for agent.o.
8197 Track dependence of tracepoint.c on agent.h.
8198 * tracepoint.c (run_inferior_command_1):
8199 (run_inferior_command): Call agent_run_command.
8200 (gdb_ust_connect_sync_socket): Deleted. Move it to
8201 common/agent.c.
8202 (resume_thread, stop_thread): Likewise.
8203 (gdb_ust_socket_init): Renamed to ...
8204 (gdb_agent_socket_init): ... New.
8205 (gdb_ust_thread): Renamed to ...
8206 (gdb_agent_helper_thread): ... New.
8207 (gdb_ust_init): Move some code to ...
8208 (gdb_agent_init): ... here. New.
8209 [HAVE_UST]: Call gdb_ust_init.
8210 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8211 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8212 * config.in, configure: Regenerated.
8213
8214 2012-03-02 Pedro Alves <palves@redhat.com>
8215
8216 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8217 * linux-low.c (struct simple_pid_list): New.
8218 (stopped_pids): New a struct simple_pid_list pointer.
8219 (add_to_pid_list, pull_pid_from_list): New.
8220 (handle_extended_wait): Don't assume the first signal new children
8221 report is SIGSTOP. Adjust call to pull_pid_from_list.
8222 (linux_wait_for_lwp): Adjust.
8223
8224 2012-03-02 Yao Qi <yao@codesourcery.com>
8225
8226 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8227 debug log.
8228
8229 2012-03-02 Yao Qi <yao@codesourcery.com>
8230
8231 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8232 `stop_pc' and `tpoint'. Update caller.
8233
8234 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8235
8236 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8237 * linux-low.c (use_linux_regsets): New macro.
8238 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8239 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8240 (linux_register_in_regsets): New function.
8241 (usr_fetch_inferior_registers): Skip registers covered by
8242 regsets.
8243 (usr_store_inferior_registers): Likewise.
8244 (usr_fetch_inferior_registers): New macro.
8245 (usr_store_inferior_registers): Likewise.
8246 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8247 (linux_store_registers): Likewise.
8248 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8249 prototype.
8250 (init_registers_mips64_dsp_linux): Likewise.
8251 (init_registers_mips_linux): New macro.
8252 (init_registers_mips_dsp_linux): Likewise.
8253 (mips_dsp_num_regs): Likewise.
8254 (DSP_BASE, DSP_CONTROL): New fallback macros.
8255 (mips_base_regs): New macro.
8256 (mips_regmap): Use it. Fix the size.
8257 (mips_dsp_regmap): New variable.
8258 (mips_dsp_regset_bitmap): Likewise.
8259 (mips_arch_setup): New function.
8260 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8261 than mips_regmap.
8262 (mips_cannot_store_register): Likewise.
8263 (the_low_target): Update .arch_setup, .num_regs and .regmap
8264 initializers. Add .regset_bitmap initializer.
8265 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8266 initializer.
8267 * linux-bfin-low.c (the_low_target): Likewise.
8268 * linux-cris-low.c (the_low_target): Likewise.
8269 * linux-crisv32-low.c (the_low_target): Likewise.
8270 * linux-ia64-low.c (the_low_target): Likewise.
8271 * linux-m32r-low.c (the_low_target): Likewise.
8272 * linux-m68k-low.c (the_low_target): Likewise.
8273 * linux-ppc-low.c (the_low_target): Likewise.
8274 * linux-s390-low.c (the_low_target): Likewise.
8275 * linux-sh-low.c (the_low_target): Likewise.
8276 * linux-sparc-low.c (the_low_target): Likewise.
8277 * linux-tic6x-low.c (the_low_target): Likewise.
8278 * linux-x86-low.c (the_low_target): Likewise.
8279 * linux-xtensa-low.c (the_low_target): Likewise.
8280 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8281 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8282 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8283 srv_xmlfiles.
8284 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8285 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8286
8287 2012-02-29 Yao Qi <yao@codesourcery.com>
8288 Pedro Alves <palves@redhat.com>
8289
8290 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8291 `step_over_finished' is true.
8292
8293 2012-02-27 Pedro Alves <palves@redhat.com>
8294
8295 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8296 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8297
8298 2012-02-27 Pedro Alves <palves@redhat.com>
8299
8300 PR server/9684
8301 * linux-low.c (pid_is_stopped): New.
8302 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8303
8304 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8305
8306 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8307 of conditions.
8308
8309 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8310
8311 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8312
8313 2012-02-24 Luis Machado <lgustavo@codesourcery>
8314
8315 * server.c (handle_query): Advertise support for target-side
8316 breakpoint condition evaluation.
8317 (process_point_options): New function.
8318 (process_serial_event): When inserting a breakpoint, check for
8319 a target-side condition that should be evaluated.
8320
8321 * mem-break.c: Include regcache.h and ax.h.
8322 (point_cond_list_t): New data structure.
8323 (breakpoint) <cond_list>: New field.
8324 (find_gdb_breakpoint_at): Make non-static.
8325 (delete_gdb_breakpoint_at): Clear any target-side
8326 conditions.
8327 (clear_gdb_breakpoint_conditions): New function.
8328 (add_condition_to_breakpoint): Likewise.
8329 (add_breakpoint_condition): Likewise.
8330 (gdb_condition_true_at_breakpoint): Likewise.
8331 (gdb_breakpoint_here): Return result directly instead
8332 of going through a local variable.
8333
8334 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8335 (clear_gdb_breakpoint_conditions): Likewise.
8336 (add_breakpoint_condition): Likewise.
8337 (gdb_condition_true_at_breakpoint): Likewise.
8338
8339 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8340 (need_step_over_p): Take target-side breakpoint condition into
8341 consideration.
8342
8343 2012-02-24 Luis Machado <lgustavo@codesourcery>
8344
8345 * server.h: Include tracepoint.h.
8346 (agent_mem_read, agent_get_trace_state_variable_value,
8347 agent_set_trace_state_variable_value,
8348 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8349 get_set_tsv_func_addr): New prototypes.
8350
8351 * ax.h: New include file.
8352 * ax.c: New source file.
8353
8354 * tracepoint.c: Include ax.h.
8355 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8356 agent_expr, eval_result_type): Move to ax.h.
8357 (parse_agent_expr): Rename to ...
8358 (gdb_parse_agent_expr): ... this, make it non-static and move
8359 to ax.h.
8360 (unparse_agent_expr) Rename to ...
8361 (gdb_unparse_agent_expr): ... this, make it non-static and move
8362 to ax.h.
8363 (eval_agent_expr): Rename to ...
8364 (eval_tracepoint_agent_expr): ... this.
8365 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8366 forward declarations.
8367 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8368 (agent_get_trace_state_variable_value): New function.
8369 (agent_set_trace_state_variable_value): New function.
8370 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8371 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8372 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8373 (condition_true_at_tracepoint): Likewise.
8374 (parse_agent_expr): Rename to ...
8375 (gdb_parse_agent_expr): ... this and move to ax.c.
8376 (unparse_agent_expr): Rename to ...
8377 (gdb_unparse_agent_expr): ... this and move to ax.c.
8378 (gdb_agent_op_name): Move to ax.c.
8379 (eval_agent_expr): Rename to ...
8380 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8381 and move to ax.c.
8382 (eval_tracepoint_agent_expr): New function.
8383 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8384 non-static.
8385 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8386 ax.c.
8387 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8388 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8389 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8390 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8391 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8392 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8393 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8394 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8395 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8396 (compile_bytecodes): Remove forward declaration.
8397 (is_goto_target): Move to ax.c.
8398 (compile_bytecodes): Move to ax.c and call
8399 agent_get_trace_state_variable_value (...) and
8400 agent_set_trace_state_variable_value (...).
8401
8402 * Makefile.in: Update ax.c and IPA dependencies.
8403
8404 2012-02-24 Pedro Alves <palves@redhat.com>
8405
8406 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8407 (cmd_bigqtbuffer_circular): ... this. Only handle
8408 'QTBuffer:circular:'.
8409 (handle_tracepoint_general_set): Adjust.
8410
8411 2012-02-16 Yao Qi <yao@codesourcery.com>
8412
8413 * inferiors.c: Move code to ...
8414 * dll.c: .... here. New.
8415 * server.h: Declare clear_dlls.
8416 * Makefile.in (SFILES): Add dll.c.
8417 (OBS): Add dll.o
8418 (dll.o): New rule.
8419
8420 2012-02-11 Yao Qi <yao@codesourcery.com>
8421
8422 * server.c: (handle_monitor_command): Add a new parameter
8423 `own_buf'.
8424 (handle_query): Update caller.
8425
8426 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8427
8428 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8429 * configure, config.in: Regenerate.
8430 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8431 is not defined.
8432
8433 2012-02-02 Pedro Alves <palves@redhat.com>
8434
8435 Try SIGKILL first, then PTRACE_KILL.
8436 * linux-low.c (linux_kill_one_lwp): New.
8437 (linux_kill_one_lwp): Rename to ...
8438 (kill_one_lwp_callback): ... this. Use the new
8439 linux_kill_one_lwp.
8440
8441 2012-02-02 Pedro Alves <palves@redhat.com>
8442
8443 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8444 inferior.
8445
8446 2012-01-27 Pedro Alves <palves@redhat.com>
8447
8448 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8449 (elf_64_file_p): Make static.
8450 (linux_pid_exe_is_elf_64_file): New.
8451 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8452 Delete declarations.
8453 (linux_pid_exe_is_elf_64_file): Declare.
8454 * linux-x86-low.c (x86_arch_setup): Use
8455 linux_pid_exe_is_elf_64_file.
8456
8457 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8458
8459 * linux-low.c (linux_wait_for_event_1): Rename to ...
8460 (linux_wait_for_event): ... here and merge it with former
8461 linux_wait_for_event - new variable wait_ptid, use it.
8462 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8463
8464 2012-01-23 Pedro Alves <palves@redhat.com>
8465
8466 * server.c (main): Avoid yet another case of infinite loop while
8467 detaching/killing after a longjmp.
8468
8469 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8470
8471 Code cleanup.
8472 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8473
8474 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8475
8476 * hostio.c (handle_readlink): New function.
8477 (handle_vFile): Call it to handle "vFile:readlink" packets.
8478
8479 2012-01-20 Pedro Alves <palves@redhat.com>
8480 Ulrich Weigand <ulrich.weigand@linaro.org>
8481
8482 * server.c (handle_v_requests): Only support vAttach and vRun to
8483 start multiple processes when in extended protocol mode.
8484
8485 2012-01-17 Pedro Alves <palves@redhat.com>
8486
8487 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8488 memalign plus mprotect to allocate the scratch buffer.
8489
8490 2012-01-13 Pedro Alves <palves@redhat.com>
8491
8492 * server.c (attach_inferior): Clear `cont_thread'.
8493
8494 2012-01-13 Pedro Alves <palves@redhat.com>
8495
8496 * server.c (main): Avoid infinite loop while detaching/killing
8497 after a longjmp.
8498
8499 2012-01-09 Doug Evans <dje@google.com>
8500
8501 * server.c (start_inferior): Set last_ptid in --wrapper case.
8502
8503 2012-01-06 Yao Qi <yao@codesourcery.com>
8504
8505 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8506 defined.
8507 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8508
8509 2012-01-04 Yao Qi <yao@codesourcery.com>
8510
8511 * tracepoint.c (cmd_qtdp): Print debug message
8512 for static tracepoint.
8513
8514 2012-01-04 Yao Qi <yao@codesourcery.com>
8515
8516 * tracepoint.c (trace_vdebug): Differentiate debug message
8517 between gdbserver and IPA.
8518
8519 2012-01-03 Yao Qi <yao@codesourcery.com>
8520
8521 * tracepoint.c (tracepoint_was_hit): Don't collect for
8522 static tracepoint.
8523
8524 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8525
8526 * terminal.h: Reformat copyright header.
8527
8528 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8529
8530 * server.c (gdbserver_version): Update copyright year.
8531 * gdbreplay.c (gdbreplay_version): Likewise.
8532
8533 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8534
8535 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8536
8537 Revert:
8538 2011-12-18 Hui Zhu <teawater@gmail.com>
8539 * linux-low.c (linux_create_inferior): Save return value to ret.
8540
8541 2011-12-18 Hui Zhu <teawater@gmail.com>
8542
8543 * linux-low.c (linux_create_inferior): Save return value to ret.
8544
8545 2011-12-16 Doug Evans <dje@google.com>
8546
8547 * linux-low.c (linux_create_inferior): If stdio connection,
8548 redirect stdin from /dev/null, stdout to stderr.
8549 * remote-utils.c (remote_is_stdio): New static global.
8550 (remote_connection_is_stdio): New function.
8551 (remote_prepare): Handle stdio connection.
8552 (remote_open): Ditto.
8553 (remote_close): Don't close stdin for stdio connections.
8554 (read_prim,write_prim): New functions. Replace all calls to
8555 read/write to these.
8556 * server.c (main): Watch for "-" argument. Move call to
8557 remote_prepare before start_inferior.
8558 * server.h (STDIO_CONNECTION_NAME): New macro.
8559 (remote_connection_is_stdio): Declare.
8560
8561 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8562 in debugging output.
8563
8564 2011-12-15 Yao Qi <yao@codesourcery.com>
8565
8566 * tracepoint.c: Include sys/syscall.h.
8567 (gdb_ust_thread): Remove preprocessor conditional.
8568
8569 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8570
8571 * linux-low.c (linux_detach_one_lwp): Call
8572 the_low_target.prepare_to_resume before detaching.
8573
8574 2011-12-14 Yao Qi <yao@codesourcery.com>
8575
8576 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8577 of write.
8578
8579 2011-12-14 Yao Qi <yao@codesourcery.com>
8580
8581 * i386-low.c (i386_low_stopped_data_address): Initialize local
8582 variable `control'.
8583
8584 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8585
8586 PR remote/13492
8587
8588 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8589 DR_CONTROL unless necessary. Extend comments.
8590 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8591 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8592
8593 2011-12-13 Yao Qi <yao@codesourcery.com>
8594
8595 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8596 macros.
8597 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8598
8599 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8600
8601 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8602 Print new debug message for such case.
8603
8604 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8605
8606 Fix overlapping memcpy.
8607 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8608 the read_inferior_memory transfer.
8609 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8610 write_inferior_memory transfer.
8611 (set_fast_tracepoint_jump): New variable buf. Use it for the
8612 read_inferior_memory and write_inferior_memory transfers.
8613 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8614 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8615 Use it for the write_inferior_memory transfer.
8616 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8617 buffers.
8618
8619 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8620
8621 * linux-low.c (fetch_register, store_register): Make code
8622 consistent, fix formatting.
8623
8624 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8625
8626 * linux-low.c (usr_store_inferior_registers): Factor out code
8627 to handle individual registers into...
8628 (store_register): ... this new function.
8629
8630 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8631
8632 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8633 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8634 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8635 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8636 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8637 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8638 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8639 (srv_xmlfiles): Add new XML files.
8640
8641 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8642 and <sys/uio.h>.
8643 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8644 (init_registers_s390_linux32v1): Add prototype.
8645 (init_registers_s390_linux32v2): Likewise.
8646 (init_registers_s390_linux64v1): Likewise.
8647 (init_registers_s390_linux64v2): Likewise.
8648 (init_registers_s390x_linux64v1): Likewise.
8649 (init_registers_s390x_linux64v2): Likewise.
8650 (s390_num_regs): Increment to 52.
8651 (s390_regmap): Add orig_r2 register.
8652 (s390_num_regs_3264): Increment to 68.
8653 (s390_regmap_3264): Add orig_r2 register.
8654 (s390_collect_ptrace_register): Handle orig_r2 register.
8655 (s390_supply_ptrace_register): Likewise.
8656 (s390_fill_last_break): New function.
8657 (s390_store_last_break): Likewise.
8658 (s390_fill_system_call): New function.
8659 (s390_store_system_call): Likewise.
8660 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8661 register sets.
8662 (s390_check_regset): New function.
8663 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8664 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8665 Update target_regsets for available register sets.
8666
8667 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8668 Jan Kratochvil <jan.kratochvil@redhat.com>
8669
8670 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8671 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8672 New.
8673 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8674 * linux-low.h (struct process_info_private): New member r_debug.
8675 * server.c (handle_qxfer_libraries): Call
8676 the_target->qxfer_libraries_svr4.
8677 (handle_qxfer_libraries_svr4): New function.
8678 (qxfer_packets): New entry "libraries-svr4".
8679 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8680 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8681 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8682 PACKET_qXfer_libraries_svr4.
8683
8684 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8685
8686 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8687 PSW address/mask between 8-byte and 16-byte formats.
8688 (s390_supply_ptrace_register): Likewise.
8689 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8690 basic addressing mode bit.
8691
8692 2011-11-24 Stan Shebs <stan@codesourcery.com>
8693
8694 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8695
8696 2011-11-17 Stan Shebs <stan@codesourcery.com>
8697
8698 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8699 (tracing_start_time): New global.
8700 (tracing_stop_time): New global.
8701 (tracing_user_name): New global.
8702 (tracing_notes): New global.
8703 (tracing_stop_note): New global.
8704 (cmd_qtstart): Set traceframe_usage, start_time.
8705 (stop_tracing): Set stop_time.
8706 (cmd_qtstatus): Report additional status.
8707 (cmd_qtp): New function.
8708 (handle_tracepoint_query): Call it.
8709 (cmd_qtnotes): New function.
8710 (handle_tracepoint_general_set): Call it.
8711 (get_timestamp): Rename from tsv_get_timestamp.
8712
8713 2011-11-14 Stan Shebs <stan@codesourcery.com>
8714 Kwok Cheung Yeung <kcy@codesourcery.com>
8715
8716 * linux-x86-low.c (small_jump_insn): New.
8717 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8718 trampoline and error message, build a trampoline and issue a small
8719 jump instruction to it.
8720 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8721 trampoline and error message.
8722 (x86_get_min_fast_tracepoint_insn_len): New.
8723 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8724 * linux-low.h (struct linux_target_ops): Add arguments to
8725 install_fast_tracepoint_jump_pad operation, add new operation.
8726 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8727 arguments.
8728 (linux_get_min_fast_tracepoint_insn_len): New function.
8729 (linux_target_op): Add new operation.
8730 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8731 (gdb_trampoline_buffer_end): Ditto.
8732 (gdb_trampoline_buffer_error): Ditto.
8733 (struct ipa_sym_addresses): Add fields for new IPA variables.
8734 (symbol_list): Add entries for new IPA variables.
8735 (struct tracepoint): Add fields to hold the address range of the
8736 trampoline used by the tracepoint.
8737 (trampoline_buffer_head): New static variable.
8738 (trampoline_buffer_tail): Ditto.
8739 (claim_trampoline_space): New function.
8740 (have_fast_tracepoint_trampoline_buffer): New function.
8741 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8742 structure.
8743 (install_fast_tracepoint): Ditto, also add error buffer argument.
8744 (cmd_qtminftpilen): New function.
8745 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8746 (fast_tracepoint_from_trampoline_address): New function.
8747 (fast_tracepoint_collecting): Handle trampoline as part of jump
8748 pad space.
8749 (set_trampoline_buffer_space): New function.
8750 (initialize_tracepoint): Initialize new IPA variables.
8751 * target.h (struct target_ops): Add arguments to
8752 install_fast_tracepoint_jump_pad operation, add new
8753 get_min_fast_tracepoint_insn_len operation.
8754 (target_get_min_fast_tracepoint_insn_len): New.
8755 (install_fast_tracepoint_jump_pad): Add arguments.
8756 * server.h (IPA_BUFSIZ): Define.
8757 * linux-i386-ipa.c: Include extra header files.
8758 (initialize_fast_tracepoint_trampoline_buffer): New function.
8759 (initialize_low_tracepoint): Call it.
8760 * server.h (set_trampoline_buffer_space): Declare.
8761 (claim_trampoline_space): Ditto.
8762 (have_fast_tracepoint_trampoline_buffer): Ditto.
8763
8764 2011-11-14 Yao Qi <yao@codesourcery.com>
8765
8766 * server.c (handle_query): Handle InstallInTrace for qSupported.
8767 * tracepoint.c (add_tracepoint): Sort list.
8768 (install_tracepoint, download_tracepoint): New.
8769 (cmd_qtdp): Call them to install and download tracepoints.
8770 (sort_tracepoints): Removed.
8771 (cmd_qtstart): Update.
8772
8773 2011-11-14 Yao Qi <yao@codesourcery.com>
8774
8775 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8776 * mem-break.h: Declare.
8777 * tracepoint.c (cmd_qtstart): Move some code to ...
8778 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8779 New.
8780 (download_tracepoints): Move some code to ...
8781 (download_tracepoint_1): ... here. New.
8782
8783 2011-11-08 Yao Qi <yao@codesourcery.com>
8784
8785 * remote-utils.c (relocate_instruction): A comment fix.
8786
8787 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8788
8789 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8790 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8791 dr_status_mirror and dr_control_mirror from debug_reg_state.
8792 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8793 (i386_initial_stuff): Remove use of deleted globals.
8794 (i386_get_thread_context, i386_set_thread_context,
8795 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8796 from debug_reg_state.
8797
8798 2011-11-05 Yao Qi <yao@codesourcery.com>
8799
8800 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8801 address as TPOINT's.
8802
8803 2011-11-02 Stan Shebs <stan@codesourcery.com>
8804
8805 * tracepoint.c (agent_mem_read_string): New function.
8806 (eval_agent_expr): Call it for tracenz.
8807 * server.c (handle_query): Report support for tracenz.
8808
8809 2011-11-02 Yao Qi <yao@codesourcery.com>
8810
8811 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8812
8813 2011-11-02 Yao Qi <yao@codesourcery.com>
8814
8815 * target.h: Fix a typo in comment.
8816
8817 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8818
8819 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8820 clobber the breakpoints' shadows with fast tracepoint jumps.
8821 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8822 * target.c (write_inferior_memory): Also pass MYADDR down to
8823 check_mem_write.
8824
8825 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8826
8827 * configure.ac: Check support for personality routine.
8828 * configure: Regenerate.
8829 * config.in: Likewise.
8830 * linux-low.c: Include <sys/personality.h>.
8831 Define ADDR_NO_RANDOMIZE if necessary.
8832 (linux_create_inferior): Disable address space randomization when
8833 forking inferior, if requested.
8834 (linux_supports_disable_randomization): New function.
8835 (linux_target_ops): Install it.
8836 * server.h (disable_randomization): Declare.
8837 * server.c (disable_randomization): New global variable.
8838 (handle_general_set): Handle QDisableRandomization.
8839 (handle_query): Likewise for qSupported.
8840 (main): Support --disable-randomization and --no-disable-randomization
8841 command line arguments.
8842 * target.h (struct target_ops): Add supports_disable_randomization.
8843 (target_supports_disable_randomization): New macro.
8844
8845 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8846
8847 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8848 ifdef check.
8849 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8850 [!PT_GETDSBT] (target_loadmap): New definition.
8851 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8852 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8853 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8854 and PT_GETDSBT to LINUX_LOADMAP.
8855 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8856 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8857
8858 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8859
8860 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8861 (arm_linux_hwbp_cap): New static variable.
8862 (arm_linux_get_hwbp_cap): Replace by ...
8863 (arm_linux_init_hwbp_cap): ... this new function.
8864 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8865 (arm_linux_get_hw_watchpoint_count): Likewise.
8866 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8867 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8868 (arm_prepare_to_resume): Use perror_with_name instead of error.
8869
8870 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8871
8872 * linux-arm-low.c: Include <signal.h>.
8873 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8874 (struct arm_linux_hwbp_cap): New data type.
8875 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8876 (struct arm_linux_hw_breakpoint): New data type.
8877 (MAX_BPTS, MAX_WPTS): Define.
8878 (struct arch_process_info, struct arch_lwp_info): New data types.
8879 (arm_linux_get_hwbp_cap): New function.
8880 (arm_linux_get_hw_breakpoint_count): Likewise.
8881 (arm_linux_get_hw_watchpoint_count): Likewise.
8882 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8883 (arm_hwbp_control_initialize): Likewise.
8884 (arm_hwbp_control_is_enabled): Likewise.
8885 (arm_hwbp_control_is_initialized): Likewise.
8886 (arm_hwbp_control_disable): Likewise.
8887 (arm_linux_hw_breakpoint_equal): Likewise.
8888 (arm_linux_hw_point_initialize): Likewise.
8889 (struct update_registers_data): New data structure.
8890 (update_registers_callback: New function.
8891 (arm_insert_point): Likewise.
8892 (arm_remove_point): Likewise.
8893 (arm_stopped_by_watchpoint): Likewise.
8894 (arm_stopped_data_address): Likewise.
8895 (arm_new_process): Likewise.
8896 (arm_new_thread): Likewise.
8897 (arm_prepare_to_resume): Likewise.
8898 (the_low_target): Register arm_insert_point, arm_remove_point,
8899 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8900 arm_new_thread, and arm_prepare_to_resume.
8901
8902 2011-09-15 Stan Shebs <stan@codesourcery.com>
8903
8904 * server.h (struct emit_ops): Add compare-goto fields.
8905 * tracepoint.c (gdb_agent_op_sizes): New table.
8906 (emit_eq_goto): New function.
8907 (emit_ne_goto): New function.
8908 (emit_lt_goto): New function.
8909 (emit_le_goto): New function.
8910 (emit_gt_goto): New function.
8911 (emit_ge_goto): New function.
8912 (is_goto_target): New function.
8913 (compile_bytecodes): Recognize special cases of compare-goto
8914 combinations and call specialized emitters for them.
8915 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8916 (amd64_emit_ne_goto): New function.
8917 (amd64_emit_lt_goto): New function.
8918 (amd64_emit_le_goto): New function.
8919 (amd64_emit_gt_goto): New function.
8920 (amd64_emit_ge_goto): New function.
8921 (amd64_emit_ops): Add the new functions.
8922 (i386_emit_eq_goto): New function.
8923 (i386_emit_ne_goto): New function.
8924 (i386_emit_lt_goto): New function.
8925 (i386_emit_le_goto): New function.
8926 (i386_emit_gt_goto): New function.
8927 (i386_emit_ge_goto): New function.
8928 (i386_emit_ops): Add the new functions.
8929
8930 2011-09-08 Stan Shebs <stan@codesourcery.com>
8931
8932 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8933 (i386_emit_epilogue): Restore %ebx.
8934
8935 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8936
8937 * server.c (step_thread): Remove definition.
8938 (process_serial_event): Don't handle Hs.
8939 * server.h (step_thread): Remove declaration.
8940 * target.c (set_desired_inferior): Remove use of step_thread.
8941
8942 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8943
8944 * linux-low.c: Include linux-procfs.h.
8945 (linux_attach_lwp_1): Update comments.
8946 (linux_attach): Scan for existing threads when attaching to a
8947 process that is the tgid.
8948 * Makefile.in: Update dependencies.
8949
8950 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8951
8952 * configure.srv: Add linux-procfs.o dependencies.
8953
8954 2011-08-14 Yao Qi <yao@codesourcery.com>
8955
8956 * target.h (struct target_ops): Fix indent.
8957 * win32-low.c (win32_target_ops): Fix comment.
8958
8959 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8960 Yao Qi <yao@codesourcery.com>
8961
8962 * Makefile.in (clean): Remove tic6x-*.c files.
8963 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8964 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8965 (tic6x-c64xp-linux.c): Likewise.
8966 * configure.srv: Add support for tic6x-*-uclinux.
8967 * linux-tic6x-low.c: New.
8968 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8969
8970 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8971 Yao Qi <yao@codesourcery.com>
8972
8973 * target.h (struct target_ops): Add read_loadmap.
8974 * linux-low.c (struct target_loadseg): New type.
8975 (struct target_loadmap): New type.
8976 (linux_read_loadmap): New function.
8977 (linux_target_ops): Add linux_read_loadmap.
8978 * server.c (handle_query): Support qXfer:fdpic:read packet.
8979 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8980 to NULL.
8981
8982 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8983
8984 * win32-low.c: Include <stdint.h>.
8985
8986 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8987
8988 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8989 to the inferior here.
8990 (i386_remove_aligned_watchpoint): Ditto.
8991 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8992 fit part of the watchpoint in the debug registers.
8993 (i386_update_inferior_debug_regs): New.
8994 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8995 registers, and only update the inferior on success.
8996 (i386_low_remove_watchpoint): Ditto.
8997
8998 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8999
9000 * linux-low.c (compare_ints, unique, list_threads, show_process,
9001 linux_core_of_thread): Delete.
9002 (linux_target_ops): Change linux_core_of_thread to
9003 linux_common_core_of_thread.
9004 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9005 * utils.c (malloc_failure): Change type of argument.
9006 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9007 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9008 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9009 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9010 (IPA_OBJS): Add common-utils-ipa.o.
9011 (ptid_h, linux_osdata_h): New macros.
9012 (server_h): Add common/common-utils.h, common/xml-utils.h,
9013 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9014 common/ptid.h.
9015 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9016 ptid.o, buffer.o): New rules.
9017 (linux-low.o): Add common/linux-osdata.h as a dependency.
9018 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9019 * configure.ac: Add AC_HEADER_DIRENT check.
9020 * config.in: Regenerate.
9021 * configure: Regenerate.
9022 * remote-utils.c (xml_escape_text): Delete.
9023 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9024 buffer_xml_printf): Move to common/buffer.c.
9025 * server.c (main): Remove call to initialize_inferiors.
9026 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9027 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9028 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9029 internal_error, gdb_assert, gdb_assert_fail): Delete.
9030 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9031 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9032 common/buffer.h.
9033 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9034 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9035 initialize_inferiors): Delete.
9036
9037 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9038
9039 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9040 symbol error.
9041
9042 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9043
9044 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9045 assertion.
9046 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9047
9048 2011-05-26 Yao Qi <yao@codesourcery.com>
9049
9050 * Makefile.in (thread-db.o): Track dependence to
9051 common/gdb_thread_db.h.
9052 * thread-db.c: include gdb_thread_db.h from right place.
9053
9054 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9055
9056 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9057 __FILE__ and __LINE__ to internal_error.
9058
9059 2011-05-13 Doug Evans <dje@google.com>
9060
9061 * thread-db.c (try_thread_db_load_from_sdir): New function.
9062 (try_thread_db_load_from_dir): New function.
9063 (thread_db_load_search): Handle $sdir, ignore $pdir.
9064 Remove trying of system directories if search of
9065 libthread-db-search-path fails, that is now done via $sdir.
9066
9067 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9068
9069 * server.c (handle_query): Add EnableDisableTracepoints to the list
9070 of supported features.
9071 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9072 tracepoints.
9073 (cmd_qtenable_disable): New.
9074 (cmd_qtstart): Install tracepoints even if disabled.
9075 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9076 receiving a QTEnable or QTDisable packet.
9077 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9078 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9079 tracepoints.
9080 (gdb_probe): Skip data collection if static tracepoint is disabled.
9081
9082 2011-05-10 Doug Evans <dje@google.com>
9083
9084 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9085
9086 2011-05-04 Doug Evans <dje@google.com>
9087
9088 * linux-low.c (linux_join): Skip process lookup.
9089 * spu-low.c (spu_join): Ditto.
9090 * server.c (join_inferiors_callback): Delete.
9091 (process_serial_event): For 'D' packet (detach) call join_inferior
9092 directly.
9093
9094 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9095
9096 * README: Don't mention xscale*-*-linux*.
9097 * configure.srv (xscale*-*-linux*): Don't handle target.
9098
9099 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9100
9101 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9102 casting pointers.
9103 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9104 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9105 (i386_emit_void_call_2): Likewise.
9106
9107 2011-04-26 Yao Qi <yao@codesourcery.com>
9108
9109 * linux-low.c: Move common macros to linux-ptrace.h.
9110 Include linux-ptrace.h.
9111 * Makefile.in (linux_ptrace_h): New.
9112 (linux-low.o): Depends on linux-ptrace.h.
9113
9114 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9115
9116 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9117 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9118 (remote_prepare): New function with most of the TCP code from ...
9119 (remote_open): ... here. Detect PORT here unconditionally. Move also
9120 setting transport_is_reliable.
9121 * server.c (run_once): New variable.
9122 (gdbserver_usage): Document it.
9123 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9124 the first run if RUN_ONCE.
9125 * server.h (run_once, remote_prepare): New declarations.
9126
9127 2011-04-19 Tom Tromey <tromey@redhat.com>
9128
9129 * win32-low.c (handle_load_dll): Remove duplicate "the".
9130
9131 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9132
9133 Remove support for old Cygwin 1.5 versions.
9134 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9135 function to avoid warning.
9136 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9137 warning.
9138
9139 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9140
9141 * gdbserver/server.h (Macro _): Define it if not available.
9142
9143 2011-03-14 Michael Snyder <msnyder@vmware.com>
9144
9145 * hostio.c (handle_close): Remove unnecessary null test.
9146
9147 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9148
9149 * Makefile.in (maintainer-clean realclean distclean): Remove
9150 "make ... subdir_do" command.
9151
9152 2011-03-10 Michael Snyder <msnyder@vmware.com>
9153
9154 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9155
9156 * server.c (handle_v_run): Free alloced buffer on early return.
9157
9158 2011-03-09 Yao Qi <yao@codesourcery.com>
9159
9160 Revert:
9161 2011-03-04 Yao Qi <yao@codesourcery.com>
9162
9163 * Makefile.in: Remove GNU make feature --directory.
9164
9165 2011-03-05 Yao Qi <yao@codesourcery.com>
9166
9167 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9168 (subdir_do): New make target. Copied from gdb/Makefile.
9169 (maintainer-clean, realclean, distclean, clean): Call corresponding
9170 make targets in common/Makefile.
9171
9172 2011-02-11 Yao Qi <yao@codesourcery.com>
9173
9174 * configure.ac: Call AC_PROG_RANLIB.
9175 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9176 * configure: Regenerate.
9177
9178 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9179
9180 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9181
9182 2011-03-06 Yao Qi <yao@codesourcery.com>
9183
9184 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9185
9186 2011-03-05 Yao Qi <yao@codesourcery.com>
9187
9188 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9189 (subdir_do): New make target. Copied from gdb/Makefile.
9190 (maintainer-clean, realclean, distclean, clean): Call corresponding
9191 make targets in common/Makefile.
9192
9193 2011-03-04 Yao Qi <yao@codesourcery.com>
9194
9195 * Makefile.in: Remove GNU make feature --directory.
9196
9197 2011-03-04 Michael Snyder <msnyder@vmware.com>
9198
9199 * server.c (queue_stop_reply): Call xmalloc not malloc.
9200
9201 2011-03-02 Michael Snyder <msnyder@vmware.com>
9202
9203 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9204
9205 2011-02-28 Michael Snyder <msnyder@vmware.com>
9206
9207 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9208 (cmd_qtframe): Ditto.
9209 (cmd_qtbuffer): Ditto.
9210 (cmd_bigqtbuffer): Ditto.
9211
9212 * utils.c (decimal2str): Initialize 'width' to nine, then
9213 don't mess with it.
9214
9215 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9216
9217 * hostio.c (require_data): Free *data, not data.
9218
9219 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9220
9221 * hostio.c (require_data): Use free, not xfree.
9222
9223 2011-02-27 Michael Snyder <msnyder@vmware.com>
9224
9225 * server.c (handle_query): Discard unused value.
9226
9227 * hostio.c (require_data): Free malloc memory before returning
9228 error.
9229
9230 2011-02-26 Michael Snyder <msnyder@vmware.com>
9231
9232 * linux-low.c (list_threads): Call closedir for dirent.
9233
9234 2011-02-27 Michael Snyder <msnyder@vmware.com>
9235
9236 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9237 a case statement falls through.
9238
9239 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9240
9241 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9242 in comparison.
9243
9244 2011-02-26 Michael Snyder <msnyder@vmware.com>
9245
9246 * utils.c (decimal2str): Eliminate dead code and dead param.
9247 (pulongest): Drop dead param from call to decimal2str.
9248 (plongest): Ditto.
9249
9250 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9251
9252 Revert the following patch (not approved yet):
9253 2011-02-21 Hui Zhu <teawater@gmail.com>
9254 * tracepoint.c (tp_printf): New function.
9255 (eval_agent_expr): Handle gdb_agent_op_printf.
9256
9257 2011-02-21 Hui Zhu <teawater@gmail.com>
9258
9259 * tracepoint.c (tp_printf): New function.
9260 (eval_agent_expr): Handle gdb_agent_op_printf.
9261
9262 2011-02-18 Tom Tromey <tromey@redhat.com>
9263
9264 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9265 (tracepoint.o): Likewise.
9266 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9267 (gdb_agent_op_names): Likewise.
9268
9269 2011-02-18 Tom Tromey <tromey@redhat.com>
9270
9271 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9272 gdb_agent_op_rot>: New constants.
9273 (gdb_agent_op_names): Add pick and roll.
9274 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9275 cases.
9276
9277 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9278
9279 * aclocal.m4: Regenerated with aclocal-1.11.1.
9280
9281 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9282
9283 * server.c (handle_qxfer_traceframe_info): New.
9284 (qxfer_packets): Register "traceframe-info".
9285 (handle_query): Report support for qXfer:traceframe-info:read+.
9286 * tracepoint.c (match_blocktype): New.
9287 (traceframe_find_block_type): Rename to ...
9288 (traceframe_walk_blocks): ... this. Add callback filter argument,
9289 and use it.
9290 (traceframe_find_block_type): New, reimplemented on top of
9291 traceframe_walk_blocks.
9292 (build_traceframe_info_xml): New.
9293 (traceframe_read_info): New.
9294 * server.h (traceframe_read_info): Declare.
9295
9296 2011-02-11 Yao Qi <yao@codesourcery.com>
9297
9298 * configure.ac: Call AC_PROG_RANLIB.
9299 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9300 * configure: Regenerate.
9301
9302 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9303
9304 * server.c (gdb_read_memory): Change return semantics to allow
9305 partial transfers.
9306 (handle_search_memory_1): Adjust.
9307 (process_serial_event) <'m' packet>: Handle partial transfers.
9308 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9309
9310 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9311
9312 * regcache.c (init_register_cache): Initialize
9313 regcache->register_status.
9314 (free_register_cache): Release regcache->register_status.
9315 (regcache_cpy): Copy register_status.
9316 (registers_to_string): Print 'x's for unavailable registers.
9317 (supply_register): Mark the register's status valid or
9318 unavailable, depending on whether a buffer was passed in or not.
9319 (supply_register_zeroed): New.
9320 (supply_regblock): Mark the registers' status valid or
9321 unavailable, depending on whether a buffer was passed in or not.
9322 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9323 (struct regcache): New `register_status' field.
9324 (supply_register_zeroed): Declare.
9325 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9326 supply_register_zeroed, rather than passing a NULL buffer to
9327 supply_register.
9328 * tracepoint.c (fetch_traceframe_registers): Update comment.
9329
9330 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9331
9332 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9333 buffer explicit.
9334
9335 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9336
9337 * server.h (decode_xfer_write): Change prototype.
9338 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9339 and don't extract the annex here.
9340 * server.c (decode_xfer_read): Remove `annex' parameter,
9341 and don't extract the annex here.
9342 (decode_xfer): New.
9343 (struct qxfer): New.
9344 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9345 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9346 (handle_qxfer_statictrace): New functions, abstracted out from
9347 handle_query, and made to use the struct qxfer interface.
9348 (handle_threads_qxfer_proper): Rename to ...
9349 (handle_qxfer_threads_proper): ... this.
9350 (handle_threads_qxfer): Rename to ...
9351 (handle_qxfer_threads): ... this. Adjust.
9352 (qxfer_packets): New array.
9353 (handle_qxfer): New function.
9354 (handle_query): Use handle_qxfer.
9355
9356 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9357
9358 * gdbreplay.c: Shorten lines of >= 80 columns.
9359 * linux-low.c: Ditto.
9360 * linux-ppc-low.c: Ditto.
9361 * linux-s390-low.c: Ditto.
9362 * linux-sparc-low.c: Ditto.
9363 * linux-x86-low.c: Ditto.
9364 * linux-xtensa-low.c: Ditto.
9365 * mem-break.c: Ditto.
9366 * nto-low.c: Ditto.
9367 * regcache.h: Ditto.
9368 * remote-utils.c: Ditto.
9369 * server.c: Ditto.
9370 * server.h: Ditto.
9371 * thread-db.c: Ditto.
9372 * tracepoint.c: Ditto.
9373 * utils.c: Ditto.
9374 * win32-low.h: Ditto.
9375
9376 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9377
9378 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9379 update.
9380
9381 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9382
9383 * server.c (gdbserver_version): Update copyright year in version
9384 output.
9385 * gdbreplay.c (gdbreplay_version): Ditto.
9386
9387 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9388
9389 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9390 * linux-bfin-low.c: New file.
9391 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9392 PT_DATA_ADDR for BFIN targets.
9393 * Makefile.in (SFILES): Add linux-bfin-low.c.
9394 (clean): Remove reg-bfin.c.
9395 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9396 * README: Mention supported Blackfin targets.
9397
9398 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9399
9400 * .gitignore: New file.
9401
9402 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9403
9404 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9405
9406 2010-10-22 Jie Zhang <jie@codesourcery.com>
9407
9408 * Makefile.in: Add FLAGS_TO_PASS variable.
9409 (install): Remove dependency of install-only and recursively
9410 invoke make for install-only.
9411
9412 2010-10-04 Doug Evans <dje@google.com>
9413
9414 * Makefile.in (uninstall): Use $(DESTDIR).
9415
9416 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9417
9418 PR gdb/11842
9419
9420 * linux-x86-low.c (compat_siginfo_from_siginfo)
9421 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9422 si_code is < 0. Check for si_code == SI_TIMER before checking for
9423 si_code < 0.
9424
9425 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9426
9427 * lynx-i386-low.c: New file.
9428 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9429
9430 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9431
9432 * lynx-low.c (ptrace_request_to_str): Remove handling for
9433 request values that have been removed in LynxOS 5.x.
9434
9435 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9436
9437 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9438 <ptrace.h>
9439
9440 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9441
9442 * configure.ac: Add --enable-inprocess-agent option.
9443 * configure: Rebuilt.
9444
9445 2010-09-06 Yao Qi <yao@codesourcery.com>
9446
9447 * linux-low.c (linux_kill): Remove unused variable.
9448 (linux_stabilize_threads): Likewise.
9449 * server.c (start_inferior): Likewise.
9450 (queue_stop_reply_callback): Likewise.
9451 * tracepoint.c (do_action_at_tracepoint): Likewise.
9452
9453 2010-09-06 Yao Qi <yao@codesourcery.com>
9454
9455 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9456 on return.
9457
9458 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9459
9460 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9461
9462 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9463
9464 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9465 "$(IPA_DEPFILES)".
9466
9467 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9468
9469 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9470 gdbserver/lynx-ppc-low.c: New files.
9471 * Makefile.in (lynx_low_h): New variable.
9472 (lynx-low.o, lynx-ppc-low.o): New rules.
9473 * configure.ac: On LynxOS, link with -lnetinet.
9474 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9475 * configure: regenerate.
9476
9477 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9478
9479 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9480 * configure.ac: Add check for vasprintf and vsnprintf.
9481 * configure, config.in: Regenerate.
9482 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9483
9484 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9485
9486 * gdbreplay.c: Move include of alloca.h up, next to include of
9487 malloc.h.
9488 * server.h: Add include of malloc.h.
9489 * mem-break.c: Remove include of malloc.h.
9490 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9491
9492 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9493
9494 * Makefile.in (memmem.o): Build with -Wno-error.
9495
9496 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9497
9498 * utils.c (xsnprintf): Make non-static.
9499 * server.h: Add xsnprintf declaration.
9500 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9501 replace calls to snprintf by calls to xsnprintf throughout.
9502
9503 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9504
9505 * configure.ac: Add configure check for alloca.
9506 * configure, config.in: Regenerate.
9507 * server.h: Include alloca.h if it exists.
9508 * gdbreplay.c: Include alloca.h if it exists.
9509
9510 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9511
9512 * linux-low.c (__SIGRTMIN): Define if not already defined.
9513 (linux_create_inferior): Check for __ANDROID__ rather than
9514 __SIGRTMIN.
9515 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9516 are already deferred.
9517 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9518 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9519 stopped and already has a pending signal to report.
9520 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9521 a pending signal to report or is moving out of a jump pad.
9522 (linux_init_signals): Check for __ANDROID__ rather than
9523 __SIGRTMIN.
9524
9525 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9526
9527 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9528 debug_threads check. Avoid a linear search when not doing debug
9529 output.
9530
9531 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9532
9533 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9534 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9535 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9536 (process_event): Change local fd's type to gdb_fildes_t.
9537 (create_file_handler): Adjust prototype.
9538 (delete_file_handler): Adjust prototype.
9539 (handle_file_event): Adjust prototype. Use pfildes.
9540 (create_file_event): Adjsut prototype.
9541 * remote-utils.c (remote_desc, listen_desc): Change type to
9542 gdb_fildes_t.
9543 * server.h: New gdb_fildes_t typedef.
9544 [USE_WIN32API]: Include winsock2.h.
9545 (delete_file_handler, add_file_handler): Adjust prototypes.
9546 (pfildes): Declare.
9547 * utils.c (pfildes): New.
9548
9549 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9550
9551 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9552 * configure: Regenerate.
9553
9554 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9555
9556 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9557 (linux_done_accessing_memory): ... this.
9558 (linux_target_ops): Adjust.
9559 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9560 * nto-low.c (nto_target_ops): Adjust comment.
9561 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9562 * spu-low.c (spu_target_ops): Adjust comment.
9563 * target.h (target_ops): Rename unprepare_to_access_memory field
9564 to done_accessing_memory.
9565 (unprepare_to_access_memory): Rename to ...
9566 (done_accessing_memory): ... this.
9567
9568 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9569
9570 * linux-low.c (linux_prepare_to_access_memory): New.
9571 (linux_unprepare_to_access_memory): New.
9572 (linux_target_ops): Install them.
9573 * server.c (read_memory): Rename to ...
9574 (gdb_read_memory): ... this. Use
9575 prepare_to_access_memory/prepare_to_access_memory.
9576 (write_memory): Rename to ...
9577 (gdb_write_memory): ... this. Use
9578 prepare_to_access_memory/prepare_to_access_memory.
9579 (handle_search_memory_1): Adjust.
9580 (process_serial_event): Adjust.
9581 * target.h (struct target_ops): New fields
9582 prepare_to_access_memory and unprepare_to_access_memory.
9583 (prepare_to_access_memory, unprepare_to_access_memory): New.
9584 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9585 prepare_to_access_memory/prepare_to_access_memory.
9586 * nto-low.c (nto_target_ops): Adjust.
9587 * spu-low.c (spu_target_ops): Adjust.
9588 * win32-low.c (win32_target_ops): Adjust.
9589
9590 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9591
9592 * Makefile.in (WARN_CFLAGS): Get it from configure.
9593 (WERROR_CFLAGS): New.
9594 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9595 * configure.ac: Introduce --enable-werror, which adds -Werror to
9596 the compiler command line. Enabled by default. Disable with
9597 --disable-werror. Add -Wdeclaration-after-statement
9598 Wpointer-arith and -Wformat-nonliteral to warning flags.
9599 * configure: Regenerate.
9600
9601 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9602
9603 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9604
9605 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9606
9607 * gdbreplay.c (remote_error): New.
9608 (gdbchar): New.
9609 (expect): Use gdbchar. Check for error reading from GDB.
9610 Clarify sync error output.
9611 (play): Check for errors writing to GDB.
9612 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9613 * remote-utils.c (getpkt): Check for errors writing to the remote
9614 descriptor.
9615
9616 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9617
9618 * linux-low.c (linux_wait_1): Move non-debugging code out of
9619 `debug_threads' control.
9620
9621 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9622
9623 * linux-low.c (linux_wait_1): Don't set last_status here.
9624 * server.c (push_event, queue_stop_reply_callback): Assert we're
9625 not pushing a TARGET_WAITKIND_IGNORE event.
9626 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9627 (myresume, handle_target_event): Set the thread's last_resume_kind
9628 and last_status from the target returned status.
9629
9630 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9631
9632 PR threads/10729
9633
9634 * linux-x86-low.c (update_debug_registers_callback): New.
9635 (i386_dr_low_set_addr): Use it.
9636 (i386_dr_low_get_addr): New.
9637 (i386_dr_low_set_control): Use update_debug_registers_callback.
9638 (i386_dr_low_get_control): New.
9639 (i386_dr_low_get_status): Adjust.
9640 * linux-low.c (linux_stop_lwp): New.
9641 * linux-low.h (linux_stop_lwp): Declare.
9642
9643 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9644 argument instead of a i386_debug_reg_state.
9645 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9646 a i386_debug_reg_state.
9647 (i386_insert_aligned_watchpoint): Adjust.
9648 (i386_remove_aligned_watchpoint): Adjust.
9649 (i386_low_stopped_data_address): Read the debug registers from the
9650 inferior instead of from the mirrors.
9651 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9652 (i386_dr_low_get_addr): Declare.
9653 (i386_dr_low_get_control): Declare.
9654 (i386_dr_low_get_status): Change prototype.
9655
9656 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9657 (i386_dr_low_get_addr): New.
9658 (i386_dr_low_get_control): New.
9659 (i386_dr_low_get_status): Adjust prototype. Return
9660 dr_status_mirror.
9661 (i386_initial_stuff): Clear dr_status_mirror and
9662 dr_control_mirror.
9663 (i386_get_thread_context): Adjust.
9664 (i386_set_thread_context): Adjust.
9665 (i386_thread_added): Adjust.
9666
9667 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9668
9669 * linux-low.h (linux_thread_area): Delete declaration.
9670
9671 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9672
9673 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9674 after its termination.
9675
9676 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9677
9678 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9679 (gdb_wants_all_stopped): Delete.
9680 (linux_wait_1): Don't call them.
9681 * server.c (handle_v_cont): Tag all threads as want-stopped.
9682 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9683 stopped as "client-wants-stopped".
9684
9685 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9686
9687 * Makefile.in (signals_h): New.
9688 (server_h): Depend on it.
9689 (server.o): Don't depend on $(signals_def).
9690 (signals.o): Depend on $(signals_def).
9691
9692 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9693
9694 * Makefile.in (signals_def): New.
9695 (server_h): Append include/gdb/signals.h and signals_def.
9696 (server.o): Append signals_def.
9697
9698 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9699
9700 * server.c (handle_target_event): Use target_signal_to_host for
9701 resume_info.sig initialization.
9702 * target.h (struct thread_resume) <sig>: New comment.
9703
9704 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9705
9706 * server.c (handle_query): strcpy() the returned string from paddress()
9707 instead of sprintf().
9708 * utils.c (paddress): Return phex_nz().
9709
9710 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9711
9712 * server.c (handle_v_cont): Call mourn_inferior if process
9713 just exited.
9714 (myresume): Likewise.
9715
9716 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9717
9718 Static tracepoints, and integration with UST.
9719
9720 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9721 * mem-break.c (uninsert_all_breakpoints)
9722 (reinsert_all_breakpoints): New.
9723 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9724 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9725 (gdb_agent_ust_loaded, helper_thread_id)
9726 (gdb_agent_helper_thread_id): New macros.
9727 (struct ipa_sym_addresses): Add addr_ust_loaded,
9728 addr_helper_thread_id, addr_cmd_buf.
9729 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9730 (in_process_agent_loaded_ust): New.
9731 (write_e_ust_not_loaded): New.
9732 (maybe_write_ipa_ust_not_loaded): New.
9733 (struct collect_static_trace_data_action): New.
9734 (enum tracepoint_type) <static_tracepoint>: New.
9735 (struct tracepoint) <handle>: Mention static tracepoints.
9736 (struct static_tracepoint_ctx): New.
9737 (CMD_BUF_SIZE): New.
9738 (add_tracepoint_action): Handle static tracepoint actions.
9739 (unprobe_marker_at): New.
9740 (clear_installed_tracepoints): Handle static tracepoints.
9741 (cmd_qtdp): Handle static tracepoints.
9742 (probe_marker_at): New.
9743 (cmd_qtstart): Handle static tracepoints.
9744 (response_tracepoint): Handle static tracepoints.
9745 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9746 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9747 (get_context_regcache): Handle static tracepoints.
9748 (do_action_at_tracepoint): Handle static tracepoint actions.
9749 (traceframe_find_block_type): Handle static trace data blocks.
9750 (traceframe_read_sdata): New.
9751 (download_tracepoints): Download static tracepoint actions.
9752 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9753 (GDB_PROBE_NAME): New.
9754 (ust_ops): New.
9755 (GET_UST_SYM): New.
9756 (USTF): New.
9757 (dlsym_ust): New.
9758 (ust_marker_to_static_tracepoint): New.
9759 (gdb_probe): New.
9760 (collect_ust_data_at_tracepoint): New.
9761 (gdb_ust_probe): New.
9762 (UNIX_PATH_MAX, SOCK_DIR): New.
9763 (gdb_ust_connect_sync_socket): New.
9764 (resume_thread, stop_thread): New.
9765 (run_inferior_command): New.
9766 (init_named_socket): New.
9767 (gdb_ust_socket_init): New.
9768 (cstr_to_hexstr): New.
9769 (next_st): New.
9770 (first_marker, next_marker): New.
9771 (response_ust_marker): New.
9772 (cmd_qtfstm, cmd_qtsstm): New.
9773 (unprobe_marker_at, probe_marker_at): New.
9774 (cmd_qtstmat, gdb_ust_thread): New.
9775 (gdb_ust_init): New.
9776 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9777 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9778 (ST_REGENTRY): New.
9779 (x86_64_st_collect_regmap): New.
9780 (X86_64_NUM_ST_COLLECT_GREGS): New.
9781 (AMD64_RIP_REGNUM): New.
9782 (supply_static_tracepoint_registers): New.
9783 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9784 (ST_REGENTRY): New.
9785 (i386_st_collect_regmap): New.
9786 (i386_NUM_ST_COLLECT_GREGS): New.
9787 (supply_static_tracepoint_registers): New.
9788 * server.c (handle_query): Handle qXfer:statictrace:read.
9789 <qSupported>: Report support for StaticTracepoints, and
9790 qXfer:statictrace:read features.
9791 * server.h (traceframe_read_sdata)
9792 (supply_static_tracepoint_registers): Declare.
9793 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9794 (unpack_varlen_hex): Include in IPA build.
9795 * Makefile.in (ustlibs, ustinc): New.
9796 (IPA_OBJS): Add remote-utils-ipa.o.
9797 ($(IPA_LIB)): Link -ldl and -lpthread.
9798 (UST_CFLAGS): New.
9799 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9800 * config.in, configure: Regenerate.
9801
9802 2010-06-20 Ian Lance Taylor <iant@google.com>
9803 Pedro Alves <pedro@codesourcery.com>
9804
9805 * linux-x86-low.c (always_true): Delete.
9806 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9807 trying to fool the compiler with always_true.
9808
9809 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9810
9811 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9812 conditions in gdbserver.
9813
9814 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9815
9816 * spu-low.c (spu_read_memory): Wrap around local store limit.
9817 (spu_write_memory): Likewise.
9818
9819 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9820
9821 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9822 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9823 LONGEST uses.
9824 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9825 uses.
9826 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9827 uses with LONGEST uses.
9828
9829 2010-06-14 Stan Shebs <stan@codesourcery.com>
9830 Pedro Alves <pedro@codesourcery.com>
9831
9832 Bytecode compiler.
9833
9834 * linux-x86-low.c: Include limits.h.
9835 (add_insns): New.
9836 (always_true): New.
9837 (EMIT_ASM): New.
9838 (EMIT_ASM32): New.
9839 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9840 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9841 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9842 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9843 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9844 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9845 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9846 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9847 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9848 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9849 (amd64_emit_void_call_2): New.
9850 (amd64_emit_ops): New.
9851 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9852 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9853 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9854 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9855 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9856 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9857 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9858 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9859 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9860 (i386_emit_stack_adjust, i386_emit_int_call_1)
9861 (i386_emit_void_call_2): New.
9862 (i386_emit_ops): New.
9863 (x86_emit_ops): New.
9864 (the_low_target): Install x86_emit_ops.
9865 * server.h (struct emit_ops): New.
9866 (get_raw_reg_func_addr): Declare.
9867 (current_insn_ptr, emit_error): Declare.
9868 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9869 (set_trace_state_variable_value): New defines.
9870 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9871 addr_get_trace_state_variable_value and
9872 addr_set_trace_state_variable_value.
9873 (symbol_list): New fields for get_raw_reg,
9874 get_trace_state_variable_value and set_trace_state_variable_value.
9875 (condfn): New typedef.
9876 (struct tracepoint): New field `compiled_cond'.
9877 (do_action_at_tracepoint): Clear compiled_cond.
9878 (get_trace_state_variable_value, set_trace_state_variable_value):
9879 Export in the IPA.
9880 (condition_true_at_tracepoint): If there's a compiled condition,
9881 run that.
9882 (current_insn_ptr, emit_error): New globals.
9883 (struct bytecode_address): New.
9884 (get_raw_reg_func_addr): New.
9885 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9886 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9887 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9888 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9889 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9890 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9891 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9892 (compile_tracepoint_condition, compile_bytecodes): New.
9893 * target.h (emit_ops): Forward declare.
9894 (struct target_ops): New field emit_ops.
9895 (target_emit_ops): New.
9896 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9897 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9898 * linux-low.c (linux_emit_ops): New.
9899 (linux_target_ops): Install it.
9900 * linux-low.h (struct linux_target_ops): New field emit_ops.
9901
9902 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9903
9904 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9905 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9906
9907 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9908 Stan Shebs <stan@codesourcery.com>
9909
9910 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9911 (all): Depend on $(extra_libraries).
9912 (install-only): Install the IPA.
9913 (IPA_OBJS, IPA_LIB): New.
9914 (clean): Remove the IPA lib.
9915 (IPAGENT_CFLAGS): New.
9916 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9917 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9918 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9919 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9920 * configure.ac: Check for atomic builtins support in the compiler.
9921 (IPA_DEPFILES, extra_libraries): Define.
9922 * configure.srv (ipa_obj): Add description.
9923 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9924 (i[34567]86-*-linux*): Set ipa_obj.
9925 (x86_64-*-linux*): Set ipa_obj.
9926 * linux-low.c (stabilizing_threads): New.
9927 (supports_fast_tracepoints): New.
9928 (linux_detach): Stabilize threads before detaching.
9929 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9930 the lwp is either not stabilizing, or is moving out of a jump pad.
9931 (linux_fast_tracepoint_collecting): New.
9932 (maybe_move_out_of_jump_pad): New.
9933 (enqueue_one_deferred_signal): New.
9934 (dequeue_one_deferred_signal): New.
9935 (linux_wait_for_event_1): If moving out of a jump pad, defer
9936 pending signals to later.
9937 (linux_stabilize_threads): New.
9938 (linux_wait_1): Check if threads need moving out of jump pads, and
9939 do it if so.
9940 (stuck_in_jump_pad_callback): New.
9941 (move_out_of_jump_pad_callback): New.
9942 (lwp_running): New.
9943 (linux_resume_one_lwp): Handle moving out of jump pads.
9944 (linux_set_resume_request): Dequeue deferred signals.
9945 (need_step_over_p): Also step over fast tracepoint jumps.
9946 (start_step_over): Also uninsert fast tracepoint jumps.
9947 (finish_step_over): Also reinsert fast tracepoint jumps.
9948 (linux_install_fast_tracepoint_jump): New.
9949 (linux_target_ops): Install linux_stabilize_threads and
9950 linux_install_fast_tracepoint_jump_pad.
9951 * linux-low.h (linux_target_ops) <get_thread_area,
9952 install_fast_tracepoint_jump_pad>: New fields.
9953 (struct lwp_info) <collecting_fast_tracepoint,
9954 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9955 (linux_get_thread_area): Declare.
9956 * linux-x86-low.c (jump_insn): New.
9957 (x86_get_thread_area): New.
9958 (append_insns): New.
9959 (push_opcode): New.
9960 (amd64_install_fast_tracepoint_jump_pad): New.
9961 (i386_install_fast_tracepoint_jump_pad): New.
9962 (x86_install_fast_tracepoint_jump_pad): New.
9963 (the_low_target): Install x86_get_thread_area and
9964 x86_install_fast_tracepoint_jump_pad.
9965 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9966 (struct fast_tracepoint_jump): New.
9967 (fast_tracepoint_jump_insn): New.
9968 (fast_tracepoint_jump_shadow): New.
9969 (find_fast_tracepoint_jump_at): New.
9970 (fast_tracepoint_jump_here): New.
9971 (delete_fast_tracepoint_jump): New.
9972 (set_fast_tracepoint_jump): New.
9973 (uninsert_fast_tracepoint_jumps_at): New.
9974 (reinsert_fast_tracepoint_jumps_at): New.
9975 (set_breakpoint_at): Use write_inferior_memory.
9976 (uninsert_raw_breakpoint): Use write_inferior_memory.
9977 (check_mem_read): Mask out fast tracepoint jumps.
9978 (check_mem_write): Mask out fast tracepoint jumps.
9979 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9980 (set_fast_tracepoint_jump): Declare.
9981 (delete_fast_tracepoint_jump)
9982 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9983 (reinsert_fast_tracepoint_jumps_at): Declare.
9984 * regcache.c: Don't compile many functions when building the
9985 in-process agent library.
9986 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9987 the register buffer in the heap.
9988 (free_register_cache): If the register buffer isn't owned by the
9989 regcache, don't free it.
9990 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9991 pre-existing register caches.
9992 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9993 type.
9994 (convert_ascii_to_int): : Constify `from' parameter type.
9995 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9996 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9997 the needed buffer in-place.
9998 (relocate_instruction): New.
9999 * server.c (handle_query) <qSymbols>: If the target supports
10000 tracepoints, give it a chance of looking up symbols. Report
10001 support for fast tracepoints.
10002 (handle_status): Stabilize threads.
10003 (process_serial_event): Adjust.
10004 * server.h (struct fast_tracepoint_jump): Forward declare.
10005 (struct process_info) <fast_tracepoint_jumps>: New field.
10006 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10007 (decode_X_packet, decode_M_packet): Adjust.
10008 (relocate_instruction): Declare.
10009 (in_process_agent_loaded): Declare.
10010 (tracepoint_look_up_symbols): Declare.
10011 (struct fast_tpoint_collect_status): Declare.
10012 (fast_tracepoint_collecting): Declare.
10013 (force_unlock_trace_buffer): Declare.
10014 (handle_tracepoint_bkpts): Declare.
10015 (initialize_low_tracepoint)
10016 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10017 * target.h (struct target_ops) <stabilize_threads,
10018 install_fast_tracepoint_jump_pad>: New fields.
10019 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10020 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10021 [HAVE_STDINT_H]: Include stdint.h.
10022 (trace_debug_1): Rename to ...
10023 (trace_vdebug): ... this.
10024 (trace_debug): Rename to ...
10025 (trace_debug_1): ... this. Add `level' parameter.
10026 (trace_debug): New.
10027 (ATTR_USED, ATTR_NOINLINE): New.
10028 (IP_AGENT_EXPORT): New.
10029 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10030 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10031 (about_to_request_buffer_space, trace_buffer_is_full)
10032 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10033 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10034 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10035 (traceframe_write_count, traceframes_created)
10036 (trace_state_variables)
10037 New renaming defines.
10038 (struct ipa_sym_addresses): New.
10039 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10040 (symbol_list): New.
10041 (ipa_sym_addrs): New.
10042 (all_tracepoint_symbols_looked_up): New.
10043 (in_process_agent_loaded): New.
10044 (write_e_ipa_not_loaded): New.
10045 (maybe_write_ipa_not_loaded): New.
10046 (tracepoint_look_up_symbols): New.
10047 (debug_threads) [IN_PROCESS_AGENT]: New.
10048 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10049 (UNKNOWN_SIDE_EFFECTS): New.
10050 (stop_tracing): New.
10051 (flush_trace_buffer): New.
10052 (stop_tracing_bkpt): New.
10053 (flush_trace_buffer_bkpt): New.
10054 (read_inferior_integer): New.
10055 (read_inferior_uinteger): New.
10056 (read_inferior_data_pointer): New.
10057 (write_inferior_data_pointer): New.
10058 (write_inferior_integer): New.
10059 (write_inferior_uinteger): New.
10060 (struct collect_static_trace_data_action): Delete.
10061 (enum tracepoint_type): New.
10062 (struct tracepoint) <type>: New field `type'.
10063 <actions_str, step_actions, step_actions_str>: Only include in
10064 GDBserver.
10065 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10066 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10067 (tracepoints): Use IP_AGENT_EXPORT.
10068 (last_tracepoint): Don't include in the IPA.
10069 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10070 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10071 (alloced_trace_state_variables): New.
10072 (trace_state_variables): Use IP_AGENT_EXPORT.
10073 (traceframe_t): Delete unused variable.
10074 (circular_trace_buffer): Don't include in the IPA.
10075 (trace_buffer_start): Delete.
10076 (struct trace_buffer_control): New.
10077 (trace_buffer_free): Delete.
10078 (struct ipa_trace_buffer_control): New.
10079 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10080 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10081 New.
10082 (trace_buffer_ctrl): New.
10083 (TRACE_BUFFER_CTRL_CURR): New.
10084 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10085 Reimplement as macros.
10086 (trace_buffer_wrap): Delete.
10087 (traceframe_write_count, traceframe_read_count)
10088 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10089 (struct tracepoint_hit_ctx) <type>: New field.
10090 (struct fast_tracepoint_ctx): New.
10091 (memory_barrier): New.
10092 (cmpxchg): New.
10093 (record_tracepoint_error): Update atomically in the IPA.
10094 (clear_inferior_trace_buffer): New.
10095 (about_to_request_buffer_space): New.
10096 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10097 updating the same buffer.
10098 (add_tracepoint): Default the tracepoint's type to trap
10099 tracepoint, and orig_size to -1.
10100 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10101 internal variables.
10102 (create_trace_state_variable): New parameter `gdb'. Handle it.
10103 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10104 (cmd_qtdp): Handle fast tracepoints.
10105 (cmd_qtdv): Adjust.
10106 (max_jump_pad_size): New.
10107 (gdb_jump_pad_head): New.
10108 (get_jump_space_head): New.
10109 (claim_jump_space): New.
10110 (sort_tracepoints): New.
10111 (MAX_JUMP_SIZE): New.
10112 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10113 IPA.
10114 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10115 support. Upload fast traceframes, and delete internal IPA
10116 breakpoints.
10117 (stop_tracing_handler): New.
10118 (flush_trace_buffer_handler): New.
10119 (cmd_qtstop): Upload fast tracepoints.
10120 (response_tracepoint): Handle fast tracepoints.
10121 (tracepoint_finished_step): Upload fast traceframes. Set the
10122 tracepoint hit context's tracepoint type.
10123 (handle_tracepoint_bkpts): New.
10124 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10125 type. Add comment about fast tracepoints.
10126 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10127 non-existing action_str field.
10128 (get_context_regcache): Handle fast tracepoints.
10129 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10130 to the regcache.
10131 (fast_tracepoint_from_jump_pad_address): New.
10132 (fast_tracepoint_from_ipa_tpoint_address): New.
10133 (collecting_t): New.
10134 (force_unlock_trace_buffer): New.
10135 (fast_tracepoint_collecting): New.
10136 (collecting): New.
10137 (gdb_collect): New.
10138 (write_inferior_data_ptr): New.
10139 (target_tp_heap): New.
10140 (target_malloc): New.
10141 (download_agent_expr): New.
10142 (UALIGN): New.
10143 (download_tracepoints): New.
10144 (download_trace_state_variables): New.
10145 (upload_fast_traceframes): New.
10146 (IPA_FIRST_TRACEFRAME): New.
10147 (IPA_NEXT_TRACEFRAME_1): New.
10148 (IPA_NEXT_TRACEFRAME): New.
10149 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10150 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10151 (gdb_jump_pad_buffer_end): New.
10152 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10153 (initialize_tracepoint): Adjust.
10154 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10155 buffer. Initialize the low module.
10156 * utils.c (PREFIX, TOOLNAME): New.
10157 (malloc_failure): Use PREFIX.
10158 (error): In the IPA, an error causes an exit.
10159 (fatal, warning): Use PREFIX.
10160 (internal_error): Use TOOLNAME.
10161 (NUMCELLS): Increase to 10.
10162 * configure, config.in: Regenerate.
10163
10164 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10165
10166 * server.c (handle_query) <qSupported>: Do two passes over the
10167 qSupported string to avoid nesting strtok.
10168
10169 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10170
10171 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10172 (CDEPS): New.
10173 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10174 -Wl,--dynamic-list.
10175 * configure: Regenerate.
10176 * proc-service.list: New.
10177
10178 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10179
10180 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10181 New comment.
10182
10183 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10184
10185 * gdbreplay.c (remote_open): Check error return from socket() call by
10186 its equality to -1 not by it being negative.
10187 * remote-utils.c (remote_open): Likewise.
10188
10189 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10190
10191 * config.h: Regenerate.
10192
10193 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10194
10195 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10196 doesn't provide PTRACE_GET_THREAD_AREA.
10197
10198 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10199
10200 * linux-m68k-low.c: Include <asm/ptrace.h>
10201 (ps_get_thread_area): Implement.
10202
10203 2010-05-03 Doug Evans <dje@google.com>
10204
10205 * event-loop.c (struct callback_event): New struct.
10206 (callback_list): New global.
10207 (append_callback_event, delete_callback_event): New functions.
10208 (process_callback): New function.
10209 (start_event_loop): Call it.
10210 * remote-utils.c (NOT_SCHEDULED): Define.
10211 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10212 moved out of readchar.
10213 (readchar): Rewrite. Call reschedule before returning.
10214 (reset_readchar): New function.
10215 (remote_close): Call it.
10216 (process_remaining, reschedule): New functions.
10217 * server.h (callback_handler_func): New typedef.
10218 (append_callback_event, delete_callback_event): Declare.
10219
10220 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10221
10222 * proc-service.c (ps_pglobal_lookup): Use
10223 thread_db_look_up_one_symbol.
10224 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10225 parameter. Use it instead of all_symbols_looked_up.
10226 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10227 field.
10228 (all_symbols_looked_up): Don't declare.
10229 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10230 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10231 field.
10232 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10233 Set all_symbols_looked_up here.
10234 (thread_db_look_up_one_symbol): New.
10235 (thread_db_get_tls_address): Adjust.
10236 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10237 thread_db object on the heap, and tentatively set it in the
10238 process structure.
10239 (thread_db_init): Don't set all_symbols_looked_up here.
10240 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10241
10242 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10243
10244 * linux-low.c (linux_kill, linux_detach): Adjust.
10245 (status_pending_p_callback): Remove redundant statement. Check
10246 for !TARGET_WAITIKIND_IGNORE, instead of
10247 TARGET_WAITKIND_STOPPED.
10248 (handle_tracepoints): Make sure LWP is locked. Adjust.
10249 (linux_wait_for_event_1): Adjust.
10250 (linux_cancel_breakpoints): New.
10251 (unsuspend_one_lwp): New.
10252 (unsuspend_all_lwps): New.
10253 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10254 (send_sigstop_callback): Change return type to int, add new
10255 `except' parameter and handle it.
10256 (suspend_and_send_sigstop_callback): New.
10257 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10258 pass them down. If SUSPEND, also increment the lwp's suspend
10259 count.
10260 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10261 (need_step_over_p): Don't consider suspended LWPs.
10262 (start_step_over): Adjust.
10263 (proceed_one_lwp): Change return type to int, add new `except'
10264 parameter and handle it.
10265 (unsuspend_and_proceed_one_lwp): New.
10266 (proceed_all_lwps): Use find_inferior instead of
10267 for_each_inferior.
10268 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10269 also decrement the suspend count of LWPs. Pass `except' down,
10270 instead of hacking its suspend count.
10271 (linux_pause_all): Add `freeze' parameter. Adjust.
10272 (linux_unpause_all): New.
10273 (linux_target_ops): Install linux_unpause_all.
10274 * server.c (handle_status): Adjust.
10275 * target.h (struct target_ops): New fields `unpause_all' and
10276 `cancel_breakpoints'. Add new parameter to `pause_all'.
10277 (pause_all): Add new `freeze' parameter.
10278 (unpause_all): New.
10279 (cancel_breakpoints): New.
10280 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10281 cancel breakpoints.
10282 (cmd_qtstart): Pause threads.
10283 (stop_tracing): Pause threads, and cancel breakpoints.
10284 * win32-low.c (win32_target_ops): Adjust.
10285
10286 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10287
10288 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10289 the inferior right away from here...
10290 (linux_wait_1): ... to here, and adjust to check the thread's
10291 last_resume_kind instead of the lwp's step or stop_expected flags.
10292
10293 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10294
10295 * README: Use consistent `GDB' and `GDBserver' spellings.
10296
10297 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10298
10299 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10300 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10301 (linux_detach_one_lwp): Assume the lwp is stopped.
10302 (any_thread_of): Delete.
10303 (linux_detach): Stop all lwps here. Don't blindly delete all
10304 breakpoints.
10305 (delete_lwp_callback): New.
10306 (linux_mourn): Delete all lwps of the process that is gone.
10307 (linux_wait_1): Don't delete the last lwp of the process here.
10308 * mem-break.h (mark_breakpoints_out): Declare.
10309 * mem-break.c (mark_breakpoints_out): New.
10310 (free_all_breakpoints): Use it.
10311 * server.c (handle_target_event): If the process is gone, mark
10312 breakpoints out.
10313 * thread-db.c (struct thread_db) <create_bp>: New field.
10314 (thread_db_enable_reporting): Fix prototype. Store a thread event
10315 breakpoint reference in the thread_db struct.
10316 (thread_db_load_search): Clear the thread_db object.
10317 (try_thread_db_load_1): Ditto.
10318 (switch_to_process): New.
10319 (disable_thread_event_reporting): Use it.
10320 (remove_thread_event_breakpoints): New.
10321 (thread_db_detach, thread_db_mourn): Use it.
10322
10323 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10324
10325 * linux-low.c (linux_enable_event_reporting): New.
10326 (linux_wait_for_event_1, handle_extended_wait): Use it.
10327
10328 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10329
10330 * linux-low.c (linux_kill_one_lwp, linux_kill)
10331 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10332 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10333 SIGSTOP even if the LWP is stopped.
10334 (send_sigstop_callback): New.
10335 (stop_all_lwps): Use send_sigstop_callback instead.
10336 (linux_resume_one_thread): Adjust.
10337 (proceed_one_lwp): Still proceed an LWP that the client has
10338 requested to stop, if we haven't reported it as stopped yet. Make
10339 sure that LWPs the client want stopped, have a pending SIGSTOP.
10340
10341 2010-04-26 Doug Evans <dje@google.com>
10342
10343 * server.c (handle_general_set): Make static.
10344
10345 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10346 Print received char after testing for error/eof instead of before.
10347 (input_interrupt): Tweak comment.
10348
10349 2010-04-23 Doug Evans <dje@google.com>
10350
10351 * server.c (start_inferior): Print inferior argv if --debug.
10352
10353 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10354
10355 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10356 * nto-x86-low.c: Include server.h
10357
10358 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10359
10360 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10361 be consistent with other sources of this directory.
10362 (init_registers_amd64): Correct name of source file of this function
10363 in the comment.
10364
10365 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10366
10367 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10368 64-bit executables.
10369
10370 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10371
10372 * win32-i386-low.c: Add 64-bit support.
10373 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10374 (init_registers_amd64): Declare.
10375 (mappings): Add 64-bit version of array.
10376 (init_windows_x86): New function.
10377 (the_low_target): Change init_arch field to init_windows_x86.
10378
10379 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10380
10381 * win32-low.c: Adapt to support also 64-bit architecture.
10382 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10383 (get_image_name): Use SIZE_T type for local variable `done'.
10384 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10385 (toolhelp_get_dll_name): Idem.
10386 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10387 Use uintptr_t typecast to avoid warning.
10388 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10389 (handle_exception): Use phex_nz to avoid warning.
10390 (win32_wait): Remove unused local variable `process'.
10391
10392 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10393
10394 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10395 `amd64-avx.o'.
10396
10397 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10398
10399 * configure.ac: Use `ws2_32' library for srv_mingw.
10400 * configure: Regenerate.
10401 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10402 * remote-utils.c: Likewise.
10403
10404 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10405
10406 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10407 if __x86_64__ is defined.
10408
10409 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10410
10411 * configure: Regenerate.
10412
10413 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10414
10415 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10416 * target.h (target_ops): New get_tib_address field.
10417 * win32-low.h (win32_thread_info): Add thread_local_base field.
10418 * win32-low.c (child_add_thread): Add tlb argument.
10419 Set thread_local_base field to TLB.
10420 (get_child_debug_event): Adapt to child_add_thread change.
10421 (win32_get_tib_address): New function.
10422 (win32_target_ops): Set get_tib_address field to
10423 win32_get_tib_address.
10424 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10425
10426 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10427
10428 * linux-low.c (linux_mourn): Also remove the process.
10429 * server.c (handle_target_event): Don't remove the process here.
10430 * nto-low.c (nto_mourn): New.
10431 (nto_target_ops): Install it.
10432 * spu-low.c (spu_mourn): New.
10433 (spu_target_ops): Install it.
10434 * win32-low.c (win32_mourn): New.
10435 (win32_target_ops): Install it.
10436
10437 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10438
10439 * server.h (buffer_xml_printf): Remove redundant `;'.
10440
10441 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10442
10443 * regcache.c (set_register_cache): Invalidate regcaches before
10444 changing the register cache layout.
10445 (regcache_invalidate_one): Allow a NULL regcache.
10446 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10447 regcaches before changing the register cache layout or the target
10448 regsets.
10449
10450 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10451
10452 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10453 variable warning on Linux/x86-64.
10454
10455 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10456
10457 GDBserver disconnected tracing support.
10458
10459 * linux-low.c (linux_remove_process): Delete.
10460 (add_lwp): Don't set last_resume_kind here.
10461 (linux_kill): Use `mourn'.
10462 (linux_detach): Use `thread_db_detach', and `mourn'.
10463 (linux_mourn): New.
10464 (linux_attach_lwp_1): Adjust comment.
10465 (linux_attach): last_resume_kind moved the thread_info; adjust.
10466 (status_pending_p_callback): Adjust.
10467 (linux_wait_for_event_1): Adjust.
10468 (count_events_callback, select_singlestep_lwp_callback)
10469 (select_event_lwp_callback, cancel_breakpoints_callback)
10470 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10471 (proceed_one_lwp): Adjust.
10472 (linux_async): Add debug output.
10473 (linux_thread_stopped): New.
10474 (linux_pause_all): New.
10475 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10476 linux_pause_all.
10477 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10478 (thread_db_free): Delete declaration.
10479 (thread_db_detach, thread_db_mourn): Declare.
10480 * thread-db.c (thread_db_init): Use thread_db_mourn.
10481 (thread_db_free): Delete, split in two.
10482 (disable_thread_event_reporting): New.
10483 (thread_db_detach): New.
10484 (thread_db_mourn): New.
10485
10486 * server.h (struct thread_info) <last_resume_kind>: New field.
10487 <attached>: Add comment.
10488 <gdb_detached>: New field.
10489 (handler_func): Change return type to int.
10490 (handle_serial_event, handle_target_event): Ditto.
10491 (gdb_connected): Declare.
10492 (tracing): Delete.
10493 (disconnected_tracing): Declare.
10494 (stop_tracing): Declare.
10495
10496 * server.c (handle_query) <qSupported>: Report support for
10497 disconnected tracing.
10498 (queue_stop_reply_callback): Account for running threads.
10499 (gdb_wants_thread_stopped): New.
10500 (gdb_wants_all_threads_stopped): New.
10501 (gdb_reattached_process): New.
10502 (handle_status): Clear the `gdb_detached' flag of all processes.
10503 In all-stop, stop all threads.
10504 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10505 (process_serial_event): If the remote connection breaks, or if an
10506 exit was forced with "monitor exit", force an event loop exit.
10507 Handle disconnected tracing on detach.
10508 (handle_serial_event): Adjust.
10509 (handle_target_event): If GDB isn't connected, forward events back
10510 to the inferior, unless the last process exited, in which case,
10511 exit gdbserver. Adjust interface.
10512
10513 * remote-utils.c (remote_open): Don't block in accept. Instead
10514 register an event loop source on the listen socket file
10515 descriptor. Refactor bits into ...
10516 (listen_desc): ... this new global.
10517 (gdb_connected): ... this new function.
10518 (enable_async_notification): ... this new function.
10519 (handle_accept_event): ... this new function.
10520 (remote_close): Clear remote_desc.
10521
10522 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10523
10524 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10525 New fields.
10526 (mourn_inferior): Define.
10527 (target_process_qsupported): Avoid the dangling else problem.
10528 (thread_stopped): Define.
10529 (pause_all): Define.
10530 (target_waitstatus_to_string): Declare.
10531 * target.c (target_waitstatus_to_string): New.
10532
10533 * tracepoint.c (tracing): Make extern.
10534 (disconnected_tracing): New.
10535 (stop_tracing): Make extern. Handle tracing stops due to GDB
10536 disconnecting.
10537 (cmd_qtdisconnected): New.
10538 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10539 (handle_tracepoint_general_set): Handle QTDisconnected.
10540
10541 * event-loop.c (event_handler_func): Change return type to int.
10542 (process_event): Bail out if the event handler wants the event
10543 loop to stop.
10544 (handle_file_event): Ditto.
10545 (start_event_loop): Bail out if the event handler wants the event
10546 loop to stop.
10547
10548 * nto-low.c (nto_target_ops): Adjust.
10549 * spu-low.c (spu_wait): Don't remove the process here.
10550 (spu_target_ops): Adjust.
10551 * win32-low.c (win32_wait): Don't remove the process here.
10552 (win32_target_ops): Adjust.
10553
10554 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10555
10556 * regcache.c (realloc_register_cache): Invalidate inferior's
10557 regcache before recreating it.
10558
10559 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10560
10561 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10562
10563 2010-04-09 Stan Shebs <stan@codesourcery.com>
10564 Pedro Alves <pedro@codesourcery.com>
10565
10566 * server.h (LONGEST): New.
10567 (struct thread_info) <while_stepping>: New field.
10568 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10569 Declare.
10570 (initialize_tracepoint, handle_tracepoint_general_set)
10571 (handle_tracepoint_query, tracepoint_finished_step)
10572 (tracepoint_was_hit, release_while_stepping_state_list):
10573 (current_traceframe): Declare.
10574 * server.c (handle_general_set): Handle tracepoint packets.
10575 (read_memory): New.
10576 (write_memory): New.
10577 (handle_search_memory_1): Use read_memory.
10578 (handle_query): Report support for conditional tracepoints, trace
10579 state variables, and tracepoint sources. Handle tracepoint
10580 queries.
10581 (main): Initialize the tracepoints module.
10582 (process_serial_event): Handle traceframe reads/writes.
10583
10584 * linux-low.c (handle_tracepoints): New.
10585 (linux_wait_1): Call it.
10586 (linux_resume_one_lwp): Handle while-stepping.
10587 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10588 (linux_target_ops): Install them.
10589 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10590 New field.
10591 * linux-x86-low.c (x86_supports_tracepoints): New.
10592 (the_low_target). Install it.
10593
10594 * mem-break.h (delete_breakpoint): Declare.
10595 * mem-break.c (delete_breakpoint): Make external.
10596
10597 * target.h (struct target_ops): Add `supports_tracepoints',
10598 `read_pc', and `write_pc' fields.
10599 (target_supports_tracepoints): Define.
10600 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10601 (phex_nz): New.
10602
10603 * regcache.h (struct regcache) <registers_owned>: New field.
10604 (init_register_cache, regcache_cpy): Declare.
10605 (regcache_read_pc, regcache_write_pc): Declare.
10606 (register_cache_size): Declare.
10607 (supply_regblock): Declare.
10608 * regcache.c (init_register_cache): New.
10609 (new_register_cache): Use it.
10610 (regcache_cpy): New.
10611 (register_cache_size): New.
10612 (supply_regblock): New.
10613 (regcache_read_pc, regcache_write_pc): New.
10614
10615 * tracepoint.c: New.
10616
10617 * Makefile.in (OBS): Add tracepoint.o.
10618 (tracepoint.o): New rule.
10619
10620 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10621
10622 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10623 (i386-mmx.o): New.
10624 (i386-mmx.c): Likewise.
10625 (i386-mmx-linux.o): Likewise.
10626 (i386-mmx-linux.c): Likewise.
10627
10628 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10629 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10630 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10631 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10632
10633 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10634 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10635 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10636
10637 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10638
10639 * Makefile.in (clean): Updated.
10640 (i386-avx.o): New.
10641 (i386-avx.c): Likewise.
10642 (i386-avx-linux.o): Likewise.
10643 (i386-avx-linux.c): Likewise.
10644 (amd64-avx.o): Likewise.
10645 (amd64-avx.c): Likewise.
10646 (amd64-avx-linux.o): Likewise.
10647 (amd64-avx-linux.c): Likewise.
10648
10649 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10650 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10651 (srv_amd64_regobj): Add amd64-avx.o.
10652 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10653 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10654 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10655 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10656 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10657 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10658 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10659
10660 * i387-fp.c: Include "i386-xstate.h".
10661 (i387_xsave): New.
10662 (i387_cache_to_xsave): Likewise.
10663 (i387_xsave_to_cache): Likewise.
10664 (x86_xcr0): Likewise.
10665
10666 * i387-fp.h (i387_cache_to_xsave): Likewise.
10667 (i387_xsave_to_cache): Likewise.
10668 (x86_xcr0): Likewise.
10669
10670 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10671 * linux-crisv32-low.c (target_regsets): Likewise.
10672 * linux-m68k-low.c (target_regsets): Likewise.
10673 * linux-mips-low.c (target_regsets): Likewise.
10674 * linux-ppc-low.c (target_regsets): Likewise.
10675 * linux-s390-low.c (target_regsets): Likewise.
10676 * linux-sh-low.c (target_regsets): Likewise.
10677 * linux-sparc-low.c (target_regsets): Likewise.
10678 * linux-xtensa-low.c (target_regsets): Likewise.
10679
10680 * linux-low.c: Include <sys/uio.h>.
10681 (regsets_fetch_inferior_registers): Support nt_type.
10682 (regsets_store_inferior_registers): Likewise.
10683 (linux_process_qsupported): New.
10684 (linux_target_ops): Add linux_process_qsupported.
10685
10686 * linux-low.h (regset_info): Add nt_type.
10687 (linux_target_ops): Add process_qsupported.
10688
10689 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10690 and <sys/uio.h>.
10691 (init_registers_i386_avx_linux): New.
10692 (init_registers_amd64_avx_linux): Likewise.
10693 (xmltarget_i386_linux_no_xml): Likewise.
10694 (xmltarget_amd64_linux_no_xml): Likewise.
10695 (PTRACE_GETREGSET): Likewise.
10696 (PTRACE_SETREGSET): Likewise.
10697 (x86_fill_xstateregset): Likewise.
10698 (x86_store_xstateregset): Likewise.
10699 (use_xml): Likewise.
10700 (x86_linux_update_xmltarget): Likewise.
10701 (x86_linux_process_qsupported): Likewise.
10702 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10703 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10704 init_registers_i386_linux here. Call
10705 x86_linux_update_xmltarget.
10706 (the_low_target): Add x86_linux_process_qsupported.
10707
10708 * server.c (handle_query): Call target_process_qsupported.
10709
10710 * target.h (target_ops): Add process_qsupported.
10711 (target_process_qsupported): New.
10712
10713 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10714
10715 * inferiors.c (add_thread): Set last_status kind to
10716 TARGET_WAITKIND_IGNORE.
10717 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10718 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10719 (linux_wait_1): Move `thread' local definition to block that uses
10720 it. Don't NULL initialize `event_child'.
10721 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10722 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10723 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10724
10725 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10726
10727 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10728 an extended waitstatus, or by a watchpoint.
10729 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10730 thread was stepping or has been stopped by a watchpoint.
10731
10732 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10733
10734 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10735 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10736 of another, then delete the previous, and validate all
10737 breakpoints.
10738 (validate_inserted_breakpoint): New.
10739 (delete_disabled_breakpoints): New.
10740 (validate_breakpoints): New.
10741 (check_mem_read): Validate breakpoints before trusting their
10742 shadow. Delete disabled breakpoints.
10743 (check_mem_write): Validate breakpoints before trusting they
10744 should be inserted. Delete disabled breakpoints.
10745 * mem-break.h (validate_breakpoints):
10746 * server.c (handle_query): Validate breakpoints when we see a
10747 qSymbol query.
10748
10749 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10750
10751 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10752 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10753 if we could tell there's a GDB breakpoint at stop_pc.
10754 (need_step_over_p): Don't do a step over if we find a GDB
10755 breakpoint at the resume PC.
10756
10757 * mem-break.c (struct raw_breakpoint): New.
10758 (enum bkpt_type): New type `gdb_breakpoint'.
10759 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10760 fields. New field `raw'.
10761 (find_raw_breakpoint_at): New.
10762 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10763 breakpoint instead.
10764 (set_breakpoint_at): Adjust.
10765 (delete_raw_breakpoint): New.
10766 (release_breakpoint): New.
10767 (delete_breakpoint): Rename to...
10768 (delete_breakpoint_1): ... this. Add proc parameter. Use
10769 release_breakpoint. Return ENOENT.
10770 (delete_breakpoint): Reimplement.
10771 (find_breakpoint_at): Delete.
10772 (find_gdb_breakpoint_at): New.
10773 (delete_breakpoint_at): Delete.
10774 (set_gdb_breakpoint_at): New.
10775 (delete_gdb_breakpoint_at): New.
10776 (gdb_breakpoint_here): New.
10777 (set_reinsert_breakpoint): Use release_breakpoint.
10778 (uninsert_breakpoint): Rename to ...
10779 (uninsert_raw_breakpoint): ... this.
10780 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10781 (reinsert_raw_breakpoint): Change parameter type to
10782 raw_breakpoint.
10783 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10784 instead.
10785 (check_breakpoints): Adjust. Use release_breakpoint.
10786 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10787 (breakpoint_inserted_here): Ditto.
10788 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10789 Don't trust the breakpoint's shadow if it is not inserted.
10790 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10791 (delete_all_breakpoints): Adjust.
10792 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10793 use delete_breakpoint_1.
10794
10795 * mem-break.h (breakpoints_supported): Delete declaration.
10796 (set_gdb_breakpoint_at): Declare.
10797 (gdb_breakpoint_here): Declare.
10798 (delete_breakpoint_at): Delete.
10799 (delete_gdb_breakpoint_at): Declare.
10800
10801 * server.h (struct raw_breakpoint): Forward declare.
10802 (struct process_info): New field `raw_breakpoints'.
10803
10804 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10805 breakpoints.
10806
10807 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10808
10809 * linux-low.c (status_pending_p_callback): Fix comment.
10810 (linux_wait_for_event_1): Move most of the internal breakpoint
10811 handling from here...
10812 (linux_wait_1): ... to here.
10813 (count_events_callback): New.
10814 (select_singlestep_lwp_callback): New.
10815 (select_event_lwp_callback): New.
10816 (cancel_breakpoints_callback): New.
10817 (select_event_lwp): New.
10818 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10819 priority to all LWPs that have had events that should be reported
10820 to the client. Cancel breakpoints when about to reporting the
10821 event to the client, not while stopping lwps. No longer cancel
10822 finished single-steps here.
10823 (cancel_finished_single_step): Delete.
10824 (cancel_finished_single_steps): Delete.
10825
10826 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10827
10828 * mem-break.c (enum bkpt_type): New.
10829 (struct breakpoint): New field `type'.
10830 (set_breakpoint_at): Change return type to struct breakpoint
10831 pointer. Set type to `other_breakpoint' by default.
10832 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10833 in the breakpoint list.
10834 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10835 (reinsert_breakpoint): Rename to ...
10836 (reinsert_raw_breakpoint): ... this.
10837 (reinsert_breakpoints_at): Adjust.
10838 * mem-break.h (struct breakpoint): Declare.
10839 (set_breakpoint_at): Change return type to struct breakpoint
10840 pointer.
10841
10842 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10843
10844 * server.c (handle_query): Assign, not compare.
10845
10846 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10847
10848 Teach linux gdbserver to step-over-breakpoints.
10849
10850 * linux-low.c (can_hardware_single_step): New.
10851 (supports_breakpoints): New.
10852 (handle_extended_wait): If stopping threads, read the stop pc of
10853 the new cloned LWP.
10854 (get_pc): New.
10855 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10856 low target doesn't support retrieving the PC.
10857 (add_lwp): Set last_resume_kind to resume_continue.
10858 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10859 (linux_attach): Don't clear stop_expected. Set the lwp's
10860 last_resume_kind to resume_stop.
10861 (linux_detach_one_lwp): Don't check for removed breakpoints.
10862 (check_removed_breakpoint): Delete.
10863 (status_pending_p): Rename to ...
10864 (status_pending_p_callback): ... this. Don't check for removed
10865 breakpoints. Don't consider threads that are stopped from GDB's
10866 perspective.
10867 (linux_wait_for_lwp): Always read the stop_pc here.
10868 (cancel_breakpoint): New.
10869 (step_over_bkpt): New global.
10870 (linux_wait_for_event_1): Implement stepping over breakpoints.
10871 (gdb_wants_lwp_stopped): New.
10872 (gdb_wants_all_stopped): New.
10873 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10874 single-step traps here. Store the thread's last reported target
10875 wait status.
10876 (send_sigstop): Don't clear stop_expected. Always set it,
10877 instead.
10878 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10879 (cancel_finished_single_step): New.
10880 (cancel_finished_single_steps): New.
10881 (wait_for_sigstop): Don't cancel finished single-step traps here.
10882 (linux_resume_one_lwp): Don't check for removed breakpoints.
10883 Don't set `step' on non-hardware step archs.
10884 (linux_set_resume_request): Ignore resume_stop requests if already
10885 stopping or stopped. Set the lwp's last_resume_kind.
10886 (resume_status_pending_p): Don't check for removed breakpoints.
10887 (need_step_over_p): New.
10888 (start_step_over): New.
10889 (finish_step_over): New.
10890 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10891 requests. Clear the thread's last reported target waitstatus.
10892 Don't use the `suspended' flag. Don't consider pending breakpoints.
10893 (linux_resume): Start a step-over if necessary.
10894 (proceed_one_lwp): New.
10895 (proceed_all_lwps): New.
10896 (unstop_all_lwps): New.
10897 * linux-low.h (struct lwp_info): Rewrite comment for the
10898 `suspended' flag. Add the `stop_pc' field. Delete the
10899 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10900 Add `'last_resume_kind' and `need_step_over' fields.
10901 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10902 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10903 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10904 (set_raw_breakpoint_at): New.
10905 (set_breakpoint_at): Rewrite to use it.
10906 (reinsert_breakpoint_handler): Delete.
10907 (set_reinsert_breakpoint): New.
10908 (reinsert_breakpoint_by_bp): Delete.
10909 (delete_reinsert_breakpoints): New.
10910 (uninsert_breakpoint): Rewrite.
10911 (uninsert_breakpoints_at): New.
10912 (reinsert_breakpoint): Rewrite.
10913 (reinsert_breakpoints_at): New.
10914 (check_breakpoints): Rewrite.
10915 (breakpoint_here): New.
10916 (breakpoint_inserted_here): New.
10917 (check_mem_read): Adjust.
10918 * mem-break.h (breakpoints_supported, breakpoint_here)
10919 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10920 (reinsert_breakpoint_by_bp): Delete declaration.
10921 (delete_reinsert_breakpoints): Declare.
10922 (reinsert_breakpoint): Delete declaration.
10923 (reinsert_breakpoints_at): Declare.
10924 (uninsert_breakpoint): Delete declaration.
10925 (uninsert_breakpoints_at): Declare.
10926 (check_breakpoints): Adjust prototype.
10927 * server.h: Adjust include order.
10928 (struct thread_info): Declare here. Add a `last_status' field.
10929
10930 2010-03-23 Michael Snyder <msnyder@vmware.com>
10931
10932 * server.c (crc32): New function.
10933 (handle_query): Add handling for 'qCRC:' request.
10934
10935 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10936
10937 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10938 lwp had been stopped by a watchpoint.
10939
10940 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10941
10942 * server.h (internal_error): Declare.
10943 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10944 * utils.c (internal_error): New function.
10945
10946 2010-03-15 Andreas Schwab <schwab@redhat.com>
10947
10948 * configure.srv: Fix typo setting srv_regobj.
10949
10950 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10951
10952 * linux-low.c (fetch_register): Avoid passing a non string literal
10953 format to `error'.
10954 (usr_store_inferior_registers): Ditto.
10955
10956 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10957
10958 * linux-low.c (linux_write_memory): Bail out early if peeking
10959 memory failed.
10960
10961 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10962
10963 * linux-low.h (struct lwp_info): New fields
10964 `stopped_by_watchpoint' and `stopped_data_address'.
10965 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10966 here, and cache them in the lwp object.
10967 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10968 directly.
10969 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10970 field.
10971 (linux_stopped_by_watchpoint): Rewrite.
10972 (linux_stopped_data_address): Rewrite.
10973
10974 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10975
10976 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10977 switching the current inferior, not before.
10978
10979 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10980
10981 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10982 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10983 i386-linux.c and amd64-linux.c.
10984 (reg-i386.o): Removed.
10985 (reg-i386.c): Likewise.
10986 (reg-i386-linux.o): Likewise.
10987 (reg-i386-linux.c): Likewise.
10988 (reg-x86-64.o): Likewise.
10989 (reg-x86-64.c): Likewise.
10990 (reg-x86-64-linux.o): Likewise.
10991 (reg-x86-64-linux.c): Likewise.
10992 (i386.o): New.
10993 (i386.c): Likewise.
10994 (i386-linux.o): Likewise.
10995 (i386-linux.c): Likewise.
10996 (amd64.o): Likewise.
10997 (amd64.c): Likewise.
10998 (amd64-linux.o): Likewise.
10999 (amd64-linux.c): Likewise.
11000
11001 * configure.srv (srv_i386_regobj): New.
11002 (srv_i386_linux_regobj): Likewise.
11003 (srv_amd64_regobj): Likewise.
11004 (srv_amd64_linux_regobj): Likewise.
11005 (srv_i386_32bit_xmlfiles): Likewise.
11006 (srv_i386_64bit_xmlfiles): Likewise.
11007 (srv_i386_xmlfiles): Likewise.
11008 (srv_amd64_xmlfiles): Likewise.
11009 (srv_i386_linux_xmlfiles): Likewise.
11010 (srv_amd64_linux_xmlfiles): Likewise.
11011 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11012 srv_xmlfiles to $srv_i386_xmlfiles.
11013 (i[34567]86-*-mingw32ce*): Likewise.
11014 (i[34567]86-*-mingw*): Likewise.
11015 (i[34567]86-*-nto*): Likewise.
11016 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11017 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11018 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11019 (x86_64-*-linux*): Likewise.
11020
11021 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11022 (init_registers_amd64_linux): New.
11023 (x86_arch_setup): Replace init_registers_x86_64_linux with
11024 init_registers_amd64_linux.
11025
11026 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11027
11028 * configure.ac: Check for libdl. If it is not available link against
11029 static libthread_db.
11030 * configure: Regenerate.
11031
11032 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11033
11034 PR9605
11035
11036 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11037 handing a read watchpoint.
11038 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11039
11040 2010-02-12 Doug Evans <dje@google.com>
11041
11042 * linux-low.c (linux_supports_tracefork_flag): Document.
11043 (linux_look_up_symbols): Add comment.
11044
11045 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11046
11047 * regcache.c (supply_register): Clear regcache if buf is NULL.
11048
11049 2010-02-02 Nicolas Roche <roche@sourceware.org>
11050 Joel Brobecker <brobecker@adacore.com>
11051
11052 * inferiors.c (find_inferior): Add function documentation.
11053 (unloaded_dll): Handle the case where the unloaded dll has not
11054 been previously registered in the dll list.
11055
11056 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11057
11058 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11059 (thumb2_breakpoint): New.
11060 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11061
11062 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11063
11064 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11065 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11066 breakpoints.
11067
11068 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11069
11070 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11071
11072 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11073
11074 * linux-s390-low.c (s390_collect_ptrace_register)
11075 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11076
11077 2010-01-21 Doug Evans <dje@google.com>
11078
11079 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11080 (PTRACE_ARG4_TYPE): New macro.
11081 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11082 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11083 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11084 (usr_store_inferior_registers): Ditto.
11085 (linux_read_memory, linux_write_memory): Ditto.
11086 (linux_test_for_tracefork): Ditto.
11087
11088 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11089 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11090
11091 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11092
11093 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11094 target.
11095
11096 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11097
11098 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11099 prototype to take a regcache. Adjust.
11100
11101 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11102
11103 * regcache.h (struct thread_info): Forward declare.
11104 (struct regcache): New.
11105 (new_register_cache): Adjust prototype.
11106 (get_thread_regcache): Declare.
11107 (free_register_cache): Adjust prototype.
11108 (registers_to_string, registers_from_string): Ditto.
11109 (supply_register, supply_register_by_name, collect_register)
11110 (collect_register_as_string, collect_register_by_name): Ditto.
11111 * regcache.c (struct inferior_regcache_data): Delete.
11112 (get_regcache): Rename to ...
11113 (get_thread_regcache): ... this. Adjust. Switch inferior before
11114 fetching registers.
11115 (regcache_invalidate_one): Adjust.
11116 (regcache_invalidate): Fix prototype.
11117 (new_register_cache): Return the new register cache.
11118 (free_register_cache): Change prototype.
11119 (realloc_register_cache): Adjust.
11120 (registers_to_string): Change prototype to take a regcache. Adjust.
11121 (registers_from_string): Ditto.
11122 (register_data): Ditto.
11123 (supply_register): Ditto.
11124 (supply_register_by_name): Ditto.
11125 (collect_register): Ditto.
11126 (collect_register_as_string): Ditto.
11127 (collect_register_by_name): Ditto.
11128 * server.c (process_serial_event): Adjust.
11129 * linux-low.h (regset_fill_func, regset_store_func): Change
11130 prototype.
11131 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11132 Change prototype.
11133 * linux-low.c (get_stop_pc): Adjust.
11134 (check_removed_breakpoint): Adjust.
11135 (linux_wait_for_event): Adjust.
11136 (linux_resume_one_lwp): Adjust.
11137 (fetch_register): Add regcache parameter. Adjust.
11138 (usr_store_inferior_registers): Ditto.
11139 (regsets_fetch_inferior_registers): Ditto.
11140 (regsets_store_inferior_registers): Ditto.
11141 (linux_fetch_registers, linux_store_registers): Ditto.
11142 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11143 regcache. Adjust.
11144 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11145 Ditto.
11146 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11147 prototype to take a regcache.
11148 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11149 * remote-utils.c (convert_ascii_to_int, outreg)
11150 (prepare_resume_reply): Change prototype to take a regcache.
11151 Adjust.
11152 * target.h (struct target_ops) <fetch_registers, store_registers>:
11153 Change prototype to take a regcache.
11154 (fetch_inferior_registers, store_inferior_registers): Change
11155 prototype to take a regcache. Adjust.
11156 * proc-service.c (ps_lgetregs): Adjust.
11157 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11158 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11159 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11160 take a regcache. Adjust.
11161 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11162 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11163 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11164 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11165 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11166 (cris_cannot_fetch_register):
11167 (cris_breakpoint_at): Change prototype to take a regcache.
11168 Adjust.
11169 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11170 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11171 to take a regcache. Adjust.
11172 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11173 Adjust.
11174 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11175 take a regcache. Adjust.
11176 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11177 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11178 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11179 * linux-mips-low.c (mips_get_pc):
11180 (mips_set_pc): Change prototype to take a regcache. Adjust.
11181 (mips_reinsert_addr): Adjust.
11182 (mips_collect_register): Change prototype to take a regcache.
11183 Adjust.
11184 (mips_supply_register):
11185 (mips_collect_register_32bit, mips_supply_register_32bit)
11186 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11187 (mips_store_fpregset): Ditto.
11188 * linux-ppc-low.c (ppc_supply_ptrace_register)
11189 (ppc_supply_ptrace_register): Ditto.
11190 (parse_spufs_run): Adjust.
11191 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11192 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11193 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11194 take a regcache. Adjust.
11195 * linux-s390-low.c (s390_collect_ptrace_register)
11196 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11197 (s390_set_pc): Change prototype to take a regcache. Adjust.
11198 (s390_arch_setup): Adjust.
11199 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11200 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11201 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11202 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11203 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11204 regcache. Adjust.
11205 (sparc_breakpoint_at): Adjust.
11206 * linux-xtensa-low.c (xtensa_fill_gregset):
11207 (xtensa_store_gregset):
11208 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11209 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11210 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11211 prototype to take a regcache. Adjust.
11212 * win32-arm-low.c (arm_fetch_inferior_register)
11213 (arm_store_inferior_register): Change prototype to take a
11214 regcache. Adjust.
11215 * win32-i386-low.c (i386_fetch_inferior_register)
11216 (i386_store_inferior_register): Change prototype to take a
11217 regcache. Adjust.
11218 * win32-low.c (child_fetch_inferior_registers)
11219 (child_store_inferior_registers): Change prototype to take a
11220 regcache. Adjust.
11221 (win32_wait): Adjust.
11222 (win32_fetch_inferior_registers): Change prototype to take a
11223 regcache. Adjust.
11224 (win32_store_inferior_registers): Adjust.
11225 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11226 store_inferior_register>: Change prototype to take a regcache.
11227
11228 2010-01-20 Doug Evans <dje@google.com>
11229
11230 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11231 #ifdef.
11232 (linux_wait_for_event1, linux_init_signals): Ditto.
11233 (W_STOPCODE): Provide definition if missing.
11234
11235 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11236
11237 * linux-low.c (linux_core_of_thread): New.
11238 (compare_ints, show_process, list_threads): New.
11239 (linux_qxfer_osdata): Report threads and cores.
11240 (linux_target_op): Register linux_core_of_thread.
11241 * remote-utils.c (prepare_resume_reply): Report the core.
11242 (buffer_xml_printf): Support %d specifier.
11243 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11244 New.
11245 (handle_query): Handle qXfer:threads. Announce availability
11246 thereof.
11247 * target.h (struct target_ops): New field core_of_thread.
11248
11249 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11250
11251 * Makefile.in (clean): Remove new generated files.
11252 (reg-s390.o, reg-s390.c): Remove rules.
11253 (reg-s390x.o, reg-s390x.c): Likewise.
11254 (s390-linux32.o, s390-linux32.c): Add rules.
11255 (s390-linux64.o, s390-linux64.c): Likewise.
11256 (s390x-linux64.o, s390x-linux64.c): Likewise.
11257 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11258 * linux-s390-low.c: Include <elf.h>.
11259 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11260 (init_registers_s390): Remove prototype.
11261 (init_registers_s390x): Likewise.
11262 (init_registers_s390_linux32): Add prototype.
11263 (init_registers_s390_linux64): Likewise.
11264 (init_registers_s390x_linux64): Likewise.
11265 (s390_num_regs_3264): New define.
11266 (s390_regmap_3264): New global variable.
11267 (s390_cannot_fetch_register): Remove obsolete check.
11268 (s390_cannot_store_register): Likewise.
11269 (s390_collect_ptrace_register): Handle upper/lower register halves.
11270 (s390_supply_ptrace_register): Likewise.
11271 (s390_fill_gregset): Update to register number changes.
11272 (s390_get_hwcap): New routine.
11273 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11274 Install appropriate regmap and register set.
11275
11276 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11277
11278 * server.c (gdbserver_version): Update copyright year to 2010.
11279 * gdbreplay.c (gdbreplay_version): Likewise.
11280
11281 2009-12-28 Doug Evans <dje@google.com>
11282
11283 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11284 elf/external.h. Include <elf.h> instead but only if necessary.
11285
11286 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11287
11288 * linux-low.c (linux_remove_process): Remove `detaching'
11289 parameter. Don't release/detach from thread_db here.
11290 (linux_kill): Release/detach from thread_db here, ...
11291 (linux_detach): ... and here, before actually detaching.
11292 (linux_wait_1): ... and here, when a process exits.
11293 * thread-db.c (any_thread_of): New.
11294 (thread_db_free): Switch the current inferior to a thread of the
11295 passed in process.
11296
11297 2009-12-21 Doug Evans <dje@google.com>
11298
11299 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11300
11301 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11302 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11303 warning ifndef __NR_tkill. Move setting of errno there too.
11304 Delete unnecessary resetting of errno after syscall.
11305 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11306
11307 * configure.ac: Check for dladdr.
11308 * config.in: Regenerate.
11309 * configure: Regenerate.
11310 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11311 (try_thread_db_load): Update.
11312
11313 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11314
11315 2009-12-18 Doug Evans <dje@google.com>
11316
11317 * event-loop.c: Include unistd.h if it exists.
11318
11319 * linux-low.c (my_waitpid): Move definition away from being in
11320 between linux_tracefork_child/linux_test_for_tracefork.
11321
11322 * gdb_proc_service.h (psaddr_t): Fix type.
11323 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11324 signature to match glibc.
11325
11326 2009-12-16 Doug Evans <dje@google.com>
11327
11328 * linux-low.c (linux_read_memory): Fix argument to read.
11329
11330 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11331
11332 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11333 events, don't leave current_inferior pointing at null.
11334
11335 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11336
11337 * win32-low.c (LOG): Delete.
11338 (OUTMSG): Output to stderr.
11339 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11340 on compile time LOG macro.
11341 (win32_wait): Fix debug output.
11342
11343 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11344
11345 * win32-low.c (win32_add_one_solib): If the dll name is
11346 "ntdll.dll", prepend the system directory to the dll path.
11347
11348 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11349
11350 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11351
11352 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11353 Vladimir Prus <vladimir@codesourcery.com>
11354
11355 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11356 * configure.ac: Check for __mcoldfire__ and set
11357 gdb_cv_m68k_is_coldfire.
11358 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11359 reg-cf.o and reg-m68k.o.
11360 * configure: Regenerated.
11361
11362 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11363
11364 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11365 Pass it to thread_db_free.
11366 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11367 proper `detaching' argument to linux_remove_process.
11368 * linux-low.h (thread_db_free): Add `detaching' parameter.
11369 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11370 to thread_db_free.
11371 (thread_db_free): Add `detaching' parameter. Only
11372 call td_ta_clear_event if detaching from process.
11373
11374 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11375
11376 * thread-db.c (thread_db_free): Fix typo.
11377
11378 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11379
11380 PR gdb/10838
11381 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11382
11383 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11384
11385 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11386 with an i686 compiler.
11387 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11388 needed.
11389 * configure: Rebuilt.
11390
11391 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11392
11393 PR gdb/10783
11394
11395 * server.c (handle_search_memory_1): Correct read_addr initialization
11396 in loop for searching subsequent chunks.
11397
11398 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11399
11400 * configure.ac: New --with-libthread-db option.
11401 * thread-db.c: Allow direct dependence on libthread_db.
11402 (thread_db_free): Adjust.
11403 * config.in: Regenerate.
11404 * configure: Likewise.
11405
11406 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11407
11408 PR gdb/10757
11409 * thread-db.c (attach_thread): New function.
11410 (maybe_attach_thread): Return success/failure.
11411 (find_new_threads_callback): Adjust.
11412 (thread_db_find_new_threads): Loop until no new threads.
11413
11414 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11415
11416 * proc-service.c (ps_lgetregs): Formatting.
11417
11418 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11419
11420 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11421 * configure.ac: Adjust.
11422 * linux-low.h (struct process_info_private): Move members to struct
11423 thread_db.
11424 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11425 * linux-low.c (linux_remove_process): Adjust.
11426 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11427 * server.c (handle_query): Move code ...
11428 (handle_monitor_command): ... here. New function.
11429 * target.h (struct target_ops): New member.
11430 * thread-db.c (struct thread_db): New.
11431 (libthread_db_search_path): New variable.
11432 (thread_db_create_event, thread_db_enable_reporting)
11433 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11434 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11435 (try_thread_db_load_1, dladdr_to_soname): New functions.
11436 (try_thread_db_load, thread_db_load_search): New functions.
11437 (thread_db_init): Search for libthread_db.
11438 (thread_db_free): New function.
11439 (thread_db_handle_monitor_command): Likewise.
11440 * config.in: Regenerate.
11441 * configure: Regenerate.
11442
11443 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11444
11445 * spu-low.c (spu_kill): Wait for inferior to terminate.
11446 Call clear_inferiors.
11447 (spu_detach): Call clear_inferiors.
11448
11449 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11450
11451 * aclocal.m4: Regenerate.
11452 * config.in: Likewise.
11453 * configure: Likewise.
11454
11455 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11456
11457 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11458 (parse_spufs_run): New function.
11459 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11460 (ppc_breakpoint_at): Handle SPU breakpoints.
11461
11462 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11463
11464 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11465 (SPUFS_MAGIC): Define.
11466 (spu_enumerate_spu_ids): New function.
11467 (linux_qxfer_spu): New function.
11468 (linux_target_ops): Install linux_qxfer_spu.
11469
11470 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11471
11472 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11473 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11474 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11475 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11476 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11477 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11478 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11479 (init_registers_powerpc_cell32l): Add prototype.
11480 (init_registers_powerpc_cell64l): Likewise.
11481 (ppc_arch_setup): Detect Cell/B.E. architecture.
11482
11483 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11484
11485 * Makefile.in (datarootdir): New variable.
11486
11487 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11488
11489 * linux-low.c (linux_write_memory): Update debugging output.
11490 * Makefile.in (clean): Add new descriptions.
11491 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11492 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11493 * configure.srv: Add new files for arm*-*-linux*.
11494 * linux-arm-low.c: Add new declarations.
11495 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11496 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11497 (HWCAP_VFPv3D16): New.
11498 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11499 instead of __IWMMXT__.
11500 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11501 (arm_arch_setup): New.
11502 (target_regsets): Remove #ifdef. Add VFP regset.
11503 (the_low_target): Use arm_arch_setup.
11504
11505 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11506
11507 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11508 the main thread again.
11509
11510 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11511
11512 Adding Neutrino gdbserver.
11513 * configure: Regenerated.
11514 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11515 * configure.srv (i[34567]86-*-nto*): New target.
11516 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11517 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11518 (nto_comctrl) [__QNX__]: New function.
11519 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11520
11521 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11522
11523 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11524 srv_tgtobj.
11525
11526 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11527 Pedro Alves <pedro@codesourcery.com>
11528
11529 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11530 don't support CONTEXT_EXTENDED_REGISTERS.
11531 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11532 (the_low_target): Install them.
11533 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11534 failing with ERROR_PIPE_NOT_CONNECTED.
11535
11536 2009-06-30 Doug Evans <dje@google.com>
11537 Pierre Muller <muller@ics.u-strasbg.fr>
11538
11539 Add h/w watchpoint support to x86-linux, win32-i386.
11540 * Makefile.in (SFILES): Add i386-low.c
11541 (i386_low_h): Define.
11542 (i386-low.o): Add dependencies.
11543 (linux-x86-low.o): Add i386-low.h dependency.
11544 (win32-i386-low.o): Ditto.
11545 * i386-low.c: New file.
11546 * i386-low.h: New file.
11547 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11548 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11549 * linux-low.c (linux_add_process): Initialize arch_private.
11550 (linux_remove_process): Free arch_private.
11551 (add_lwp): Initialize arch_private.
11552 (delete_lwp): Free arch_private.
11553 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11554 provided.
11555 * linux-low.h (process_info_private): New member arch_private.
11556 (lwp_info): New member arch_private.
11557 (linux_target_ops): New members new_process, new_thread,
11558 prepare_to_resume.
11559 (ptid_of): New macro.
11560 * linux-x86-low.c: Include stddef.h, i386-low.h.
11561 (arch_process_info): New struct.
11562 (arch_lwp_info): New struct.
11563 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11564 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11565 (i386_dr_low_get_status): New function.
11566 (x86_insert_point, x86_remove_point): New functions.
11567 (x86_stopped_by_watchpoint): New function.
11568 (x86_stopped_data_address): New function.
11569 (x86_linux_new_process, x86_linux_new_thread): New functions.
11570 (x86_linux_prepare_to_resume): New function.
11571 (the_low_target): Add entries for insert_point, remove_point,
11572 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11573 prepare_to_resume.
11574 * server.c (debug_hw_points): New global.
11575 (monitor_show_help): Document set debug-hw-points.
11576 (handle_query): Process "set debug-hw-points".
11577 * server.h (debug_hw_points): Declare.
11578 (paddress): Declare.
11579 * utils.c (NUMCELLS, CELLSIZE): New macros.
11580 (get_sell, xsnprintf, paddress): New functions.
11581 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11582 remove_point, stopped_by_watchpoint, stopped_data_address.
11583 * win32-i386-low.c: Include i386-low.h.
11584 (debug_reg_state): Replaces dr.
11585 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11586 (i386_dr_low_get_status): New function.
11587 (i386_insert_point, i386_remove_point): New functions.
11588 (i386_stopped_by_watchpoint): New function.
11589 (i386_stopped_data_address): New function.
11590 (i386_initial_stuff): Update.
11591 (get_thread_context,set_thread_context,i386_thread_added): Update.
11592 (the_low_target): Add entries for insert_point,
11593 remove_point, stopped_by_watchpoint, stopped_data_address.
11594 * win32-low.c (win32_insert_watchpoint): New function.
11595 (win32_remove_watchpoint): New function.
11596 (win32_stopped_by_watchpoint): New function.
11597 (win32_stopped_data_address): New function.
11598 (win32_target_ops): Add entries for insert_watchpoint,
11599 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11600 * win32-low.h (win32_target_ops): New members insert_point,
11601 remove_point, stopped_by_watchpoint, stopped_data_address.
11602
11603 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11604
11605 * server.c (process_serial_event): Re-return unsupported, not
11606 error, if the type isn't recognized. Re-allow supporting only
11607 insert or remove packets. Also call require_running for
11608 breakpoints. Add missing break statement to default case. Tidy.
11609 * target.h (struct target_ops): Rename insert_watchpoint to
11610 insert_point, and remove_watchpoint to remove_point.
11611
11612 * linux-low.h (struct linux_target_ops): Likewise.
11613 * linux-low.c (linux_insert_watchpoint): Rename to ...
11614 (linux_insert_point): ... this. Adjust.
11615 (linux_remove_watchpoint): Rename to ...
11616 (linux_remove_point): ... this. Adjust.
11617 (linux_target_ops): Adjust.
11618 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11619 (cris_insert_point): ... this.
11620 (cris_remove_watchpoint): Rename to ...
11621 (cris_remove_point): ... this.
11622 (the_low_target): Adjust.
11623
11624 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11625
11626 * server.c (handle_v_kill): Pass signal_pid to
11627 kill_inferior if multi_process is zero.
11628
11629 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11630
11631 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11632 * target.h (target_ops): Comment for *_watchpoint to make it clear
11633 the functions can get types '0' and '1'.
11634
11635 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11636
11637 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11638 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11639 * regcache.c (get_regcache): Likewise.
11640 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11641 * win32-low.c (child_fetch_inferior_registers): Remove check for
11642 regno 0.
11643
11644 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11645 Pedro Alves <pedro@codesourcery.com>
11646
11647 * target.h (struct target_ops) <supports_multi_process>: New
11648 callback.
11649 (target_supports_multi_process): New.
11650 * server.c (handle_query): Even if GDB reports support, only
11651 enable multi-process if the target also supports it. Report
11652 multi-process support only if the target backend supports it.
11653 * linux-low.c (linux_supports_multi_process): New function.
11654 (linux_target_ops): Install it as target_supports_multi_process
11655 callback.
11656
11657 2009-05-24 Doug Evans <dje@google.com>
11658
11659 Global renaming of find_thread_pid to find_thread_ptid.
11660 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11661 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11662 All callers updated.
11663
11664 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11665 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11666 directly.
11667
11668 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11669 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11670 (linux_resume_one_lwp): Ditto.
11671
11672 2009-05-23 Doug Evans <dje@google.com>
11673
11674 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11675 from struct inferior_list_entry * to struct lwp_info *.
11676 All callers updated.
11677
11678 2009-05-13 Doug Evans <dje@google.com>
11679
11680 * linux-x86-low.c: Don't include assert.h.
11681 (x86_siginfo_fixup): Use fatal, not assert.
11682 (x86_arch_setup): Fix comment.
11683
11684 2009-05-12 Doug Evans <dje@google.com>
11685
11686 Biarch support for i386/amd64 gdbserver.
11687 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11688 Add linux-x86-low.c.
11689 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11690 (linux-x86-low.o): Add.
11691 * linux-x86-64-low.c: Delete.
11692 * linux-i386-low.c: Delete.
11693 * linux-x86-low.c: New file.
11694 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11695 linux-x86-low.o.
11696 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11697 linux-x86-low.o.
11698 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11699 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11700 (linux_child_pid_to_exec_file): New function.
11701 (elf_64_header_p, elf_64_file_p): New functions.
11702 (siginfo_fixup): New function.
11703 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11704 give target a chance to convert layout.
11705 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11706 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11707
11708 2009-05-07 Doug Evans <dje@google.com>
11709
11710 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11711 (regsets_store_inferior_registers): Ditto.
11712
11713 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11714
11715 PR server/10048
11716
11717 * linux-low.c (must_set_ptrace_flags): Delete.
11718 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11719 of the global.
11720 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11721 `lwp->must_set_ptrace_flags' instead.
11722 (linux_wait_for_event_1): Set ptrace options here.
11723 (linux_wait_1): ... not here.
11724
11725 2009-04-30 Doug Evans <dje@google.com>
11726
11727 * inferiors.c (started_inferior_callback): New function.
11728 (attached_inferior_callback): New function.
11729 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11730 * server.c (print_started_pid, print_attached_pid): New functions.
11731 (detach_or_kill_for_exit): New function.
11732 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11733 * server.h (have_started_inferiors_p): Declare.
11734 (have_attached_inferiors_p): Declare.
11735
11736 * inferiors.c (remove_process): Fix memory leak, free process.
11737 * linux-low.c (linux_remove_process): New function.
11738 (linux_kill): Call it instead of remove_process.
11739 (linux_detach, linux_wait_1): Ditto.
11740
11741 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11742
11743 * configure.srv: Add x86 Windows CE target.
11744
11745 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11746
11747 * inferiors.c (get_thread_process): Make global.
11748 * server.h (get_thread_process): Add prototype.
11749 * thread-db.c (find_one_thread): Use get_thread_process
11750 instead of current_process.
11751 (thread_db_get_tls_address): Do not crash if called when
11752 thread layer is not yet initialized.
11753
11754 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11755
11756 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11757 * spu-low.c (current_tid): Rename to ...
11758 (current_ptid): ... this.
11759 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11760 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11761 ptid_get_lwp (current_ptid) instead of current_tid.
11762 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11763 instead of current_tid. Use find_process_pid to verify pid
11764 argument is valid. Pass proper argument to remove_process.
11765 (spu_thread_alive): Compare current_ptid instead of current_tid.
11766 (spu_resume): Likewise.
11767
11768 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11769
11770 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11771 variable.
11772
11773 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11774
11775 Implement the multiprocess extensions, and add linux multiprocess
11776 support.
11777
11778 * server.h (ULONGEST): Declare.
11779 (struct ptid, ptid_t): New.
11780 (minus_one_ptid, null_ptid): Declare.
11781 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11782 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11783 (struct inferior_list_entry): Change `id' type from unsigned from
11784 to ptid_t.
11785 (struct sym_cache, struct breakpoint, struct
11786 process_info_private): Forward declare.
11787 (struct process_info): Declare.
11788 (current_process): Declare.
11789 (all_processes): Declare.
11790 (initialize_inferiors): Declare.
11791 (add_thread): Adjust to use ptid_t.
11792 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11793 (add_process, remove_process, find_thread_pid): Declare.
11794 (find_inferior_id): Adjust to use ptid_t.
11795 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11796 (multi_process): Declare.
11797 (push_event): Adjust to use ptid_t.
11798 (read_ptid, write_ptid): Declare.
11799 (prepare_resume_reply): Adjust to use ptid_t.
11800 (clear_symbol_cache): Declare.
11801 * inferiors.c (all_processes): New.
11802 (null_ptid, minus_one_ptid): New.
11803 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11804 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11805 (add_thread): Change unsigned long to ptid. Remove gdb_id
11806 parameter. Adjust.
11807 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11808 (gdb_id_to_thread): Rename to ...
11809 (find_thread_pid): ... this. Change unsigned long to ptid.
11810 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11811 (loaded_dll, pull_pid_from_list): Adjust.
11812 (add_process, remove_process, find_process_pid)
11813 (get_thread_process, current_process, initialize_inferiors): New.
11814 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11815 (struct target_waitstatus) <related_pid>: Ditto.
11816 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11817 return type to int.
11818 (struct target_ops) <join>: Add `pid' argument.
11819 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11820 (struct target_ops) <wait>: Add `ptid' field. Change return type
11821 to ptid.
11822 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11823 (mywait): Add `ptid' argument. Change return type to ptid_t.
11824 (target_pid_to_str): Declare.
11825 * target.c (set_desired_inferior): Adjust to use ptids.
11826 (mywait): Add new `ptid' argument. Adjust.
11827 (target_pid_to_str): New.
11828 * mem-break.h (free_all_breakpoints): Declare.
11829 * mem-break.c (breakpoints): Delelete.
11830 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11831 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11832 to use per-process breakpoint list.
11833 (free_all_breakpoints): New.
11834 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11835 (symbol_cache, all_symbols_looked_up): Delete.
11836 (hexchars): New.
11837 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11838 read_ptid): New.
11839 (prepare_resume_reply): Change ptid argument's type from unsigned
11840 long to ptid_t. Adjust. Implement W;process and X;process.
11841 (free_sym_cache, clear_symbol_cache): New.
11842 (look_up_one_symbol): Adjust to per-process symbol cache. *
11843 * server.c (cont_thread, general_thread, step_thread): Change type
11844 to ptid_t.
11845 (attached): Delete.
11846 (multi_process): New.
11847 (last_ptid): Change type to ptid_t.
11848 (struct vstop_notif) <ptid>: Change type to ptid_t.
11849 (queue_stop_reply, push_event): Change `ptid' argument's type to
11850 ptid_t.
11851 (discard_queued_stop_replies): Add `pid' argument.
11852 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11853 changes. Don't reference the `attached' global.
11854 (attach_inferior): Adjust to mywait interface changes.
11855 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11856 features. Handle and report "multiprocess+". Handle
11857 "qAttached:PID".
11858 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11859 changes.
11860 (handle_v_kill): New.
11861 (handle_v_stopped): Adjust to use target_pid_to_str.
11862 (handle_v_requests): Allow multiple attaches and runs when
11863 multiprocess extensions are in effect. Handle "vKill".
11864 (myresume): Adjust to use ptids.
11865 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11866 (handle_status): Adjust to discard_queued_stop_replies interface
11867 change.
11868 (first_thread_of, kill_inferior_callback)
11869 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11870 (main): Call initialize_inferiors. Adjust to use ptids, killing
11871 and detaching from all inferiors. Handle multiprocess packet
11872 variants.
11873 * linux-low.h: Include gdb_proc_service.h.
11874 (struct process_info_private): New.
11875 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11876 <lwpid_of>: Use ptid_get_lwp.
11877 (get_lwp_thread): Adjust.
11878 (struct lwp_info): Add `dead' member.
11879 (find_lwp_pid): Declare.
11880 * linux-low.c (thread_db_active): Delete.
11881 (new_inferior): Adjust comment.
11882 (inferior_pid): Delete.
11883 (linux_add_process): New.
11884 (handle_extended_wait): Adjust.
11885 (add_lwp): Change unsigned long to ptid.
11886 (linux_create_inferior): Add process to processes table. Adjust
11887 to use ptids. Don't set new_inferior here.
11888 (linux_attach_lwp): Rename to ...
11889 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11890 it. Adjust to use ptids.
11891 (linux_attach_lwp): New.
11892 (linux_attach): Add process to processes table. Don't set
11893 new_inferior here.
11894 (struct counter): New.
11895 (second_thread_of_pid_p, last_thread_of_process_p): New.
11896 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11897 multiple processes.
11898 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11899 processes. Remove process from process table.
11900 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11901 to multiple processes.
11902 (any_thread_of): New.
11903 (linux_detach): Add `pid' argument, and handle it. Remove process
11904 from processes table.
11905 (linux_join): Add `pid' argument. Handle it.
11906 (linux_thread_alive): Change unsighed long argument to ptid_t.
11907 Consider dead lwps as not being alive.
11908 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11909 threads we're not interested in.
11910 (same_lwp, find_lwp_pid): New.
11911 (linux_wait_for_lwp): Change `pid' argument's type from int to
11912 ptid_t. Adjust.
11913 (linux_wait_for_event): Rename to ...
11914 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11915 from int to ptid_t. Adjust.
11916 (linux_wait_for_event): New.
11917 (linux_wait_1): Add `ptid' argument. Change return type to
11918 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11919 that exit from the process table.
11920 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11921 Adjust.
11922 (mark_lwp_dead): New.
11923 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11924 stopping all threads, mark its main lwp as dead.
11925 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11926 ptids.
11927 (fetch_register, usr_store_inferior_registers)
11928 (regsets_fetch_inferior_registers)
11929 (regsets_store_inferior_registers, linux_read_memory)
11930 (linux_write_memory): Inline `inferior_pid'.
11931 (linux_look_up_symbols): Adjust to use per-process
11932 `thread_db_active'.
11933 (linux_request_interrupt): Adjust to use ptids.
11934 (linux_read_auxv): Inline `inferior_pid'.
11935 (initialize_low): Don't reference thread_db_active.
11936 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11937 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11938 (ps_getpid): Return the pid of the current inferior.
11939 * thread-db.c (proc_handle, thread_agent): Delete.
11940 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11941 per-process data.
11942 (find_one_thread): Change argument type to ptid_t. Adjust to
11943 per-process data.
11944 (maybe_attach_thread): Adjust to per-process data and ptids.
11945 (thread_db_find_new_threads): Ditto.
11946 (thread_db_init): Ditto.
11947 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11948 processes table. Adjust to use ptids.
11949 (spu_kill, spu_detach): Adjust interface. Remove process from
11950 processes table.
11951 (spu_join, spu_thread_alive): Adjust interface.
11952 (spu_wait): Adjust interface. Remove process from processes
11953 table. Adjust to use ptids.
11954 * win32-low.c (current_inferior_tid): Delete.
11955 (current_inferior_ptid): New.
11956 (debug_event_ptid): New.
11957 (thread_rec): Take a ptid. Adjust.
11958 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11959 (child_delete_thread): Ditto.
11960 (do_initial_child_stuff): Add `attached' argument. Add process to
11961 processes table.
11962 (child_fetch_inferior_registers, child_store_inferior_registers):
11963 Adjust.
11964 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11965 (win32_attach): Pass 1 to do_initial_child_stuff.
11966 (win32_kill): Adjust interface. Remove process from processes
11967 table.
11968 (win32_detach): Ditto.
11969 (win32_join): Adjust interface.
11970 (win32_thread_alive): Take a ptid.
11971 (win32_resume): Adjust to use ptids.
11972 (get_child_debug_event): Ditto.
11973 (win32_wait): Adjust interface. Remove exiting process from
11974 processes table.
11975
11976 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11977
11978 Non-stop mode support.
11979
11980 * server.h (non_stop): Declare.
11981 (gdb_client_data, handler_func): Declare.
11982 (delete_file_handler, add_file_handler, start_event_loop):
11983 Declare.
11984 (handle_serial_event, handle_target_event, push_event)
11985 (putpkt_notif): Declare.
11986 * target.h (enum resume_kind): New.
11987 (struct thread_resume): Replace `step' field by `kind' field.
11988 (TARGET_WNOHANG): Define.
11989 (struct target_ops) <wait>: Add `options' argument.
11990 <supports_non_stop, async, start_non_stop>: New fields.
11991 (target_supports_non_stop, target_async): New.
11992 (start_non_stop): Declare.
11993 (mywait): Add `options' argument.
11994 * target.c (mywait): Add `options' argument. Print child exit
11995 notifications here.
11996 (start_non_stop): New.
11997 * server.c (non_stop, own_buf, mem_buf): New globals.
11998 (struct vstop_notif): New.
11999 (notif_queue): New global.
12000 (queue_stop_reply, push_event, discard_queued_stop_replies)
12001 (send_next_stop_reply): New.
12002 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12003 interface changes.
12004 (attach_inferior): In non-stop mode, don't wait for the target
12005 here.
12006 (handle_general_set): Handle QNonStop.
12007 (handle_query): When handling qC, return the current general
12008 thread, instead of the first thread of the list.
12009 (handle_query): If the backend supports non-stop mode, include
12010 QNonStop+ in the qSupported query response.
12011 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12012 and non-stop mode.
12013 (handle_v_attach, handle_v_run): Handle non-stop mode.
12014 (handle_v_stopped): New.
12015 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12016 (myresume): Adjust to use resume_kind. Handle non-stop.
12017 (queue_stop_reply_callback): New.
12018 (handle_status): Handle non-stop mode.
12019 (main): Clear non_stop flag on reconnection. Use the event-loop.
12020 Refactor serial protocol handling from here ...
12021 (process_serial_event): ... to this new function. When GDB
12022 selects any thread, select one here. In non-stop mode, wait until
12023 GDB acks all pending events before exiting.
12024 (handle_serial_event, handle_target_event): New.
12025 * remote-utils.c (remote_open): Install remote_desc in the event
12026 loop.
12027 (remote_close): Remove remote_desc from the event loop.
12028 (putpkt_binary): Rename to...
12029 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12030 (putpkt_binary): New as wrapper around putpkt_binary_1.
12031 (putpkt_notif): New.
12032 (prepare_resume_reply): In non-stop mode, don't change the
12033 general_thread.
12034 * event-loop.c: New.
12035 * Makefile.in (OBJ): Add event-loop.o.
12036 (event-loop.o): New rule.
12037
12038 * linux-low.h (pid_of): Moved here.
12039 (lwpid_of): New.
12040 (get_lwp_thread): Use lwpid_of.
12041 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12042 * linux-low.c (pid_of): Delete.
12043 (inferior_pid): Use lwpid_of.
12044 (linux_event_pipe): New.
12045 (target_is_async_p): New.
12046 (delete_lwp): New.
12047 (handle_extended_wait): Use lwpid_of.
12048 (add_lwp): Don't set lwpid field.
12049 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12050 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12051 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12052 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12053 first. Adjust to linux_wait_for_event interface changes. Use
12054 lwpid_of.
12055 (linux_detach): Don't delete the main lwp here.
12056 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12057 (status_pending_p): Don't consider explicitly suspended lwps.
12058 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12059 pointer. Add OPTIONS argument. Change return type to int. Use
12060 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12061 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12062 pointer. Add status pointer argument. Return a pid instead of a
12063 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12064 changes. In non-stop mode, don't switch to a random thread.
12065 (linux_wait): Rename to...
12066 (linux_wait_1): ... this. Add target_options argument, and handle
12067 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12068 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12069 clean exit and signal exit code. Don't stop all threads in
12070 non-stop mode. In all-stop mode, only stop all threads when
12071 reporting a stop to GDB. Handle explicit thread stop requests.
12072 (async_file_flush, async_file_mark): New.
12073 (linux_wait): New.
12074 (send_sigstop): Use lwpid_of.
12075 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12076 interface changes. In non-stop mode, don't switch to a random
12077 thread.
12078 (linux_resume_one_lwp): Use lwpid_of.
12079 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12080 (linux_resume_one_thread): ... this. Handle resume_stop. In
12081 non-stop mode, don't look for pending flag in all threads.
12082 (resume_status_pending_p): Don't consider explicitly suspended
12083 threads.
12084 (my_waitpid): Reimplement. Emulate __WALL.
12085 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12086 Use lwpid_of.
12087 (sigchld_handler, linux_supports_non_stop, linux_async)
12088 (linux_start_non_stop): New.
12089 (linux_target_ops): Register linux_supports_non_stop, linux_async
12090 and linux_start_non_stop.
12091 (initialize_low): Install SIGCHLD handler.
12092 * thread-db.c (thread_db_create_event, find_one_thread)
12093 (thread_db_get_tls_address): Use lwpid_of.
12094 * win32-low.c (win32_detach): Adjust to use resume_kind.
12095 (win32_wait): Add `options' argument.
12096 * spu-low.c (spu_resume): Adjust to use resume_kind.
12097 (spu_wait): Add `options' argument.
12098
12099 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12100
12101 Decouple target code from remote protocol.
12102
12103 * target.h (enum target_waitkind): New.
12104 (struct target_waitstatus): New.
12105 (struct target_ops) <wait>: Return an unsigned long. Take a
12106 target_waitstatus pointer instead of a char pointer.
12107 (mywait): Likewise.
12108 * target.c (mywait): Change prototype to return an unsigned long.
12109 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12110 * server.h (thread_from_wait, old_thread_from_wait): Delete
12111 declarations.
12112 (prepare_resume_reply): Change prototype to take a
12113 target_waitstatus.
12114 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12115 (last_status, last_ptid): New.
12116 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12117 pid instead of a signal.
12118 (attach_inferior): Remove "status" and "signal" parameters.
12119 Adjust.
12120 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12121 not as an address.
12122 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12123 (handle_v_requests, myresume): Remove "status" and "signal"
12124 parameters. Adjust.
12125 (handle_status): New.
12126 (main): Delete local `status'. Adjust.
12127 * remote-utils.c: Include target.h.
12128 (prepare_resume_reply): Change prototype to take a
12129 target_waitstatus. Adjust.
12130
12131 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12132 interface.
12133 * spu-low.c (spu_wait): Adjust.
12134 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12135 Delete.
12136 (win32_wait): Adjust.
12137
12138 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12139
12140 * target.h (struct thread_resume): Delete leave_stopped member.
12141 (struct target_ops): Add a `n' argument to the `resume' callback.
12142 * server.c (start_inferior): Adjust.
12143 (handle_v_cont, myresume): Adjust.
12144 * linux-low.c (check_removed_breakpoint): Adjust to resume
12145 interface change, and to removed leave_stopped field.
12146 (resume_ptr): Delete.
12147 (struct thread_resume_array): New.
12148 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12149 resume interface change.
12150 (linux_continue_one_thread, linux_queue_one_thread)
12151 (resume_status_pending_p): Check if the resume field is NULL
12152 instead of checking the leave_stopped member.
12153 (linux_resume): Adjust to the target resume interface change.
12154 * spu-low.c (spu_resume): Adjust to the target resume interface
12155 change.
12156 * win32-low.c (win32_detach, win32_resume): Ditto.
12157
12158 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12159
12160 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12161 flag.
12162 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12163 pending.
12164 (linux_continue_one_thread): Only preserve the stepping flag if
12165 there's a pending breakpoint.
12166
12167 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12168
12169 * server.c (main): After the inferior having exited, call
12170 remote_close before exiting gdbserver.
12171
12172 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12173
12174 Fix size of FPSCR in Power 7 processors.
12175 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12176 (PPC_FEATURE_HAS_DFP): New #define.
12177 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12178 size of the FPSCR.
12179
12180 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12181
12182 * server.c (handle_query) Whitespace and formatting.
12183
12184 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12185
12186 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12187 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12188 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12189 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12190 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12191 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12192 Makefile.in, configure.ac: Fix whitespace throughout.
12193 * configure: Regenerate.
12194
12195 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12196
12197 * inferiors.c (find_inferior): Make it safe for the callback
12198 function to delete the currently iterated inferior.
12199
12200 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12201
12202 * Makefile.in (linuw_low_h): Move higher.
12203 (thread-db.o): Depend on $(linux_low_h).
12204
12205 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12206
12207 Rename "process" to "lwp" throughout.
12208
12209 * linux-low.c (all_processes): Rename to...
12210 (all_lwps): ... this.
12211 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12212 (add_process): Rename to ...
12213 (add_lwp): ... this. Adjust.
12214 (linux_create_inferior): Adjust.
12215 (linux_attach_lwp): Adjust.
12216 (linux_attach): Adjust.
12217 (linux_kill_one_process): Rename to ...
12218 (linux_kill_one_lwp): ... this. Adjust.
12219 (linux_kill): Adjust.
12220 (linux_detach_one_process): Rename to ...
12221 (linux_detach_one_lwp): ... this. Adjust.
12222 (linux_detach): Adjust.
12223 (check_removed_breakpoint): Adjust.
12224 (status_pending_p): Adjust.
12225 (linux_wait_for_process): Rename to ...
12226 (linux_wait_for_lwp): ... this. Adjust.
12227 (linux_wait_for_event): Adjust.
12228 (send_sigstop): Adjust.
12229 (wait_for_sigstop): Adjust.
12230 (stop_all_processes): Rename to ...
12231 (stop_all_lwps): ... this.
12232 (linux_resume_one_process): Rename to ...
12233 (linux_resume_one_lwp): ... this. Adjust.
12234 (linux_set_resume_request, linux_continue_one_thread)
12235 (linux_queue_one_thread, resume_status_pending_p)
12236 (usr_store_inferior_registers, regsets_store_inferior_registers)
12237 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12238 Adjust.
12239 * linux-low.h (get_process): Rename to ...
12240 (get_lwp): ... this. Adjust.
12241 (get_thread_process): Rename to ...
12242 (get_thread_lwp): ... this. Adjust.
12243 (get_process_thread): Rename to ...
12244 (get_lwp_thread): ... this. Adjust.
12245 (struct process_info): Rename to ...
12246 (struct lwp_info): ... this.
12247 (all_processes): Rename to ...
12248 (all_lwps): ... this.
12249 * proc-service.c (ps_lgetregs): Adjust.
12250 * thread-db.c (thread_db_create_event, find_one_thread)
12251 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12252
12253 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12254
12255 * server.c (handle_query): Handle "qAttached".
12256
12257 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12258
12259 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12260 GPLv3, update license URL.
12261
12262 2009-03-01 Doug Evans <dje@google.com>
12263
12264 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12265 (server_h): Add gdb_signals.h.
12266 (signals.o): Update.
12267 * server.h (target_signal_from_host,target_signal_to_host_p)
12268 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12269
12270 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12271
12272 * remote-utils.c (getpkt): Also generate remote-debug
12273 information if noack_mode is set.
12274
12275 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12276
12277 * server.c (handle_query): Report qXfer:siginfo:read and
12278 qXfer:siginfo:write as supported and handle them.
12279 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12280 * linux-low.c (linux_xfer_siginfo): New.
12281 (linux_target_ops): Set it.
12282
12283 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12284
12285 * server.c (gdbserver_usage): Mention --remote-debug.
12286 (main): Accept '--remote-debug' switch.
12287
12288 2009-01-18 Doug Evans <dje@google.com>
12289
12290 * regcache.c (new_register_cache): No need to check result of xcalloc.
12291 * server.c (handle_search_memory): Back out calls to xmalloc,
12292 result is checked and error is returned to user upon failure.
12293 (handle_query): Ditto. Add more checks for result of malloc.
12294 (handle_v_cont): Check result of malloc, report error back to
12295 user upon failure.
12296 (handle_v_run): Ditto. Call freeargv.
12297 * server.h (freeargv): Declare.
12298 * utils.c (freeargv): New fn.
12299
12300 2009-01-15 Doug Evans <dje@google.com>
12301
12302 * gdbreplay.c (perror_with_name): Make arg const char *.
12303 * server.h (target_signal_to_name): Make return type const char *.
12304 * thread-db.c (thread_db_err_str): Make return type const char *.
12305 * utils.c (perror_with_name): Make arg const char *.
12306
12307 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12308
12309 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12310 when handling a EXIT_PROCESS_DEBUG_EVENT.
12311
12312 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12313
12314 * gdbreplay.c (gdbreplay_version): Update copyright year.
12315 * server.c (gdbserver_version): Likewise.
12316
12317 2009-01-05 Doug Evans <dje@google.com>
12318
12319 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12320 (handle_extended_wait): Improve comment.
12321
12322 2008-12-13 Doug Evans <dje@google.com>
12323
12324 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12325 * server.h (ATTR_MALLOC): New macro.
12326 (xmalloc,xcalloc,xstrdup): Declare.
12327 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12328 * inferiors.c: Ditto.
12329 * linux-low.c: Ditto.
12330 * mem-break.c: Ditto.
12331 * regcache.c: Ditto.
12332 * remote-utils.c: Ditto.
12333 * server.c: Ditto.
12334 * target.c: Ditto.
12335 * win32-low.c: Ditto.
12336
12337 2008-12-12 Doug Evans <dje@google.com>
12338
12339 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12340 in debugging printf.
12341
12342 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12343
12344 2008-12-09 Doug Evans <dje@google.com>
12345
12346 * linux-low.h (struct process_info): Delete member tid, unused.
12347 * thread-db.c (find_one_thread): Update.
12348 (maybe_attach_thread): Update.
12349
12350 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12351
12352 * target.h (struct target_ops): Add qxfer_osdata member.
12353 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12354 and dirent.h.
12355 (linux_qxfer_osdata): New functions.
12356 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12357 callback.
12358 * server.c (handle_query): Handle "qXfer:osdata:read:".
12359 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12360 (buffer_xml_printf): New functions.
12361 * server.h (struct buffer): New.
12362 (buffer_grow_str, buffer_grow_str0): New macros.
12363 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12364 (buffer_xml_printf): Declare.
12365
12366 2008-11-24 Doug Evans <dje@google.com>
12367
12368 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12369
12370 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12371
12372 * server.c (handle_v_run): Always use the supplied argument list.
12373
12374 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12375
12376 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12377 (xtensa_regmap_table): Add entry for scompare1.
12378
12379 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12380
12381 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12382 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12383 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12384 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12385 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12386 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12387 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12388 XML target descriptions.
12389 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12390 when inferior is running on an ISA 2.05 or later processor. Add
12391 special case to return offset for full 64-bit slot of FPSCR when
12392 in 32-bits.
12393
12394 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12395
12396 * Makefile.in (SFILES, clean): Added sparc64 files.
12397 (reg-sparc64.o, reg-sparc64.c): New.
12398 * configure.srv (sparc*-*-linux*): New configuration.
12399 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12400 syscall arguments for SPARC.
12401 (regsets_store_inferior_registers): Likewise.
12402 * linux-sparc-low.c: New file.
12403
12404 2008-10-21 Doug Evans <dje@google.com>
12405
12406 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12407 (READLINE_DIR,READLINE_DEP): Delete.
12408 (INTERNAL_CFLAGS): Update.
12409 (LINTFLAGS): Update.
12410
12411 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12412
12413 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12414 whole argv from the last run, not just argv[0].
12415
12416 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12417
12418 * regcache.c (new_register_cache): Return NULL if the register
12419 cache size isn't known yet.
12420 (free_register_cache): Avoid dereferencing a NULL regcache.
12421
12422 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12423
12424 * configure.srv: Merge MIPS and MIPS64.
12425
12426 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12427
12428 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12429
12430 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12431
12432 * Makefile.in: Add required vsx dependencies.
12433
12434 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12435 Declare init_registers_powerpc_vsx32l.
12436 Declare init_registers_powerpc_vsx64l.
12437 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12438 (ppc_arch_setup): Check for VSX in hwcap.
12439 (ppc_fill_vsxregset): New function.
12440 (ppc_store_vsxregset): New function.
12441 Add new VSX entry in regset_info target_regsets.
12442
12443 * configure.srv: Add new VSX dependencies.
12444
12445 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12446
12447 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12448 (remote_open): Set or clear transport_is_reliable.
12449 (putpkt_binary): Don't expect acks in noack mode.
12450 (getpkt): Don't send ack/nac in noack mode.
12451 * server.c (handle_general_set): Handle QStartNoAckMode.
12452 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12453 qSupported.
12454 (main): Reset noack_mode on every connection.
12455 * server.h (noack_mode): Declare.
12456
12457 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12458
12459 * Makefile.in (GDBREPLAY_OBS): New variable.
12460 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12461
12462 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12463 Daniel Jacobowitz <dan@codesourcery.com>
12464
12465 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12466 (usr_store_inferior_registers): Likewise.
12467 (regsets_store_inferior_registers): Likewise.
12468
12469 2008-07-31 Rolf Jansen <rj@surtec.com>
12470 Pedro Alves <pedro@codesourcery.com>
12471
12472 * configure.ac: Check for memmem declaration.
12473 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12474 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12475 (disable_packet_qfThreadInfo): Unconditionally compile.
12476 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12477 * configure, config.in: Regenerate.
12478
12479 2008-07-28 Doug Kwan <dougkwan@google.com>
12480
12481 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12482 (linux_write_memory): Remove declaration of errno.
12483
12484 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12485
12486 * linux-low.c (handle_extended_wait): Do not use "status"
12487 variable uninitialized.
12488
12489 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12490
12491 * server.c (handle_v_attach): Inhibit reporting dll changes.
12492
12493 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12494
12495 * remote-utils.c (prepare_resume_reply): If requested, don't
12496 output "thread:TID" in the T stop reply.
12497
12498 * server.c (disable_packet_vCont, disable_packet_Tthread)
12499 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12500 (handle_query): If requested, disable support for qC, qfThreadInfo
12501 and qsThreadInfo.
12502 (handle_v_requests): If requested, disable support for vCont.
12503 (gdbserver_show_disableable): New.
12504 (main): Handle --disable-packet and --disable-packet=LIST.
12505
12506 * server.h (disable_packet_vCont, disable_packet_Tthread)
12507 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12508
12509 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12510
12511 * server.c (gdbserver_usage): Mention --version.
12512
12513 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12514
12515 * Makefile.in (gdbreplay.o): New rule.
12516
12517 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12518
12519 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12520 message, not gdbserver.
12521
12522 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12523 Nathan Sidwell <nathan@codesourcery.com>
12524 Joseph Myers <joseph@codesourcery.com>
12525
12526 * acinclude.m4: Include ../../config/acx.m4.
12527 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12528 * configure, config.in: Regenerate.
12529 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12530 * server.c (gdbserver_version): Print PKGVERSION.
12531 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12532 (main): Adjust gdbserver_usage calls.
12533 * gdbreplay.c (version, host_name): Add declarations.
12534 (gdbreplay_version, gdbreplay_usage): New.
12535 (main): Accept --version and --help options.
12536
12537 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12538
12539 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12540 (arm_breakpoint_at): Handle Thumb.
12541 (the_low_target): Add comment.
12542
12543 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12544
12545 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12546
12547 2008-05-09 Doug Evans <dje@google.com>
12548
12549 * server.h (decode_search_memory_packet): Declare.
12550 * remote-utils.c (decode_search_memory_packet): New fn.
12551 * server.c (handle_search_memory_1): New fn.
12552 (handle_search_memory): New fn.
12553 (handle_query): Process qSearch:memory packets.
12554
12555 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12556
12557 * regcache.c (registers_length): Remove.
12558 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12559 full register packet.
12560 * regcache.h (registers_length): Remove prototype.
12561 * server.h (PBUFSIZ): Define to 16384.
12562
12563 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12564
12565 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12566 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12567 powerpc-64l.o, and powerpc-altivec64l.o.
12568 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12569 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12570 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12571 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12572 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12573 to srv_xmlfiles.
12574
12575 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12576 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12577 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12578 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12579 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12580 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12581 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12582 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12583 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12584 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12585 (clean): Update.
12586
12587 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12588 (init_registers_powerpc_32l): ... this new prototype.
12589 (init_registers_powerpc_32): Remove, replace by ...
12590 (init_registers_powerpc_altivec32l): ... this new prototype.
12591 (init_registers_powerpc_e500): Remove, replace by ...
12592 (init_registers_powerpc_e500l): ... this new prototype.
12593 (init_registers_ppc64): Remove, replace by ...
12594 (init_registers_powerpc_64l): ... this new prototype.
12595 (init_registers_powerpc_64): Remove, replace by ...
12596 (init_registers_powerpc_altivec64l): ... this new prototype.
12597 (ppc_num_regs): Set to 73.
12598 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12599 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12600 (ppc_cannot_store_register): Handle orig_r3 and trap.
12601 (ppc_arch_setup): Update init_registers_... calls.
12602 (ppc_fill_gregset): Handle orig_r3 and trap.
12603
12604 * inferiors.c (clear_inferiors): Reset current_inferior.
12605
12606 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12607
12608 * acinclude.m4: Add override.m4.
12609 * configure: Regenerate.
12610
12611 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12612
12613 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12614 initial call to init_register_ppc64.
12615
12616 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12617
12618 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12619 single powerpc*-*-linux* case.
12620 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12621
12622 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12623
12624 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12625 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12626 from reg_xmlfiles.
12627 * linux-ppc-low.c: Include <elf.h>.
12628 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12629 (ppc_hwcap): New global variable.
12630 (ppc_regmap): Remove __SPE__ #ifdef sections.
12631 (ppc_regmap_e500): New global variable.
12632 (ppc_cannot_store_register): Update __SPE__ special case.
12633 (ppc_get_hwcap): New function.
12634 (ppc_arch_setup): Use it to determine whether inferior supports
12635 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12636 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12637 Do not access registers if target does not support AltiVec.
12638 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12639 Do not access registers if target does not support SPE.
12640 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12641
12642 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12643
12644 * linux-low.c (disabled_regsets, num_regsets): New.
12645 (use_regsets_p): Delete.
12646 (linux_wait_for_process): Clear disabled_regsets.
12647 (regsets_fetch_inferior_registers): Check and set it.
12648 (regsets_store_inferior_registers): Likewise.
12649 (linux_fetch_registers, linux_store_registers): Do not use
12650 use_regsets_p.
12651 (initialize_low): Allocate disabled_regsets.
12652
12653 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12654
12655 * Makefile.in (LIBOBJS): New.
12656 (OBS): Use LIBOBJS.
12657 (memmem.o): New rule.
12658 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12659 * configure: Regenerated.
12660
12661 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12662
12663 * server.c (handle_query): Never return "unsupported" for
12664 qXfer:features:read queries.
12665
12666 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12667
12668 * server.c (get_features_xml): Fix inverted condition.
12669 (handle_query): Always support qXfer:feature:read.
12670
12671 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12672
12673 * server.c (wrapper_argv): New.
12674 (start_inferior): Handle wrapper_argv. If set, expect an extra
12675 trap.
12676 (gdbserver_usage): Document --wrapper.
12677 (main): Parse --wrapper.
12678
12679 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12680
12681 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12682 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12683 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12684 (ppc_set_pc): Likewise.
12685 (ppc_arch_setup): New function.
12686 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12687 of collect_register.
12688 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12689
12690 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12691
12692 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12693 instead of linux-ppc64-low.o.
12694 * linux-ppc64-low.c: Remove file.
12695 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12696 (linux-ppc64-low.o): Remove rule.
12697
12698 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12699 (init_registers_powerpc_64): Likewise.
12700 (ppc_regmap): Conditionally define depending on __powerpc64__.
12701 (ppc_cannot_store_register): Do not special-case "fpscr" when
12702 compiled on __powerpc64__.
12703 (ppc_collect_ptrace_register): New function.
12704 (ppc_supply_ptrace_register): New function.
12705 (ppc_breakpoint): Change type to "unsigned int".
12706 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12707 (the_low_target): Conditionally provide initializers for the
12708 arch_setup member depending on __powerpc64__. Install
12709 collect_ptrace_register and supply_ptrace_register members.
12710
12711 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12712
12713 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12714 * server.c (gdbserver_xmltarget): Define.
12715 (get_features_xml): Use it to replace "target.xml" and arch_string.
12716
12717 * configure.srv: Remove srv_xmltarget. Add XML files that were
12718 mentioned there to srv_xmlfiles instead. Remove conditional tests
12719 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12720 srv_xmlfiles and srv_regobj to include all possible choices.
12721 * configure.ac (srv_xmltarget): Remove.
12722 (srv_xmlfiles): Do not add "target.xml".
12723 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12724 checks for supplementary target information.
12725 * configure: Regenerate.
12726 * Makefile.in (XML_TARGET): Remove.
12727 (target.xml): Remove rule.
12728 (clean): Do not clean up target.xml.
12729 (.PRECIOUS): Do not mention target.xml.
12730
12731 * target.h (struct target_ops): Remove arch_string member.
12732 * linux-low.c (linux_arch_string): Remove.
12733 (linux_target_ops): Remove arch_string initializer.
12734 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12735 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12736 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12737 * spu-low.c (spu_arch_string): Remove.
12738 (spu_target_ops): Remove arch_string initializer.
12739 * win32-low.c (win32_arch_string): Remove.
12740 (win32_target_ops): Remove arch_string initializer.
12741 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12742 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12743 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12744
12745 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12746
12747 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12748 by collect_ptrace_register and supply_ptrace_register hooks.
12749 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12750 instead of checking for the_low_target.left_pad_xfer.
12751 (usr_store_inferior_registers): Use collect_ptrace_register callback
12752 instead of checking for the_low_target.left_pad_xfer.
12753
12754 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12755 (s390_supply_ptrace_register): Likewise.
12756 (s390_fill_gregset): Call s390_collect_ptrace_register.
12757 (the_low_target): Update.
12758
12759 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12760 (ppc_supply_ptrace_register): Likewise.
12761 (the_low_target): Update.
12762
12763 * linux-i386-low.c (the_low_target): Update.
12764 * linux-x86-64-low.c (the_low_target): Update.
12765
12766 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12767
12768 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12769 reg-s390.o and reg-s390x.o.
12770
12771 * linux-low.c (new_inferior): New global variable.
12772 (linux_create_inferior, linux_attach): Set it.
12773 (linux_wait_for_process): Call the_low_target.arch_setup after the
12774 target has stopped for the first time.
12775 (initialize_low): Do not call the_low_target.arch_setup.
12776
12777 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12778 (s390_set_pc): Likewise.
12779 (s390_arch_setup): New function.
12780 (the_low_target): Use s390_arch_setup as arch_setup routine.
12781
12782 * regcache.c (realloc_register_cache): New function.
12783 (set_register_cache): Call it for each existing regcache.
12784
12785 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12786
12787 * server.h (init_registers): Remove prototype.
12788
12789 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12790 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12791 instead of init_registers ().
12792 * linux-arm-low.c (init_registers_arm): Add prototype.
12793 (init_registers_arm_with_iwmmxt): Likewise.
12794 (the_low_target): Add initializer for arch_setup field.
12795 * linux-cris-low.c (init_registers_cris): Add prototype.
12796 (the_low_target): Add initializer for arch_setup field.
12797 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12798 (the_low_target): Add initializer for arch_setup field.
12799 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12800 (the_low_target): Add initializer for arch_setup field.
12801 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12802 (the_low_target): Add initializer for arch_setup field.
12803 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12804 (the_low_target): Add initializer for arch_setup field.
12805 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12806 (the_low_target): Add initializer for arch_setup field.
12807 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12808 (init_registers_mips64_linux): Likewise.
12809 (the_low_target): Add initializer for arch_setup field.
12810 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12811 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12812 (the_low_target): Add initializer for arch_setup field.
12813 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12814 (init_registers_powerpc_64): Likewise.
12815 (the_low_target): Add initializer for arch_setup field.
12816 * linux-s390-low.c (init_registers_s390): Add prototype.
12817 (init_registers_s390x): Likewise.
12818 (the_low_target): Add initializer for arch_setup field.
12819 * linux-sh-low.c (init_registers_sh): Add prototype.
12820 (the_low_target): Add initializer for arch_setup field.
12821 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12822 (the_low_target): Add initializer for arch_setup field.
12823 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12824 (the_low_target): Add initializer for arch_setup field.
12825
12826 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12827 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12828 instead of init_registers ().
12829 * win32-arm-low.c (init_registers_arm): Add prototype.
12830 (the_low_target): Add initializer for arch_setup field.
12831 * win32-i386-low.c (init_registers_i386): Add prototype.
12832 (the_low_target): Add initializer for arch_setup field.
12833
12834 * spu-low.c (init_registers_spu): Add prototype.
12835 (initialize_low): Call initialie_registers_spu () instead of
12836 initialize_registers ().
12837
12838 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12839
12840 * server.c (handle_v_requests): When handling the vRun and vAttach
12841 packets, if already debugging a process, don't kill it. Return an
12842 error instead.
12843
12844 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12845
12846 * server.c (handle_query): Correct length check.
12847
12848 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12849
12850 * win32-low.c (do_initial_child_stuff): Add process handle
12851 parameter. Set current_process_handle and current_process_id from the
12852 parameters. Clear globals.
12853 (win32_create_inferior): Don't set current_process_handle and
12854 current_process_id here. Instead pass them on the call to
12855 do_initial_child_stuff.
12856 (win32_attach): Likewise.
12857 (win32_clear_inferiors): New.
12858 (win32_kill): Don't close the current process handle or the
12859 current thread handle here. Instead call win32_clear_inferiors.
12860 (win32_detach): Don't open a new handle to the process. Call
12861 win32_clear_inferiors.
12862 (win32_join): Don't rely on current_process_handle; open a new
12863 handle using the process id.
12864 (win32_wait): Call win32_clear_inferiors when the inferior process
12865 has exited.
12866
12867 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12868
12869 * server.c (monitor_show_help): Add "exit".
12870
12871 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12872
12873 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12874 (clean): Add reg-xtensa.c.
12875 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12876 * configure.srv (xtensa*-*-linux*) New target.
12877 * linux-xtensa-low.c: New.
12878 * xtensa-xtregs.c: New.
12879
12880 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12881
12882 * hostio.c: Don't include errno.h.
12883 (errno_to_fileio_errno): Move to hostio-errno.
12884 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12885 error number outputting to the target->hostio_last_error callback.
12886 (hostio_packet_error): Use FILEIO_EINVAL directly.
12887 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12888 calls to hostio_error.
12889 * hostio-errno.c: New.
12890 * server.h (hostio_last_error_from_errno): Declare.
12891 * target.h (target_ops): Add hostio_last_error member.
12892 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12893 as hostio_last_error handler.
12894 * spu-low.c (spu_target_ops): Likewise.
12895 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12896 (wince_hostio_last_error): New functions.
12897 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12898 as hostio_last_error handler.
12899 (win32_target_ops) [!_WIN32_WCE]: Register
12900 hostio_last_error_from_errno as hostio_last_error handler.
12901 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12902 (hostio-errno.o): New rule.
12903 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12904 * configure.srv (srv_hostio_err_objs): New variable. Default to
12905 hostio-errno.o.
12906 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12907 * configure: Regenerate.
12908
12909 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12910
12911 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12912 (linux_kill, linux_detach): Clean up the process list.
12913 * remote-utils.c (remote_open): Improve port number parsing.
12914 (putpkt_binary, input_interrupt): Only send interrupts if the target
12915 is running.
12916 * server.c (extended_protocol): Make static.
12917 (attached): Define earlier.
12918 (exit_requested, response_needed, program_argv): New variables.
12919 (target_running): New.
12920 (start_inferior): Clear attached here.
12921 (attach_inferior): Set attached here.
12922 (require_running): Define.
12923 (handle_query): Use require_running and target_running. Implement
12924 "monitor exit".
12925 (handle_v_attach, handle_v_run): New.
12926 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12927 (gdbserver_usage): Update.
12928 (main): Redo argument parsing. Handle --debug and --multi. Handle
12929 --attach along with other options or after the port. Save
12930 program_argv. Support no initial program. Resynchronize
12931 communication with GDB after an error. Handle "monitor exit".
12932 Use require_running and target_running. Always allow the extended
12933 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12934 restart in extended mode.
12935 * README: Refer to the GDB manual. Update --attach usage.
12936
12937 2007-12-20 Andreas Schwab <schwab@suse.de>
12938
12939 * linux-low.c (STACK_SIZE): Define.
12940 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12941 (linux_test_for_tracefork): Likewise.
12942
12943 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12944
12945 * linux-low.c (linux_wait_for_event): Update messages. Do not
12946 reinsert auto-delete breakpoints.
12947 * mem-break.c (struct breakpoint): Change return type of handler to
12948 int.
12949 (set_breakpoint_at): Update handler type.
12950 (reinsert_breakpoint_handler): Return 1 instead of calling
12951 delete_breakpoint.
12952 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12953 setting a new one.
12954 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12955 * mem-break.h (set_breakpoint_at): Update handler type.
12956 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12957 * win32-low.c (auto_delete_breakpoint): New.
12958 (get_child_debug_event): Use it.
12959
12960 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12961
12962 * configure.ac: Check for pread and pwrite.
12963 * hostio.c (handle_pread): Fall back to lseek and read.
12964 (handle_pwrite): Fall back to lseek and write.
12965 * config.in, configure: Regenerated.
12966
12967 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12968
12969 * server.c (myresume): Add own_buf argument.
12970 (main): Update calls.
12971
12972 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12973
12974 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12975 * remote-utils.c (remote_open): Do not call disable_async_io.
12976 (block_async_io): Delete.
12977 (unblock_async_io): Make static.
12978 (initialize_async_io): New.
12979 * server.c (handle_v_cont): Handle async I/O here.
12980 (myresume): Likewise. Move other common resume tasks here...
12981 (main): ... from here. Call initialize_async_io. Disable async
12982 I/O before the main loop.
12983 * server.h (initialize_async_io): Declare.
12984 (block_async_io, unblock_async_io): Delete prototypes.
12985 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12986
12987 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12988
12989 * remote-utils.c (readchar): Allow binary data in received messages.
12990
12991 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12992
12993 * win32-low.c (attaching): New global.
12994 (win32_create_inferior): Clear the `attaching' global.
12995 (win32_attach): Set the `attaching' global.
12996 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12997 attaching. Only set a breakpoint at the entry point if not
12998 attaching.
12999
13000 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13001
13002 * server.c (main): Don't report dll events on the initial
13003 connection on attaches.
13004
13005 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13006
13007 * server.c (main): Relax numerical bases supported for the pid of
13008 the --attach command line argument.
13009
13010 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13011
13012 * win32-low.c (win32_attach): Call OpenProcess before
13013 DebugActiveProcess, not after. Add last error output to error
13014 call.
13015
13016 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13017
13018 * win32-low.c (win32_get_thread_context)
13019 (win32_set_thread_context): New functions.
13020 (thread_rec): Use win32_get_thread_context.
13021 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13022 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13023 field.
13024
13025 2007-12-03 Leo Zayas
13026 Pedro Alves <pedro_alves@portugalmail.pt>
13027
13028 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13029 global variables.
13030 (child_add_thread): Minor cleanup.
13031 (child_continue): Resume artificially suspended threads before
13032 calling ContinueDebugEvent.
13033 (suspend_one_thread): New.
13034 (fake_breakpoint_event): New.
13035 (get_child_debug_event): Change return type to int. Check here if
13036 gdb sent an interrupt request. If a soft interrupt was requested,
13037 fake a breakpoint event. Return 0 if there is no event to handle,
13038 and 1 otherwise.
13039 (win32_wait): Don't check here if gdb sent an interrupt request.
13040 Ensure there is a valid event to handle.
13041 (win32_request_interrupt): Add soft interruption method as last
13042 resort.
13043
13044 2007-12-03 Leo Zayas
13045 Pedro Alves <pedro_alves@portugalmail.pt>
13046
13047 * win32-low.h (win32_thread_info): Add descriptions to the
13048 structure members. Replace `suspend_count' counter by a
13049 `suspended' flag.
13050 * win32-low.c (thread_rec): Update condition of when to get the
13051 context from the inferior. Rely on ContextFlags being set if it
13052 has already been retrieved. Only suspend the inferior thread if
13053 we haven't already. Warn if that fails.
13054 (continue_one_thread): s/suspend_count/suspended/. Only call
13055 ResumeThread once. Warn if that fails.
13056
13057 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13058
13059 * win32-low.c (win32_wait): Don't read from the inferior when it
13060 has already exited.
13061
13062 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13063
13064 * Makefile.in (win32_low_h): New variable.
13065 (win32-low.o): Add dependency on $(win32_low_h).
13066 (win32-arm-low.o, win32-i386-low.o): New rules.
13067
13068 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13069
13070 * hostio.c: Correct copyright year.
13071
13072 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13073
13074 * Makefile.in (OBS): Add hostio.o.
13075 (hostio.o): New rule.
13076 * server.h (handle_vFile): Declare.
13077 * hostio.c: New file.
13078 * server.c (handle_v_requests): Take packet_len and new_packet_len
13079 for binary packets. Call handle_vFile.
13080 (main): Update call to handle_v_requests.
13081
13082 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13083
13084 * linux-low.c: Include <sched.h>.
13085
13086 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13087
13088 * linux-low.c (linux_tracefork_grandchild): New.
13089 (linux_tracefork_child): Use clone.
13090 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13091
13092 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13093
13094 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13095
13096 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13097
13098 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13099
13100 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13101
13102 * inferiors.c (change_inferior_id): Delete.
13103 (add_pid_to_list, pull_pid_from_list): New.
13104 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13105 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13106 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13107 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13108 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13109 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13110 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13111 (using_threads): Always set to 1.
13112 (handle_extended_wait): New.
13113 (add_process): Do not set TID.
13114 (linux_create_inferior): Set must_set_ptrace_flags.
13115 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13116 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13117 (linux_thread_alive): Rename TID argument to LWPID.
13118 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13119 (linux_wait_for_event): Do not use TID or check using_threads. Update
13120 call to dead_thread_notify. Call handle_extended_wait.
13121 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13122 (send_sigstop): Delete sigstop_sent.
13123 (wait_for_sigstop): Avoid TID.
13124 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13125 (linux_test_for_tracefork): New.
13126 (linux_lookup_signals): Use thread_db_active and
13127 linux_supports_tracefork_flag.
13128 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13129 * linux-low.h (get_process_thread): Avoid TID.
13130 (struct process_ifo): Move thread_known and tid to the end. Remove
13131 sigstop_sent.
13132 (linux_attach_lwp, thread_db_init): Update prototypes.
13133 * server.h (change_inferior_id): Delete prototype.
13134 (add_pid_to_list, pull_pid_from_list): New prototypes.
13135 * thread-db.c (thread_db_use_events): New.
13136 (find_first_thread): Rename to...
13137 (find_one_thread): ...this. Update callers and messages. Do not
13138 call fatal. Check thread_db_use_events. Do not call
13139 change_inferior_id or new_thread_notify.
13140 (maybe_attach_thread): Update. Do not call new_thread_notify.
13141 (thread_db_init): Set thread_db_use_events. Check use_events.
13142 * utils.c (fatal, warning): Correct message prefix.
13143
13144 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13145
13146 * Makefile.in (clean): Remove new files.
13147 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13148 (powerpc-64.o, powerpc-64.c): New rules.
13149 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13150 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13151 with SPE.
13152 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13153 SPE targets.
13154 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13155 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13156 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13157 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13158 (target_regsets): Add AltiVec and SPE register sets.
13159 * configure.ac: Check for AltiVec and SPE.
13160 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13161 (ppc_fill_vrregset, ppc_store_vrregset): New.
13162 (target_regsets): Add AltiVec register set.
13163 * configure: Regenerated.
13164
13165 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13166
13167 * linux-low.c (O_LARGEFILE): Define.
13168 (linux_read_memory): Use /proc/PID/mem.
13169 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13170 * configure, config.in: Regenerated.
13171
13172 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13173
13174 * linux-low.c (linux_wait_for_event): Do not pass signals while
13175 single-stepping.
13176
13177 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13178
13179 * win32-low.c (create_process): New.
13180 (win32_create_inferior): Use create_process instead of
13181 CreateProcess. If create_process failed retry appending an ".exe"
13182 suffix. Store the GetLastError result immediatelly after
13183 create_process calls and use it on the call to error.
13184
13185 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13186
13187 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13188
13189 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13190
13191 * configure.ac: Switch license to GPLv3.
13192
13193 2007-08-01 Michael Snyder <msnyder@access-company.com>
13194
13195 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13196
13197 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13198
13199 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13200 typedef.
13201 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13202 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13203 CloseToolhelp32Snapshot.
13204 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13205 CloseToolhelp32Snapshot.
13206
13207 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13208
13209 * server.c (main): Check for inferior exit before main loop.
13210
13211 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13212
13213 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13214 instead of on tmp_desc.
13215
13216 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13217 Daniel Jacobowitz <dan@codesourcery.com>
13218
13219 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13220 (add_thread): Minor cleanups.
13221 (clear_inferiors): Move lower in the file. Clear the DLL
13222 list.
13223 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13224 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13225 (xml_escape_text): New.
13226 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13227 for qSupported.
13228 (handle_v_cont): Report errors.
13229 (gdbserver_version): Update.
13230 (main): Correct size of own_buf. Do not report initial DLL events.
13231 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13232 (unloaded_dll, xml_escape_text): New.
13233 * win32-low.c (enum target_waitkind): Update comments.
13234 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13235 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13236 (win32_EnumProcessModules, win32_GetModuleInformation)
13237 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13238 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13239 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13240 (win32_Module32First, win32_Module32Next, load_toolhelp)
13241 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13242 (get_child_debug_event): Handle DLL events.
13243 (win32_wait): Likewise.
13244
13245 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13246
13247 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13248 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13249
13250 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13251
13252 * win32-low.c (handle_output_debug_string): Ignore event if not
13253 waiting.
13254
13255 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13256
13257 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13258
13259 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13260
13261 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13262
13263 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13264
13265 * inferiors.c (change_inferior_id): Add comment.
13266 * linux-low.c (check_removed_breakpoint): Add an early
13267 prototype. Improve debug output.
13268 (linux_attach): Doc update.
13269 (linux_detach_one_process, linux_detach): Clean up before releasing
13270 each process.
13271 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13272 * linux-low.h (struct process_info): Doc improvement.
13273 * mem-break.c (delete_all_breakpoints): New.
13274 * mem-break.h (delete_all_breakpoints): New prototype.
13275 * thread-db.c (find_first_thread): New.
13276 (thread_db_create_event): Call it instead of
13277 thread_db_find_new_threads. Clean up unused variables.
13278 (maybe_attach_thread): Remove first thread handling.
13279 (thread_db_find_new_threads): Use find_first_thread.
13280 (thread_db_get_tls_address): Likewise.
13281
13282 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13283
13284 * thread-db.c (thread_db_find_new_threads): Add prototype.
13285 (thread_db_create_event): Check for the main thread before adding
13286 a new thread.
13287 (maybe_attach_thread): Only enable event reporting if TID == 0.
13288 (thread_db_get_tls_address): Check for new threads.
13289
13290 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13291
13292 * linux-low.c (linux_create_inferior): Try execv before execvp.
13293 * spu-low.c (spu_create_inferior): Likewise.
13294
13295 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13296
13297 * linux-low.c (linux_create_inferior): Change execv to execvp.
13298 * spu-low.c (spu_create_inferior): Likewies.
13299
13300 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13301
13302 * Makefile.in (clean): Clean new files instead of deleted ones.
13303 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13304 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13305 rules.
13306 * configure.srv: Specify XML files and new regformats for MIPS and
13307 MIPS64 GNU/Linux.
13308 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13309 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13310 an entry for the restart register.
13311 (mips_cannot_fetch_register, mips_cannot_store_register)
13312 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13313 register names to match the XML descriptions.
13314 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13315 restart register instead of $0.
13316
13317 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13318 Markus Deuling <deuling@de.ibm.com>
13319
13320 * remote-utils.c (decode_xfer_write): New function.
13321 * server.h (decode_xfer_write): Add prototype.
13322 * server.c (handle_query): Add PACKET_LEN argument. Support
13323 qXfer:spu:read and qXfer:spu:write packets.
13324 (main): Pass packet_len to handle_query.
13325 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13326 * target.h (target_ops): Add qxfer_spu.
13327
13328 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13329
13330 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13331 accessing non-seekable spufs files.
13332
13333 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13334
13335 * server.c (handle_query): Add reply for qC packet.
13336
13337 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13338 Leo Zayas <lerele@champenstudios@com>
13339
13340 * server.h (check_remote_input_interrupt_request): New function.
13341 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13342 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13343 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13344 (check_remote_input_interrupt_request): New function.
13345 * server.h (check_remote_input_interrupt_request): Declare.
13346 * win32-low.c (winapi_DebugBreakProcess,
13347 winapi_GenerateConsoleCtrlEvent): New typedefs.
13348 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13349 to 250 ms.
13350 (win32_wait): Check for remote interrupt request
13351 with check_remote_input_interrupt_request.
13352 (win32_request_interrupt): New function.
13353 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13354
13355 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13356
13357 * win32-low.c (debug_registers_changed,
13358 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13359 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13360 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13361 (thread_rec): Get context using the low target.
13362 (child_add_thread): Call thread_added on the low target,
13363 which does the same thing.
13364 (regptr): Delete.
13365 (do_initial_child_stuff): Remove debug registers references.
13366 Set context using the low target. Resume threads after
13367 setting the contexts.
13368 (child_continue): Remove dead variable. Remove debug
13369 registers references.
13370 (child_fetch_inferior_registers): Go through the low target.
13371 (do_child_store_inferior_registers): Remove.
13372 (child_store_inferior_registers): Go through the low target.
13373 (win32_resume): Remove debug registers references.
13374 Set context using the low target.
13375 (handle_exception): Change return type to void. Don't record
13376 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13377 first chance exception.
13378 (get_child_debug_event): Change return type to void. Remove
13379 goto loop. Always return after waiting for debug event.
13380 (win32_wait): Convert to switch statement. Handle spurious
13381 events.
13382
13383 * win32-i386-low.c (debug_registers_changed,
13384 debug_registers_used): New.
13385 (initial_stuff): Rename to ...
13386 (i386_initial_stuff): ... this. Clear debug registers
13387 state variables.
13388 (store_debug_registers): Delete.
13389 (i386_get_thread_context): New.
13390 (load_debug_registers): Delete.
13391 (i386_set_thread_context): New.
13392 (i386_thread_added): New.
13393 (single_step): Rename to ...
13394 (i386_single_step): ... this.
13395 (do_fetch_inferior_registers): Rename to ...
13396 (i386_fetch_inferior_register): ... this.
13397 (i386_store_inferior_register): New.
13398 (the_low_target): Adapt to new interface.
13399
13400 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13401 (arm_get_thread_context): New.
13402 (arm_set_thread_context): New.
13403 (regptr): New.
13404 (do_fetch_inferior_registers): Rename to ...
13405 (arm_fetch_inferior_register): ... this.
13406 (arm_store_inferior_register): New.
13407 (arm_wince_breakpoint): Reimplement as unsigned long.
13408 (arm_wince_breakpoint_len): Define.
13409 (the_low_target): Adapt to new interface.
13410
13411 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13412 load_debug_registers. Add get_thread_context, set_thread_context,
13413 thread_added and store_inferior_register. Rename
13414 fetch_inferior_registers to fetch_inferior_register.
13415 (regptr): Remove declaration.
13416
13417 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13418
13419 * linux-low.c (linux_detach): Change return type to int. Return 0.
13420 * spu-low.c (spu_detach): Likewise.
13421
13422 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13423
13424 * target.h (target_ops): Change return type of detach to int.
13425 Add join.
13426 (join_inferior): New.
13427 * server.c (main): Don't skip detach support on mingw32.
13428 If the inferior doesn't support detaching return error.
13429 Call join_inferior instead of using waitpid.
13430 * linux-low.c (linux_join): New.
13431 (linux_target_op): Add linux_join.
13432 * spu-low.c (spu_join): New.
13433 (spu_target_ops): Add spu_join.
13434 * win32-low.c (win32_detach): Adapt to new interface.
13435 Reopen current_process_handle before detaching. Issue a child
13436 resume before detaching.
13437 (win32_join): New.
13438 (win32_target_op): Add win32_join.
13439
13440 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13441
13442 * win32-low.c (win32-attach): Fix return value.
13443 * target.h (target_ops): Describe ATTACH return values.
13444
13445 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13446
13447 * win32-low.c (GETPROCADDRESS): Define.
13448 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13449 (winapi_DebugSetProcessKillOnExit): Likewise.
13450 (win32_create_inferior): Force usage of ansi CreateProcessA.
13451 (win32_attach): Use GETPROCADDRESS.
13452 (win32_detach): Likewise.
13453
13454 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13455
13456 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13457
13458 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13459
13460 * win32-low.c: Commit leftover changes from 2007-03-29.
13461
13462 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13463
13464 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13465 fields short instead of int. Add explicit padding.
13466 (i387_cache_to_fsave): Remove unnecessary casts.
13467 (i387_fsave_to_cache): Doc fix.
13468 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13469
13470 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13471
13472 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13473 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13474
13475 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13476
13477 * configure.srv (arm*-*-mingw32ce*): Move near the other
13478 arm targets.
13479
13480 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13481
13482 * configure.ac: Add errno checking.
13483 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13484 sys/file.h and malloc.h.
13485 (AC_CHECK_DECLS): Add perror.
13486 (srv_mingwce): Handle.
13487 * configure.srv (i[34567]86-*-cygwin*): Add
13488 win32-i386-low.o to srv_tgtobj.
13489 (i[34567]86-*-mingw*): Likewise.
13490 (arm*-*-mingw32ce*): Add case.
13491 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13492 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13493 [__MINGW32CE__] (strerror): New function.
13494 [__MINGW32CE__] (errno): Define to GetLastError.
13495 [__MINGW32CE__] (COUNTOF): New macro.
13496 (remote_open): Remove extra close call.
13497 * mem-break.c (delete_breakpoint_at): New function.
13498 * mem-break.h (delete_breakpoint_at): Declare.
13499 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13500 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13501 [USE_WIN32API] (read, write): Add char* casts.
13502 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13503 * server.h: Include wincecompat.h on Windows CE.
13504 [HAVE_ERRNO_H]: Check.
13505 (perror): Declare if not declared.
13506 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13507 (perror_with_name): Remove errno declaration.
13508 * wincecompat.h: New.
13509 * wincecompat.c: New.
13510 * win32-low.h: New.
13511 * win32-arm-low.c: New.
13512 * win32-i386-low.c: New.
13513 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13514 (OUTMSG2): Make it safe.
13515 (_T): New macro.
13516 (COUNTOF): New macro.
13517 (NUM_REGS): Get it from the low target.
13518 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13519 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13520 (thread_rec): Let low target handle debug registers.
13521 (child_add_thread): Likewise.
13522 (child_init_thread_list): Likewise.
13523 (continue_one_thread): Likewise.
13524 (regptr): New.
13525 (do_child_fetch_inferior_registers): Move to ...
13526 * win32-i386-low.c: ... here, and rename to ...
13527 (do_fetch_inferior_registers): ... this.
13528 * win32-low.c (child_fetch_inferior_registers):
13529 Go through the low target.
13530 (do_child_store_inferior_registers): Use regptr.
13531 (strwinerror): New function.
13532 (win32_create_inferior): Handle Windows CE.
13533 Use strwinerror instead of strerror on Windows error
13534 codes. Add program to the error output.
13535 Don't close the main thread handle on Windows CE.
13536 (win32_attach): Use coredll.dll on Windows CE.
13537 (win32_kill): Close current process and current
13538 thread handles.
13539 (win32_detach): Use coredll.dll on Windows CE.
13540 (win32_resume): Let low target handle debug registers, and
13541 step request.
13542 (handle_exception): Add/Remove initial breakpoint. Avoid
13543 non-existant WSTOPSIG on Windows CE.
13544 (win32_read_inferior_memory): Cast to remove warning.
13545 (win32_arch_string): Go through the low target.
13546 (initialize_low): Call set_breakpoint_data with the low
13547 target's breakpoint.
13548 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13549 FOP_REGNUM, mappings): Move to ...
13550 * win32-i386-low.c: ... here.
13551 * win32-low.c (win32_thread_info): Move to ...
13552 * win32-low.h: ... here.
13553 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13554 win32-arm-low.c and wincecompat.c.
13555 (all:): Add $EXEEXT.
13556 (install-only:): Likewise.
13557 (gdbserver:): Likewise.
13558 (gdbreplay:): Likewise.
13559 * config.in: Regenerate.
13560 * configure: Regenerate.
13561
13562 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13563
13564 * win32-low.c: Rename typedef thread_info to
13565 win32_thread_info throughout.
13566
13567 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13568
13569 * win32-i386-low.c: Rename to ...
13570 * win32-low.c: ... this.
13571 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13572 * Makefile.in: Likewise.
13573
13574 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13575
13576 * remote-utils.c (monitor_output): Constify msg parameter.
13577 * server.h (monitor_output): Likewise.
13578 * win32-i386-low.c (handle_output_debug_string): New.
13579 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13580 handle_output_debug_string.
13581 (get_child_debug_event): Likewise.
13582
13583 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13584
13585 * server.c (main): Correct strtoul check.
13586
13587 2007-03-27 Jon Ringle <jon@ringle.org>
13588
13589 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13590
13591 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13592
13593 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13594
13595 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13596
13597 * terminal.h: Check HAVE_SGTTY_H.
13598
13599 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13600
13601 * remote-utils.c (remote_open): Print out the assigned port number.
13602
13603 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13604
13605 * remote-utils.c (monitor_output): New function.
13606 * server.c (debug_threads): Define here.
13607 (monitor_show_help): New function.
13608 (handle_query): Handle qRcmd.
13609 (main): Do not handle 'd' packet.
13610 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13611 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13612 of debug_threads.
13613
13614 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13615
13616 * Makefile.in (EXEEXT): New.
13617 (clean): Use $(EXEEXT).
13618
13619 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13620
13621 * target.h (target_ops): Rename send_signal to request_interrupt,
13622 and remove enum target_signal parameter.
13623 * linux-low.c (linux_request_interrupt): Rename from
13624 linux_send_signal, and always send SIGINT.
13625 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13626 and always send SIGINT.
13627 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13628 of send_signal.
13629 (input_interrupt): Likewise.
13630
13631 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13632
13633 * server.c (get_features_xml): Check if target implemented
13634 arch_string.
13635 * win32-i386-low.c (win32_arch_string): New.
13636 (win32_target_ops): Add win32_arch_string as arch_string member.
13637
13638 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13639
13640 * spu-low.c (spu_arch_string): New.
13641 (spu_target_ops): Add spu_arch_string.
13642
13643 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13644
13645 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13646 * configure.ac: Do not check for terminal.h.
13647 * configure, config.in: Regenerated.
13648
13649 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13650
13651 * Makefile.in (OBS): Add $(XML_BUILTIN).
13652 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13653 (clean): Update.
13654 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13655 (arm-with-iwmmxt.c): New.
13656 * config.in, configure: Regenerate.
13657 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13658 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13659 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13660 (arm*-*-linux*): Add iWMMXt and regset support.
13661 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13662 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13663 (arm_store_wmmxregset, target_regsets): New.
13664 * server.c (get_features_xml): Take annex argument. Check builtin
13665 XML documents.
13666 (handle_query): Handle multiple annexes.
13667
13668 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13669
13670 * remote-utils.c [USE_WIN32API] (read, write): Define.
13671 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13672 write.
13673
13674 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13675
13676 * linux-i386-low.c (the_low_target): Set arch_string.
13677 * linux-x86-64-low.c (the_low_target): Likewise.
13678 * linux-low.c (linux_arch_string): New.
13679 (linux_target_ops): Add it.
13680 * linux-low.h (struct linux_target_ops): Add arch_string.
13681 * server.c (write_qxfer_response): Use const void * for DATA.
13682 (get_features_xml): New.
13683 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13684 * target.h (struct target_ops): Add arch_string method.
13685
13686 2007-01-03 Denis Pilat <denis.pilat@st.com>
13687 Daniel Jacobowitz <dan@codesourcery.com>
13688
13689 * linux-low.c (linux_kill): Handle being called with no threads.
13690 * win32-i386-low.c (win32_kill): Likewise.
13691 (get_child_debug_event): Clear current_process_handle.
13692
13693 2006-12-30 Denis PILAT <denis.pilat@st.com>
13694 Daniel Jacobowitz <dan@codesourcery.com>
13695
13696 * remote-utils.c (remote_open): Check the type of specified
13697 serial port devices before opening them.
13698 * server.c (main): Kill the inferior if an error occurs during
13699 the first remote_open.
13700
13701 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13702
13703 * README: Update supported targets.
13704
13705 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13706
13707 * Makefile.in (clean): Remove reg-mips64.c.
13708 (reg-mips64.c, reg-mips64.o): New rules.
13709 * configure.srv: Handle mips64. Include regset support for mips.
13710 * linux-mips-low.c (union mips_register): New.
13711 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13712 (mips_breakpoint, mips_breakpoint_at): Use int.
13713 (mips_collect_register, mips_supply_register)
13714 (mips_collect_register_32bit, mips_supply_register_32bit)
13715 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13716 (mips_store_fpregset, target_regsets): New.
13717 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13718
13719 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13720
13721 * configure.srv: Add target "spu*-*-*".
13722 * Makefile.in (clean): Remove reg-spu.c.
13723 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13724 * spu-low.c: New file.
13725
13726 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13727
13728 * configure.ac: Correct td_thr_tls_get_addr test.
13729 * configure: Regenerated.
13730
13731 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13732
13733 * linux-low.c (linux_wait_for_event): Reformat. Use the
13734 pass_signals array.
13735 * remote-utils.c (decode_address_to_semicolon): New.
13736 * server.c (pass_signals, handle_general_set): New.
13737 (handle_query): Mention QPassSignals for qSupported.
13738 (main): Call handle_general_set.
13739 * server.h (pass_signals, decode_address_to_semicolon): New.
13740
13741 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13742
13743 * server.c (handle_query): Correct error handling for read_auxv.
13744
13745 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13746
13747 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13748 and srv_linux_thread_db to yes.
13749 * linux-s390-low.c (s390_fill_gregset): New function.
13750 (target_regsets): Define data structure.
13751
13752 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13753
13754 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13755 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13756 * config.in, configure: Regenerated.
13757 * inferiors.c (gdb_id_to_thread): New function.
13758 (gdb_id_to_thread_id): Use it.
13759 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13760 * linux-low.h (struct process_info): Add th member.
13761 (thread_db_get_tls_address): New prototype.
13762 * remote-utils.c (decode_address): Make non-static.
13763 * server.c (handle_query): Handle qGetTLSAddr.
13764 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13765 * target.h (struct target_ops): Add get_tls_address.
13766 * thread-db.c (maybe_attach_thread): Save the thread handle.
13767 (thread_db_get_tls_address): New.
13768
13769 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13770
13771 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13772 (linux_resume_one_process): Take a siginfo_t *. Update all
13773 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13774 (struct pending_signals): Add a siginfo_t.
13775 (linux_wait_for_process): Always set last_status.
13776 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13777 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13778 * linux-low.h (struct process_info): Add last_status.
13779
13780 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13781
13782 * remote-utils.c (try_rle): New function.
13783 (putpkt_binary): Use it.
13784
13785 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13786
13787 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13788 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13789 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13790 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13791 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13792 point registers.
13793
13794 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13795
13796 * server.c (terminal_fd): New variable.
13797 (old_foreground_pgrp): Likewise.
13798 (restore_old_foreground_pgrp): New function.
13799 (start_inferior): Record the terminal file descriptor in terminal_fd
13800 and its original foreground group in old_foreground_pgrp. Register
13801 restore_old_foreground_pgrp with atexit().
13802
13803 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * server.c (handle_query): Correct qPart to qXfer.
13806
13807 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13808
13809 * configure.ac: Check for more headers which are missing on
13810 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13811 * configure.srv: Add Cygwin and mingw32.
13812 * remote-utils.c: Don't include headers unconditionally which
13813 are missing on mingw32. Include <winsock.h> for mingw32.
13814 (remote_open): Adjust for mingw32 support. Flush
13815 standard error after writing to it.
13816 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13817 (unblock_async_io, enable_async_io, disable_async_io)
13818 (readchar, getpkt): Update for Winsock support.
13819 (prepare_resume_reply): Expect a protocol signal number.
13820 * server.c: Disable <sys/wait.h> on mingw32.
13821 (start_inferior): Adjust for mingw32 support. Flush
13822 standard error after writing to it.
13823 (attach_inferior): Likewise. Use protocol signal
13824 numbers.
13825 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13826 and names.
13827 * win32-i386-low.c: New file.
13828 * Makefile.in (XM_CLIBS): Set.
13829 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13830 (win32-i386-low.o): New dependency rule.
13831 * linux-low.c (linux_wait): Use target signal numbers.
13832 * target.h (struct target_ops): Doc fix.
13833 * server.h (target_signal_to_name): New prototype.
13834 * gdbreplay.c: Don't include headers unconditionally which
13835 are missing on mingw32. Include <winsock.h> for mingw32.
13836 (remote_close, remote_open): Adjust for Winsock support.
13837 * configure, config.in: Regenerated.
13838
13839 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13840
13841 * server.c (decode_xfer_read, write_qxfer_response): New.
13842 (handle_query): Take a packet length argument. Handle
13843 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13844 the qSupported response.
13845 (main): Update call to handle_query.
13846
13847 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13848
13849 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13850 (putpkt_binary): Renamed from putpkt and adjusted for binary
13851 data.
13852 (putpkt): New wrapper for putpkt_binary.
13853 (readchar): Don't mask off the high bit.
13854 (decode_X_packet): New function.
13855 * server.c (main): Call putpkt_binary if a handler sets the packet
13856 length. Save the length of the incoming packet. Handle 'X'.
13857 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13858
13859 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13860
13861 * server.c (handle_query): Handle qSupported.
13862
13863 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13864
13865 * remote-utils.c (all_symbols_looked_up): New variable.
13866 (look_up_one_symbol): Check it.
13867 * server.h (look_up_one_symbol): New declaration.
13868 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13869
13870 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * Makefile.in (linux-arm-low.o): Update dependencies.
13873 * linux-arm-low.c: Include "gdb_proc_service.h".
13874 (PTRACE_GET_THREAD_AREA): Define.
13875 (ps_get_thread_area): New function.
13876
13877 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13878
13879 * configure.srv (m68k*-*-uclinux*): New target.
13880 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13881 (linux_resume_one_process): Remove extraneous cast.
13882 (linux_read_offsets): New.
13883 (linux_target_op): Add linux_read_offsets on mmuless systems.
13884 * server.c (handle_query): Add qOffsets logic.
13885 * target.h (struct target_ops): Add read_offsets.
13886
13887 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13888
13889 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13890 (PTRACE_GET_THREAD_AREA): Define.
13891 (ps_get_thread_area): New function.
13892 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13893 (linux-x86-64-low.o): Update.
13894
13895 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13896
13897 * configure.ac: Remove checks for prfpregset_t.
13898 * gdb_proc_service.h: New file.
13899 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13900 new "gdb_proc_service.h".
13901 * proc-service.c: Likewise.
13902 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13903 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13904 * Makefile.in (gdb_proc_service_h): Updated.
13905 * configure, config.in: Regenerated.
13906
13907 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13908
13909 * remote-utils.c (prepare_resume_reply): Move declaration
13910 of gdb_id_from_wait to the top of the block.
13911
13912 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13913
13914 * linux-low.c (regsets_store_inferior_registers): Read the regset
13915 from the target before filling it.
13916
13917 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13918
13919 * server.c (attach_inferior): Return SIGTRAP for a successful
13920 attach.
13921
13922 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13923
13924 * Makefile.in (OBS): Add version.o.
13925 (STAGESTUFF): Delete.
13926 (version.o): Add dependencies.
13927 (version.c): Replace rule.
13928 (clean): Remove version.c.
13929 * server.c (gdbserver_version): New.
13930 (gdbserver_usage): Use printf.
13931 (main): Handle --version and --help.
13932 * server.h (version, host_name): Add declarations.
13933
13934 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13935
13936 * linux-arm-low.c:
13937 * linux-arm-low.c:
13938 * inferiors.c:
13939 * i387-fp.h:
13940 * i387-fp.c:
13941 * gdbreplay.c:
13942 * regcache.c:
13943 * proc-service.c:
13944 * mem-break.h:
13945 * mem-break.c:
13946 * linux-x86-64-low.c:
13947 * linux-sh-low.c:
13948 * linux-s390-low.c:
13949 * linux-ppc64-low.c:
13950 * linux-ppc-low.c:
13951 * linux-mips-low.c:
13952 * linux-m68k-low.c:
13953 * linux-m32r-low.c:
13954 * linux-low.h:
13955 * linux-low.c:
13956 * linux-ia64-low.c:
13957 * linux-i386-low.c:
13958 * linux-crisv32-low.c:
13959 * thread-db.c:
13960 * terminal.h:
13961 * target.h:
13962 * target.c:
13963 * server.h:
13964 * server.c:
13965 * remote-utils.c:
13966 * regcache.h:
13967 * utils.c:
13968 * Makefile.in:
13969 * configure.ac:
13970 * gdbserver.1: Add (C) after Copyright. Update the FSF
13971 address.
13972
13973 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13974
13975 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13976 (arm_breakpoint_at): Recognize both breakpoints.
13977 (the_low_target): Use the correct breakpoint instruction.
13978
13979 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13980
13981 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13982 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13983 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13984 (the_low_target): Update.
13985
13986 2005-10-25 Andreas Schwab <schwab@suse.de>
13987
13988 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13989
13990 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13991 (ia64_num_regs): Reduce to 462.
13992
13993 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13994
13995 * acinclude.m4: Correct quoting.
13996 * aclocal.m4: Regenerated.
13997
13998 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13999 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14000 (thread_db_init): Call thread_db_err_str.
14001 * configure.ac: Check for TD_VERSION.
14002 * config.in, configure: Regenerated.
14003
14004 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14005
14006 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14007
14008 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14009
14010 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14011 is not available. Define HAVE_PTRACE_GETREGS if it is.
14012 * config.in, configure: Regenerated.
14013 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14014 * linux-i386-low.c, linux-m68k-low.c: Update to use
14015 HAVE_PTRACE_GETREGS.
14016 * linux-low.c (regsets_fetch_inferior_registers)
14017 (regsets_store_inferior_registers): Only return 0 if we processed
14018 GENERAL_REGS.
14019 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14020 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14021
14022 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14023
14024 * inferiors.c (struct thread_info): Add gdb_id.
14025 (add_thread): Add gdb_id argument.
14026 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14027 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14028 calls to add_thread.
14029 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14030 * server.c (handle_query): Use thread_to_gdb_id.
14031 (handle_v_cont, main): Use gdb_id_to_thread_id.
14032 * server.h (add_thread): Update prototype.
14033 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14034 prototypes.
14035
14036 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14037
14038 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14039 left-padded registers.
14040 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14041 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14042
14043 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14044
14045 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14046 * configure: Regenerate.
14047 * config.in: Regenerate.
14048 * server.h (NEED_DECLARATION_STRERROR):
14049 Replace with !HAVE_DECL_STRERROR.
14050
14051 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14052
14053 * linux-low.c (linux_wait, linux_send_signal): Don't test
14054 an unsigned long variable for > 0 if it could be MAX_ULONG.
14055 * server.c (myresume): Likewise.
14056 * target.c (set_desired_inferior): Likewise.
14057
14058 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14059
14060 * configure.ac: Simplify and improve check for socklen_t.
14061 * configure, config.in: Regenerate.
14062
14063 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14064
14065 * acconfig.h: Remove.
14066 * configure.ac: Add a test for socklen_t. Use three-argument
14067 AC_DEFINE throughout.
14068 * config.in: Regenerated using autoheader 2.59.
14069 * configure: Regenerated.
14070
14071 * gdbreplay.c (socklen_t): Provide a default.
14072 (remote_open): Use socklen_t.
14073 * remote-utils.c (socklen_t): Provide a default.
14074 (remote_open): Use socklen_t.
14075 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14076 unsigned char.
14077
14078 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14079 char for buffers.
14080 * linux-low.c (linux_read_memory, linux_write_memory)
14081 (linux_read_auxv): Likewise.
14082 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14083 (check_mem_write): Likewise.
14084 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14085 Likewise.
14086 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14087 (registers_from_string, register_data): Likewise.
14088 * server.c (handle_query, main): Likewise.
14089 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14090 (decode_M_packet): Likewise.
14091 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14092 * target.h (struct target_ops): Update read_memory, write_memory,
14093 and read_auxv.
14094 (read_inferior_memory, write_inferior_memory): Update.
14095 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14096 to unsigned char *.
14097 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14098 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14099 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14100 linux-s390-low.c, linux-sh-low.c: Update for changes in
14101 read_inferior_memory and the_low_target->breakpoint.
14102
14103 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14104
14105 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14106 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14107 * configure.srv: Add powerpc64-*-linux*.
14108 * linux-ppc64-low.c: New file.
14109
14110 2005-05-23 Orjan Friberg <orjanf@axis.com>
14111
14112 * linux-cris-low.c: New file with support for CRIS.
14113 * linux-crisv32-low.c: Ditto for CRISv32.
14114 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14115 (clean): Add reg-cris.c and reg-crisv32.c.
14116 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14117 reg-crisv32.o, and reg-crisv32.c to make rules.
14118 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14119 recognized targets.
14120
14121 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14122
14123 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14124 of sizeof (PTRACE_XFER_TYPE).
14125 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14126
14127 2005-05-12 Orjan Friberg <orjanf@axis.com>
14128
14129 * target.h (struct target_ops): Add insert_watchpoint,
14130 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14131 pointers for hardware watchpoint support.
14132 * linux-low.h (struct linux_target_ops): Ditto.
14133 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14134 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14135 to linux_target_ops.
14136 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14137 reply packet.
14138 * server.c (main): Recognize 'Z' and 'z' packets.
14139
14140 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14141
14142 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14143 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14144 (the_low_target): Add new members.
14145
14146 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14147
14148 * proc-service.c (ps_lgetregs): Search all_processes instead of
14149 all_threads.
14150
14151 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14152
14153 * server.c (start_inferior): Change return type to int.
14154 (attach_inferior): Change sigptr to int *.
14155 (handle_v_cont, handle_v_requests): Change signal to int *.
14156 (main): Change signal to int.
14157
14158 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14159
14160 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14161 * configure.srv: Add m32r*-*-linux*.
14162 * linux-m32r-low.c: New file.
14163
14164 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14165
14166 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14167
14168 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14169
14170 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14171 Take unsigned long arguments for PIDs.
14172 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14173 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14174 (wait_for_sigstop, linux_resume_one_process)
14175 (regsets_fetch_inferior_registers, linux_send_signal)
14176 (linux_read_auxv): Likewise. Update the types of variables holding
14177 PIDs. Update format string specifiers.
14178 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14179 * remote-utils.c (prepare_resume_reply): Likewise.
14180 * server.c (cont_thread, general_thread, step_thread)
14181 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14182 unsigned long.
14183 (handle_query): Update format specifiers.
14184 (handle_v_cont, main): Use strtoul for thread IDs.
14185 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14186 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14187 (general_thread, step_thread, thread_from_wait)
14188 (old_thread_from_wait): Update.
14189 * target.h (struct thread_resume): Use unsigned long for THREAD.
14190 (struct target_ops): Use unsigned long for arguments to attach and
14191 thread_alive.
14192
14193 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14194
14195 * acinclude.m4: Include bfd/bfd.m4 directly.
14196 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14197 <agriffis@toolchain.org>.
14198 * aclocal.m4, configure: Regenerated.
14199
14200 2005-01-07 Andrew Cagney <cagney@gnu.org>
14201
14202 * configure.ac: Rename configure.in, require autoconf 2.59.
14203 * configure: Re-generate.
14204
14205 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14206
14207 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14208 LIBS when finished.
14209 * aclocal.m4: Regenerated.
14210 * configure: Regenerated.
14211
14212 2004-11-21 Andreas Schwab <schwab@suse.de>
14213
14214 * linux-m68k-low.c (m68k_num_gregs): Define.
14215 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14216 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14217 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14218 (m68k_breakpoint_at): New. Add to the_low_target.
14219
14220 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14221 srv_linux_thread_db to yes.
14222
14223 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14224
14225 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14226 (ARCH_SET_FS): Likewise.
14227 (ARCH_GET_FS): Likewise.
14228 (ARCH_GET_GS): Likewise.
14229
14230 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14231
14232 * linux-i386-low.c (ps_get_thread_area): New.
14233 * linux-x86-64-low.c (ps_get_thread_area): New.
14234 * linux-low.c: Include <sys/syscall.h>.
14235 (linux_kill_one_process): Don't kill the first thread here.
14236 (linux_kill): Kill the first thread here.
14237 (kill_lwp): New function.
14238 (send_sigstop, linux_send_signal): Use it.
14239 * proc-service.c: Clean up #ifdefs.
14240 (fpregset_info): Delete.
14241 (ps_lgetregs): Update and enable implementation.
14242 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14243 implementations.
14244 * remote-utils.c (struct sym_cache, symbol_cache): New.
14245 (input_interrupt): Print a clearer message.
14246 (async_io_enabled): New variable.
14247 (enable_async_io, disable_async_io): Use it. Update comments.
14248 (look_up_one_symbol): Use the symbol cache.
14249 * thread-db.c (thread_db_look_up_symbols): New function.
14250 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14251
14252 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14253
14254 * configure.in: Test for -rdynamic.
14255 * configure: Regenerated.
14256 * Makefile (INTERNAL_LDFLAGS): New.
14257 (gdbserver, gdbreplay): Use it.
14258
14259 2004-09-02 Andrew Cagney <cagney@gnu.org>
14260
14261 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14262
14263 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14264
14265 * linux-low.c (linux_wait): Clear all_processes list also.
14266
14267 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14268
14269 * linux-low.c: Include <errno.h>. Remove extern declaration of
14270 errno.
14271
14272 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14273
14274 * gdbreplay.c, server.h, utils.c: Update copyright years.
14275
14276 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14277
14278 * server.c (main): Print child status or termination signal from
14279 variable 'signal', not 'sig'.
14280
14281 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14282
14283 * linux-low.c (linux_read_memory): Change return type to
14284 int. Check for and return error from ptrace().
14285 * target.c (read_inferior_memory): Change return type to int. Pass
14286 back return status from the_target->read_memory().
14287 * target.h (struct target_ops): Adapt *read_memory() prototype.
14288 Update comment.
14289 (read_inferior_memory): Adapt prototype.
14290 * server.c (main): Return an error packet if
14291 read_inferior_memory() returns an error.
14292
14293 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14294
14295 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14296 Unify with other clean targets.
14297
14298 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14299
14300 * server.c (handle_v_cont): Call set_desired_inferior.
14301
14302 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14303
14304 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14305
14306 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14307
14308 * linux-low.c (linux_wait): Unblock async I/O.
14309 (linux_resume): Block and enable async I/O.
14310 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14311 * server.h (block_async_io, unblock_async_io): Add prototypes.
14312
14313 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14314
14315 * remote-utils.c (remote_open): Print a status notice after
14316 opening a TCP port.
14317 * server.c (attach_inferior): Print a status notice after
14318 attaching.
14319
14320 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14321
14322 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14323
14324 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14325
14326 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14327 error packet.
14328 * server.c, target.h: Update copyright years.
14329
14330 2004-02-25 Roland McGrath <roland@redhat.com>
14331
14332 * target.h (struct target_ops): New member `read_auxv'.
14333 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14334 * linux-low.c (linux_read_auxv): New function.
14335 (linux_target_ops): Initialize `read_auxv' member to that.
14336
14337 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14338
14339 Committed by Jim Blandy <jimb@redhat.com>.
14340
14341 * linux-s390-low.c (s390_num_regs): Update.
14342 (s390_regmap): Remove control registers. Use __s390x__ predefine
14343 instead of GPR_SIZE to distiguish s390 and s390x targets.
14344
14345 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14346
14347 * linux-low.c: Update copyright year.
14348 (check_removed_breakpoint): Clear pending_is_breakpoint.
14349 (linux_set_resume_request, linux_queue_one_thread)
14350 (resume_status_pending_p): New functions.
14351 (linux_continue_one_thread): Use process->resume.
14352 (linux_resume): Only resume threads if there are no pending events.
14353 * linux-low.h (struct process_info): Add resume request
14354 pointer.
14355
14356 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14357
14358 * regcache.c (new_register_cache): Clear the allocated register
14359 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14360
14361 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14362
14363 * linux-low.c (linux_resume): Take a struct thread_resume *
14364 argument.
14365 (linux_wait): Update call.
14366 (resume_ptr): New static variable.
14367 (linux_continue_one_thread): Renamed from
14368 linux_continue_one_process. Use resume_ptr.
14369 (linux_resume): Use linux_continue_one_thread.
14370 * server.c (handle_v_cont, handle_v_requests): New functions.
14371 (myresume): New function.
14372 (main): Handle 'v' case.
14373 * target.h (struct thread_resume): New type.
14374 (struct target_ops): Change argument of "resume" to struct
14375 thread_resume *.
14376 (myresume): Delete macro.
14377
14378 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14379
14380 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14381 (uninstall): Support DESTDIR.
14382
14383 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14384
14385 * configure.srv: Add xscale*linux copy of arm*linux entry.
14386
14387 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14388
14389 * linux-arm-low.c (arm_reinsert_addr): New function.
14390 (the_low_target): Add arm_reinsert_addr.
14391
14392 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14393
14394 * mem-break.c: Remove whitespace at end of file.
14395
14396 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14397
14398 * configure.in: Check whether we need to prototype strerror.
14399 * server.h: Optionally prototype strerror.
14400 * gdbreplay.c (perror_with_name): Use strerror.
14401 * linux-low.c (linux_attach_lwp): Use strerror.
14402 * utils.c (perror_with_name): Use strerror.
14403 * config.in, configure: Regenerated.
14404
14405 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14406
14407 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14408 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14409
14410 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14411
14412 * Makefile.in (SFILES): Update.
14413 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14414 low-sun3.c: Remove files.
14415
14416 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14417
14418 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14419 (linux_detach_one_process, linux_detach): New functions.
14420 (linux_target_ops): Add linux_detach.
14421 * server.c (main): Handle 'D' packet.
14422 * target.h (struct target_ops): Add "detach" member.
14423 (detach_inferior): Define.
14424
14425 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14426
14427 From Kelley Cook <kelleycook@wideopenwest.com>:
14428 * configure.srv: Accept i[34567]86 variants.
14429
14430 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14431
14432 * linux-low.c (linux_wait_for_event): Correct comment typos.
14433 (linux_resume_one_process): Call check_removed_breakpoint.
14434 (linux_send_signal): New function.
14435 (linux_target_ops): Add linux_send_signal.
14436 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14437 of kill.
14438 * target.h (struct target_ops): Add send_signal.
14439
14440 2003-05-29 Jim Blandy <jimb@redhat.com>
14441
14442 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14443 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14444 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14445 away part of the register's value.
14446
14447 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14448
14449 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14450 (linux_wait_for_event, linux_init_signals): Likewise.
14451
14452 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14453
14454 * configure.in: Check for stdlib.h.
14455 * configure: Regenerated.
14456 * config.in: Regenerated.
14457
14458 2003-01-04 Andreas Schwab <schwab@suse.de>
14459
14460 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14461
14462 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14463
14464 * Makefile.in: Remove obsolete code.
14465
14466 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14467
14468 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14469 defined(PT_FPR0_HI).
14470
14471 2002-11-17 Stuart Hughes <seh@zee2.com>
14472
14473 * linux-arm-low.c (arm_num_regs): Increase.
14474 (arm_regmap): Include status register.
14475
14476 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14477
14478 * linux-low.c (register_addr): Remove incorrect -1 check.
14479
14480 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14481
14482 * linux-low.c (linux_create_inferior): Call setpgid. Return
14483 the new PID.
14484 (unstopped_p, linux_signal_pid): Remove.
14485 (linux_target_ops): Remove linux_signal_pid.
14486 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14487 global instead of target method.
14488 * target.h (struct target_ops): Remove signal_pid. Update comment
14489 for create_inferior.
14490 * server.c (signal_pid): New variable.
14491 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14492 gdbserver. Set the child to be the foreground process group.
14493 (attach_inferior): Set signal_pid.
14494
14495 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14496
14497 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14498
14499 2002-08-20 Jim Blandy <jimb@redhat.com>
14500
14501 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14502 default for this.
14503
14504 2002-08-01 Andrew Cagney <cagney@redhat.com>
14505
14506 * Makefile.in: Make chill references obsolete.
14507
14508 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14509
14510 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14511 * configure: Regenerate.
14512 * config.in: Regenerate.
14513
14514 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14515
14516 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14517 (perror_with_name, remote_close, remote_open, expect, play): Static.
14518
14519 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14520
14521 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14522 byte offsets instead of an array of indexes.
14523 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14524
14525 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14526
14527 * regcache.c: Add comment.
14528
14529 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14530
14531 * thread-db.c: New file.
14532 * proc-service.c: New file.
14533 * acinclude.m4: New file.
14534 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14535 proc-service.o, and thread-db.o.
14536 (linux-low.o): Add USE_THREAD_DB.
14537 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14538 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14539 * aclocal.m4: Regenerated.
14540 * config.in: Regenerated.
14541 * configure: Regenerated.
14542 * configure.in: Check for proc_service.h, sys/procfs.h,
14543 thread_db.h, and linux/elf.h headrs.
14544 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14545 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14546 Check for -lthread_db and thread support.
14547 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14548 PowerPC, and SuperH.
14549 * i387-fp.c: Constify arguments.
14550 * i387-fp.h: Likewise.
14551 * inferiors.c: (struct thread_info): Renamed from
14552 `struct inferior_info'. Remove PID member. Use generic inferior
14553 list header. All uses updated.
14554 (inferiors, signal_pid): Removed.
14555 (all_threads): New variable.
14556 (get_thread): Define.
14557 (add_inferior_to_list): New function.
14558 (for_each_inferior): New function.
14559 (change_inferior_id): New function.
14560 (add_inferior): Removed.
14561 (remove_inferior): New function.
14562 (add_thread): New function.
14563 (free_one_thread): New function.
14564 (remove_thread): New function.
14565 (clear_inferiors): Use for_each_inferior and free_one_thread.
14566 (find_inferior): New function.
14567 (find_inferior_id): New function.
14568 (inferior_target_data): Update argument type.
14569 (set_inferior_target_data): Likewise.
14570 (inferior_regcache_data): Likewise.
14571 (set_inferior_regcache_data): Likewise.
14572 * linux-low.c (linux_bp_reinsert): Remove.
14573 (all_processes, stopping_threads, using_thrads)
14574 (struct pending_signals, debug_threads, pid_of): New.
14575 (inferior_pid): Replace with macro.
14576 (struct inferior_linux_data): Remove.
14577 (get_stop_pc, add_process): New functions.
14578 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14579 Use add_process and add_thread.
14580 (linux_attach_lwp): New function, based on old linux_attach. Use
14581 add_process and add_thread. Set stop_expected for new threads.
14582 (linux_attach): New function.
14583 (linux_kill_one_process): New function.
14584 (linux_kill): Kill all LWPs.
14585 (linux_thread_alive): Use find_inferior_id.
14586 (check_removed_breakpoints, status_pending_p): New functions.
14587 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14588 Update. Use WNOHANG. Wait for cloned processes also. Update process
14589 struct for the found process.
14590 (linux_wait_for_event): New function.
14591 (linux_wait): Use it. Support LWPs.
14592 (send_sigstop, wait_for_sigstop, stop_all_processes)
14593 (linux_resume_one_process, linux_continue_one_process): New functions.
14594 (linux_resume): Support LWPs.
14595 (REGISTER_RAW_SIZE): Remove.
14596 (fetch_register): Use register_size instead. Call supply_register.
14597 (usr_store_inferior_registers): Likewise. Call collect_register.
14598 Fix recursive case.
14599 (regsets_fetch_inferior_registers): Improve error message.
14600 (regsets_store_inferior_registers): Add debugging.
14601 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14602 (unstopped_p, linux_signal_pid): New functions.
14603 (linux_target_ops): Add linux_signal_pid.
14604 (linux_init_signals): New function.
14605 (initialize_low): Call it. Initialize using_threads.
14606 * regcache.c (inferior_regcache_data): Add valid
14607 flag.
14608 (get_regcache): Fetch registers lazily. Add fetch argument
14609 and update all callers.
14610 (regcache_invalidate_one, regcache_invalidate): New
14611 functions.
14612 (new_register_cache): Renamed from create_register_cache.
14613 Return the new regcache.
14614 (free_register_cache): Change argument to a void *.
14615 (registers_to_string, registers_from_string): Call get_regcache
14616 with fetch flag set.
14617 (register_data): Make static. Pass fetch flag to get_regcache.
14618 (supply_register): Call get_regcache with fetch flag clear.
14619 (collect_register): Call get_regcache with fetch flag set.
14620 (collect_register_as_string): New function.
14621 * regcache.h: Update.
14622 * remote-utils.c (putpkt): Flush after debug output and use
14623 stderr.
14624 Handle input interrupts while waiting for an ACK.
14625 (input_interrupt): Use signal_pid method.
14626 (getpkt): Flush after debug output and use stderr.
14627 (outreg): Use collect_register_as_string.
14628 (new_thread_notify, dead_thread_notify): New functions.
14629 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14630 and general_thread.
14631 (look_up_one_symbol): Flush after debug output.
14632 * server.c (step_thread, server_waiting): New variables.
14633 (start_inferior): Don't use signal_pid. Update call to mywait.
14634 (attach_inferior): Update call to mywait.
14635 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14636 (main): Don't fetch/store registers explicitly. Use
14637 set_desired_inferior. Support proposed ``Hs'' packet. Update
14638 calls to mywait.
14639 * server.h: Update.
14640 (struct inferior_list, struct_inferior_list_entry): New.
14641 * target.c (set_desired_inferior): New.
14642 (write_inferior_memory): Constify.
14643 (mywait): New function.
14644 * target.h: Update.
14645 (struct target_ops): New signal_pid method.
14646 (mywait): Removed macro, added prototype.
14647
14648 * linux-low.h (regset_func): Removed.
14649 (regset_fill_func, regset_store_func): New.
14650 (enum regset_type): New.
14651 (struct regset_info): Add type field. Use new operation types.
14652 (struct linux_target_ops): stop_pc renamed to get_pc.
14653 Add decr_pc_after_break and breakpoint_at.
14654 (get_process, get_thread_proess, get_process_thread)
14655 (strut process_info, all_processes, linux_attach_lwp)
14656 (thread_db_init): New.
14657
14658 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14659 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14660 (the_low_target): Add new members.
14661 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14662 (i386_store_fpxregset): Constify.
14663 (target_regsets): Add new kind identifier.
14664 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14665 (i386_set_pc): Add debugging.
14666 (i386_breakpoint_at): New function.
14667 (the_low_target): Add new members.
14668 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14669 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14670 (mips_breakpoint_at): New.
14671 (the_low_target): Add new members.
14672 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14673 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14674 (the_low_target): Add new members.
14675 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14676 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14677 (the_low_target): Add new members.
14678 * linux-x86-64-low.c (target_regsets): Add new kind
14679 identifier.
14680
14681 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14682
14683 From Martin Pool <mbp@samba.org>:
14684 * server.c (gdbserver_usage): New function.
14685 (main): Call it.
14686
14687 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14688
14689 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14690 stop_at -> stop_pc.
14691
14692 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14693
14694 * Makefile.in: Remove obsolete code.
14695
14696 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14697
14698 * linux-low.c (regsets_fetch_inferior_registers),
14699 (regsets_store_inferior_registers): Removed cast to int from
14700 ptrace() calls.
14701 * regcache.h: Added declaration of struct inferior_info.
14702
14703 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14704
14705 * inferiors.c (struct inferior_info): Add regcache_data.
14706 (add_inferior): Call create_register_cache.
14707 (clear_inferiors): Call free_register_cache.
14708 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14709 * regcache.c (struct inferior_regcache_data): New.
14710 (registers): Remove.
14711 (get_regcache): New function.
14712 (create_register_cache, free_register_cache): New functions.
14713 (set_register_cache): Don't initialize the register cache here.
14714 (registers_to_string, registers_from_string, register_data): Call
14715 get_regcache.
14716 * regcache.h: Add prototypes.
14717 * server.h: Likewise.
14718
14719 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14720
14721 * mem-break.c: New file.
14722 * mem-break.h: New file.
14723 * Makefile.in: Add mem-break.o rule; update server.h
14724 dependencies.
14725 * inferiors.c (struct inferior_info): Add target_data
14726 member.
14727 (clear_inferiors): Free target_data member if set.
14728 (inferior_target_data, set_inferior_target_data): New functions.
14729 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14730 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14731 * linux-low.c (linux_bp_reinsert): New variable.
14732 (struct inferior_linux_data): New.
14733 (linux_create_inferior): Use set_inferior_target_data.
14734 (linux_attach): Likewise. Call add_inferior.
14735 (linux_wait_for_one_inferior): New function.
14736 (linux_wait): Call it.
14737 (linux_write_memory): Add const.
14738 (initialize_low): Call set_breakpoint_data.
14739 * linux-low.h (struct linux_target_ops): Add breakpoint
14740 handling members.
14741 * server.c (attach_inferior): Remove extra add_inferior
14742 call.
14743 * server.h: Include mem-break.h. Update inferior.c
14744 prototypes.
14745 * target.c (read_inferior_memory)
14746 (write_inferior_memory): New functions.
14747 * target.h (read_inferior_memory)
14748 (write_inferior_memory): Change macros to prototypes.
14749 (struct target_ops): Update comments. Add const to write_memory
14750 definition.
14751
14752 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14753
14754 * linux-low.c (usr_store_inferior_registers): Support
14755 registers which are allowed to fail to store.
14756 * linux-low.h (linux_target_ops): Likewise.
14757 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14758 (ppc_cannot_store_register): FPSCR may not be storable.
14759
14760 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14761
14762 * server.h: Include <string.h> if HAVE_STRING_H.
14763 * ChangeLog: Correct paths in last ChangeLog entry.
14764
14765 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14766
14767 * linux-low.h: Remove obsolete prototypes.
14768 (struct linux_target_ops): New.
14769 (extern the_low_target): New.
14770 * linux-low.c (num_regs, regmap): Remove declarations.
14771 (register_addr): Use the_low_target explicitly.
14772 (fetch_register): Likewise.
14773 (usr_fetch_inferior_registers): Likewise.
14774 (usr_store_inferior_registers): Likewise.
14775 * linux-arm-low.c (num_regs): Remove.
14776 (arm_num_regs): Define.
14777 (arm_regmap): Renamed from regmap, made static.
14778 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14779 made static.
14780 (arm_cannot_store_register): Renamed from cannot_store_register,
14781 made static.
14782 (the_low_target): New.
14783 * linux-i386-low.c (num_regs): Remove.
14784 (i386_num_regs): Define.
14785 (i386_regmap): Renamed from regmap, made static.
14786 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14787 made static.
14788 (i386_cannot_store_register): Renamed from cannot_store_register,
14789 made static.
14790 (the_low_target): New.
14791 * linux-ia64-low.c (num_regs): Remove.
14792 (ia64_num_regs): Define.
14793 (ia64_regmap): Renamed from regmap, made static.
14794 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14795 made static.
14796 (ia64_cannot_store_register): Renamed from cannot_store_register,
14797 made static.
14798 (the_low_target): New.
14799 * linux-m68k-low.c (num_regs): Remove.
14800 (m68k_num_regs): Define.
14801 (m68k_regmap): Renamed from regmap, made static.
14802 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14803 made static.
14804 (m68k_cannot_store_register): Renamed from cannot_store_register,
14805 made static.
14806 (the_low_target): New.
14807 * linux-mips-low.c (num_regs): Remove.
14808 (mips_num_regs): Define.
14809 (mips_regmap): Renamed from regmap, made static.
14810 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14811 made static.
14812 (mips_cannot_store_register): Renamed from cannot_store_register,
14813 made static.
14814 (the_low_target): New.
14815 * linux-ppc-low.c (num_regs): Remove.
14816 (ppc_num_regs): Define.
14817 (ppc_regmap): Renamed from regmap, made static.
14818 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14819 made static.
14820 (ppc_cannot_store_register): Renamed from cannot_store_register,
14821 made static.
14822 (the_low_target): New.
14823 * linux-s390-low.c (num_regs): Remove.
14824 (s390_num_regs): Define.
14825 (s390_regmap): Renamed from regmap, made static.
14826 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14827 made static.
14828 (s390_cannot_store_register): Renamed from cannot_store_register,
14829 made static.
14830 (the_low_target): New.
14831 * linux-sh-low.c (num_regs): Remove.
14832 (sh_num_regs): Define.
14833 (sh_regmap): Renamed from regmap, made static.
14834 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14835 made static.
14836 (sh_cannot_store_register): Renamed from cannot_store_register,
14837 made static.
14838 (the_low_target): New.
14839 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14840 (the_low_target): New.
14841
14842 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14843
14844 * Makefile.in: Add stamp-h target.
14845 * configure.in: Create stamp-h.
14846 * configure: Regenerated.
14847
14848 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14849
14850 * inferiors.c: New file.
14851 * target.c: New file.
14852 * target.h: New file.
14853 * Makefile.in: Add target.o and inferiors.o. Update
14854 dependencies.
14855 * linux-low.c (inferior_pid): New static variable,
14856 moved from server.c.
14857 (linux_create_inferior): Renamed from create_inferior.
14858 Call add_inferior. Return 0 on success instead of a PID.
14859 (linux_attach): Renamed from myattach.
14860 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14861 (linux_thread_alive): Renamed from mythread_alive.
14862 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14863 child dies.
14864 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14865 (regsets_store_inferior_registers): Correct error message.
14866 Add missing ``return 0''.
14867 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14868 (linux_store_registers): Renamed from store_inferior_registers.
14869 (linux_read_memory): Renamed from read_inferior_memory.
14870 (linux_write_memory): Renamed from write_inferior_memory.
14871 (linux_target_ops): New structure.
14872 (initialize_low): Call set_target_ops ().
14873 * remote-utils.c (unhexify): New function.
14874 (hexify): New function.
14875 (input_interrupt): Send signals to ``signal_pid''.
14876 * server.c (inferior_pid): Remove.
14877 (start_inferior): Update create_inferior call.
14878 (attach_inferior): Call add_inferior.
14879 (handle_query): New function.
14880 (main): Call handle_query for `q' packets.
14881 * server.h: Include "target.h". Remove obsolete prototypes.
14882 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14883
14884 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14885
14886 * Makefile.in: Add WARN_CFLAGS. Update configury
14887 dependencies.
14888 * configure.in: Check for <string.h>
14889 * configure: Regenerate.
14890 * config.in: Regenerate.
14891 * gdbreplay.c: Include needed system headers.
14892 (remote_open): Remove strchr prototype.
14893 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14894 * regcache.c (supply_register): Change buf argument to const void *.
14895 (supply_register_by_name): Likewise.
14896 (collect_register): Change buf argument to void *.
14897 (collect_register_by_name): Likewise.
14898 * regcache.h: Add missing prototypes.
14899 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14900 * server.c (handle_query): New function.
14901 (attached): New static variable, moved out of main.
14902 (main): Quiet longjmp clobber warnings.
14903 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14904 * utils.c (error): Remove NORETURN.
14905 (fatal): Likewise.
This page took 0.368293 seconds and 4 git commands to generate.