1 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3 * Makefile.in (%-ipa.o: %.c): New rule.
4 (tracepoint-ipa.o: tracepoint.c): Remove.
5 (utils-ipa.o: utils.c): Remove.
6 (remote-utils-ipa.o: remote-utils.c): Remove.
7 (regcache-ipa.o: regcache.c): Remove.
8 (i386-linux-ipa.o: i386-linux.c): Remove.
9 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
10 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
11 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
12 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
13 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
14 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
15 (amd64-linux-ipa.o: amd64-linux.c): Remove.
16 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
17 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
18 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
19 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
20 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
21 (aarch64-ipa.o: aarch64.c): Remove.
22 (s390-linux32-ipa.o: s390-linux32.c): Remove.
23 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
24 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
25 (s390-linux64-ipa.o: s390-linux64.c): Remove.
26 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
27 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
28 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
29 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
30 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
31 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
32 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
33 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
34 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
35 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
36 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
37 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
38 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
39 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
40 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
41 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
42 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
43 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
44 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
45 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
46 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
47 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
48 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
49 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
50 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
51 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
52 (tdesc-ipa.o: tdesc.c): Remove.
53 (x32-linux-ipa.o: x32-linux.c): Remove.
54 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
55 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
57 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
59 * Makefile.in (%.o: ../arch/%.c): New rule.
60 (arm.o: ../arch/arm.c): Remove.
61 (arm-linux.o: ../arch/arm-linux.c): Remove.
62 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
63 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
65 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
67 * Makefile.in (%.o: ../nat/%.c): New rule.
68 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
69 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
70 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
71 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
72 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
73 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
74 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
75 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
76 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
77 (linux-personality.o: ../nat/linux-personality.c): Remove.
78 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
79 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
80 (x86-linux.o: ../nat/x86-linux.c): Remove.
81 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
82 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
84 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
86 * Makefile.in (%.o: ../common/%.c): New rule.
87 (signals.o: ../common/signals.c): Remove.
88 (print-utils.o: ../common/print-utils.c): Remove.
89 (rsp-low.o: ../common/rsp-low.c): Remove.
90 (common-utils.o: ../common/common-utils.c): Remove.
91 (posix-strerror.o: ../common/posix-strerror.c): Remove.
92 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
93 (vec.o: ../common/vec.c): Remove.
94 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
95 (xml-utils.o: ../common/xml-utils.c): Remove.
96 (ptid.o: ../common/ptid.c): Remove.
97 (buffer.o: ../common/buffer.c): Remove.
98 (format.o: ../common/format.c): Remove.
99 (filestuff.o: ../common/filestuff.c): Remove.
100 (agent.o: ../common/agent.c): Remove.
101 (errors.o: ../common/errors.c): Remove.
102 (environ.o: ../common/environ.c): Remove.
103 (common-debug.o: ../common/common-debug.c): Remove.
104 (cleanups.o: ../common/cleanups.c): Remove.
105 (common-exceptions.o: ../common/common-exceptions.c): Remove.
106 (fileio.o: ../common/fileio.c): Remove.
107 (common-regcache.o: ../common/common-regcache.c): Remove.
108 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
109 (new-op.o: ../common/new-op.c): Remove.
110 (btrace-common.o: ../common/btrace-common.c): Remove.
112 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
114 * Makefile.in (%.o: ../target/%.c): New rule.
115 (waitstatus.o: ../target/waitstatus.c): Remove.
117 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
120 (%.c: ../regformats/%.dat,
121 (%.c: ../regformats/arm/%.dat,
122 (%.c: ../regformats/i386/%.dat,
123 (%.c: ../regformats/rs6000/%.dat): New rules.
126 (arm-with-iwmmxt.c): Remove.
127 (arm-with-vfpv2.c): Remove.
128 (arm-with-vfpv3.c): Remove.
129 (arm-with-neon.c): Remove.
130 (reg-bfin.c): Remove.
131 (reg-cris.c): Remove.
132 (reg-crisv32.c): Remove.
134 (i386-linux.c): Remove.
135 (i386-avx.c): Remove.
136 (i386-avx-linux.c): Remove.
137 (i386-avx-avx512.c): Remove.
138 (i386-avx-avx512-linux.c): Remove.
139 (i386-mpx.c): Remove.
140 (i386-mpx-linux.c): Remove.
141 (i386-avx-mpx-avx512-pku.c): Remove.
142 (i386-avx-mpx-avx512-pku-linux.c): Remove.
143 (i386-avx-mpx.c): Remove.
144 (i386-avx-mpx-linux.c): Remove.
145 (i386-mmx.c): Remove.
146 (i386-mmx-linux.c): Remove.
147 (reg-ia64.c): Remove.
148 (reg-m32r.c): Remove.
149 (reg-m68k.c): Remove.
151 (mips-linux.c): Remove.
152 (mips-dsp-linux.c): Remove.
153 (mips64-linux.c): Remove.
154 (mips64-dsp-linux.c): Remove.
155 (nios2-linux.c): Remove.
156 (powerpc-32.c): Remove.
157 (powerpc-32l.c): Remove.
158 (powerpc-altivec32l.c): Remove.
159 (powerpc-cell32l.c): Remove.
160 (powerpc-vsx32l.c): Remove.
161 (powerpc-isa205-32l.c): Remove.
162 (powerpc-isa205-altivec32l.c): Remove.
163 (powerpc-isa205-vsx32l.c): Remove.
164 (powerpc-e500l.c): Remove.
165 (powerpc-64l.c): Remove.
166 (powerpc-altivec64l.c): Remove.
167 (powerpc-cell64l.c): Remove.
168 (powerpc-vsx64l.c): Remove.
169 (powerpc-isa205-64l.c): Remove.
170 (powerpc-isa205-altivec64l.c): Remove.
171 (powerpc-isa205-vsx64l.c): Remove.
172 (s390-linux32.c): Remove.
173 (s390-linux32v1.c): Remove.
174 (s390-linux32v2.c): Remove.
175 (s390-linux64.c): Remove.
176 (s390-linux64v1.c): Remove.
177 (s390-linux64v2.c): Remove.
178 (s390-te-linux64.c): Remove.
179 (s390-vx-linux64.c): Remove.
180 (s390-tevx-linux64.c): Remove.
181 (s390x-linux64.c): Remove.
182 (s390x-linux64v1.c): Remove.
183 (s390x-linux64v2.c): Remove.
184 (s390x-te-linux64.c): Remove.
185 (s390x-vx-linux64.c): Remove.
186 (s390x-tevx-linux64.c): Remove.
187 (tic6x-c64xp-linux.c): Remove.
188 (tic6x-c64x-linux.c): Remove.
189 (tic6x-c62x-linux.c): Remove.
191 (reg-sparc64.c): Remove.
194 (amd64-linux.c): Remove.
195 (amd64-avx.c): Remove.
196 (amd64-avx-linux.c): Remove.
197 (amd64-avx-avx512.c): Remove.
198 (amd64-avx-avx512-linux.c): Remove.
199 (amd64-mpx.c): Remove.
200 (amd64-mpx-linux.c): Remove.
201 (amd64-avx-mpx-avx512-pku.c): Remove.
202 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
203 (amd64-avx-mpx.c): Remove.
204 (amd64-avx-mpx-linux.c): Remove.
206 (x32-linux.c): Remove.
208 (x32-avx-linux.c): Remove.
209 (x32-avx-avx512.c): Remove.
210 (x32-avx-avx512-linux.c): Remove.
211 (reg-xtensa.c): Remove.
212 (reg-tilegx.c): Remove.
213 (reg-tilegx32.c): Remove.
215 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
217 * Makefile.in (SFILES): Add "common/environ.c".
218 (OBJS): Add "common/environ.h".
220 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
222 * configure.ac: Check if the fs_base and gs_base members of
223 `struct user_regs_struct' exist.
224 * config.in: Regenerated.
225 * configure: Likewise.
227 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
229 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
231 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
232 (get_next_pcs_syscall_next_pc): Likewise.
234 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
236 * win32-i386-low.c: Fix incorrect reference to a couple source files.
237 * nto-x86-low.c: Likewise.
239 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
241 * Makefile.in: Include disable-implicit-rules.mk.
243 2016-11-23 Pedro Alves <palves@redhat.com>
245 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
246 (debug_vprintf): Use std::chrono::steady_clock instead of
247 gettimeofday. Use '.' instead of ':'.
248 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
249 (get_timestamp): Use std::chrono::steady_clock instead of
252 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
254 * Makefile.in: Fix whitespace formatting.
256 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
258 * Makefile.in (SFILES, OBS): Flatten list and order
261 2016-11-23 Pedro Alves <palves@redhat.com>
263 * event-loop.c (handle_file_event): Use warning.
264 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
265 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
268 2016-11-23 Pedro Alves <palves@redhat.com>
270 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
272 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
273 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
274 debug_printf and debug_flush for debug output.
275 * server.c (handle_general_set): Likewise.
276 * thread-db.c (try_thread_db_load): Use debug_printf for debug
279 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
281 * Makefile.in (.c.o): Replace rule with ...
282 (%.o: %.c): ... this one.
284 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
286 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
287 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
289 * configure.ac: Remove checks for the make program.
290 * configure: Re-generate.
292 2016-10-28 Pedro Alves <palves@redhat.com>
294 * Makefile.in (CXX_DIALECT): Get from configure.
295 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
296 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
297 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
298 * config.in: Regenerate.
299 * configure: Regenerate.
301 2016-10-27 Yao Qi <yao.qi@linaro.org>
303 * linux-low.c (linux_supports_range_stepping): Return true if
304 can_software_single_step return true.
306 2016-10-27 Yao Qi <yao.qi@linaro.org>
308 * inferiors.c (find_inferior_in_random): New function.
309 * inferiors.h (find_inferior_in_random): Declare.
310 * linux-low.c (linux_wait_for_event_filtered): Call
311 find_inferior_in_random instead of find_inferior.
313 2016-10-27 Yao Qi <yao.qi@linaro.org>
315 * linux-low.c (linux_wait_1): If single-step breakpoints are
316 inserted, remove them.
318 2016-10-26 Pedro Alves <palves@redhat.com>
320 * linux-low.c (handle_extended_wait): Link parent/child fork
322 (linux_wait_1): Unlink them.
323 (linux_set_resume_request): Ignore resume requests for
324 already-resumed and unhandled fork child threads.
325 * linux-low.h (struct lwp_info) <fork_relative>: New field.
326 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
328 (handle_v_requests) <vCont>: Don't call require_running.
329 * server.h (in_queued_stop_replies): New declaration.
331 2016-10-24 Yao Qi <yao.qi@linaro.org>
334 * linux-aarch64-low.c (append_insns): Cast the return value to
337 2016-10-10 Yao Qi <yao.qi@linaro.org>
339 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
341 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
343 * target.c (target_supports_multi_process): New function, moved
345 * target.h (target_supports_multi_process): ... here. Remove
348 2016-10-05 Tom Tromey <tom@tromey.com>
351 * tracepoint.c (handle_tracepoint_bkpts): Check
352 ipa_error_tracepoint, not ipa_stopping_tracepoint.
354 2016-10-05 Yao Qi <yao.qi@linaro.org>
356 * configure.srv: Update the path of arm-*.xml files.
358 2016-10-05 Terry Guo <terry.guo@arm.com>
359 Yao Qi <yao.qi@linaro.org>
361 * Makefile.in: Adjust the path of rules.
362 * configure.srv: Update the path of xml files.
363 * regformats/arm-with-iwmmxt.dat: Regenerated.
364 * regformats/arm-with-neon.dat: Likewise.
365 * regformats/arm-with-vfpv2.dat: Likewise.
366 * regformats/arm-with-vfpv3.dat Likewise.
368 2016-09-30 Yao Qi <yao.qi@linaro.org>
371 * target.c (target_stop_and_wait): Don't call
372 target_continue_no_signal, use resume_stop instead.
374 2016-09-26 Yao Qi <yao.qi@linaro.org>
376 * linux-low.c (linux_wait_1): Call debug_exit.
378 2016-09-23 Pedro Alves <palves@redhat.com>
380 * Makefile.in (SFILES): Add common/new-op.c.
381 (OBS): Add common/new-op.o.
382 (new-op.o): New rule.
384 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
386 * .gitinore: Ignore more files.
388 2016-09-21 Yao Qi <yao.qi@linaro.org>
390 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
393 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
395 * server.c (start_inferior): Call target_mourn_inferior instead of
396 mourn_inferior; pass ptid_t argument to it.
398 (handle_target_event): Likewise.
399 * target.c (target_mourn_inferior): New function.
400 * target.h (mourn_inferior): Delete macro.
402 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
404 * linux-low.c (lwp_is_stepping): New function.
406 2016-09-06 Carl Love <cel@us.ibm.com>
408 * server.c (start_inferior): Fixed comment, requested comment change
409 didn't get updated correctly. Removed reference to ptrace () call as
410 it is only true on Linux systems.
412 2016-09-06 Carl Love <cel@us.ibm.com>
414 * server.c (start_inferior): Do not call
415 function target_post_create_inferior () if the
416 inferior process has already exited.
418 2016-09-05 Pedro Alves <palves@redhat.com>
420 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
421 (COMPILE.pre, CC_LD): Use CXX directly.
422 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
423 * acinclude.m4: Don't include build-with-cxx.m4.
424 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
425 * configure: Regenerate.
427 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
430 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
431 call writing data to own_buf.
433 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
435 * target.c (mywait): Call target_wait instead of
437 (target_wait): New function.
439 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
441 * server.c (start_inferior): New variable 'ptid'. Replace calls
442 to the_target->resume by target_continue{,_no_signal}, depending
444 * target.c (target_stop_and_wait): Call target_continue_no_signal
445 instead of the_target->resume.
446 (target_continue): New function.
448 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
450 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
452 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
455 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
457 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
458 * linux-arm-low.c (ps_get_thread_area): Likewise.
459 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
460 * linux-m68k-low.c (ps_get_thread_area): Likewise.
461 * linux-mips-low.c (ps_get_thread_area): Likewise.
462 * linux-nios2-low.c (ps_get_thread_area): Likewise.
463 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
464 * linux-x86-low.c (ps_get_thread_area): Likewise.
465 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
467 2016-08-19 Pedro Alves <palves@redhat.com>
469 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
471 2016-08-19 Pedro Alves <palves@redhat.com>
473 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
474 comment. Use memcpy instead of casting through unsigned long.
476 2016-08-19 Pedro Alves <palves@redhat.com>
478 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
479 allocating around 0x80000000.
481 2016-08-19 Pedro Alves <palves@redhat.com>
484 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
485 (x32-avx512-linux-ipa.o): New rules.
486 * configure.ac (x86_64-*-linux*): New x32 check.
487 * configure.srv (ipa_x32_linux_regobj): New.
488 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
489 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
491 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
493 * configure: Regenerate.
495 2016-08-09 Pedro Alves <palves@redhat.com>
498 * Makefile.in (OBS): Add signals-state-save-restore.o.
499 (signals-state-save-restore.o): New rule.
500 * config.in: Regenerate.
501 * configure: Regenerate.
502 * linux-low.c: Include "signals-state-save-restore.h".
503 (linux_create_inferior): Call
504 restore_original_signals_state.
505 * server.c: Include "dispositions-save-restore.h".
506 (captured_main): Call save_original_signals_state.
508 2016-08-05 Pedro Alves <palves@redhat.com>
510 * configure: Regenerate.
512 2016-08-04 Yao Qi <yao.qi@linaro.org>
514 * linux-low.c (regsets_fetch_inferior_registers): Check
515 errno is ESRCH or not.
517 2016-08-02 Yao Qi <yao.qi@linaro.org>
519 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
520 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
521 (thread_db_load_search): Update.
522 (try_thread_db_load_1): Don't look for td_ta_event_addr,
523 td_ta_set_event and td_ta_event_getmsg.
525 2016-07-26 Pedro Alves <palves@redhat.com>
528 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
529 of unsigned long for 64-bit registers and use uint32_t instead of
530 unsigned int for 32-bit registers.
532 2016-07-26 Pedro Alves <palves@redhat.com>
534 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
537 2016-07-21 Tom Tromey <tom@tromey.com>
539 * configure: Rebuild.
541 2016-07-21 Yao Qi <yao.qi@linaro.org>
543 * mem-break.c (find_gdb_breakpoint): Cast bp to
544 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
546 2016-07-21 Yao Qi <yao.qi@linaro.org>
548 * server.c (handle_v_requests): Support s and S actions
549 if target_supports_software_single_step return true.
551 2016-07-21 Yao Qi <yao.qi@linaro.org>
553 * linux-low.c (resume_stopped_resumed_lwps): If resume request
554 is resume_step, call maybe_hw_step.
555 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
557 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
559 (proceed_one_lwp): If resume request is resume_step, install
560 reinsert breakpoints and call maybe_hw_step.
562 2016-07-21 Yao Qi <yao.qi@linaro.org>
564 * linux-low.c (proceed_one_lwp): Declare.
565 (linux_resume_one_thread): Remove local variable 'step'.
566 Lift code enqueue signal. Call proceed_one_lwp instead of
567 linux_resume_one_lwp.
569 2016-07-21 Yao Qi <yao.qi@linaro.org>
571 * linux-low.c (linux_resume_one_thread): Call
572 enqueue_pending_signal.
574 2016-07-21 Yao Qi <yao.qi@linaro.org>
576 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
577 * inferiors.c (do_restore_current_thread_cleanup): New function.
578 (make_cleanup_restore_current_thread): Likewise.
579 * linux-low.c (install_software_single_step_breakpoints): Call
580 make_cleanup_restore_current_thread. Switch current_thread to
583 2016-07-21 Yao Qi <yao.qi@linaro.org>
585 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
586 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
587 (clone_one_breakpoint): Likewise.
588 (delete_reinsert_breakpoints): Change parameter to thread.
590 (has_reinsert_breakpoints): Likewise.
591 (uninsert_reinsert_breakpoints): Likewise.
592 (reinsert_reinsert_breakpoints): Likewise.
593 * mem-break.h (set_reinsert_breakpoint): Update declaration.
594 (delete_reinsert_breakpoints): Likewise.
595 (reinsert_reinsert_breakpoints): Likewise.
596 (uninsert_reinsert_breakpoints): Likewise.
597 (has_reinsert_breakpoints): Likewise.
599 2016-07-21 Yao Qi <yao.qi@linaro.org>
601 * inferiors.c (get_thread_process): Make parameter const.
602 * inferiors.h (get_thread_process): Update declaration.
603 * mem-break.c (clone_all_breakpoints): Remove all parameters.
604 Add new parameters child_thread and parent_thread. Callers
606 * mem-break.h (clone_all_breakpoints): Update declaration.
608 2016-07-21 Yao Qi <yao.qi@linaro.org>
610 * mem-break.c (struct breakpoint) <cond_list>: Remove.
611 <command_list, handler>: Remove.
612 (struct gdb_breakpoint): New.
613 (struct other_breakpoint): New.
614 (struct reinsert_breakpoint): New.
615 (is_gdb_breakpoint): New function.
616 (any_persistent_commands): Update command_list if
617 is_gdb_breakpoint returns true.
618 (set_breakpoint): Create breakpoints according to their types.
619 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
620 (set_gdb_breakpoint_1): Likewise.
621 (set_gdb_breakpoint): Likewise.
622 (clear_breakpoint_conditions): Change parameter type to
623 'struct gdb_breakpoint *'.
624 (clear_breakpoint_commands): Likewise.
625 (clear_breakpoint_conditions_and_commands): Likewise.
626 (add_condition_to_breakpoint): Likewise.
627 (add_breakpoint_condition): Likewise.
628 (add_commands_to_breakpoint): Likewise.
629 (check_breakpoints): Check other_breakpoint.
630 (clone_one_breakpoint): Clone breakpopint according to its type.
631 * mem-break.h (struct gdb_breakpoint): Declare.
632 (set_gdb_breakpoint): Update declaration.
633 (clear_breakpoint_conditions_and_commands): Likewise.
634 (add_breakpoint_condition): Likewise.
635 (add_breakpoint_commands): Likewise.
636 * server.c (process_point_options): Change parameter type to
637 'struct gdb_breakpoint *'.
639 2016-07-21 Yao Qi <yao.qi@linaro.org>
641 * mem-break.c (set_breakpoint_at): Rename it to ...
642 (set_breakpoint_type_at): ... it.
643 (set_breakpoint_at): Call set_breakpoint_type_at.
644 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
645 * mem-break.h (set_breakpoint_at): Update comments.
647 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
649 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
651 (nios2_store_gregset): Likewise.
653 2016-07-01 Pedro Alves <palves@redhat.com>
654 Antoine Tremblay <antoine.tremblay@ericsson.com>
656 * linux-low.c: Change interface to take the target lwp_info
657 pointer directly and return void. Handle detaching from a zombie
659 (linux_detach_lwp_callback): New function.
660 (linux_detach): Detach from the leader thread after detaching from
663 2016-06-28 Yao Qi <yao.qi@linaro.org>
665 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
666 for variable new_offset.
667 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
668 (aarch64_ftrace_insn_reloc_cb): Likewise.
669 (aarch64_ftrace_insn_reloc_tb): Likewise.
670 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
671 PRIx64 instead of PRIx32.
673 2016-06-28 Yao Qi <yao.qi@linaro.org>
675 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
676 (the_low_target): Install arm_get_syscall_trapinfo.
678 2016-06-28 Yao Qi <yao.qi@linaro.org>
680 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
682 (the_low_target): Install aarch64_get_syscall_trapinfo.
684 2016-06-28 Yao Qi <yao.qi@linaro.org>
686 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
688 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
689 Remove parameter sysno.
690 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
693 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
695 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
696 (s390_emit_ne_goto): Likewise.
697 (s390_emit_lt_goto): Likewise.
698 (s390_emit_le_goto): Likewise.
699 (s390_emit_gt_goto): Likewise.
700 (s390_emit_ge_goto): Likewise.
701 (s390x_emit_eq_goto): Likewise.
702 (s390x_emit_ne_goto): Likewise.
703 (s390x_emit_lt_goto): Likewise.
704 (s390x_emit_le_goto): Likewise.
705 (s390x_emit_gt_goto): Likewise.
706 (s390x_emit_ge_goto): Likewise.
707 (s390_emit_ops_impl): Mark variable static.
708 (s390x_emit_ops): Likewise.
710 2016-06-17 Yao Qi <yao.qi@linaro.org>
712 * linux-low.c (handle_extended_wait): Call
713 uninsert_reinsert_breakpoints for the parent process. Remove
714 reinsert breakpoints from the child process. Reinsert them to
715 the parent process when vfork is done.
716 * mem-break.c (uninsert_reinsert_breakpoints): New function.
717 (reinsert_reinsert_breakpoints): New function.
718 * mem-break.h (uninsert_reinsert_breakpoints): Declare
719 (reinsert_reinsert_breakpoints): Declare.
721 2016-06-17 Yao Qi <yao.qi@linaro.org>
723 * linux-low.c (handle_extended_wait): If the parent is doing
724 step-over, remove the reinsert breakpoints from the forked child.
726 2016-06-17 Yao Qi <yao.qi@linaro.org>
728 * linux-low.c (unsuspend_all_lwps): Declare.
729 (linux_low_filter_event): If thread exited, call finish_step_over.
730 If step-over is finished, unsuspend other threads.
732 2016-06-17 Yao Qi <yao.qi@linaro.org>
734 * linux-low.c (linux_resume_one_lwp_throw): Assert
735 has_reinsert_breakpoints returns false.
736 * mem-break.c (delete_disabled_breakpoints): Assert
737 bp type isn't reinsert_breakpoint.
739 2016-06-17 Yao Qi <yao.qi@linaro.org>
741 * linux-low.c (maybe_hw_step): New function.
742 (linux_resume_one_lwp_throw): Call maybe_hw_step.
743 (finish_step_over): Switch current_thread to lwp temporarily,
744 and assert has_reinsert_breakpoints returns true.
745 (proceed_one_lwp): Call maybe_hw_step.
746 * mem-break.c (has_reinsert_breakpoints): New function.
747 * mem-break.h (has_reinsert_breakpoints): Declare.
749 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
751 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
753 2016-05-17 Yao Qi <yao.qi@linaro.org>
755 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
756 instead of find_inferior.
758 2016-05-05 Yao Qi <yao.qi@linaro.org>
760 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
761 Initialize res to zero.
763 2016-05-05 Yao Qi <yao.qi@linaro.org>
765 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
768 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
770 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
771 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
772 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
774 2016-04-28 Par Olsson <par.olsson@windriver.com>
775 Simon Marchi <simon.marchi@ericsson.com>
777 * tracepoint.c (write_inferior_int8): New function.
778 (cmd_qtenable_disable): Write enable flag using
781 2016-04-25 Yao Qi <yao.qi@linaro.org>
783 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
784 (need_step_over_p): Return zero if the LWP has pending signals
785 can be delivered on software single step target.
787 2016-04-25 Yao Qi <yao.qi@linaro.org>
789 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
790 return instead of error.
792 2016-04-22 Yao Qi <yao.qi@linaro.org>
794 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
797 2016-04-22 Yao Qi <yao.qi@linaro.org>
799 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
800 signal when stepping over breakpoint with software single
803 2016-04-21 Pedro Alves <palves@redhat.com>
805 * linux-s390-low.c (s390_collect_ptrace_register)
806 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
808 (s390_check_regset): Use void * instead of gdb_byte *.
810 2016-04-20 Pedro Alves <palves@redhat.com>
812 * configure: Renegerate.
814 2016-04-20 Yao Qi <yao.qi@linaro.org>
816 * linux-aarch32-low.c: Include "arch/arm-linux.h".
817 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
819 (arm_store_gregset): Likewise.
821 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
823 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
824 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
825 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
826 (amd64-avx-mpx-linux.c): New rules.
827 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
828 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
829 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
830 (srv_amd64_regobj): Add amd64-avx-mpx.o.
831 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
832 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
833 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
834 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
835 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
836 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
837 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
838 * linux-x86-low.c (x86_linux_read_description): Add case for
839 X86_XSTATE_AVX_MPX_MASK.
840 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
841 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
842 init_registers_i386_avx_mpx_linux.
843 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
844 (initialize_low_tracepoint): Call
845 init_registers_i386_avx_mpx_linux.
846 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
847 (initialize_low_tracepoint): Call
848 init_registers_amd64_avx_mpx_linux.
849 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
850 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
851 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
854 2016-04-18 Pedro Alves <palves@redhat.com>
856 * configure: Regenerate.
858 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
860 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
861 (aarch64_emit_sub): Likewise.
863 2016-04-12 Pedro Alves <palves@redhat.com>
865 * utils.c (prepare_to_throw_exception): Delete.
867 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
869 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
871 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
873 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
875 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
877 * linux-aarch64-ipa.c: Add <elf.h> include.
878 * linux-ppc-ipa.c: Add <elf.h> include.
879 * linux-s390-ipa.c: Add <elf.h> include.
881 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
883 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
884 (get_raw_reg_ptr): Likewise.
885 (get_trace_state_variable_value_ptr): Likewise.
886 (set_trace_state_variable_value_ptr): Likewise.
887 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
890 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
891 Marcin Kościelnicki <koriakin@0x04.net>
894 * linux-ppc-low.c (emit_insns): New function.
895 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
896 (ppc_emit_prologue): New function.
897 (ppc_emit_epilogue): New function.
898 (ppc_emit_add): New function.
899 (ppc_emit_sub): New function.
900 (ppc_emit_mul): New function.
901 (ppc_emit_lsh): New function.
902 (ppc_emit_rsh_signed): New function.
903 (ppc_emit_rsh_unsigned): New function.
904 (ppc_emit_ext): New function.
905 (ppc_emit_zero_ext): New function.
906 (ppc_emit_log_not): New function.
907 (ppc_emit_bit_and): New function.
908 (ppc_emit_bit_or): New function.
909 (ppc_emit_bit_xor): New function.
910 (ppc_emit_bit_not): New function.
911 (ppc_emit_equal): New function.
912 (ppc_emit_less_signed): New function.
913 (ppc_emit_less_unsigned): New function.
914 (ppc_emit_ref): New function.
915 (ppc_emit_const): New function.
916 (ppc_emit_reg): New function.
917 (ppc_emit_pop): New function.
918 (ppc_emit_stack_flush): New function.
919 (ppc_emit_swap): New function.
920 (ppc_emit_stack_adjust): New function.
921 (ppc_emit_call): New function.
922 (ppc_emit_int_call_1): New function.
923 (ppc_emit_void_call_2): New function.
924 (ppc_emit_if_goto): New function.
925 (ppc_emit_goto): New function.
926 (ppc_emit_eq_goto): New function.
927 (ppc_emit_ne_goto): New function.
928 (ppc_emit_lt_goto): New function.
929 (ppc_emit_le_goto): New function.
930 (ppc_emit_gt_goto): New function.
931 (ppc_emit_ge_goto): New function.
932 (ppc_write_goto_address): New function.
933 (ppc_emit_ops_impl): New static variable.
934 (ppc64v1_emit_prologue): New function.
935 (ppc64v2_emit_prologue): New function.
936 (ppc64_emit_epilogue): New function.
937 (ppc64_emit_add): New function.
938 (ppc64_emit_sub): New function.
939 (ppc64_emit_mul): New function.
940 (ppc64_emit_lsh): New function.
941 (ppc64_emit_rsh_signed): New function.
942 (ppc64_emit_rsh_unsigned): New function.
943 (ppc64_emit_ext): New function.
944 (ppc64_emit_zero_ext): New function.
945 (ppc64_emit_log_not): New function.
946 (ppc64_emit_bit_and): New function.
947 (ppc64_emit_bit_or): New function.
948 (ppc64_emit_bit_xor): New function.
949 (ppc64_emit_bit_not): New function.
950 (ppc64_emit_equal): New function.
951 (ppc64_emit_less_signed): New function.
952 (ppc64_emit_less_unsigned): New function.
953 (ppc64_emit_ref): New function.
954 (ppc64_emit_const): New function.
955 (ppc64v1_emit_reg): New function.
956 (ppc64v2_emit_reg): New function.
957 (ppc64_emit_pop): New function.
958 (ppc64_emit_stack_flush): New function.
959 (ppc64_emit_swap): New function.
960 (ppc64v1_emit_call): New function.
961 (ppc64v2_emit_call): New function.
962 (ppc64v1_emit_int_call_1): New function.
963 (ppc64v2_emit_int_call_1): New function.
964 (ppc64v1_emit_void_call_2): New function.
965 (ppc64v2_emit_void_call_2): New function.
966 (ppc64_emit_if_goto): New function.
967 (ppc64_emit_eq_goto): New function.
968 (ppc64_emit_ne_goto): New function.
969 (ppc64_emit_lt_goto): New function.
970 (ppc64_emit_le_goto): New function.
971 (ppc64_emit_gt_goto): New function.
972 (ppc64_emit_ge_goto): New function.
973 (ppc64v1_emit_ops_impl): New static variable.
974 (ppc64v2_emit_ops_impl): New static variable.
975 (ppc_emit_ops): New function.
976 (linux_low_target): Wire in ppc_emit_ops.
978 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
979 Marcin Kościelnicki <koriakin@0x04.net>
982 * Makefile.in: Add powerpc-*-ipa.o
983 * configure.srv: Add ipa_obj for powerpc*-linux.
984 * linux-ppc-ipa.c: New file.
985 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
987 (PPC_FIELD): New macro.
988 (PPC_SEXT): New macro.
989 (PPC_OP6): New macro.
993 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
994 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
995 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
996 (ppc_get_thread_area): New function.
997 (is_elfv2_inferior): New function.
998 (gen_ds_form): New function.
999 (GEN_STD): New macro.
1000 (GEN_STDU): New macro.
1001 (GEN_LD): New macro.
1002 (GEN_LDU): New macro.
1003 (gen_d_form): New function.
1004 (GEN_ADDI): New macro.
1005 (GEN_ADDIS): New macro.
1006 (GEN_LI): New macro.
1007 (GEN_LIS): New macro.
1008 (GEN_ORI): New macro.
1009 (GEN_ORIS): New macro.
1010 (GEN_LWZ): New macro.
1011 (GEN_STW): New macro.
1012 (GEN_STWU): New macro.
1013 (gen_xfx_form): New function.
1014 (GEN_MFSPR): New macro.
1015 (GEN_MTSPR): New macro.
1016 (GEN_MFCR): New macro.
1017 (GEN_MTCR): New macro.
1018 (GEN_SYNC): New macro.
1019 (GEN_LWSYNC): New macro.
1020 (gen_x_form): New function.
1021 (GEN_OR): New macro.
1022 (GEN_MR): New macro.
1023 (GEN_LWARX): New macro.
1024 (GEN_STWCX): New macro.
1025 (GEN_CMPW): New macro.
1026 (gen_md_form): New function.
1027 (GEN_RLDICL): New macro.
1028 (GEN_RLDICR): New macro.
1029 (gen_i_form): New function.
1031 (GEN_BL): New macro.
1032 (gen_b_form): New function.
1033 (GEN_BNE): New macro.
1034 (GEN_LOAD): New macro.
1035 (GEN_STORE): New macro.
1036 (gen_limm): New function.
1037 (gen_atomic_xchg): New function.
1038 (gen_call): New function.
1039 (ppc_relocate_instruction): New function.
1040 (ppc_install_fast_tracepoint_jump_pad): New function.
1041 (ppc_get_min_fast_tracepoint_insn_len): New function.
1042 (ppc_get_ipa_tdesc_idx): New function.
1043 (the_low_target): Wire in the new functions.
1044 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1046 * linux-ppc-tdesc.h: New file.
1048 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1050 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1051 (alloc_jump_pad_buffer): New function.
1052 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1053 (alloc_jump_pad_buffer): New function.
1054 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1055 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1056 (alloc_jump_pad_buffer): New function.
1057 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1058 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1059 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1060 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1062 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1064 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1065 * linux-amd64-ipa.c: Likewise.
1066 * linux-i386-ipa.c: Likewise.
1067 * linux-s390-ipa.c: Likewise.
1068 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1069 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1070 set_trace_state_variable_value_ptr.
1071 (struct ipa_sym_addresses): Likewise.
1072 (symbol_list): Likewise.
1073 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1074 accessing gdb_collect directly.
1075 (gdb_collect_ptr_type): New typedef.
1076 (get_raw_reg_ptr_type): New typedef.
1077 (get_trace_state_variable_value_ptr_type): New typedef.
1078 (set_trace_state_variable_value_ptr_type): New typedef.
1079 (gdb_collect_ptr): New global.
1080 (get_raw_reg_ptr): New global.
1081 (get_trace_state_variable_value_ptr): New global.
1082 (set_trace_state_variable_value_ptr): New global.
1083 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1084 accessing get_raw_reg directly.
1085 (get_get_tsv_func_addr): Likewise for
1086 get_trace_state_variable_value_ptr.
1087 (get_set_tsv_func_addr): Likewise for
1088 set_trace_state_variable_value_ptr.
1089 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1091 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1093 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1095 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1097 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1099 (relocate_instruction): Remove own_buf.
1100 * server.c (own_buf): Make global.
1101 (handle_v_requests): Make global.
1102 * server.h (own_buf): New declaration.
1103 (handle_v_requests): New prototype.
1105 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1108 * linux-s390-low.c (add_insns): New function.
1109 (s390_emit_prologue): New function.
1110 (s390_emit_epilogue): New function.
1111 (s390_emit_add): New function.
1112 (s390_emit_sub): New function.
1113 (s390_emit_mul): New function.
1114 (s390_emit_lsh): New function.
1115 (s390_emit_rsh_signed): New function.
1116 (s390_emit_rsh_unsigned): New function.
1117 (s390_emit_ext): New function.
1118 (s390_emit_log_not): New function.
1119 (s390_emit_bit_and): New function.
1120 (s390_emit_bit_or): New function.
1121 (s390_emit_bit_xor): New function.
1122 (s390_emit_bit_not): New function.
1123 (s390_emit_equal): New function.
1124 (s390_emit_less_signed): New function.
1125 (s390_emit_less_unsigned): New function.
1126 (s390_emit_ref): New function.
1127 (s390_emit_if_goto): New function.
1128 (s390_emit_goto): New function.
1129 (s390_write_goto_address): New function.
1130 (s390_emit_litpool): New function.
1131 (s390_emit_const): New function.
1132 (s390_emit_call): New function.
1133 (s390_emit_reg): New function.
1134 (s390_emit_pop): New function.
1135 (s390_emit_stack_flush): New function.
1136 (s390_emit_zero_ext): New function.
1137 (s390_emit_swap): New function.
1138 (s390_emit_stack_adjust): New function.
1139 (s390_emit_set_r2): New function.
1140 (s390_emit_int_call_1): New function.
1141 (s390_emit_void_call_2): New function.
1142 (s390_emit_eq_goto): New function.
1143 (s390_emit_ne_goto): New function.
1144 (s390_emit_lt_goto): New function.
1145 (s390_emit_le_goto): New function.
1146 (s390_emit_gt_goto): New function.
1147 (s390_emit_ge_goto): New function.
1148 (s390x_emit_prologue): New function.
1149 (s390x_emit_epilogue): New function.
1150 (s390x_emit_add): New function.
1151 (s390x_emit_sub): New function.
1152 (s390x_emit_mul): New function.
1153 (s390x_emit_lsh): New function.
1154 (s390x_emit_rsh_signed): New function.
1155 (s390x_emit_rsh_unsigned): New function.
1156 (s390x_emit_ext): New function.
1157 (s390x_emit_log_not): New function.
1158 (s390x_emit_bit_and): New function.
1159 (s390x_emit_bit_or): New function.
1160 (s390x_emit_bit_xor): New function.
1161 (s390x_emit_bit_not): New function.
1162 (s390x_emit_equal): New function.
1163 (s390x_emit_less_signed): New function.
1164 (s390x_emit_less_unsigned): New function.
1165 (s390x_emit_ref): New function.
1166 (s390x_emit_if_goto): New function.
1167 (s390x_emit_const): New function.
1168 (s390x_emit_call): New function.
1169 (s390x_emit_reg): New function.
1170 (s390x_emit_pop): New function.
1171 (s390x_emit_stack_flush): New function.
1172 (s390x_emit_zero_ext): New function.
1173 (s390x_emit_swap): New function.
1174 (s390x_emit_stack_adjust): New function.
1175 (s390x_emit_int_call_1): New function.
1176 (s390x_emit_void_call_2): New function.
1177 (s390x_emit_eq_goto): New function.
1178 (s390x_emit_ne_goto): New function.
1179 (s390x_emit_lt_goto): New function.
1180 (s390x_emit_le_goto): New function.
1181 (s390x_emit_gt_goto): New function.
1182 (s390x_emit_ge_goto): New function.
1183 (s390_emit_ops): New function.
1184 (struct linux_target_ops): Fill in emit_ops hook.
1186 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1189 * Makefile.in: Add s390 IPA files.
1190 * configure.srv: Build IPA for s390.
1191 * linux-s390-ipa.c: New file.
1192 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1193 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1194 (tdesc_s390_linux32): Likewise.
1195 (init_registers_s390_linux32v1): Likewise.
1196 (tdesc_s390_linux32v1): Likewise.
1197 (init_registers_s390_linux32v2): Likewise.
1198 (tdesc_s390_linux32v2): Likewise.
1199 (init_registers_s390_linux64): Likewise.
1200 (tdesc_s390_linux64): Likewise.
1201 (init_registers_s390_linux64v1): Likewise.
1202 (tdesc_s390_linux64v1): Likewise.
1203 (init_registers_s390_linux64v2): Likewise.
1204 (tdesc_s390_linux64v2): Likewise.
1205 (init_registers_s390_te_linux64): Likewise.
1206 (tdesc_s390_te_linux64): Likewise.
1207 (init_registers_s390_vx_linux64): Likewise.
1208 (tdesc_s390_vx_linux64): Likewise.
1209 (init_registers_s390_tevx_linux64): Likewise.
1210 (tdesc_s390_tevx_linux64): Likewise.
1211 (init_registers_s390x_linux64): Likewise.
1212 (tdesc_s390x_linux64): Likewise.
1213 (init_registers_s390x_linux64v1): Likewise.
1214 (tdesc_s390x_linux64v1): Likewise.
1215 (init_registers_s390x_linux64v2): Likewise.
1216 (tdesc_s390x_linux64v2): Likewise.
1217 (init_registers_s390x_te_linux64): Likewise.
1218 (tdesc_s390x_te_linux64): Likewise.
1219 (init_registers_s390x_vx_linux64): Likewise.
1220 (tdesc_s390x_vx_linux64): Likewise.
1221 (init_registers_s390x_tevx_linux64): Likewise.
1222 (tdesc_s390x_tevx_linux64): Likewise.
1223 (have_hwcap_s390_vx): New static variable.
1224 (s390_arch_setup): Fill have_hwcap_s390_vx.
1225 (s390_get_thread_area): New function.
1226 (s390_ft_entry_gpr_esa): New const.
1227 (s390_ft_entry_gpr_zarch): New const.
1228 (s390_ft_entry_misc): New const.
1229 (s390_ft_entry_fr): New const.
1230 (s390_ft_entry_vr): New const.
1231 (s390_ft_main_31): New const.
1232 (s390_ft_main_64): New const.
1233 (s390_ft_exit_fr): New const.
1234 (s390_ft_exit_vr): New const.
1235 (s390_ft_exit_misc): New const.
1236 (s390_ft_exit_gpr_esa): New const.
1237 (s390_ft_exit_gpr_zarch): New const.
1238 (append_insns): New function.
1239 (s390_relocate_instruction): New function.
1240 (s390_install_fast_tracepoint_jump_pad): New function.
1241 (s390_get_min_fast_tracepoint_insn_len): New function.
1242 (s390_get_ipa_tdesc_idx): New function.
1243 (struct linux_target_ops): Wire in the above functions.
1244 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1245 * linux-s390-tdesc.h: New file.
1247 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1249 * linux-s390-low.c (s390_supports_tracepoints): New function.
1250 (struct linux_target_ops): Fill supports_tracepoints hook.
1252 2016-03-18 Yao Qi <yao.qi@linaro.org>
1254 * linux-low.c (lwp_signal_can_be_delivered): New function.
1255 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1257 2016-03-18 Yao Qi <yao.qi@linaro.org>
1259 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1260 0 if signal is enqueued. Remove 'signal' from one debugging
1261 message. Move one debugging message to some lines below.
1262 Remove code setting 'signal' to 0.
1264 2016-03-18 Yao Qi <yao.qi@linaro.org>
1266 * linux-low.c (linux_low_filter_event): Remove redundant
1267 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1269 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1271 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1272 (struct linux_target_ops): Wire in the above.
1274 2016-03-03 Yao Qi <yao.qi@linaro.org>
1276 * linux-low.c: Update comments to start_step_over.
1278 2016-03-03 Yao Qi <yao.qi@linaro.org>
1281 * linux-low.c (handle_extended_wait): Set child suspended
1282 if event_lwp->bp_reinsert isn't zero.
1284 2016-03-02 Yao Qi <yao.qi@linaro.org>
1286 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1287 enqueue_pending_signal.
1289 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1291 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1294 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1296 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1297 (s390_regmap_3264) [!__s390x__]: New global.
1298 (s390_collect_ptrace_register): Skip map entries containing -1.
1299 (s390_supply_ptrace_register): Ditto.
1300 (s390_fill_gprs_high): New function.
1301 (s390_store_gprs_high): New function.
1302 (s390_regsets): Add NT_S390_HIGH_GPRS.
1303 (s390_get_hwcap): Enable on 31-bit.
1304 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1305 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1306 Detect NT_S390_HIGH_GPRS.
1307 (s390_usrregs_info_3264): Enable on 31-bit.
1308 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1309 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1311 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1314 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1315 * configure.srv: Ditto.
1316 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1317 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1318 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1319 (init_registers_amd64_linux): Remove prototype.
1320 (tdesc_amd64_linux): Remove declaration.
1321 (get_ipa_tdesc): New function.
1322 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1323 initialize remaining tdescs.
1324 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1325 (init_registers_i386_linux): Remove prototype.
1326 (tdesc_i386_linux): Remove declaration.
1327 (get_ipa_tdesc): New function.
1328 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1329 initialize remaining tdescs.
1330 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1331 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1332 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1333 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1334 (x86_get_ipa_tdesc_idx): New function.
1335 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1336 * linux-x86-tdesc.h: New file.
1337 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1338 (target_get_ipa_tdesc_idx): New macro.
1339 * tracepoint.c (ipa_tdesc_idx): New macro.
1340 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1341 (symbol_list): Add ipa_tdesc_idx.
1342 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1343 (ipa_tdesc): Remove.
1344 (ipa_tdesc_idx): New variable.
1345 (get_context_regcache): Use get_ipa_tdesc.
1346 (gdb_collect): Ditto.
1348 * tracepoint.h (get_ipa_tdesc): New prototype.
1349 (ipa_tdesc): Remove.
1351 2016-02-24 Pedro Alves <palves@redhat.com>
1353 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1354 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1355 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1356 Factor out common code between the USE_SIGTRAP_SIGINFO and
1357 !USE_SIGTRAP_SIGINFO blocks.
1358 (linux_low_filter_event): Call save_stop_reason instead of
1359 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1361 (linux_wait_1): Update comments.
1363 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
1365 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1366 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1367 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1368 ppc_insert_point, ppc_remove_point.
1370 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1372 * linux-s390-low.c (s390_supports_z_point_type): New function.
1373 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1375 2016-02-16 Yao Qi <yao.qi@linaro.org>
1377 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1378 PC. Get pc from regcache_read_pc.
1380 2016-02-12 Yao Qi <yao.qi@linaro.org>
1382 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1383 or linux_get_pc_32bit.
1384 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1386 2016-02-12 Yao Qi <yao.qi@linaro.org>
1388 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1389 arm_linux_get_next_pcs_fixup.
1391 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1393 * tracepoint.c (x_tracepoint_action_download): Change
1394 write_inferior_data_ptr to write_inferior_data_pointer.
1395 (cmd_qtstart): Likewise.
1396 (write_inferior_data_ptr): Remove.
1397 (download_agent_expr): Change write_inferior_data_ptr to
1398 write_inferior_data_pointer.
1399 (download_tracepoint_1): Likewise.
1400 (download_tracepoint): Likewise.
1401 (download_trace_state_variables): Likewise.
1403 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
1404 Marcin Kościelnicki <koriakin@0x04.net>
1406 * tracepoint.c (struct tracepoint_action_ops): Remove.
1407 (struct tracepoint_action): Remove ops.
1408 (m_tracepoint_action_download, r_tracepoint_action_download)
1409 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1410 size and offset accordingly.
1411 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1412 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1413 (tracepoint_action_send, tracepoint_action_download): New functions.
1414 Helpers for trace action handlers.
1415 (add_tracepoint_action): Remove setup actions ops.
1416 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1418 2016-02-10 Yao Qi <yao.qi@linaro.org>
1420 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1422 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1424 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1426 * configure: Regenerate.
1428 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1430 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1431 void * to gdb_byte *.
1432 * linux-low.c (siginfo_fixup): Likewise.
1433 (linux_xfer_siginfo): Likewise.
1434 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1436 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1438 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1440 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1442 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1444 * linux-x86-low.c [__x86_64__]: Include
1445 "nat/amd64-linux-siginfo.h".
1446 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1447 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1448 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1449 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1450 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1451 (cpt_si_fd, si_timerid, si_overrun): Move from
1452 nat/amd64-linux-siginfo.c.
1453 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1455 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1457 * server.c (skip_to_semicolon): Remove.
1458 (process_point_options): Use strchrnul instead of
1461 2016-01-26 Yao Qi <yao.qi@linaro.org>
1463 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1464 * linux-low.c (install_software_single_step_breakpoints): Don't
1465 call regcache_read_pc.
1466 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1469 2016-01-26 Yao Qi <yao.qi@linaro.org>
1471 * linux-low.c (install_software_single_step_breakpoints): Call
1472 regcache_read_pc instead of get_pc.
1474 2016-01-26 Yao Qi <yao.qi@linaro.org>
1476 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1477 (unblock_async_io): Rename to ...
1478 (block_unblock_async_io): ... it. New function.
1479 (enable_async_io): Don't install SIGIO handler. Unblock it
1481 (disable_async_io): Don't ignore SIGIO. Block it instead.
1482 (initialize_async_io): Install SIGIO handler. Don't call
1485 2016-01-26 Yao Qi <yao.qi@linaro.org>
1487 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1488 first character is '\003', call *the_target->request_interrupt.
1490 2016-01-25 Yao Qi <yao.qi@linaro.org>
1492 * remote-utils.c (new_thread_notify): Remove.
1493 (dead_thread_notify): Likewise.
1494 * remote-utils.h (new_thread_notify): Remove declaration.
1495 (dead_thread_notify): Likewise.
1497 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1499 * gdb.trace/pending.exp: Fix expected message on continue.
1501 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1503 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1504 it works properly on big-endian machines where sizeof (CORE_ADDR)
1507 2016-01-21 Pedro Alves <palves@redhat.com>
1509 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1510 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1511 * configure: Regenerate.
1513 2016-01-21 Yao Qi <yao.qi@linaro.org>
1515 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1516 is_thumb and set it according to CPSR saved on the stack.
1517 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1518 arm_sigreturn_next_pc.
1520 2016-01-18 Yao Qi <yao.qi@linaro.org>
1522 * linux-low.c (linux_set_pc_64bit): New function.
1523 (linux_get_pc_64bit): New function.
1524 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1526 * linux-sparc-low.c (debug_threads): Remove declaration.
1527 (sparc_get_pc): Remove.
1528 (the_low_target): Use linux_get_pc_64bit instead of
1530 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1531 (the_low_target): Use linux_get_pc_64bit and
1534 2016-01-18 Yao Qi <yao.qi@linaro.org>
1536 * linux-arm-low.c (debug_threads): Remove declaration.
1537 (arm_get_pc, arm_set_pc): Remove.
1538 (the_low_target): Use linux_get_pc_32bit and
1540 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1541 (the_low_target): Use linux_get_pc_32bit and
1543 * linux-cris-low.c (debug_threads): Remove declaration.
1544 (cris_get_pc, cris_set_pc,): Remove.
1545 (the_low_target): Use linux_get_pc_32bit and
1547 * linux-crisv32-low.c (debug_threads): Remove declaration.
1548 (cris_get_pc, cris_set_pc): Remove.
1549 (the_low_target): Use linux_get_pc_32bit and
1551 * linux-low.c: Include inttypes.h.
1552 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1553 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1554 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1555 (the_low_target): Use linux_get_pc_32bit and
1557 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1558 (the_low_target): Use linux_get_pc_32bit and
1560 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1561 (the_low_target): Use linux_get_pc_32bit and
1563 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1564 (the_low_target): Use linux_get_pc_32bit and
1566 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1567 (the_low_target): Use linux_get_pc_32bit and
1570 2016-01-18 Gary Benson <gbenson@redhat.com>
1572 * configure.ac (AC_FUNC_FORK): New check.
1573 * config.in: Regenerate.
1574 * configure: Likewise.
1576 2016-01-14 Yao Qi <yao.qi@linaro.org>
1578 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1579 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1580 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1581 arm_get_next_pcs_ctor.
1583 2016-01-12 Josh Stone <jistone@redhat.com>
1584 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1586 * inferiors.h: Include "gdb_vecs.h".
1587 (struct process_info): Add syscalls_to_catch.
1588 * inferiors.c (remove_process): Free syscalls_to_catch.
1589 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1590 syscall_return stops.
1591 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1592 * server.c (handle_general_set): Handle QCatchSyscalls.
1593 (handle_query): Report support for QCatchSyscalls.
1594 * target.h (struct target_ops): Add supports_catch_syscall.
1595 (target_supports_catch_syscall): New macro.
1596 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1597 (struct lwp_info): Add syscall_state.
1598 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1599 Maintain syscall_state and syscalls_to_catch across exec.
1600 (get_syscall_trapinfo): New function, proxy to the_low_target.
1601 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1602 (linux_low_filter_event): Toggle syscall_state entry/return for
1603 syscall traps, and set it ignored for all others.
1604 (gdb_catching_syscalls_p): New function.
1605 (gdb_catch_this_syscall_p): New function.
1606 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1607 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1608 (linux_supports_catch_syscall): New function.
1609 (linux_target_ops): Install it.
1610 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1611 (the_low_target): Install it.
1613 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1615 * acinclude.m4: Include new ../warning.m4 file.
1616 * configure: Regenerated.
1617 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1619 2016-01-12 Mike Frysinger <vapier@gentoo.org>
1621 * ax.c (is_goto_target): Mark static.
1622 * linux-low.c (register_addr): Likewise.
1623 (linux_fetch_registers, linux_store_registers): Likewise.
1624 * mem-break.c (any_persistent_commands): Fix old prototype.
1625 (add_commands_to_breakpoint): Mark static.
1626 * regcache.c (find_register_by_name): Delete unused func.
1627 * remote-utils.c (hex_or_minus_one): Mark static.
1628 * server.c (monitor_show_help): Mark static.
1629 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1630 handle_v_requests): Likewise.
1632 2016-01-12 Pedro Alves <palves@redhat.com>
1634 Remove use of the registered trademark symbol throughout.
1636 2016-01-08 Yao Qi <yao.qi@linaro.org>
1638 * remote-utils.c (getpkt): If c is '\003', call target hook
1641 2016-01-06 Yao Qi <yao.qi@linaro.org>
1643 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1644 linux-aarch32-low.c.
1645 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1646 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1647 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1648 (thumb2_breakpoint): Declare.
1649 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1650 linux-aarch32-low.h.
1651 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1652 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1653 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1655 2016-01-01 Joel Brobecker <brobecker@adacore.com>
1657 * gdbreplay.c (gdbreplay_version): Change copyright year in
1659 * server.c (gdbserver_version): Likewise.
1661 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1663 * server.c (crc32_table): Delete.
1664 (crc32): Use libiberty's xcrc32 function.
1666 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1668 * lynx-low.c (lynx_delete_thread_callback): New function.
1669 (lynx_mourn): Properly delete our process and all of its
1670 threads. Remove call to clear_inferiors.
1672 2015-12-22 Joel Brobecker <brobecker@adacore.com>
1674 * target.c (thread_search_callback): Add check that
1675 the thread_stopped target callback is not NULL before
1678 2015-12-21 Yao Qi <yao.qi@linaro.org>
1680 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1683 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1685 * server.c (handle_query): Call target_supports_software_single_step.
1687 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1689 * linux-low.c (single_step): New function.
1690 (linux_resume_one_lwp_throw): Call single_step.
1691 (start_step_over): Likewise.
1693 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1695 * Makefile.in (SFILES): Append arch/arm-linux.c,
1696 arch/arm-get-next-pcs.c.
1697 (arm-linux.o): New rule.
1698 (arm-get-next-pcs.o): New rule.
1699 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1701 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1702 to linux-aarch32-low.c.
1703 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1704 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1705 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1706 (thumb2_breakpoint_len): Likewise.
1707 (arm_is_thumb_mode): Make non-static.
1708 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1709 from linux-aarch32-low.c.
1710 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1711 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1712 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1713 (thumb2_breakpoint_len): Likewise.
1714 (arm_is_thumb_mode): New declaration.
1715 * linux-arm-low.c: Include arch/arm-linux.h
1716 aarch/arm-get-next-pcs.h, sys/syscall.h.
1717 (get_next_pcs_ops): New struct.
1718 (get_next_pcs_addr_bits_remove): New function.
1719 (get_next_pcs_is_thumb): New function.
1720 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1721 (arm_sigreturn_next_pc): Likewise.
1722 (get_next_pcs_syscall_next_pc): Likewise.
1723 (arm_gdbserver_get_next_pcs): Likewise.
1724 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1726 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1727 * server.h: Include gdb_vecs.h.
1729 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1731 * Makefile.in (SFILES): Append common/common-regcache.c.
1732 (OBS): Append common-regcache.o.
1733 (common-regcache.o): New rule.
1734 * regcache.c (init_register_cache): Initialize cache to
1736 (regcache_raw_read_unsigned): New function.
1737 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1738 register_status enum.
1740 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1742 * linux-aarch64-low.c (the_low_targets): Rename
1743 breakpoint_reinsert_addr to get_next_pcs.
1744 * linux-arm-low.c (the_low_targets): Likewise.
1745 * linux-bfin-low.c (the_low_targets): Likewise.
1746 * linux-cris-low.c (the_low_targets): Likewise.
1747 * linux-crisv32-low.c (the_low_targets): Likewise.
1748 * linux-low.c (can_software_single_step): Likewise.
1749 (install_software_single_step_breakpoints): New function.
1750 (start_step_over): Use install_software_single_step_breakpoints.
1751 * linux-low.h: New CORE_ADDR vector.
1752 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1754 * linux-mips-low.c (the_low_targets): Likewise.
1755 * linux-nios2-low.c (the_low_targets): Likewise.
1756 * linux-sparc-low.c (the_low_targets): Likewise.
1758 2015-12-17 Pedro Alves <palves@redhat.com>
1760 * linux-low.c (linux_kill_one_lwp): Remove references to
1762 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1764 (linux_init_signals): Delete.
1765 (initialize_low): Adjust.
1766 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1768 2015-12-16 Pedro Alves <palves@redhat.com>
1770 * configure.ac (compiler warning flags): When testing a
1771 -Wno-foo option, check whether -Wfoo works instead.
1772 * configure: Regenerate.
1774 2015-12-11 Don Breazeal <donb@codesourcery.com>
1776 * server.c (process_serial_event): Don't exit from gdbserver
1777 in remote mode if there are still active inferiors.
1779 2015-12-11 Yao Qi <yao.qi@linaro.org>
1781 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1782 arm_breakpoint_at if the process is 32-bit.
1784 2015-12-11 Yao Qi <yao.qi@linaro.org>
1786 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1789 2015-12-07 Yao Qi <yao.qi@linaro.org>
1791 * configure.srv: Append arm.o to srv_tgtobj for
1792 aarch64*-*-linux* target.
1793 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1794 from linux-arm-low.c.
1795 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1796 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1797 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1798 (thumb2_breakpoint_len): Likewise.
1799 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1800 (arm_breakpoint_kinds): Likewise.
1801 (arm_breakpoint_kind_from_pc): Likewise.
1802 (arm_sw_breakpoint_from_kind): Likewise.
1803 (arm_breakpoint_kind_from_current_state): Likewise.
1804 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1805 (arm_sw_breakpoint_from_kind): Declare.
1806 (arm_breakpoint_kind_from_current_state): Declare.
1807 (arm_breakpoint_at): Declare.
1808 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1809 arm_sw_breakpoint_from_kind if process is 32-bit.
1810 (aarch64_breakpoint_kind_from_pc): New function.
1811 (aarch64_breakpoint_kind_from_current_state): New function.
1812 (the_low_target): Initialize fields breakpoint_kind_from_pc
1813 and breakpoint_kind_from_current_state.
1814 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1815 linux-aarch32-low.c.
1816 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1817 (arm_breakpoint, arm_breakpoint_len): Likewise.
1818 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1819 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1820 (arm_is_thumb_mode): Likewise.
1821 (arm_breakpoint_at): Likewise.
1822 (arm_breakpoint_kind_from_pc): Likewise.
1823 (arm_sw_breakpoint_from_kind): Likewise.
1824 (arm_breakpoint_kind_from_current_state): Likewise.
1827 2015-08-04 Yao Qi <yao.qi@linaro.org>
1829 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1830 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1831 * server.c (extended_protocol): Remove "static".
1832 * server.h (extended_protocol): Declare it.
1834 2015-12-04 Josh Stone <jistone@redhat.com>
1836 * target.h (struct target_ops) <arch_setup>: Rename to ...
1837 (struct target_ops) <post_create_inferior>: ... this.
1838 (target_arch_setup): Rename to ...
1839 (target_post_create_inferior): ... this, calling post_create_inferior.
1840 * server.c (start_inferior): Update target_arch_setup calls to
1841 target_post_create_inferior.
1842 * linux-low.c (linux_low_ptrace_options): Forward declare.
1843 (linux_arch_setup): Update its comment for general use.
1844 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1845 (struct linux_target_ops): Use linux_post_create_inferior.
1846 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1847 to post_create_inferior.
1848 * nto-low.c (struct nto_target_ops): Likewise.
1849 * spu-low.c (struct spu_target_ops): Likewise.
1850 * win32-low.c (struct win32_target_ops): Likewise.
1852 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1854 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1856 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1858 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1859 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1860 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1861 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1862 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1863 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1864 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1865 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1866 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1867 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1868 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1869 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1871 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1873 * linux-low.c (linux_look_up_symbols): Don't call
1874 linux_supports_traceclone.
1875 * linux-low.h (thread_db_init): Remove use_events argument.
1876 * thread-db.c (thread_db_use_event): Remove global variable.
1877 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1878 (struct thread_db) <td_create_bp>: Remove field.
1879 (thread_db_create_event): Remove function.
1880 (thread_db_enable_reporting): Likewise.
1881 (find_one_thread): Don't check for thread_db_use_events.
1882 (attach_thread): Likewise.
1883 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1884 (try_thread_db_load_1): Don't check for thread_db_use_events.
1885 (thread_db_init): Remove use_events argument and thread events
1887 (remove_thread_event_breakpoints): Remove function.
1888 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1890 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1892 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1894 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1895 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1896 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1897 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1898 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1900 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1902 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1903 * linux-low.c (can_hardware_single_step): Use
1904 supports_hardware_single_step.
1905 (can_software_single_step): New function.
1906 (start_step_over): Call can_software_single_step.
1907 (linux_supports_hardware_single_step): New function.
1908 (struct target_ops) <supports_software_single_step>: Initialize.
1909 * linux-low.h (struct linux_target_ops)
1910 <supports_hardware_single_step>: Initialize.
1911 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1912 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1913 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1914 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1915 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1916 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1917 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1918 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1919 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1920 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1922 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1923 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1925 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1926 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1927 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1930 * target.h (struct target_ops): <supports_software_single_step>:
1932 (target_supports_software_single_step): New macro.
1934 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1936 * linux-low.c (linux_wait_1): Fix pc advance condition.
1937 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1938 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1940 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1942 * linux-arm-low.c (arm_is_thumb_mode): New function.
1943 (arm_breakpoint_at): Use arm_is_thumb_mode.
1944 (arm_breakpoint_kind_from_current_state): New function.
1945 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1947 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1948 (linux_breakpoint_kind_from_current_state): New function.
1949 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1950 * linux-low.h (struct linux_target_ops)
1951 <breakpoint_kind_from_current_state>: New field.
1952 * target.h (struct target_ops): Likewise.
1953 (target_breakpoint_kind_from_current_state): New macro.
1955 2015-11-30 Pedro Alves <palves@redhat.com>
1957 * linux-low.c (linux_resume): Wake up the event loop before
1960 2015-11-30 Pedro Alves <palves@redhat.com>
1962 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1964 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1966 * target.c (struct thread_search): New structure.
1967 (thread_search_callback): New function.
1968 (prev_general_thread): New global.
1969 (prepare_to_access_memory, done_accessing_memory): New functions.
1970 * target.h (prepare_to_access_memory, done_accessing_memory):
1971 Replace macros with function declarations.
1973 2015-11-30 Pedro Alves <palves@redhat.com>
1976 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1977 report TARGET_WAITKIND_NO_RESUMED.
1978 * remote-utils.c (prepare_resume_reply): Handle
1979 TARGET_WAITKIND_NO_RESUMED.
1980 * server.c (report_no_resumed): New global.
1981 (handle_query) <qSupported>: Handle "no-resumed+". Report
1982 "no-resumed+" support.
1983 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1984 return error if the client doesn't support no-resumed events.
1985 (push_stop_notification): New function.
1986 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1987 events if the client supports them.
1989 2015-11-30 Pedro Alves <palves@redhat.com>
1991 * linux-low.c (thread_still_has_status_pending_p): Don't check
1993 (lwp_resumed): New function.
1994 (status_pending_p_callback): Return early if the LWP is not
1995 supposed to be resumed.
1997 2015-11-30 Pedro Alves <palves@redhat.com>
1999 * linux-low.c (handle_extended_wait): Assert that the LWP's
2000 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2001 thread create events, leave the new child's status pending.
2002 (linux_low_filter_event): If GDB wants to hear about thread exit
2003 events, leave the LWP marked dead and don't delete it.
2004 (linux_wait_for_event_filtered): Don't check for thread exit.
2005 (filter_exit_event): New function.
2006 (linux_wait_1): Use it, when returning an exit event.
2007 (linux_resume_one_lwp_throw): Assert that the LWP's
2008 waitstatus is TARGET_WAITKIND_IGNORE.
2009 * remote-utils.c (prepare_resume_reply): Handle
2010 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2011 * server.c (report_thread_events): New global.
2012 (handle_general_set): Handle QThreadEvents.
2013 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2014 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2015 TARGET_WAITKIND_THREAD_EXITED.
2016 * server.h (report_thread_events): Declare.
2018 2015-11-30 Pedro Alves <palves@redhat.com>
2020 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2021 the thread's last_resume_kind was resume_stop.
2023 2015-11-30 Pedro Alves <palves@redhat.com>
2025 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2028 2015-11-30 Pedro Alves <palves@redhat.com>
2030 * server.c (handle_v_requests): Handle vCtrlC.
2032 2015-11-30 Pedro Alves <palves@redhat.com>
2034 * gdbthread.h (find_any_thread_of_pid): Declare.
2035 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2037 * server.c (handle_query): If current_thread is NULL, look for
2038 another thread of the selected process.
2040 2015-11-26 Daniel Colascione <dancol@dancol.org>
2041 Simon Marchi <simon.marchi@ericsson.com>
2043 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2044 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2046 * target.h (struct target_ops) <thread_name>: New field.
2047 (target_thread_name): New macro.
2049 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2051 * regcache.h (regcache_invalidate_pid): Add declaration.
2052 * regcache.c (regcache_invalidate_pid): New function, extracted
2053 from regcache_invalidate.
2054 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2055 Add trivial documentation comment.
2056 * lynx-low.c: Use regcache_invalidate_pid instead of
2057 regcache_invalidate.
2059 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2061 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2062 and Elf64_auxv_t if the target is Android.
2064 2015-11-22 Doug Evans <xdje42@gmail.com>
2066 * target.h: #include <sys/types.h>.
2068 2015-11-19 Pedro Alves <palves@redhat.com>
2070 * linux-low.c (linux_process_qsupported): Change prototype.
2072 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2074 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2075 and adjust to loop over all features.
2076 * server.c (handle_query) <qSupported>: Adjust to call
2077 target_process_qsupported once, passing it a vector of unprocessed
2079 * target.h (struct target_ops) <process_qsupported>: Change
2081 (target_process_qsupported): Adjust.
2083 2015-11-19 Pedro Alves <palves@redhat.com>
2085 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2087 * configure: Regenerate.
2089 2015-11-19 Pedro Alves <palves@redhat.com>
2091 * configure: Regenerate.
2093 2015-11-19 Yao Qi <yao.qi@linaro.org>
2095 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2098 2015-11-19 Yao Qi <yao.qi@linaro.org>
2100 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2101 (struct aarch64_operand): Move enum out.
2103 2015-11-19 Yao Qi <yao.qi@linaro.org>
2105 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2106 struct user_fpsimd_state *.
2107 (aarch64_store_fpregset): Likewise.
2109 2015-11-19 Yao Qi <yao.qi@linaro.org>
2111 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2112 struct user_pt_regs *.
2113 (aarch64_store_gregset): Likewise.
2115 2015-11-18 Pedro Alves <palves@redhat.com>
2117 * Makefile.in (all_object_files): Add $IPA_OBJS.
2119 2015-11-17 Pedro Alves <palves@redhat.com>
2121 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2122 GDB_SIGNAL_0 and gdb_signal_to_string.
2124 2015-11-17 Pedro Alves <palves@redhat.com>
2126 * win32-low.c (handle_output_debug_string): Remove parameter.
2127 (win32_kill): Remove our_status local and adjust call to
2128 handle_output_debug_string.
2129 (get_child_debug_event): Adjust call to
2130 handle_output_debug_string.
2132 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2134 * linux-mips-low.c (mips_fill_gregset): Add cast.
2135 (mips_store_gregset): Likewise.
2136 (mips_fill_fpregset): Likewise.
2137 (mips_store_fpregset): Likewise.
2139 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2141 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2144 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2146 * linux-mips-low.c (mips_linux_new_thread): Change type of
2147 watch_type to enum target_hw_bp_type.
2149 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2151 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2152 Change return type to arm_hwbp_type.
2154 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2156 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2157 (arm_store_gregset): Likewise.
2158 * linux-arm-low.c (arm_get_hwcap): Likewise.
2159 (arm_read_description): Likewise.
2161 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2163 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2165 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2167 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2168 (ppc_fill_vsxregset): Likewise.
2169 (ppc_store_vsxregset): Likewise.
2170 (ppc_fill_vrregset): Likewise.
2171 (ppc_store_vrregset): Likewise.
2172 (ppc_fill_evrregset): Likewise.
2173 (ppc_store_evrregset): Likewise.
2175 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2177 * linux-ppc-low.c (ppc_usrregs_info): Remove
2178 forward-declaration.
2179 (ppc_arch_setup): Move lower in file.
2181 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2183 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2184 (ps_pdwrite): Likewise.
2186 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2188 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2189 to after assert checks.
2191 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2193 * proc-service.c (ps_pdread): Add/adjust casts.
2194 (ps_pdwrite): Add/adjust casts.
2196 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2198 * server.c (handle_search_memory_1): Cast return value of
2201 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2203 * server.c (write_qxfer_response): Change type of data to
2206 2015-10-29 Pedro Alves <palves@redhat.com>
2208 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2210 2015-10-29 Pedro Alves <palves@redhat.com>
2212 * tracepoint.c (clear_installed_tracepoints): Add casts.
2214 2015-10-29 Pedro Alves <palves@redhat.com>
2216 * server.c (handle_v_cont, process_serial_event): Add enum
2217 gdb_signal casts to signal parsing code.
2219 2015-10-29 Pedro Alves <palves@redhat.com>
2221 * linux-low.h (NULL_REGSET): Define.
2222 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2223 * linux-arm-low.c (arm_regsets): Likewise.
2224 * linux-crisv32-low.c (cris_regsets): Likewise.
2225 * linux-m68k-low.c (m68k_regsets): Likewise.
2226 * linux-mips-low.c (mips_regsets): Likewise.
2227 * linux-nios2-low.c (nios2_regsets): Likewise.
2228 * linux-ppc-low.c (ppc_regsets): Likewise.
2229 * linux-s390-low.c (s390_regsets): Likewise.
2230 * linux-sh-low.c (sh_regsets): Likewise.
2231 * linux-sparc-low.c (sparc_regsets): Likewise.
2232 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2233 * linux-tile-low.c (tile_regsets): Likewise.
2234 * linux-x86-low.c (x86_regsets): Likewise.
2235 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2237 2015-10-29 Pedro Alves <palves@redhat.com>
2239 * linux-low.h (NULL_REGSET): Define.
2240 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2241 * linux-arm-low.c (arm_regsets): Likewise.
2242 * linux-crisv32-low.c (cris_regsets): Likewise.
2243 * linux-m68k-low.c (m68k_regsets): Likewise.
2244 * linux-mips-low.c (mips_regsets): Likewise.
2245 * linux-nios2-low.c (nios2_regsets): Likewise.
2246 * linux-ppc-low.c (ppc_regsets): Likewise.
2247 * linux-s390-low.c (s390_regsets): Likewise.
2248 * linux-sh-low.c (sh_regsets): Likewise.
2249 * linux-sparc-low.c (sparc_regsets): Likewise.
2250 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2251 * linux-tile-low.c (tile_regsets): Likewise.
2252 * linux-x86-low.c (x86_regsets): Likewise.
2253 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2255 2015-10-26 Doug Evans <dje@google.com>
2257 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2259 2015-10-26 Doug Evans <dje@google.com>
2261 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2263 2015-10-26 Doug Evans <dje@google.com>
2265 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2267 (attach_thread, find_new_threads_callback): Ditto.
2269 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2271 * mem-break.h (set_breakpoint_data): Remove.
2273 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2275 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2276 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2277 (initialize_low): Remove set_breakpoint_data call.
2278 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2279 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2280 (initialize_low): Remove set_breakpoint_data call.
2281 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2282 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2283 (initialize_low): Remove set_breakpoint_data call.
2285 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2287 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2288 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2289 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2290 * target.h (target_breakpoint_kind_from_pc): New macro.
2292 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2294 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2295 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2296 the default breakpoint kind.
2298 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2300 * linux-arm-low.c (arm_supports_z_point_type): Add software
2303 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2305 * linux-arm-low.c: Refactor breakpoint definitions.
2306 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2307 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2309 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2311 * Makefile.in: Add arm.c/o.
2312 * configure.srv: Likewise.
2313 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2314 (arm_breakpoint_kind_from_pc): New function.
2315 (arm_sw_breakpoint_from_kind): Return proper kind.
2316 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2318 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2320 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2322 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2323 (struct raw_breakpoint) <size>: Remove.
2324 (struct raw_breakpoint) <kind>: Add.
2325 (bp_size): New function.
2326 (bp_opcode): Likewise.
2327 (find_raw_breakpoint_at): Adjust for kind.
2328 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2329 (remove_memory_breakpoint): Adjust for kind call bp_size.
2330 (set_raw_breakpoint_at): Adjust for kind.
2331 (set_breakpoint): Likewise.
2332 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2333 (delete_raw_breakpoint): Adjust for kind.
2334 (delete_breakpoint): Likewise.
2335 (find_gdb_breakpoint): Likewise.
2336 (set_gdb_breakpoint_1): Likewise.
2337 (set_gdb_breakpoint): Likewise.
2338 (delete_gdb_breakpoint_1): Likewise.
2339 (delete_gdb_breakpoint): Likewise.
2340 (uninsert_raw_breakpoint): Likewise.
2341 (reinsert_raw_breakpoint): Likewise.
2342 (set_breakpoint_data): Remove.
2343 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2344 (check_mem_read): Adjust for kind call bp_size.
2345 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2346 (clone_one_breakpoint): Adjust for kind.
2347 * mem-break.h (set_gdb_breakpoint): Likewise.
2348 (delete_gdb_breakpoint): Likewise.
2349 * server.c (process_serial_event): Likewise.
2351 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2353 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2354 (struct linux_target_ops) <breakpoint>: Remove.
2355 (struct linux_target_ops) <breakpoint_len>: Remove.
2356 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2358 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2359 (arm_sw_breakpoint_from_kind): New function.
2360 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2361 (struct linux_target_ops) <breakpoint>: Remove.
2362 (struct linux_target_ops) <breakpoint_len>: Remove.
2363 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2364 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2365 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2366 (struct linux_target_ops) <breakpoint>: Remove.
2367 (struct linux_target_ops) <breakpoint_len>: Remove.
2368 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2369 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2370 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2371 (struct linux_target_ops) <breakpoint>: Remove.
2372 (struct linux_target_ops) <breakpoint_len>: Remove.
2373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2374 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2375 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2376 and sw_breakpoint_from_kind to increment the pc.
2377 (linux_breakpoint_kind_from_pc): New function.
2378 (linux_sw_breakpoint_from_kind): New function.
2379 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2380 (initialize_low): Call breakpoint_kind_from_pc and
2381 sw_breakpoint_from_kind to replace breakpoint_data/len.
2382 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2384 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2385 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2386 (struct linux_target_ops) <breakpoint>: Remove.
2387 (struct linux_target_ops) <breakpoint_len>: Remove.
2388 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2389 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2390 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2391 (struct linux_target_ops) <breakpoint>: Remove.
2392 (struct linux_target_ops) <breakpoint_len>: Remove.
2393 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2394 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2395 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2396 (struct linux_target_ops) <breakpoint>: Remove.
2397 (struct linux_target_ops) <breakpoint_len>: Remove.
2398 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2399 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2400 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2401 (struct linux_target_ops) <breakpoint>: Remove.
2402 (struct linux_target_ops) <breakpoint_len>: Remove.
2403 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2404 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2405 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2406 (struct linux_target_ops) <breakpoint>: Remove.
2407 (struct linux_target_ops) <breakpoint_len>: Remove.
2408 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2409 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2410 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2411 (struct linux_target_ops) <breakpoint>: Remove.
2412 (struct linux_target_ops) <breakpoint_len>: Remove.
2413 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2414 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2415 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2416 (struct linux_target_ops) <breakpoint>: Remove.
2417 (struct linux_target_ops) <breakpoint_len>: Remove.
2418 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2419 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2420 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2421 (struct linux_target_ops) <breakpoint>: Remove.
2422 (struct linux_target_ops) <breakpoint_len>: Remove.
2423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2425 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2426 (struct linux_target_ops) <breakpoint>: Remove.
2427 (struct linux_target_ops) <breakpoint_len>: Remove.
2428 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2429 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2430 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2431 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2432 (struct linux_target_ops) <breakpoint>: Remove.
2433 (struct linux_target_ops) <breakpoint_len>: Remove.
2434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2436 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2437 (struct linux_target_ops) <breakpoint>: Remove.
2438 (struct linux_target_ops) <breakpoint_len>: Remove.
2439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2442 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2444 * linux-cris-low.c (cris_get_pc): Remove void arg.
2446 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2448 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2451 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2453 * inferiors.c (thread_pid_matches_callback): New function.
2454 (find_thread_process): New function.
2455 (remove_thread): Reset current_thread.
2456 (remove_process): Assert threads have been removed first.
2458 2015-10-15 Yao Qi <yao.qi@linaro.org>
2460 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2462 (aarch64_remove_point): Likewise.
2463 * regcache.c (regcache_register_size): New function.
2465 2015-10-12 Yao Qi <yao.qi@linaro.org>
2467 * linux-aarch64-low.c: Update all callers as emit_load_store
2468 is renamed to aarch64_emit_load_store.
2470 2015-10-12 Yao Qi <yao.qi@linaro.org>
2472 * linux-aarch64-low.c: Update all callers of function renaming
2473 from emit_insn to aarch64_emit_insn.
2475 2015-10-12 Yao Qi <yao.qi@linaro.org>
2477 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2478 arch/aarch64-insn.h.
2479 (struct aarch64_memory_operand): Likewise.
2481 (emit_insn): Move to arch/aarch64-insn.c.
2482 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2483 (emit_load_store): Move to arch/aarch64-insn.c.
2484 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2485 (can_encode_int32): Remove.
2487 2015-10-12 Yao Qi <yao.qi@linaro.org>
2489 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2490 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2491 (aarch64_relocate_instruction): Likewise.
2492 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2493 (struct aarch64_insn_visitor): Likewise.
2495 2015-10-12 Yao Qi <yao.qi@linaro.org>
2497 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2498 (struct aarch64_insn_visitor): New.
2499 (struct aarch64_insn_relocation_data): New.
2500 (aarch64_ftrace_insn_reloc_b): New function.
2501 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2502 (aarch64_ftrace_insn_reloc_cb): Likewise.
2503 (aarch64_ftrace_insn_reloc_tb): Likewise.
2504 (aarch64_ftrace_insn_reloc_adr): Likewise.
2505 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2506 (aarch64_ftrace_insn_reloc_others): Likewise.
2508 (aarch64_relocate_instruction): Use visitor.
2510 2015-10-12 Yao Qi <yao.qi@linaro.org>
2512 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2513 int. Add argument buf.
2514 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2515 aarch64_relocate_instruction.
2517 2015-10-12 Yao Qi <yao.qi@linaro.org>
2519 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2520 argument insn. Remove local variable insn. Don't call
2522 (aarch64_install_fast_tracepoint_jump_pad): Call
2525 2015-09-30 Yao Qi <yao.qi@linaro.org>
2527 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2528 (emit_load_store_pair): Likewise.
2530 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2532 * dll.c (match_dll): Add cast(s).
2533 (unloaded_dll): Likewise.
2534 * linux-low.c (second_thread_of_pid_p): Likewise.
2535 (delete_lwp_callback): Likewise.
2536 (count_events_callback): Likewise.
2537 (select_event_lwp_callback): Likewise.
2538 (linux_set_resume_request): Likewise.
2539 * server.c (accumulate_file_name_length): Likewise.
2540 (emit_dll_description): Likewise.
2541 (handle_qxfer_threads_worker): Likewise.
2542 (visit_actioned_threads): Likewise.
2543 * thread-db.c (any_thread_of): Likewise.
2544 * tracepoint.c (same_process_p): Likewise.
2545 (match_blocktype): Likewise.
2546 (build_traceframe_info_xml): Likewise.
2548 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2550 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2552 (gdb_unparse_agent_expr): Likewise.
2553 * hostio.c (require_data): Likewise.
2554 (handle_pread): Likewise.
2555 * linux-low.c (disable_regset): Likewise.
2556 (fetch_register): Likewise.
2557 (store_register): Likewise.
2558 (get_dynamic): Likewise.
2559 (linux_qxfer_libraries_svr4): Likewise.
2560 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2561 (set_fast_tracepoint_jump): Likewise.
2562 (uninsert_fast_tracepoint_jumps_at): Likewise.
2563 (reinsert_fast_tracepoint_jumps_at): Likewise.
2564 (validate_inserted_breakpoint): Likewise.
2565 (clone_agent_expr): Likewise.
2566 * regcache.c (init_register_cache): Likewise.
2567 * remote-utils.c (putpkt_binary_1): Likewise.
2568 (decode_M_packet): Likewise.
2569 (decode_X_packet): Likewise.
2570 (look_up_one_symbol): Likewise.
2571 (relocate_instruction): Likewise.
2572 (monitor_output): Likewise.
2573 * server.c (handle_search_memory): Likewise.
2574 (handle_qxfer_exec_file): Likewise.
2575 (handle_qxfer_libraries): Likewise.
2576 (handle_qxfer): Likewise.
2577 (handle_query): Likewise.
2578 (handle_v_cont): Likewise.
2579 (handle_v_run): Likewise.
2580 (captured_main): Likewise.
2581 * target.c (write_inferior_memory): Likewise.
2582 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2583 * tracepoint.c (init_trace_buffer): Likewise.
2584 (add_tracepoint_action): Likewise.
2585 (add_traceframe): Likewise.
2586 (add_traceframe_block): Likewise.
2587 (cmd_qtdpsrc): Likewise.
2588 (cmd_qtdv): Likewise.
2589 (cmd_qtstatus): Likewise.
2590 (response_source): Likewise.
2591 (response_tsv): Likewise.
2592 (cmd_qtnotes): Likewise.
2593 (gdb_collect): Likewise.
2594 (initialize_tracepoint): Likewise.
2596 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2598 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2599 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2600 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2602 (enum aarch64_condition_codes): New enum.
2603 (w0): New static global.
2606 (struct aarch64_memory_operand) <type>: New
2607 MEMORY_OPERAND_POSTINDEX type.
2608 (postindex_memory_operand): New helper function.
2609 (emit_ret): New function.
2610 (emit_load_store_pair): New function, factored out of emit_stp
2611 with support for MEMORY_OPERAND_POSTINDEX.
2612 (emit_stp): Rewrite using emit_load_store_pair.
2613 (emit_ldp): New function.
2614 (emit_load_store): Likewise.
2615 (emit_ldr): Mention post-index instruction in comment.
2616 (emit_ldrh): New function.
2617 (emit_ldrb): New function.
2618 (emit_ldrsw): Mention post-index instruction in comment.
2619 (emit_str): Likewise.
2620 (emit_subs): New function.
2621 (emit_cmp): Likewise.
2622 (emit_and): Likewise.
2623 (emit_orr): Likewise.
2624 (emit_orn): Likewise.
2625 (emit_eor): Likewise.
2626 (emit_mvn): Likewise.
2627 (emit_lslv): Likewise.
2628 (emit_lsrv): Likewise.
2629 (emit_asrv): Likewise.
2630 (emit_mul): Likewise.
2631 (emit_sbfm): Likewise.
2632 (emit_sbfx): Likewise.
2633 (emit_ubfm): Likewise.
2634 (emit_ubfx): Likewise.
2635 (emit_csinc): Likewise.
2636 (emit_cset): Likewise.
2637 (emit_nop): Likewise.
2638 (emit_ops_insns): New helper function.
2639 (emit_pop): Likewise.
2640 (emit_push): Likewise.
2641 (aarch64_emit_prologue): New function.
2642 (aarch64_emit_epilogue): Likewise.
2643 (aarch64_emit_add): Likewise.
2644 (aarch64_emit_sub): Likewise.
2645 (aarch64_emit_mul): Likewise.
2646 (aarch64_emit_lsh): Likewise.
2647 (aarch64_emit_rsh_signed): Likewise.
2648 (aarch64_emit_rsh_unsigned): Likewise.
2649 (aarch64_emit_ext): Likewise.
2650 (aarch64_emit_log_not): Likewise.
2651 (aarch64_emit_bit_and): Likewise.
2652 (aarch64_emit_bit_or): Likewise.
2653 (aarch64_emit_bit_xor): Likewise.
2654 (aarch64_emit_bit_not): Likewise.
2655 (aarch64_emit_equal): Likewise.
2656 (aarch64_emit_less_signed): Likewise.
2657 (aarch64_emit_less_unsigned): Likewise.
2658 (aarch64_emit_ref): Likewise.
2659 (aarch64_emit_if_goto): Likewise.
2660 (aarch64_emit_goto): Likewise.
2661 (aarch64_write_goto_address): Likewise.
2662 (aarch64_emit_const): Likewise.
2663 (aarch64_emit_call): Likewise.
2664 (aarch64_emit_reg): Likewise.
2665 (aarch64_emit_pop): Likewise.
2666 (aarch64_emit_stack_flush): Likewise.
2667 (aarch64_emit_zero_ext): Likewise.
2668 (aarch64_emit_swap): Likewise.
2669 (aarch64_emit_stack_adjust): Likewise.
2670 (aarch64_emit_int_call_1): Likewise.
2671 (aarch64_emit_void_call_2): Likewise.
2672 (aarch64_emit_eq_goto): Likewise.
2673 (aarch64_emit_ne_goto): Likewise.
2674 (aarch64_emit_lt_goto): Likewise.
2675 (aarch64_emit_le_goto): Likewise.
2676 (aarch64_emit_gt_goto): Likewise.
2677 (aarch64_emit_ge_got): Likewise.
2678 (aarch64_emit_ops_impl): New static global variable.
2679 (aarch64_emit_ops): New target function, return
2680 &aarch64_emit_ops_impl.
2681 (struct linux_target_ops): Install it.
2683 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2685 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2686 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2688 * linux-aarch64-ipa.c: New file.
2689 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2691 (aarch64_get_thread_area): New target method.
2692 (extract_signed_bitfield): New helper function.
2693 (aarch64_decode_ldr_literal): New function.
2694 (enum aarch64_opcodes): New enum.
2695 (struct aarch64_register): New struct.
2696 (struct aarch64_operand): New struct.
2697 (x0): New static global.
2706 (aarch64_register): New helper function.
2707 (register_operand): Likewise.
2708 (immediate_operand): Likewise.
2709 (struct aarch64_memory_operand): New struct.
2710 (offset_memory_operand): New helper function.
2711 (preindex_memory_operand): Likewise.
2712 (enum aarch64_system_control_registers): New enum.
2713 (ENCODE): New macro.
2714 (emit_insn): New helper function.
2715 (emit_b): New function.
2716 (emit_bcond): Likewise.
2717 (emit_cb): Likewise.
2718 (emit_tb): Likewise.
2719 (emit_blr): Likewise.
2720 (emit_stp): Likewise.
2721 (emit_ldp_q_offset): Likewise.
2722 (emit_stp_q_offset): Likewise.
2723 (emit_load_store): Likewise.
2724 (emit_ldr): Likewise.
2725 (emit_ldrsw): Likewise.
2726 (emit_str): Likewise.
2727 (emit_ldaxr): Likewise.
2728 (emit_stxr): Likewise.
2729 (emit_stlr): Likewise.
2730 (emit_data_processing_reg): Likewise.
2731 (emit_data_processing): Likewise.
2732 (emit_add): Likewise.
2733 (emit_sub): Likewise.
2734 (emit_mov): Likewise.
2735 (emit_movk): Likewise.
2736 (emit_mov_addr): Likewise.
2737 (emit_mrs): Likewise.
2738 (emit_msr): Likewise.
2739 (emit_sevl): Likewise.
2740 (emit_wfe): Likewise.
2741 (append_insns): Likewise.
2742 (can_encode_int32_in): New helper function.
2743 (aarch64_relocate_instruction): New function.
2744 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2745 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2746 (struct linux_target_ops): Install aarch64_get_thread_area,
2747 aarch64_install_fast_tracepoint_jump_pad and
2748 aarch64_get_min_fast_tracepoint_insn_len.
2750 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2752 * Makefile.in (aarch64-insn.o): New rule.
2753 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2755 2015-09-21 Yao Qi <yao.qi@linaro.org>
2757 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2759 2015-09-21 Yao Qi <yao.qi@linaro.org>
2761 * tracepoint.c (max_jump_pad_size): Remove.
2763 2015-09-18 Yao Qi <yao.qi@linaro.org>
2765 * linux-aarch64-low.c: Don't include sys/uio.h.
2766 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2768 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
2770 * tracepoint.c (eval_result_type): Change prototype.
2771 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2773 2015-09-15 Pedro Alves <palves@redhat.com>
2775 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2776 Check whether to report exec events instead of checking whether
2777 multiprocess is enabled.
2779 2015-09-15 Pedro Alves <palves@redhat.com>
2782 * remote-utils.c (prepare_resume_reply): Merge
2783 TARGET_WAITKIND_VFORK_DONE switch case with the
2784 TARGET_WAITKIND_FORKED case.
2786 2015-09-15 Yao Qi <yao.qi@linaro.org>
2788 * server.c (handle_query): Check string comparison using
2789 "else if" instead of "if".
2791 2015-09-15 Yao Qi <yao.qi@linaro.org>
2793 * server.c (vCont_supported): New global variable.
2794 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2795 matches. Append ";vContSupported+" to own_buf.
2796 (handle_v_requests): Append ";s;S" to own_buf if target supports
2797 hardware single step or vCont_supported is false.
2798 (capture_main): Set vCont_supported to zero.
2800 2015-09-15 Yao Qi <yao.qi@linaro.org>
2802 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2804 (linux_supports_hardware_single_step): ... New function.
2805 (linux_target_ops): Update.
2806 * lynx-low.c (lynx_target_ops): Set field
2807 supports_hardware_single_step to target_can_do_hardware_single_step.
2808 * nto-low.c (nto_target_ops): Likewise.
2809 * spu-low.c (spu_target_ops): Likewise.
2810 * win32-low.c (win32_target_ops): Likewise.
2811 * target.c (target_can_do_hardware_single_step): New function.
2812 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2813 Remove. <supports_hardware_single_step>: New field.
2814 (target_supports_conditional_breakpoints): Remove.
2815 (target_supports_hardware_single_step): New macro.
2816 (target_can_do_hardware_single_step): Declare.
2817 * server.c (handle_query): Use target_supports_hardware_single_step
2818 instead of target_supports_conditional_breakpoints.
2820 2015-09-15 Yao Qi <yao.qi@linaro.org>
2822 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2824 (struct linux_target_ops the_low_target): Install
2825 aarch64_linux_siginfo_fixup.
2827 2015-09-11 Don Breazeal <donb@codesourcery.com>
2828 Luis Machado <lgustavo@codesourcery.com>
2830 * linux-low.c (linux_mourn): Static declaration.
2831 (linux_arch_setup): Move in front of
2832 handle_extended_wait.
2833 (linux_arch_setup_thread): New function.
2834 (handle_extended_wait): Handle exec events. Call
2835 linux_arch_setup_thread. Make event_lwp argument a
2836 pointer-to-a-pointer.
2837 (check_zombie_leaders): Do not check stopped threads.
2838 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2839 (linux_low_filter_event): Add lwp and thread for exec'ing
2840 non-leader thread if leader thread has been deleted.
2841 Refactor code into linux_arch_setup_thread and call it.
2842 Pass child lwp pointer by reference to handle_extended_wait.
2843 (linux_wait_for_event_filtered): Update comment.
2844 (linux_wait_1): Prevent clobbering exec event status.
2845 (linux_supports_exec_events): New function.
2846 (linux_target_ops) <supports_exec_events>: Initialize new member.
2847 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2849 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2850 * server.c (report_exec_events): New global variable.
2851 (handle_query): Handle qSupported query for exec-events feature.
2852 (captured_main): Initialize report_exec_events.
2853 * server.h (report_exec_events): Declare new global variable.
2854 * target.h (struct target_ops) <supports_exec_events>: New
2856 (target_supports_exec_events): New macro.
2857 * win32-low.c (win32_target_ops) <supports_exec_events>:
2858 Initialize new member.
2860 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2862 * linux-low.c (linux_low_enable_btrace): Remove.
2863 (linux_target_ops): Replace linux_low_enable_btrace with
2864 linux_enable_btrace.
2866 2015-09-03 Yao Qi <yao.qi@linaro.org>
2868 * linux-aarch64-low.c (aarch64_insert_point): Call
2869 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2872 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2874 * linux-low.c (check_stopped_by_breakpoint): Use
2875 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2877 2015-08-27 Pedro Alves <palves@redhat.com>
2879 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2881 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2883 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2884 the XNEW-family equivalent.
2885 (compile_bytecodes): Likewise.
2886 * dll.c (loaded_dll): Likewise.
2887 * event-loop.c (append_callback_event): Likewise.
2888 (create_file_handler): Likewise.
2889 (create_file_event): Likewise.
2890 * hostio.c (handle_open): Likewise.
2891 * inferiors.c (add_thread): Likewise.
2892 (add_process): Likewise.
2893 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2894 * linux-arm-low.c (arm_new_process): Likewise.
2895 (arm_new_thread): Likewise.
2896 * linux-low.c (add_to_pid_list): Likewise.
2897 (linux_add_process): Likewise.
2898 (handle_extended_wait): Likewise.
2899 (add_lwp): Likewise.
2900 (enqueue_one_deferred_signal): Likewise.
2901 (enqueue_pending_signal): Likewise.
2902 (linux_resume_one_lwp_throw): Likewise.
2903 (linux_resume_one_thread): Likewise.
2904 (linux_read_memory): Likewise.
2905 (linux_write_memory): Likewise.
2906 * linux-mips-low.c (mips_linux_new_process): Likewise.
2907 (mips_linux_new_thread): Likewise.
2908 (mips_add_watchpoint): Likewise.
2909 * linux-x86-low.c (initialize_low_arch): Likewise.
2910 * lynx-low.c (lynx_add_process): Likewise.
2911 * mem-break.c (set_raw_breakpoint_at): Likewise.
2912 (set_breakpoint): Likewise.
2913 (add_condition_to_breakpoint): Likewise.
2914 (add_commands_to_breakpoint): Likewise.
2915 (clone_agent_expr): Likewise.
2916 (clone_one_breakpoint): Likewise.
2917 * regcache.c (new_register_cache): Likewise.
2918 * remote-utils.c (look_up_one_symbol): Likewise.
2919 * server.c (queue_stop_reply): Likewise.
2920 (start_inferior): Likewise.
2921 (queue_stop_reply_callback): Likewise.
2922 (handle_target_event): Likewise.
2923 * spu-low.c (fetch_ppc_memory): Likewise.
2924 (store_ppc_memory): Likewise.
2925 * target.c (set_target_ops): Likewise.
2926 * thread-db.c (thread_db_load_search): Likewise.
2927 (try_thread_db_load_1): Likewise.
2928 * tracepoint.c (add_tracepoint): Likewise.
2929 (add_tracepoint_action): Likewise.
2930 (create_trace_state_variable): Likewise.
2931 (cmd_qtdpsrc): Likewise.
2932 (cmd_qtro): Likewise.
2933 (add_while_stepping_state): Likewise.
2934 * win32-low.c (child_add_thread): Likewise.
2935 (get_image_name): Likewise.
2937 2015-08-25 Yao Qi <yao.qi@linaro.org>
2939 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2941 2015-08-25 Yao Qi <yao.qi@linaro.org>
2943 * Makefile.in (aarch64-linux.o): New rule.
2944 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2946 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2947 (aarch64_init_debug_reg_state): Make it extern.
2948 (aarch64_linux_prepare_to_resume): Remove.
2950 2015-08-25 Yao Qi <yao.qi@linaro.org>
2952 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2953 lwp_arch_private_info and ptid_of_lwp.
2955 2015-08-25 Yao Qi <yao.qi@linaro.org>
2957 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2958 Find proc_info by find_process_pid. All callers updated.
2960 2015-08-25 Yao Qi <yao.qi@linaro.org>
2962 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2964 (debug_reg_change_callback): Remove.
2965 (aarch64_notify_debug_reg_change): Remove.
2967 2015-08-25 Yao Qi <yao.qi@linaro.org>
2969 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2970 Call current_lwp_ptid.
2972 2015-08-25 Yao Qi <yao.qi@linaro.org>
2974 * linux-aarch64-low.c (debug_reg_change_callback): Use
2977 2015-08-25 Yao Qi <yao.qi@linaro.org>
2979 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2981 2015-08-25 Yao Qi <yao.qi@linaro.org>
2983 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2985 2015-08-25 Yao Qi <yao.qi@linaro.org>
2987 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2990 2015-08-25 Yao Qi <yao.qi@linaro.org>
2992 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2994 (debug_reg_change_callback): Remove argument entry and add argument
2995 lwp. Remove local variable thread. Don't print thread id in the
2996 debugging output. Don't check whether pid of thread equals to pid.
2997 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2998 iterate_over_lwps instead find_inferior.
3000 2015-08-24 Pedro Alves <palves@redhat.com>
3002 * inferiors.c (get_first_process): New function.
3003 * inferiors.h (get_first_process): New declaration.
3004 * remote-utils.c (read_ptid): Default to the first process in the
3005 list, instead of to the current thread's process.
3007 2015-08-24 Pedro Alves <palves@redhat.com>
3009 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3010 * event-loop.c: Likewise.
3011 * remote-utils.c: Likewise.
3012 * tracepoint.c: Likewise.
3014 2015-08-24 Pedro Alves <palves@redhat.com>
3016 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3019 2015-08-21 Pedro Alves <palves@redhat.com>
3021 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3022 instead of literal 1.
3024 2015-08-21 Pedro Alves <palves@redhat.com>
3026 * tdesc.c (default_description): Explicitly zero-initialize.
3028 2015-08-21 Pedro Alves <palves@redhat.com>
3031 * inferiors.c (remove_thread): Discard any pending stop reply for
3033 * server.c (remove_all_on_match_pid): Rename to ...
3034 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3036 (discard_queued_stop_replies): Change parameter to a ptid. Now
3038 (handle_v_kill, kill_inferior_callback, captured_main)
3039 (process_serial_event): Adjust.
3040 * server.h (discard_queued_stop_replies): Declare.
3042 2015-08-21 Pedro Alves <palves@redhat.com>
3044 * linux-low.c (wait_for_sigstop): Always switch to no thread
3045 selected if the previously current thread dies.
3046 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3047 process instead of the current thread's.
3048 * remote-utils.c (input_interrupt): Don't check if there's no
3050 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3051 current thread to the general thread fails, error out.
3052 (handle_qxfer_auxv, handle_qxfer_libraries)
3053 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3054 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3055 (handle_query): Check if there's a thread selected instead of
3056 checking whether there's any thread in the thread list.
3057 (handle_qxfer_threads, handle_qxfer_btrace)
3058 (handle_qxfer_btrace_conf): Don't error out early if there's no
3059 thread in the thread list.
3060 (handle_v_cont, myresume): Don't set the current thread to the
3062 (process_serial_event) <Hg handling>: Also set thread_id if the
3063 previous general thread is still alive.
3064 (process_serial_event) <g/G handling>: If setting the current
3065 thread to the general thread fails, error out.
3066 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3067 thread's lwp instead of the current thread's.
3068 * target.c (set_desired_thread): If the desired thread was not
3069 found, leave the current thread pointing to NULL. Return an int
3070 (boolean) indicating success.
3071 * target.h (set_desired_thread): Change return type to int.
3073 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3075 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3076 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3078 (ps_get_thread_area): New function.
3080 2015-08-19 Gary Benson <gbenson@redhat.com>
3082 * hostio.c (handle_pread): Do not attempt to read more data
3083 than hostio_reply_with_data can fit in a packet.
3085 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3087 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3089 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3091 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3093 2015-08-06 Pedro Alves <palves@redhat.com>
3095 * tracepoint.c (expr_eval_result): Now an int.
3097 2015-08-06 Pedro Alves <palves@redhat.com>
3099 * gdbthread.h (struct regcache): Forward declare.
3100 (struct thread_info) <regcache_data>: Now a struct regcache
3102 * inferiors.c (inferior_regcache_data)
3103 (set_inferior_regcache_data): Now work with struct regcache
3105 * inferiors.h (struct regcache): Forward declare.
3106 (inferior_regcache_data, set_inferior_regcache_data): Now work
3107 with struct regcache pointers.
3108 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3109 (free_register_cache_thread): Remove struct regcache pointer
3112 2015-08-06 Pedro Alves <palves@redhat.com>
3114 * server.c (captured_main): On error, print the exception message
3115 to stderr, and if run_once is set, throw a quit.
3117 2015-08-06 Pedro Alves <palves@redhat.com>
3119 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3122 2015-08-06 Pedro Alves <palves@redhat.com>
3124 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3125 reading beyond the passed in buffer length.
3127 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3129 * tracepoint.c (symbol_list) <required>: Remove.
3131 2015-08-06 Pedro Alves <palves@redhat.com>
3133 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3134 count if stopping and suspending threads.
3135 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3136 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3137 (linux_detach): Complete an ongoing step-over.
3138 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3140 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3141 (linux_wait_1): If passing a signal to the inferior after
3142 finishing a step-over, unsuspend and re-resume all lwps. If we
3143 see a single-step event but the thread should be continuing, don't
3144 pass the trap to gdb.
3145 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3146 internal_error instead of gdb_assert.
3147 (enqueue_pending_signal): New function.
3148 (check_ptrace_stopped_lwp_gone): Add debug output.
3149 (start_step_over): Use internal_error instead of gdb_assert.
3150 (complete_ongoing_step_over): New function.
3151 (linux_resume_one_thread): Don't resume a suspended thread.
3152 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3155 2015-08-06 Pedro Alves <palves@redhat.com>
3157 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3158 (linux_thread_alive): Use lwp_is_marked_dead.
3159 (extended_event_reported): Delete.
3160 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3161 instead of extended_event_reported.
3162 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3164 (lwp_is_marked_dead): New function.
3165 (lwp_running): Use lwp_is_marked_dead.
3166 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3169 2015-08-06 Pedro Alves <palves@redhat.com>
3171 * linux-low.c (linux_wait_1): Move fork event output out of the
3172 !report_to_gdb check. Pass event_child->waitstatus to
3173 target_waitstatus_to_string instead of ourstatus.
3175 2015-08-04 Yao Qi <yao.qi@linaro.org>
3177 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3178 if current_thread is 32 bit.
3180 2015-08-04 Yao Qi <yao.qi@linaro.org>
3182 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3183 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3184 * server.c (extended_protocol): Remove "static".
3185 * server.h (extended_protocol): Declare it.
3187 2015-08-04 Yao Qi <yao.qi@linaro.org>
3189 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3190 both aarch64 and aarch32.
3191 (aarch64_set_pc): Likewise.
3193 2015-08-04 Yao Qi <yao.qi@linaro.org>
3195 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3196 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3197 arm-with-neon.xml to srv_xmlfiles.
3198 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3199 (is_64bit_tdesc): New function.
3200 (aarch64_linux_read_description): New function.
3201 (aarch64_arch_setup): Call aarch64_linux_read_description.
3202 (regs_info): Rename to regs_info_aarch64.
3203 (aarch64_regs_info): Return right regs_info.
3204 (initialize_low_arch): Call initialize_low_arch_aarch32.
3206 2015-08-04 Yao Qi <yao.qi@linaro.org>
3208 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3209 * linux-aarch32-low.c: New file.
3210 * linux-aarch32-low.h: New file.
3211 * linux-arm-low.c (arm_fill_gregset): Move it to
3212 linux-aarch32-low.c.
3213 (arm_store_gregset): Likewise.
3214 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3215 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3216 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3217 (regs_info): Rename to regs_info_arm.
3218 (arm_regs_info): Return regs_info_aarch32 if
3219 have_ptrace_getregset is 1 and target description is
3220 arm_with_neon or arm_with_vfpv3.
3221 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3222 Call initialize_low_arch_aarch32 instead.
3224 2015-08-04 Yao Qi <yao.qi@linaro.org>
3226 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3227 * linux-low.c: ... here.
3228 * linux-low.h (have_ptrace_getregset): Declare it.
3230 2015-08-04 Pedro Alves <palves@redhat.com>
3232 * thread-db.c (struct thread_db): Use new typedefs.
3233 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3235 (disable_thread_event_reporting): Cast result of dlsym to
3236 destination function pointer type.
3237 (thread_db_mourn): Use td_ta_delete_ftype.
3239 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3241 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3243 (CDX_BREAKPOINT): Define for R2.
3244 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3245 (the_low_target): Add comments.
3247 2015-07-30 Yao Qi <yao.qi@linaro.org>
3249 * linux-arm-low.c (arm_hwcap): Remove it.
3250 (arm_read_description): New local variable arm_hwcap. Don't
3251 set arm_hwcap to zero.
3253 2015-07-30 Yao Qi <yao.qi@linaro.org>
3255 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3256 Use regcache->tdesc instead.
3257 (arm_store_wmmxregset): Likewise.
3258 (arm_fill_vfpregset): Likewise.
3259 (arm_store_vfpregset): Likewise.
3261 2015-07-30 Yao Qi <yao.qi@linaro.org>
3263 * linux-arm-low.c: Include arch/arm.h.
3264 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3265 (arm_store_gregset): Likewise.
3267 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3269 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3270 ptrace's 4th parameter.
3272 2015-07-27 Yao Qi <yao.qi@linaro.org>
3274 * configure.srv (case aarch64*-*-linux*): Don't set
3277 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3279 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3281 * linux-arm-low.c: Likewise.
3282 * linux-cris-low.c: Likewise.
3283 * linux-crisv32-low.c: Likewise.
3284 * linux-low.c: Likewise.
3285 * linux-m68k-low.c: Likewise.
3286 * linux-mips-low.c: Likewise.
3287 * linux-nios2-low.c: Likewise.
3288 * linux-s390-low.c: Likewise.
3289 * linux-sparc-low.c: Likewise.
3290 * linux-tic6x-low.c: Likewise.
3291 * linux-tile-low.c: Likewise.
3292 * linux-x86-low.c: Likewise.
3294 2015-07-24 Pedro Alves <palves@redhat.com>
3296 * config.in: Regenerate.
3297 * configure: Regenerate.
3299 2015-07-24 Pedro Alves <palves@redhat.com>
3301 * acinclude.m4: Include ../ptrace.m4.
3302 * configure.ac: Call GDB_AC_PTRACE.
3303 * config.in, configure: Regenerate.
3305 2015-07-24 Yao Qi <yao.qi@linaro.org>
3307 * linux-low.c (linux_create_inferior): Remove setting to
3308 proc->priv->new_inferior.
3309 (linux_attach): Likewise.
3310 (linux_low_filter_event): Likewise.
3311 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3313 2015-07-24 Yao Qi <yao.qi@linaro.org>
3315 * linux-low.c (linux_arch_setup): New function.
3316 (linux_low_filter_event): If proc->tdesc is NULL and
3317 proc->attached is true, call the_low_target.arch_setup.
3318 Otherwise, keep status pending, and return.
3319 (linux_resume_one_lwp_throw): Don't call get_pc if
3320 thread->while_stepping isn't NULL. Don't call
3321 get_thread_regcache if proc->tdesc is NULL.
3322 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3323 (linux_target_ops): Install arch_setup.
3324 * server.c (start_inferior): Call the_target->arch_setup.
3325 * target.h (struct target_ops) <arch_setup>: New field.
3326 (target_arch_setup): New marco.
3327 * lynx-low.c (lynx_target_ops): Update.
3328 * nto-low.c (nto_target_ops): Update.
3329 * spu-low.c (spu_target_ops): Update.
3330 * win32-low.c (win32_target_ops): Update.
3332 2015-07-24 Yao Qi <yao.qi@linaro.org>
3334 * linux-low.c (linux_add_process): Don't set
3335 proc->priv->new_inferior.
3336 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3337 (linux_attach): Likewise.
3339 2015-07-24 Yao Qi <yao.qi@linaro.org>
3341 * server.c (start_inferior): Code refactor.
3343 2015-07-24 Yao Qi <yao.qi@linaro.org>
3345 * server.c (process_serial_event): Set general_thread.
3347 2015-07-21 Yao Qi <yao.qi@linaro.org>
3349 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3350 aarch64_linux_get_debug_reg_capacity.
3352 2015-07-17 Yao Qi <yao.qi@linaro.org>
3354 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3355 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3356 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3357 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3358 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3359 (AARCH64_HWP_ALIGNMENT): Likewise.
3360 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3361 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3362 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3363 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3364 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3365 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3366 (struct aarch64_debug_reg_state): Likewise.
3367 (struct arch_lwp_info): Likewise.
3368 (aarch64_align_watchpoint): Likewise.
3369 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3370 (aarch64_watchpoint_length): Likewise.
3371 (aarch64_point_encode_ctrl_reg): Likewise
3372 (aarch64_point_is_aligned): Likewise.
3373 (aarch64_align_watchpoint): Likewise.
3374 (aarch64_linux_set_debug_regs):
3375 (aarch64_dr_state_insert_one_point): Likewise.
3376 (aarch64_dr_state_remove_one_point): Likewise.
3377 (aarch64_handle_breakpoint): Likewise.
3378 (aarch64_handle_aligned_watchpoint): Likewise.
3379 (aarch64_handle_unaligned_watchpoint): Likewise.
3380 (aarch64_handle_watchpoint): Likewise.
3382 2015-07-17 Yao Qi <yao.qi@linaro.org>
3384 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3385 and don't aarch64_get_debug_reg_state. All callers update.
3386 (aarch64_handle_aligned_watchpoint): Likewise.
3387 (aarch64_handle_unaligned_watchpoint): Likewise.
3388 (aarch64_handle_watchpoint): Likewise.
3389 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3390 (aarch64_remove_point): Likewise.
3392 2015-07-17 Yao Qi <yao.qi@linaro.org>
3394 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3396 (aarch64_handle_unaligned_watchpoint): Likewise.
3398 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3400 Revert the previous 3 commits:
3401 Move gdb_regex* to common/
3402 Move linux_find_memory_regions_full & co.
3403 gdbserver build-id attribute generator
3405 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3406 Jan Kratochvil <jan.kratochvil@redhat.com>
3408 gdbserver build-id attribute generator.
3409 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3410 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3411 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3413 (get_dynamic): Use find_pdhr to traverse program headers.
3414 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3415 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3416 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3417 (get_hex_build_id): New.
3418 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3419 to reply XML document.
3421 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3422 Jan Kratochvil <jan.kratochvil@redhat.com>
3424 * target.c: Include target/target-utils.h and fcntl.h.
3425 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3426 (target_fileio_read_stralloc): New functions.
3428 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3430 * Makefile.in (OBS): Add gdb_regex.o.
3432 * config.in: Rebuilt.
3433 * configure: Rebuilt.
3435 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3436 Jan Kratochvil <jan.kratochvil@redhat.com>
3438 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3439 * Makefile.in (OBS): Add target-utils.o.
3440 (linux-maps.o, target-utils.o): New.
3441 * configure.srv (srv_linux_obj): Add linux-maps.o.
3443 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3445 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3447 (the_low_target): Install it.
3449 2015-07-14 Pedro Alves <palves@redhat.com>
3451 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3452 Instead, ignore ECHILD, and throw an error for other errnos.
3454 2015-07-10 Pedro Alves <palves@redhat.com>
3456 * event-loop.c (struct callback_event) <data>: Change type to
3457 gdb_client_data instance instead of gdb_client_data pointer.
3458 (append_callback_event): Adjust.
3460 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3462 * linux-aarch64-low.c: Add comments for each linux_target_ops
3463 method. Remove comments already covered in target_ops and
3464 linux_target_ops definitions.
3465 (the_low_target): Add comments for each unimplemented method.
3467 2015-07-09 Yao Qi <yao.qi@linaro.org>
3469 * linux-aarch64-low.c (aarch64_regmap): Remove.
3470 (aarch64_usrregs_info): Remove.
3471 (regs_info): Set field usrregs to NULL.
3473 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3475 * linux-low.c: Include "rsp-low.h"
3476 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3477 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3478 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3479 (handle_btrace_enable_pt): New.
3480 (handle_btrace_general_set): Support "pt".
3481 (handle_btrace_conf_general_set): Support "pt:size".
3483 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3485 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3488 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3490 * linux-aarch64-low.c: Remove comment about endianness.
3491 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3492 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3495 2015-06-24 Gary Benson <gbenson@redhat.com>
3497 * linux-i386-ipa.c (stdint.h): Do not include.
3498 * lynx-i386-low.c (stdint.h): Likewise.
3499 * lynx-ppc-low.c (stdint.h): Likewise.
3500 * mem-break.c (stdint.h): Likewise.
3501 * thread-db.c (stdint.h): Likewise.
3502 * tracepoint.c (stdint.h): Likewise.
3503 * win32-low.c (stdint.h): Likewise.
3505 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3507 * server.c (write_qxfer_response): Update call to
3508 remote_escape_output.
3510 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3511 Jan Kratochvil <jan.kratochvil@redhat.com>
3513 Merge multiple hex conversions.
3514 * gdbreplay.c (tohex): Rename to 'fromhex'.
3515 (logchar): Use fromhex.
3517 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3519 * server.c (handle_qxfer_libraries): Set `version' attribute for
3522 2015-06-10 Gary Benson <gbenson@redhat.com>
3524 * target.h (struct target_ops) <multifs_open>: New field.
3525 <multifs_unlink>: Likewise.
3526 <multifs_readlink>: Likewise.
3527 * linux-low.c (nat/linux-namespaces.h): New include.
3528 (linux_target_ops): Initialize the_target->multifs_open,
3529 the_target->multifs_unlink and the_target->multifs_readlink.
3530 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3531 * hostio.c (hostio_fs_pid): New static variable.
3532 (hostio_handle_new_gdb_connection): New function.
3533 (handle_setfs): Likewise.
3534 (handle_open): Use the_target->multifs_open as appropriate.
3535 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3536 (handle_readlink): Use the_target->multifs_readlink as
3538 (handle_vFile): Handle vFile:setfs packets.
3539 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3540 after target_handle_new_gdb_connection.
3542 2015-06-10 Gary Benson <gbenson@redhat.com>
3544 * configure.ac (AC_CHECK_FUNCS): Add setns.
3545 * config.in: Regenerate.
3546 * configure: Likewise.
3547 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3548 (linux-namespaces.o): New rule.
3549 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3551 2015-06-09 Gary Benson <gbenson@redhat.com>
3553 * hostio.c (handle_open): Process mode argument with
3554 fileio_to_host_mode.
3556 2015-06-01 Yao Qi <yao.qi@linaro.org>
3558 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3559 * linux-x86-low.c: Likewise.
3561 2015-05-28 Don Breazeal <donb@codesourcery.com>
3563 * linux-low.c (handle_extended_wait): Initialize
3564 thread_info.last_resume_kind for new fork children.
3566 2015-05-15 Pedro Alves <palves@redhat.com>
3568 * target.h (target_handle_new_gdb_connection): Rewrite using if
3569 wrapped in do/while.
3571 2015-05-14 Joel Brobecker <brobecker@adacore.com>
3573 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3574 * configure, config.in: Regenerate.
3575 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3578 2015-05-12 Don Breazeal <donb@codesourcery.com>
3580 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3581 PTRACE_EVENT_VFORK_DONE.
3582 (linux_low_ptrace_options, extended_event_reported): Add vfork
3584 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3585 and "vforkdone" for RSP 'T' Stop Reply Packet.
3586 * server.h (report_vfork_events): Declare
3589 2015-05-12 Don Breazeal <donb@codesourcery.com>
3591 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3592 (the_low_target) <new_fork>: Initialize new member.
3593 * linux-arm-low.c (arm_new_fork): New function.
3594 (the_low_target) <new_fork>: Initialize new member.
3595 * linux-low.c (handle_extended_wait): Call new target function
3597 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3598 * linux-mips-low.c (mips_add_watchpoint): New function
3599 extracted from mips_insert_point.
3600 (the_low_target) <new_fork>: Initialize new member.
3601 (mips_linux_new_fork): New function.
3602 (mips_insert_point): Call mips_add_watchpoint.
3603 * linux-x86-low.c (x86_linux_new_fork): New function.
3604 (the_low_target) <new_fork>: Initialize new member.
3606 2015-05-12 Don Breazeal <donb@codesourcery.com>
3608 * linux-low.c (handle_extended_wait): Implement return value,
3609 rename argument 'event_child' to 'event_lwp', handle
3610 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3611 (linux_low_ptrace_options): New function.
3612 (linux_low_filter_event): Call linux_low_ptrace_options,
3613 use different argument fo linux_enable_event_reporting,
3614 use return value from handle_extended_wait.
3615 (extended_event_reported): New function.
3616 (linux_wait_1): Call extended_event_reported and set
3617 status to report fork events.
3618 (linux_write_memory): Add pid to debug message.
3619 (reset_lwp_ptrace_options_callback): New function.
3620 (linux_handle_new_gdb_connection): New function.
3621 (linux_target_ops): Initialize new structure member.
3622 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3623 * lynx-low.c: Initialize new structure member.
3624 * remote-utils.c (prepare_resume_reply): Implement stop reason
3625 "fork" for "T" stop message.
3626 * server.c (handle_query): Call handle_new_gdb_connection.
3627 * server.h (report_fork_events): Declare global flag.
3628 * target.h (struct target_ops) <handle_new_gdb_connection>:
3630 (target_handle_new_gdb_connection): New macro.
3631 * win32-low.c: Initialize new structure member.
3633 2015-05-12 Don Breazeal <donb@codesourcery.com>
3635 * mem-break.c (APPEND_TO_LIST): Define macro.
3636 (clone_agent_expr): New function.
3637 (clone_one_breakpoint): New function.
3638 (clone_all_breakpoints): New function.
3639 * mem-break.h: Declare new functions.
3641 2015-05-12 Don Breazeal <donb@codesourcery.com>
3643 * linux-low.c (linux_supports_fork_events): New function.
3644 (linux_supports_vfork_events): New function.
3645 (linux_target_ops): Initialize new structure members.
3646 (initialize_low): Call linux_check_ptrace_features.
3647 * lynx-low.c (lynx_target_ops): Initialize new structure
3649 * server.c (report_fork_events, report_vfork_events):
3651 (handle_query): Add new features to qSupported packet and
3653 (captured_main): Initialize new global variables.
3654 * target.h (struct target_ops) <supports_fork_events>:
3656 <supports_vfork_events>: New member.
3657 (target_supports_fork_events): New macro.
3658 (target_supports_vfork_events): New macro.
3659 * win32-low.c (win32_target_ops): Initialize new structure
3662 2015-05-12 Gary Benson <gbenson@redhat.com>
3664 * server.c (handle_qxfer_exec_file): Use current process
3667 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3669 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3670 Remove HAVE_PTRACE_GETREGS conditionals.
3671 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3672 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3674 2015-05-08 Yao Qi <yao.qi@linaro.org>
3676 * linux-low.c (linux_supports_conditional_breakpoints): New
3678 (linux_target_ops): Install new target method.
3679 * lynx-low.c (lynx_target_ops): Install NULL hook for
3680 supports_conditional_breakpoints.
3681 * nto-low.c (nto_target_ops): Likewise.
3682 * spu-low.c (spu_target_ops): Likewise.
3683 * win32-low.c (win32_target_ops): Likewise.
3684 * server.c (handle_query): Check
3685 target_supports_conditional_breakpoints.
3686 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3688 (target_supports_conditional_breakpoints): New macro.
3690 2015-05-06 Pedro Alves <palves@redhat.com>
3693 * server.c (start_inferior): If the process exits, mourn it.
3695 2015-04-21 Gary Benson <gbenson@redhat.com>
3697 * hostio.c (fileio_open_flags_to_host): Factored out to
3698 fileio_to_host_openflags in common/fileio.c. Single use
3701 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3703 * linux-xtensa-low.c (xtensa_fill_gregset)
3704 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3707 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3709 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3710 (regs_info): Replace usrregs pointer with NULL.
3712 2015-04-17 Gary Benson <gbenson@redhat.com>
3714 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3715 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3716 * server.c (handle_qxfer_exec_file): New function.
3717 (qxfer_packets): Add exec-file entry.
3718 (handle_query): Report qXfer:exec-file:read as supported packet.
3720 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3722 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3724 2015-04-09 Gary Benson <gbenson@redhat.com>
3726 * hostio-errno.c (errno_to_fileio_error): Remove function.
3727 Update caller to use remote_fileio_to_fio_error.
3729 2015-04-09 Yao Qi <yao.qi@linaro.org>
3731 * linux-low.c (linux_insert_point): Call
3732 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3733 (linux_remove_point): Call remove_memory_breakpoint if type is
3735 * linux-x86-low.c (x86_insert_point): Don't call
3736 insert_memory_breakpoint.
3737 (x86_remove_point): Don't call remove_memory_breakpoint.
3739 2015-04-01 Pedro Alves <palves@redhat.com>
3740 Cleber Rosa <crosa@redhat.com>
3742 * server.c (gdbserver_usage): Reorganize and extend the usage
3745 2015-03-24 Pedro Alves <palves@redhat.com>
3747 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3748 output. Also dump TRAP_TRACE.
3749 (linux_low_filter_event): In debug output, distinguish a
3750 resume_stop SIGSTOP from a delayed SIGSTOP.
3752 2015-03-24 Gary Benson <gbenson@redhat.com>
3754 * linux-x86-low.c (x86_linux_new_thread): Moved to
3756 (x86_linux_prepare_to_resume): Likewise.
3758 2015-03-24 Gary Benson <gbenson@redhat.com>
3760 * Makefile.in (x86-linux-dregs.o): New rule.
3761 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3762 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3763 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3764 (x86_linux_dr_get): Likewise.
3765 (x86_linux_dr_set): Likewise.
3766 (update_debug_registers_callback): Likewise.
3767 (x86_linux_dr_set_addr): Likewise.
3768 (x86_linux_dr_get_addr): Likewise.
3769 (x86_linux_dr_set_control): Likewise.
3770 (x86_linux_dr_get_control): Likewise.
3771 (x86_linux_dr_get_status): Likewise.
3772 (x86_linux_update_debug_registers): Likewise.
3774 2015-03-24 Gary Benson <gbenson@redhat.com>
3776 * linux-x86-low.c (x86_linux_update_debug_registers):
3777 New function, factored out from...
3778 (x86_linux_prepare_to_resume): ...this.
3780 2015-03-24 Gary Benson <gbenson@redhat.com>
3782 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3783 (x86_linux_dr_set): Likewise.
3784 (update_debug_registers_callback): Likewise.
3785 (x86_linux_dr_set_addr): Likewise.
3786 (x86_linux_dr_get_addr): Likewise.
3787 (x86_linux_dr_set_control): Likewise.
3788 (x86_linux_dr_get_control): Likewise.
3789 (x86_linux_dr_get_status): Likewise.
3790 (x86_linux_prepare_to_resume): Likewise.
3792 2015-03-24 Gary Benson <gbenson@redhat.com>
3794 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3795 Use perror_with_name. Pass string through gettext.
3796 (x86_linux_dr_set): Likewise.
3798 2015-03-24 Gary Benson <gbenson@redhat.com>
3800 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3801 (x86_linux_dr_set_addr): ...this.
3802 (x86_dr_low_get_addr): Rename to...
3803 (x86_linux_dr_get_addr): ...this.
3804 (x86_dr_low_set_control): Rename to...
3805 (x86_linux_dr_set_control): ...this.
3806 (x86_dr_low_get_control): Rename to...
3807 (x86_linux_dr_get_control): ...this.
3808 (x86_dr_low_get_status): Rename to...
3809 (x86_linux_dr_get_status): ...this.
3810 (x86_dr_low): Update with new function names.
3812 2015-03-24 Gary Benson <gbenson@redhat.com>
3814 * Makefile.in (x86-linux.o): New rule.
3815 * configure.srv: Add x86-linux.o to relevant targets.
3816 * linux-low.c (lwp_set_arch_private_info): New function.
3817 (lwp_arch_private_info): Likewise.
3818 * linux-x86-low.c: Include nat/x86-linux.h.
3819 (arch_lwp_info): Removed structure.
3820 (update_debug_registers_callback):
3821 Use lwp_set_debug_registers_changed.
3822 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3823 and lwp_set_debug_registers_changed.
3824 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3826 2015-03-24 Gary Benson <gbenson@redhat.com>
3828 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3829 * linux-arm-low.c (arm_new_thread): Likewise.
3830 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3831 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3832 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3833 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3835 2015-03-24 Gary Benson <gbenson@redhat.com>
3837 * linux-low.c (ptid_of_lwp): New function.
3838 (lwp_is_stopped): Likewise.
3839 (lwp_stop_reason): Likewise.
3840 * linux-x86-low.c (update_debug_registers_callback):
3842 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3845 2015-03-24 Gary Benson <gbenson@redhat.com>
3847 * linux-low.h (linux_stop_lwp): Remove declaration.
3849 2015-03-24 Gary Benson <gbenson@redhat.com>
3851 * linux-low.h: Include nat/linux-nat.h.
3852 * linux-low.c (iterate_over_lwps_args): New structure.
3853 (iterate_over_lwps_filter): New function.
3854 (iterate_over_lwps): Likewise.
3855 * linux-x86-low.c (update_debug_registers_callback):
3856 Update signature to what iterate_over_lwps expects.
3857 Remove PID check that iterate_over_lwps now performs.
3858 (x86_dr_low_set_addr): Use iterate_over_lwps.
3859 (x86_dr_low_set_control): Likewise.
3861 2015-03-24 Gary Benson <gbenson@redhat.com>
3863 * linux-x86-low.c (x86_debug_reg_state): New function.
3864 (x86_linux_prepare_to_resume): Use the above.
3866 2015-03-24 Gary Benson <gbenson@redhat.com>
3868 * linux-low.c (current_lwp_ptid): New function.
3869 * linux-x86-low.c: Include nat/linux-nat.h.
3870 (x86_dr_low_get_addr): Use current_lwp_ptid.
3871 (x86_dr_low_get_control): Likewise.
3872 (x86_dr_low_get_status): Likewise.
3874 2015-03-20 Pedro Alves <palves@redhat.com>
3876 * tracepoint.c (cmd_qtstatus): Make "str" const.
3878 2015-03-20 Pedro Alves <palves@redhat.com>
3880 * server.c (handle_general_set): Make "req_str" const.
3882 2015-03-19 Pedro Alves <palves@redhat.com>
3884 * linux-low.c (linux_resume_one_lwp): Rename to ...
3885 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3886 instead call perror_with_name.
3887 (check_ptrace_stopped_lwp_gone): New function.
3888 (linux_resume_one_lwp): Reimplement as wrapper around
3889 linux_resume_one_lwp_throw that swallows errors if the LWP is
3892 2015-03-19 Pedro Alves <palves@redhat.com>
3894 * linux-low.c (count_events_callback, select_event_lwp_callback):
3895 No longer check whether the thread has resume_stop as last resume
3898 2015-03-19 Pedro Alves <palves@redhat.com>
3900 * linux-low.c (count_events_callback, select_event_lwp_callback):
3901 Use the lwp's status_pending_p field, not the thread's.
3903 2015-03-19 Pedro Alves <palves@redhat.com>
3905 * linux-low.c (select_event_lwp_callback): Update comments to
3906 no longer mention SIGTRAP.
3908 2015-03-18 Gary Benson <gbenson@redhat.com>
3910 * server.c (handle_query): Do not report vFile:fstat as supported.
3912 2015-03-11 Gary Benson <gbenson@redhat.com>
3914 * hostio.c (sys/types.h): New include.
3915 (sys/stat.h): Likewise.
3916 (common-remote-fileio.h): Likewise.
3917 (handle_fstat): New function.
3918 (handle_vFile): Handle vFile:fstat packets.
3920 2015-03-11 Gary Benson <gbenson@redhat.com>
3922 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3923 struct stat.st_blocks and struct stat.st_blksize.
3924 * configure: Regenerate.
3925 * config.in: Likewise.
3926 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3927 (OBS): Add common-remote-fileio.o.
3928 (common-remote-fileio.o): New rule.
3930 2015-03-09 Pedro Alves <palves@redhat.com>
3932 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3933 'struct sockaddr' pointer in 'accept' call.
3935 2015-03-09 Pedro Alves <palves@redhat.com>
3938 2015-03-07 Pedro Alves <palves@redhat.com>
3939 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3940 or <winsock2.h> here. Instead include "gdb_socket.h".
3941 (remote_open): Use union gdb_sockaddr_u.
3942 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3943 or <winsock2.h> here. Instead include "gdb_socket.h".
3944 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3945 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3947 (init_named_socket, gdb_agent_helper_thread): Use union
3950 2015-03-07 Pedro Alves <palves@redhat.com>
3952 * configure.ac (build_warnings): Move
3953 -Wdeclaration-after-statement to the C-specific set.
3954 * configure: Regenerate.
3956 2015-03-07 Pedro Alves <palves@redhat.com>
3958 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3959 or <winsock2.h> here. Instead include "gdb_socket.h".
3960 (remote_open): Use union gdb_sockaddr_u.
3961 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3962 or <winsock2.h> here. Instead include "gdb_socket.h".
3963 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3964 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3966 (init_named_socket, gdb_agent_helper_thread): Use union
3969 2015-03-07 Pedro Alves <palves@redhat.com>
3971 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3974 2015-03-06 Yao Qi <yao.qi@linaro.org>
3976 * linux-aarch64-low.c (aarch64_insert_point): Use
3977 show_debug_regs as a boolean.
3978 (aarch64_remove_point): Likewise.
3980 2015-03-05 Pedro Alves <palves@redhat.com>
3982 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3983 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3984 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3985 * nto-low.c (nto_target_ops): Likewise.
3986 * spu-low.c (spu_target_ops): Likewise.
3987 * win32-low.c (win32_target_ops): Likewise.
3989 2015-03-04 Pedro Alves <palves@redhat.com>
3991 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3992 Decide whether a breakpoint triggered based on the SIGTRAP's
3994 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3995 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3996 (linux_low_filter_event): Check for breakpoints before checking
3998 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4000 (linux_stopped_by_sw_breakpoint)
4001 (linux_supports_stopped_by_sw_breakpoint)
4002 (linux_stopped_by_hw_breakpoint)
4003 (linux_supports_stopped_by_hw_breakpoint): New functions.
4004 (linux_target_ops): Install new target methods.
4006 2015-03-04 Pedro Alves <palves@redhat.com>
4008 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4009 * server.c (swbreak_feature, hwbreak_feature): New globals.
4010 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4011 (captured_main): Clear swbreak_feature and hwbreak_feature.
4012 * server.h (swbreak_feature, hwbreak_feature): Declare.
4013 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4014 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4015 supports_stopped_by_hw_breakpoint>: New fields.
4016 (target_supports_stopped_by_sw_breakpoint)
4017 (target_stopped_by_sw_breakpoint)
4018 (target_supports_stopped_by_hw_breakpoint)
4019 (target_stopped_by_hw_breakpoint): Declare.
4021 2015-03-04 Pedro Alves <palves@redhat.com>
4023 enum lwp_stop_reason -> enum target_stop_reason
4024 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4025 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4026 (linux_wait_1, stuck_in_jump_pad_callback)
4027 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4028 (linux_stopped_by_watchpoint):
4029 * linux-low.h (enum lwp_stop_reason): Delete.
4030 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4031 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4033 2015-03-04 Yao Qi <yao.qi@linaro.org>
4035 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4037 2015-03-03 Gary Benson <gbenson@redhat.com>
4039 * hostio.c (handle_vFile): Fix prefix lengths.
4041 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4043 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4046 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4048 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4049 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4050 (clean): Add "rm -f" for above C files.
4051 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4052 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4053 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4054 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4055 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4056 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4057 (init_registers_s390x_vx_linux64)
4058 (init_registers_s390x_tevx_linux64)
4059 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4060 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4062 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4063 (s390_store_vxrs_high): New functions.
4064 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4066 (s390_arch_setup): Add logic for selecting one of the new target
4067 descriptions. Activate the new vector regsets if applicable.
4068 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4069 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4070 and init_registers_s390x_tevx_linux64.
4072 2015-03-01 Pedro Alves <palves@redhat.com>
4074 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4077 2015-02-27 Pedro Alves <palves@redhat.com>
4079 * linux-x86-low.c (u_debugreg_offset): New function.
4080 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4082 2015-02-27 Pedro Alves <palves@redhat.com>
4084 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4085 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4086 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4087 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4088 (ps_lsetfpregs, ps_getpid)
4089 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4090 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4091 (ps_lsetxregs, ps_plog): Declare.
4093 2015-02-27 Pedro Alves <palves@redhat.com>
4095 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4096 IP_AGENT_EXPORT_FUNC.
4097 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4098 IP_AGENT_EXPORT_FUNC.
4099 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4100 (IP_AGENT_EXPORT): Delete.
4101 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4102 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4103 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4104 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4105 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4106 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4107 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4108 (traceframe_read_count, traceframe_write_count)
4109 (traceframes_created, trace_state_variables, get_raw_reg)
4110 (get_trace_state_variable_value, set_trace_state_variable_value)
4111 (ust_loaded, helper_thread_id, cmd_buf): Use
4112 IPA_SYM_EXPORTED_NAME.
4113 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4114 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4115 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4116 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4117 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4118 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4119 EXTERN_C_PUSH/EXTERN_C_POP.
4120 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4121 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4122 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4123 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4124 (traceframe_write_count, traceframe_read_count)
4125 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4126 (about_to_request_buffer_space, get_trace_state_variable_value)
4127 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4128 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4129 EXTERN_C_PUSH/EXTERN_C_POP.
4130 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4131 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4132 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4133 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4134 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4135 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4136 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4137 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4139 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4140 (IP_AGENT_EXPORT_VAR_DECL): Define.
4142 (gdb_agent_get_raw_reg): Declare.
4144 2015-02-27 Tom Tromey <tromey@redhat.com>
4145 Pedro Alves <palves@redhat.com>
4147 Rename symbols whose names are reserved C++ keywords throughout.
4149 2015-02-27 Pedro Alves <palves@redhat.com>
4151 * Makefile.in (COMPILER): New, get it from autoconf.
4152 (CXX): Get from autoconf instead.
4153 (COMPILE.pre): Use COMPILER.
4154 (CC-LD): Rename to ...
4155 (CC_LD): ... this. Use COMPILER.
4156 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4157 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4158 * acinclude.m4: Include build-with-cxx.m4.
4159 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4160 Disable -Werror by default if building in C++ mode.
4161 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4162 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4163 the C++ compiler. Save/restore CXXFLAGS too.
4164 * configure: Regenerate.
4166 2015-02-27 Pedro Alves <palves@redhat.com>
4168 * acinclude.m4: Include libiberty.m4.
4169 * configure.ac: Call libiberty_INIT.
4170 * config.in, configure: Regenerate.
4172 2015-02-26 Pedro Alves <palves@redhat.com>
4174 * linux-low.c (linux_wait_1): When incrementing the PC past a
4175 program breakpoint always use the_low_target.breakpoint_len as
4176 increment, rather than the maximum between that and
4177 the_low_target.decr_pc_after_break.
4179 2015-02-23 Pedro Alves <palves@redhat.com>
4181 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4182 thread was doing a step-over; always adjust the PC if
4183 we stepped over a permanent breakpoint.
4184 (linux_wait_1): If we stepped over breakpoint that was on top of a
4185 permanent breakpoint, manually advance the PC past it.
4187 2015-02-23 Pedro Alves <palves@redhat.com>
4189 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4191 (x86_fill_gregset, x86_store_gregset): Use it when handling
4194 2015-02-20 Pedro Alves <palves@redhat.com>
4196 * thread-db.c: Include "nat/linux-procfs.h".
4197 (thread_db_init): Skip listing new threads if the kernel supports
4198 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4200 2015-02-20 Pedro Alves <palves@redhat.com>
4202 * linux-low.c (status_pending_p_callback): Use ptid_match.
4204 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4206 PR breakpoints/16812
4207 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4208 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4209 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4211 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4213 PR breakpoints/15956
4214 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4216 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4218 * linux-low.c (linux_low_btrace_conf): Print size.
4219 * server.c (handle_btrace_conf_general_set): New.
4220 (hanle_general_set): Call handle_btrace_conf_general_set.
4221 (handle_query): Report Qbtrace-conf:bts:size as supported.
4223 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4225 * linux-low.c (linux_low_enable_btrace): Update parameters.
4226 (linux_low_btrace_conf): New.
4227 (linux_target_ops)<to_btrace_conf>: Initialize.
4228 * server.c (current_btrace_conf): New.
4229 (handle_btrace_enable): Rename to ...
4230 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
4231 to target_enable_btrace. Update comment. Update users.
4232 (handle_qxfer_btrace_conf): New.
4233 (qxfer_packets): Add btrace-conf entry.
4234 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4235 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4236 (target_ops)<read_btrace_conf>: New.
4237 (target_enable_btrace): Update parameters.
4238 (target_read_btrace_conf): New.
4240 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4242 * server.c (handle_btrace_general_set): Remove call to
4243 target_supports_btrace.
4244 (supported_btrace_packets): New.
4245 (handle_query): Call supported_btrace_packets.
4246 * target.h: include btrace-common.h.
4247 (btrace_target_info): Removed.
4248 (supports_btrace, target_supports_btrace): Update parameters.
4250 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4252 * Makefile.in (SFILES): Add common/btrace-common.c.
4253 (OBS): Add common/btrace-common.o.
4254 (btrace-common.o): Add build rules.
4255 * linux-low: Include btrace-common.h.
4256 (linux_low_read_btrace): Use struct btrace_data. Call
4257 btrace_data_init and btrace_data_fini.
4259 2015-02-06 Pedro Alves <palves@redhat.com>
4261 * thread-db.c (find_new_threads_callback): Add debug output.
4263 2015-02-04 Pedro Alves <palves@redhat.com>
4265 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4266 (resume_stopped_resumed_lwps): New function.
4267 (linux_wait_for_event_filtered): Use it.
4269 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4271 * Makefile.in (SFILES): Add linux-personality.c.
4272 (linux-personality.o): New rule.
4273 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4274 list of objects to be built.
4275 * linux-low.c: Include nat/linux-personality.h.
4276 (linux_create_inferior): Remove code to disable address space
4277 randomization (moved to ../nat/linux-personality.c). Create
4278 cleanup to disable address space randomization.
4280 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4282 * Makefile.in (posix-strerror.o): New rule.
4283 (mingw-strerror.o): Likewise.
4284 * configure: Regenerated.
4285 * configure.ac: Source file ../common/common.host. Initialize new
4286 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4288 2015-01-14 Yao Qi <yao@codesourcery.com>
4290 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4291 (ppc-linux.o): New rule.
4292 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4293 * configure.ac: AC_CHECK_FUNCS(getauxval).
4294 * config.in: Re-generated.
4295 * configure: Re-generated.
4296 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4297 ppc64_64bit_inferior_p
4299 2015-01-14 Yao Qi <yao@codesourcery.com>
4301 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4302 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4303 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4304 (PT_ORIG_R3, PT_TRAP): Likewise.
4305 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4306 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4307 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4309 2015-01-10 Joel Brobecker <brobecker@adacore.com>
4311 * i387-fp.c (i387_cache_to_xsave): In look over
4312 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4313 zmmh_low_space field by use of zmmh_high_space.
4315 2015-01-09 Pedro Alves <palves@redhat.com>
4317 * linux-low.c (step_over_bkpt): Move higher up in the file.
4318 (handle_extended_wait): Don't store the stop_pc here.
4319 (get_stop_pc): Adjust comments and rename to ...
4320 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4321 stopped for a software breakpoint or hardware breakpoint.
4322 (thread_still_has_status_pending_p): New function.
4323 (status_pending_p_callback): Use
4324 thread_still_has_status_pending_p. If the event is no longer
4325 interesting, resume the LWP.
4326 (handle_tracepoints): Add assert.
4327 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4328 (wstatus_maybe_breakpoint): New function.
4329 (cancel_breakpoint): Delete function.
4330 (check_stopped_by_watchpoint): New function, factored out from
4331 linux_low_filter_event.
4332 (lp_status_maybe_breakpoint): Delete function.
4333 (linux_low_filter_event): Remove filter_ptid argument.
4334 Leave thread group exits pending here. Store the LWP's stop PC.
4335 Always leave events pending.
4336 (linux_wait_for_event_filtered): Pull all events out of the
4337 kernel, and leave them all pending.
4338 (count_events_callback, select_event_lwp_callback): Consider all
4340 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4341 (select_event_lwp): Only give preference to the stepping LWP in
4342 all-stop mode. Adjust comments.
4343 (ignore_event): New function.
4344 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4345 references to cancel_breakpoints. Adjust to renames. Also give
4346 equal priority to all LWPs that have had events in non-stop mode.
4347 If reporting a software breakpoint event, unadjust the LWP's PC.
4348 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4349 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4351 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4352 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4353 (linux_stopped_by_watchpoint): Adjust.
4354 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4355 * linux-low.h (enum lwp_stop_reason): New.
4356 (struct lwp_info) <stop_pc>: Adjust comment.
4357 <stopped_by_watchpoint>: Delete field.
4358 <stop_reason>: New field.
4359 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4360 * mem-break.c (software_breakpoint_inserted_here)
4361 (hardware_breakpoint_inserted_here): New function.
4362 * mem-break.h (software_breakpoint_inserted_here)
4363 (hardware_breakpoint_inserted_here): Declare.
4364 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4365 (cancel_breakpoints): Delete.
4366 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4367 (upload_fast_traceframes): Remove references to
4370 2015-01-09 Pedro Alves <palves@redhat.com>
4372 * thread-db.c (find_new_threads_callback): Ignore thread if the
4373 kernel thread ID is -1.
4375 2015-01-09 Pedro Alves <palves@redhat.com>
4377 * linux-low.c (linux_attach_fail_reason_string): Move to
4378 nat/linux-ptrace.c, and rename.
4379 (linux_attach_lwp): Update comment.
4380 (attach_proc_task_lwp_callback): New function.
4381 (linux_attach): Adjust to rename and use
4382 linux_proc_attach_tgid_threads.
4383 (linux_attach_fail_reason_string): Delete declaration.
4385 2015-01-01 Joel Brobecker <brobecker@adacore.com>
4387 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4388 * server.c (gdbserver_version): Likewise.
4390 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4392 * remote-utils.c: Include ctype.h.
4393 (input_interrupt): Explicitly handle the case when the char
4394 received is the NUL byte. Improve the printing of non-ASCII
4397 2014-12-16 Joel Brobecker <brobecker@adacore.com>
4399 * linux-low.c (linux_low_filter_event): Update call to
4400 linux_enable_event_reporting following the addition of
4401 a new parameter to that function.
4403 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
4406 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4407 (AARCH64_FPCR_REGNO): Likewise.
4408 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4409 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4410 (aarch64_store_fpregset): Likewise.
4412 2014-12-15 Joel Brobecker <brobecker@adacore.com>
4414 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4415 Remove FIXME comment about assumption about N.
4417 2014-12-13 Joel Brobecker <brobecker@adacore.com>
4419 * configure.ac: If large-file support is disabled in GDBserver,
4420 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4421 * configure: Regenerate.
4423 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4425 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4426 warning upon ENODATA from ptrace.
4427 * linux-s390-low.c (s390_store_tdb): New.
4428 (s390_regsets): Add regset for NT_S390_TDB.
4430 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4432 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4433 without a fill_function.
4434 * linux-s390-low.c (s390_fill_last_break): Remove.
4435 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4436 (s390_arch_setup): Use regset's size instead of fill_function for
4439 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4441 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4442 the regset's store function when ptrace returned an error.
4443 * regcache.c (get_thread_regcache): Invalidate register cache
4444 before fetching inferior's registers.
4446 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4448 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4449 while-loop as for-loop.
4450 (regsets_store_inferior_registers): Likewise.
4452 2014-11-28 Yao Qi <yao@codesourcery.com>
4454 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4455 * config.in, configure: Re-generate.
4456 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4459 2014-11-21 Yao Qi <yao@codesourcery.com>
4461 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4462 (AC_CHECK_HEADERS): Remove malloc.h.
4463 * configure: Re-generated.
4464 * config.in: Re-generated.
4465 * server.h: Don't include alloca.h and malloc.h.
4466 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4467 Don't include malloc.h.
4469 2014-11-17 Joel Brobecker <brobecker@adacore.com>
4471 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4472 corresponding ERRNO check in same block.
4474 2014-11-12 Pedro Alves <palves@redhat.com>
4476 * server.c (cont_thread): Update comment.
4477 (start_inferior, attach_inferior): No longer clear cont_thread.
4478 (handle_v_cont): No longer set cont_thread.
4479 (captured_main): Clear cont_thread each time a GDB connects.
4481 2014-11-12 Pedro Alves <palves@redhat.com>
4483 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4484 thread, and don't resume all threads if the Hc thread has exited.
4486 2014-11-12 Pedro Alves <palves@redhat.com>
4488 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4489 the process group instead of to a specific LWP.
4491 2014-10-15 Pedro Alves <palves@redhat.com>
4494 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4496 (arm_set_thread_context): Delete.
4497 (the_low_target): Adjust.
4498 * win32-i386-low.c (debug_registers_changed)
4499 (debug_registers_used): Delete.
4500 (update_debug_registers_callback): New function.
4501 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4502 needing to update their debug registers.
4503 (win32_get_current_dr): New function.
4504 (x86_dr_low_get_addr, x86_dr_low_get_control)
4505 (x86_dr_low_get_status): Fetch the debug register from the thread
4507 (i386_initial_stuff): Adjust.
4508 (i386_get_thread_context): Remove current_event parameter. Don't
4509 clear debug_registers_changed nor copy DR values to
4511 (i386_set_thread_context): Delete.
4512 (i386_prepare_to_resume): New function.
4513 (i386_thread_added): Mark the thread as needing to update irs
4515 (the_low_target): Remove i386_set_thread_context and install
4516 i386_prepare_to_resume.
4517 * win32-low.c (win32_get_thread_context): Adjust.
4518 (win32_set_thread_context): Use SetThreadContext
4520 (win32_prepare_to_resume): New function.
4521 (win32_require_context): New function, factored out from ...
4522 (thread_rec): ... this.
4523 (continue_one_thread): Call win32_prepare_to_resume on each thread
4524 we're about to continue.
4525 (win32_resume): Call win32_prepare_to_resume on the event thread.
4526 * win32-low.h (struct win32_thread_info)
4527 <debug_registers_changed>: New field.
4528 (struct win32_target_ops): Change prototype of set_thread_context,
4529 delete set_thread_context and add prepare_to_resume.
4530 (win32_require_context): New declaration.
4532 2014-10-08 Gary Benson <gbenson@redhat.com>
4534 * server.h: Do not include common-exceptions.h.
4536 2014-10-08 Gary Benson <gbenson@redhat.com>
4538 * server.h: Do not include cleanups.h.
4540 2014-09-30 James Hogan <james.hogan@imgtec.com>
4542 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4545 2014-09-23 Yao Qi <yao@codesourcery.com>
4547 * linux-low.c (lp_status_maybe_breakpoint): New function.
4548 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4549 (count_events_callback): Likewise.
4550 (select_event_lwp_callback): Likewise.
4551 (cancel_breakpoints_callback): Likewise.
4553 2014-09-19 Don Breazeal <donb@codesourcery.com>
4555 * linux-low.c (handle_extended_wait): Call
4556 linux_ptrace_get_extended_event.
4557 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4558 linux_is_extended_waitstatus.
4560 2014-09-16 Joel Brobecker <brobecker@adacore.com>
4562 * Makefile.in (CPPFLAGS): Define.
4563 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4564 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4566 2014-09-16 Gary Benson <gbenson@redhat.com>
4568 * inferiors.h (current_inferior): Renamed as...
4569 (current_thread): New variable. All uses updated.
4570 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4571 (maybe_move_out_of_jump_pad): Likewise.
4572 (cancel_breakpoint): Likewise.
4573 (linux_low_filter_event): Likewise.
4574 (wait_for_sigstop): Likewise.
4575 (linux_resume_one_lwp): Likewise.
4576 (need_step_over_p): Likewise.
4577 (start_step_over): Likewise.
4578 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4579 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4580 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4581 and save_inferior as saved_thread.
4582 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4584 (regcache_invalidate_thread): Likewise.
4585 * remote-utils.c (prepare_resume_reply): Likewise.
4586 * thread-db.c (thread_db_get_tls_address): Likewise.
4587 (disable_thread_event_reporting): Likewise.
4588 (remove_thread_event_breakpoints): Likewise.
4589 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4591 * target.h (set_desired_inferior): Renamed as...
4592 (set_desired_thread): New declaration. All uses updated.
4593 * server.c (myresume): Updated comment to reference thread instead
4595 (handle_serial_event): Likewise.
4596 (handle_target_event): Likewise.
4598 2014-09-12 Tom Tromey <tromey@redhat.com>
4599 Gary Benson <gbenson@redhat.com>
4601 * regcache.h: Include common-regcache.h.
4602 (regcache_read_pc): Don't declare.
4603 * regcache.c (get_thread_regcache_for_ptid): New function.
4605 2014-09-11 Tom Tromey <tromey@redhat.com>
4606 Gary Benson <gbenson@redhat.com>
4608 * symbol.c: New file.
4609 * Makefile.in (SFILES): Add symbol.c.
4610 (OBS): Add symbol.o.
4612 2014-09-11 Gary Benson <gbenson@redhat.com>
4614 * target.c (target_stop_ptid, target_continue_ptid): New
4617 2014-09-11 Tom Tromey <tromey@redhat.com>
4618 Gary Benson <gbenson@redhat.com>
4620 * target.h: Include target/target.h.
4621 * target.c (target_read_memory, target_read_uint32)
4622 (target_write_memory): New functions.
4624 2014-09-11 Gary Benson <gbenson@redhat.com>
4626 * server.h (debug_hw_points): Don't declare.
4627 * server.c (debug_hw_points): Don't define. Replace all uses
4628 with show_debug_regs.
4629 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4630 all uses with show_debug_regs.
4632 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4634 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4635 endianness into account.
4636 (ppc_supply_ptrace_register): Likewise.
4638 2014-09-03 James Hogan <james.hogan@imgtec.com>
4640 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4641 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4643 2014-09-03 Gary Benson <gbenson@redhat.com>
4645 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4646 ALL_DEBUG_ADDRESS_REGISTERS.
4648 2014-09-02 Gary Benson <gbenson@redhat.com>
4650 * i386-low.h: Renamed as...
4651 * x86-low.h: New file. All type, function and variable name
4652 prefixes changed from "i386_" to "x86_". All references updated.
4653 * i386-low.c: Renamed as...
4654 * x86-low.c: New file. All type, function and variable name
4655 prefixes changed from "i386_" to "x86_". All references updated.
4657 2014-09-02 Gary Benson <gbenson@redhat.com>
4659 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4660 (x86_linux_new_thread): Likewise.
4662 2014-08-29 Gary Benson <gbenson@redhat.com>
4664 * server.h (setjmp.h): Do not include.
4665 (toplevel): Do not declare.
4666 (common-exceptions.h): Include.
4667 (cleanups.h): Likewise.
4668 * server.c (toplevel): Do not define.
4669 (exit_code): New static global.
4670 (detach_or_kill_for_exit_cleanup): New function.
4671 (main): New function. Original main renamed to...
4672 (captured_main): New function.
4673 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4675 2014-08-29 Gary Benson <gbenson@redhat.com>
4677 * Makefile.in (SFILES): Add common/common-exceptions.c.
4678 (OBS): Add common-exceptions.o.
4679 (common-exceptions.o): New rule.
4680 * utils.c (prepare_to_throw_exception): New function.
4682 2014-08-29 Gary Benson <gbenson@redhat.com>
4684 * config.in: Regenerate.
4685 * configure: Likewise.
4687 2014-08-29 Gary Benson <gbenson@redhat.com>
4689 * Makefile.in (SFILES): Add common/cleanups.c.
4691 (cleanups.o): New rule.
4693 2014-08-29 Gary Benson <gbenson@redhat.com>
4695 * utils.c (internal_vwarning): New function.
4697 2014-08-28 Gary Benson <gbenson@redhat.com>
4699 * utils.h (fatal): Remove declaration.
4700 * utils.c (fatal): Remove function.
4702 2014-08-28 Gary Benson <gbenson@redhat.com>
4704 * tracepoint.c (gdb_agent_init): Replace fatal with
4706 (initialize_tracepoint): Likewise.
4708 2014-08-28 Gary Benson <gbenson@redhat.com>
4710 * remote-utils.c (remote_prepare): Replace fatal with error.
4712 2014-08-28 Gary Benson <gbenson@redhat.com>
4714 * linux-low.c (linux_async): Replace fatal with warning.
4716 (linux_start_non_stop): Return -1 if linux_async failed.
4718 2014-08-28 Gary Benson <gbenson@redhat.com>
4720 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4722 (i386_dr_low_get_addr): Remove vague comment.
4723 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4726 2014-08-28 Gary Benson <gbenson@redhat.com>
4728 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4729 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4731 (linux_resume_one_lwp): Likewise.
4732 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4734 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4735 with internal_error.
4736 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4737 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4738 (find_register_by_name): Replace fatal with internal_error.
4739 (find_regno): Likewise.
4740 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4741 * thread-db.c (thread_db_create_event): Likewise.
4742 (thread_db_load_search): Likewise.
4743 (try_thread_db_load_1): Likewise.
4744 * tracepoint.c (get_jump_space_head): Replace fatal with
4746 (claim_trampoline_space): Likewise.
4747 (have_fast_tracepoint_trampoline_buffer): Likewise.
4748 (cmd_qtstart): Likewise.
4749 (stop_tracing): Likewise.
4750 (fast_tracepoint_collecting): Likewise.
4751 (target_malloc): Likewise.
4752 (download_tracepoint): Likewise.
4753 (download_trace_state_variables): Replace check with gdb_assert.
4754 (upload_fast_traceframes): Replace fatal with internal_error.
4756 2014-08-19 Tom Tromey <tromey@redhat.com>
4757 Gary Benson <gbenson@redhat.com>
4759 * Makefile.in (SFILES): Add common/common-debug.c.
4760 (OBS): Add common-debug.o.
4761 (common-debug.o): New rule.
4762 * debug.h (debug_printf): Don't declare.
4763 * debug.c (debug_printf): Renamed and rewritten as...
4764 (debug_vprintf): New function.
4766 2014-08-19 Gary Benson <gbenson@redhat.com>
4768 * utils.h: Do not include print-utils.h.
4770 2014-08-19 Tom Tromey <tromey@redhat.com>
4771 Gary Benson <gbenson@redhat.com>
4773 * server.h: Add static assertion.
4774 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4776 2014-08-19 Tom Tromey <tromey@redhat.com>
4777 Gary Benson <gbenson@redhat.com>
4779 * Makefile.in (SFILES): Add common/errors.c.
4780 (OBS): Add errors.o.
4781 (IPA_OBS): Add errors-ipa.o.
4782 (errors.o): New rule.
4783 (errors-ipa.o): Likewise.
4784 * utils.h (perror_with_name, error, warning): Don't declare.
4785 * utils.c (warning): Renamed and rewritten as...
4786 (vwarning): New function.
4787 (error): Renamed and rewritten as...
4788 (verror): New function.
4789 (internal_error): Renamed and rewritten as...
4790 (internal_verror): New function.
4792 2014-08-07 Gary Benson <gbenson@redhat.com>
4794 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4795 * configure: Regenerate.
4796 * config.in: Likewise.
4797 * server.h: Do not include errno.h.
4798 * event-loop.c: Likewise.
4799 * hostio-errno.c: Likewise.
4800 * linux-low.c: Likewise.
4801 * remote-utils.c: Likewise.
4802 * spu-low.c: Likewise.
4803 * utils.c: Likewise.
4804 * gdbreplay.c: Unconditionally include errno.h.
4806 2014-08-07 Gary Benson <gbenson@redhat.com>
4808 * server.h: Do not include string.h.
4809 * event-loop.c: Likewise.
4810 * linux-low.c: Likewise.
4811 * regcache.c: Likewise.
4812 * remote-utils.c: Likewise.
4813 * spu-low.c: Likewise.
4814 * utils.c: Likewise.
4816 2014-08-07 Gary Benson <gbenson@redhat.com>
4818 * server.h: Do not include gdb_assert.h.
4820 2014-08-07 Gary Benson <gbenson@redhat.com>
4822 * server.h: Do not include common-utils.h.
4824 2014-08-07 Gary Benson <gbenson@redhat.com>
4826 * server.h: Do not include ptid.h.
4827 * notif.h: Likewise.
4829 2014-08-07 Gary Benson <gbenson@redhat.com>
4831 * server.h: Do not include gdb_locale.h.
4833 2014-08-07 Gary Benson <gbenson@redhat.com>
4835 * server.h: Do not include gdb/signals.h.
4836 * win32-low.c: Likewise.
4838 2014-08-07 Gary Benson <gbenson@redhat.com>
4840 * server.h: Do not include pathmax.h.
4842 2014-08-07 Gary Benson <gbenson@redhat.com>
4844 * server.h: Do not include libiberty.h.
4845 * linux-bfin-low.c: Likewise.
4847 2014-08-07 Gary Benson <gbenson@redhat.com>
4849 * server.h: Do not include ansidecl.h.
4851 2014-08-07 Gary Benson <gbenson@redhat.com>
4853 * linux-x86-low.c: Do not include stddef.h.
4854 * lynx-ppc-low.c: Likewise.
4855 * tracepoint.c: Likewise.
4857 2014-08-07 Gary Benson <gbenson@redhat.com>
4859 * server.h: Do not include stdarg.h.
4860 * nto-low.c: Likewise.
4862 2014-08-07 Gary Benson <gbenson@redhat.com>
4864 * server.h: Do not include stdlib.h.
4865 * inferiors.c: Likewise.
4866 * linux-low.c: Likewise.
4867 * regcache.c: Likewise.
4868 * spu-low.c: Likewise.
4869 * tracepoint.c: Likewise.
4870 * utils.c: Likewise.
4872 2014-08-07 Gary Benson <gbenson@redhat.com>
4874 * server.h: Do not include stdio.h.
4875 * linux-low.c: Likewise.
4876 * remote-utils.c: Likewise.
4877 * spu-low.c: Likewise.
4878 * utils.c: Likewise.
4879 * wincecompat.c: Likewise.
4881 2014-08-06 Gary Benson <gbenson@redhat.com>
4883 * regcache.c (init_register_cache): Move conditionals inside if.
4885 2014-08-06 Gary Benson <gbenson@redhat.com>
4887 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4889 2014-07-31 Gary Benson <gbenson@redhat.com>
4891 * ax.h: Do not include server.h.
4892 * gdbthread.h: Likewise.
4893 * lynx-low.h: Likewise.
4894 * notif.h: Likewise.
4896 2014-07-30 Gary Benson <gbenson@redhat.com>
4898 * server.h: Include common-defs.h.
4899 Do not include config.h or build-gnulib-gdbserver/config.h.
4901 2014-07-30 Gary Benson <gbenson@redhat.com>
4903 * hostio-errno.c: Move server.h to top of includes list.
4904 * inferiors.c: Likewise.
4905 * linux-x86-low.c: Likewise.
4906 * notif.c: Include server.h.
4908 2014-07-24 Tom Tromey <tromey@redhat.com>
4909 Gary Benson <gbenson@redhat.com>
4911 * server.h (CORE_ADDR): Now unsigned.
4913 2014-07-16 Pedro Alves <palves@redhat.com>
4915 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4917 2014-07-15 Pedro Alves <palves@redhat.com>
4919 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4922 2014-07-11 Pedro Alves <palves@redhat.com>
4924 * linux-low.c (kill_wait_lwp): New function, based on
4925 kill_one_lwp_callback, but use my_waitpid directly.
4926 (kill_one_lwp_callback, linux_kill): Use it.
4928 2014-06-23 Pedro Alves <palves@redhat.com>
4930 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4931 before setting DR0..DR3.
4933 2014-06-20 Gary Benson <gbenson@redhat.com>
4935 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4936 * configure: Regenerated.
4937 * config.in: Likewise.
4939 2014-06-20 Gary Benson <gbenson@redhat.com>
4941 * Makefile.in (SFILES): Update locations for files moved
4943 (object file files): Reordered.
4945 2014-06-20 Gary Benson <gbenson@redhat.com>
4947 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4948 (i386_dr_low_set_addr): Likewise.
4949 (i386_dr_low_get_addr): Likewise.
4950 (i386_dr_low_can_set_control): Likewise.
4951 (i386_dr_low_set_control): Likewise.
4952 (i386_dr_low_get_control): Likewise.
4953 (i386_dr_low_get_status): Likewise.
4954 (i386_get_debug_register_length): Likewise.
4955 * linux-x86-low.c (i386_dr_low_set_addr):
4956 Changed signature. Made static.
4957 (i386_dr_low_get_addr): Likewise.
4958 (i386_dr_low_set_control): Likewise.
4959 (i386_dr_low_get_control): Likewise.
4960 (i386_dr_low_get_status): Likewise.
4961 (i386_dr_low): New global variable.
4962 * win32-i386-low.c (i386_dr_low_set_addr):
4963 Changed signature. Made static.
4964 (i386_dr_low_get_addr): Likewise.
4965 (i386_dr_low_set_control): Likewise.
4966 (i386_dr_low_get_control): Likewise.
4967 (i386_dr_low_get_status): Likewise.
4968 (i386_dr_low): New global variable.
4970 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4972 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4973 * Makefile.in (AR, AR_FLAGS): Define.
4974 * configure: Regenerate.
4976 2014-06-19 Gary Benson <gbenson@redhat.com>
4978 * Makefile.in (i386-dregs.o): New rule.
4979 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4980 * i386-low.c (target.h): Remove include.
4981 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4982 (DR_CONTROL_SHIFT): Likewise.
4983 (DR_CONTROL_SIZE): Likewise.
4984 (DR_RW_EXECUTE): Likewise.
4985 (DR_RW_WRITE): Likewise.
4986 (DR_RW_READ): Likewise.
4987 (DR_RW_IORW): Likewise.
4988 (DR_LEN_1): Likewise.
4989 (DR_LEN_2): Likewise.
4990 (DR_LEN_4): Likewise.
4991 (DR_LEN_8): Likewise.
4992 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4993 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4994 (DR_ENABLE_SIZE): Likewise.
4995 (DR_LOCAL_SLOWDOWN): Likewise.
4996 (DR_GLOBAL_SLOWDOWN): Likewise.
4997 (DR_CONTROL_RESERVED): Likewise.
4998 (I386_DR_CONTROL_MASK): Likewise.
4999 (I386_DR_VACANT): Likewise.
5000 (I386_DR_LOCAL_ENABLE): Likewise.
5001 (I386_DR_GLOBAL_ENABLE): Likewise.
5002 (I386_DR_DISABLE): Likewise.
5003 (I386_DR_SET_RW_LEN): Likewise.
5004 (I386_DR_GET_RW_LEN): Likewise.
5005 (I386_DR_WATCH_HIT): Likewise.
5006 (i386_wp_op_t): Likewise.
5007 (i386_show_dr): Likewise.
5008 (i386_length_and_rw_bits): Likewise.
5009 (i386_insert_aligned_watchpoint): Likewise.
5010 (i386_remove_aligned_watchpoint): Likewise.
5011 (i386_handle_nonaligned_watchpoint): Likewise.
5012 i386_update_inferior_debug_regs(): Likewise.
5013 (i386_dr_insert_watchpoint): Likewise.
5014 (i386_dr_remove_watchpoint): Likewise.
5015 (i386_dr_region_ok_for_watchpoint): Likewise.
5016 (i386_dr_stopped_data_address): Likewise.
5017 (i386_dr_stopped_by_watchpoint): Likewise.
5019 2014-06-19 Gary Benson <gbenson@redhat.com>
5021 * i386-low.c (i386_dr_show): Renamed to
5022 i386_show_dr and made static. All uses updated.
5023 (i386_dr_length_and_rw_bits): Renamed to
5024 i386_length_and_rw_bits and made static.
5026 (i386_dr_insert_aligned_watchpoint): Renamed to
5027 i386_insert_aligned_watchpoint and made static.
5029 (i386_dr_remove_aligned_watchpoint): Renamed to
5030 i386_remove_aligned_watchpoint and made static.
5032 (i386_dr_update_inferior_debug_regs): Renamed to
5033 i386_update_inferior_debug_regs and made static.
5036 2014-06-18 Gary Benson <gbenson@redhat.com>
5038 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5039 (i386_dr_low_can_set_control): Likewise.
5040 (i386_get_debug_register_length): Likewise.
5041 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5042 (i386_dr_low_can_set_control): Likewise.
5043 (i386_get_debug_register_length): Likewise.
5045 2014-06-17 Gary Benson <gbenson@redhat.com>
5047 * i386-low.h (i386-dregs.h): New include.
5048 (DR_FIRSTADDR): Now in i386-dregs.h.
5049 (DR_LASTADDR): Likewise.
5050 (DR_NADDR): Likewise.
5051 (DR_STATUS): Likewise.
5052 (DR_CONTROL): Likewise.
5053 (i386_debug_reg_state): Likewise.
5054 (i386_dr_insert_watchpoint): Likewise.
5055 (i386_dr_remove_watchpoint): Likewise.
5056 (i386_dr_region_ok_for_watchpoint): Likewise.
5057 (i386_dr_stopped_data_address): Likewise.
5058 (i386_dr_stopped_by_watchpoint): Likewise.
5059 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5061 2014-06-18 Gary Benson <gbenson@redhat.com>
5063 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5064 i386_dr_insert_watchpoint.
5065 (i386_low_remove_watchpoint): Renamed to
5066 i386_dr_remove_watchpoint.
5067 (i386_low_region_ok_for_watchpoint): Renamed to
5068 i386_dr_region_ok_for_watchpoint.
5069 (i386_low_stopped_data_address): Renamed to
5070 i386_dr_stopped_data_address.
5071 (i386_low_stopped_by_watchpoint): Renamed to
5072 i386_dr_stopped_by_watchpoint.
5073 * i386-low.c (i386_show_dr): Renamed to
5074 i386_dr_show and made nonstatic. All uses updated.
5075 (i386_length_and_rw_bits): Renamed to
5076 i386_dr_length_and_rw_bits and made nonstatic.
5078 (i386_insert_aligned_watchpoint): Renamed to
5079 i386_dr_insert_aligned_watchpoint and made nonstatic.
5081 (i386_remove_aligned_watchpoint): Renamed to
5082 i386_dr_remove_aligned_watchpoint and made nonstatic.
5084 (i386_update_inferior_debug_regs): Renamed to
5085 i386_dr_update_inferior_debug_regs and made nonstatic.
5087 (i386_low_insert_watchpoint): Renamed to
5088 i386_dr_insert_watchpoint. All uses updated.
5089 (i386_low_remove_watchpoint): Renamed to
5090 i386_dr_remove_watchpoint. All uses updated.
5091 (i386_low_region_ok_for_watchpoint): Renamed to
5092 i386_dr_region_ok_for_watchpoint. All uses updated.
5093 (i386_low_stopped_data_address): Renamed to
5094 i386_dr_stopped_data_address. All uses updated.
5095 (i386_low_stopped_by_watchpoint): Renamed to
5096 i386_dr_stopped_by_watchpoint. All uses updated.
5098 2014-06-18 Gary Benson <gbenson@redhat.com>
5100 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5101 (i386_dr_low_can_set_control): Likewise.
5102 (i386_insert_aligned_watchpoint): New check.
5104 2014-06-18 Gary Benson <gbenson@redhat.com>
5106 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5109 2014-06-18 Gary Benson <gbenson@redhat.com>
5111 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5112 instead of fatal and error.
5113 (i386_handle_nonaligned_watchpoint): Likewise.
5115 2014-06-18 Gary Benson <gbenson@redhat.com>
5117 * i386-low.c (i386_get_debug_register_length): New macro.
5118 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5119 (i386_show_dr): Use debug_printf instead of fprintf. Use
5120 phex to format values.
5122 2014-06-18 Gary Benson <gbenson@redhat.com>
5124 * i386-low.h: Comment changes.
5125 * i386-low.c: Likewise.
5127 2014-06-18 Gary Benson <gbenson@redhat.com>
5129 * i386-low.c: Whitespace changes.
5131 2014-06-12 Tom Tromey <tromey@redhat.com>
5133 * utils.c (freeargv): Remove.
5135 2014-06-12 Tom Tromey <tromey@redhat.com>
5137 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5138 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5139 (parse_debug_format_options): Likewise.
5140 (gdbserver_usage): Likewise.
5141 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5142 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5143 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5145 ($(LIBGNU)): Depend on libiberty.
5146 (all-lib): Recurse into all subdirs.
5147 (install-only): Invoke "install" target in subdirs.
5148 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5150 * configure: Rebuild.
5151 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5152 for vasprintf, vsnprintf, or gettimeofday.
5153 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5156 2014-06-05 Joel Brobecker <brobecker@adacore.com>
5158 * development.sh: Delete.
5159 * Makefile.in (config.status): Adjust dependency on development.sh.
5160 * configure.ac: Adjust development.sh source call.
5161 * configure: Regenerate.
5163 2014-06-02 Pedro Alves <palves@redhat.com>
5165 * ax.c (gdb_free_agent_expr): New function.
5166 * ax.h (gdb_free_agent_expr): New declaration.
5167 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5169 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5171 (clear_breakpoint_conditions_and_commands): New function.
5172 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5173 (clear_breakpoint_conditions_and_commands): New declaration.
5175 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5177 * linux-aarch64-low.c (asm/ptrace.h): Include.
5179 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5181 Fix TLS access for -static -pthread.
5182 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5183 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5184 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5186 2014-05-20 Pedro Alves <palves@redhat.com>
5188 * linux-aarch64-low.c (aarch64_insert_point)
5189 (aarch64_remove_point): No longer check whether the type is
5190 supported here. Adjust to new interface.
5191 (the_low_target): Install aarch64_supports_z_point_type as
5192 supports_z_point_type method.
5193 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5194 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5195 instead of a Z packet char. Adjust.
5196 (arm_supports_z_point_type): New function.
5197 (arm_insert_point, arm_remove_point): Adjust to new interface.
5198 (the_low_target): Install arm_supports_z_point_type.
5199 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5200 (cris_insert_point, cris_remove_point): Adjust to new interface.
5201 Don't check whether the type is supported here.
5202 (the_low_target): Install cris_supports_z_point_type.
5203 * linux-low.c (linux_supports_z_point_type): New function.
5204 (linux_insert_point, linux_remove_point): Adjust to new interface.
5205 * linux-low.h (struct linux_target_ops) <insert_point,
5206 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5207 raw_breakpoint pointer parameter.
5208 <supports_z_point_type>: New method.
5209 * linux-mips-low.c (mips_supports_z_point_type): New function.
5210 (mips_insert_point, mips_remove_point): Adjust to new interface.
5211 Use mips_supports_z_point_type.
5212 (the_low_target): Install mips_supports_z_point_type.
5213 * linux-ppc-low.c (the_low_target): Install NULL as
5214 supports_z_point_type method.
5215 * linux-s390-low.c (the_low_target): Install NULL as
5216 supports_z_point_type method.
5217 * linux-sparc-low.c (the_low_target): Install NULL as
5218 supports_z_point_type method.
5219 * linux-x86-low.c (x86_supports_z_point_type): New function.
5220 (x86_insert_point): Adjust to new insert_point interface. Use
5221 insert_memory_breakpoint. Adjust to new
5222 i386_low_insert_watchpoint interface.
5223 (x86_remove_point): Adjust to remove_point interface. Use
5224 remove_memory_breakpoint. Adjust to new
5225 i386_low_remove_watchpoint interface.
5226 (the_low_target): Install x86_supports_z_point_type.
5227 * lynx-low.c (lynx_target_ops): Install NULL as
5228 supports_z_point_type callback.
5229 * nto-low.c (nto_supports_z_point_type): New.
5230 (nto_insert_point, nto_remove_point): Adjust to new interface.
5231 (nto_target_ops): Install nto_supports_z_point_type.
5232 * mem-break.c: Adjust intro comment.
5233 (struct raw_breakpoint) <raw_type, size>: New fields.
5234 <inserted>: Update comment.
5235 <shlib_disabled>: Delete field.
5236 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5237 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5238 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5239 (raw_bkpt_type_to_target_hw_bp_type): New function.
5240 (find_enabled_raw_code_breakpoint_at): New function.
5241 (find_raw_breakpoint_at): New type and size parameters. Use them.
5242 (insert_memory_breakpoint): New function, based off
5243 set_raw_breakpoint_at.
5244 (remove_memory_breakpoint): New function.
5245 (set_raw_breakpoint_at): Reimplement.
5246 (set_breakpoint): New, based on set_breakpoint_at.
5247 (set_breakpoint_at): Reimplement.
5248 (delete_raw_breakpoint): Go through the_target->remove_point
5249 instead of assuming memory breakpoints.
5250 (find_gdb_breakpoint_at): Delete.
5251 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5252 (find_gdb_breakpoint): New function.
5253 (set_gdb_breakpoint_at): Delete.
5254 (z_type_supported): New function.
5255 (set_gdb_breakpoint_1): New function, loosely based off
5256 set_gdb_breakpoint_at.
5257 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5258 (delete_gdb_breakpoint_at): Delete.
5259 (delete_gdb_breakpoint_1): New function, loosely based off
5260 delete_gdb_breakpoint_at.
5261 (delete_gdb_breakpoint): New function.
5262 (clear_gdb_breakpoint_conditions): Rename to ...
5263 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5265 (add_condition_to_breakpoint): Make static.
5266 (add_breakpoint_condition): Take a struct breakpoint pointer
5267 instead of an address. Adjust.
5268 (gdb_condition_true_at_breakpoint): Rename to ...
5269 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5271 (gdb_condition_true_at_breakpoint): Reimplement.
5272 (add_breakpoint_commands): Take a struct breakpoint pointer
5273 instead of an address. Adjust.
5274 (gdb_no_commands_at_breakpoint): Rename to ...
5275 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5276 parameter. Return true if no breakpoint was found. Change debug
5278 (gdb_no_commands_at_breakpoint): Reimplement.
5279 (run_breakpoint_commands): Rename to ...
5280 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5281 and change return type to boolean.
5282 (run_breakpoint_commands): New function.
5283 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5284 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5285 breakpoint. Go through the_target->remove_point instead of
5286 assuming memory breakpoint.
5287 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5288 software and hardware breakpoints.
5289 (reinsert_raw_breakpoint): Go through the_target->insert_point
5290 instead of assuming memory breakpoint.
5291 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5292 software and hardware breakpoints.
5293 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5294 Check both software and hardware breakpoints.
5295 (validate_inserted_breakpoint): Assert the breakpoint is a
5296 software breakpoint. Set the inserted flag to -1 instead of
5297 setting shlib_disabled.
5298 (delete_disabled_breakpoints): Adjust.
5299 (validate_breakpoints): Only validate software breakpoints.
5300 Adjust to inserted flag change.
5301 (check_mem_read, check_mem_write): Skip breakpoint types other
5302 than software breakpoints. Adjust to inserted flag change.
5303 * mem-break.h (enum raw_bkpt_type): New enum.
5304 (raw_breakpoint, struct process_info): Forward declare.
5305 (Z_packet_to_target_hw_bp_type): Delete declaration.
5306 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5307 (set_gdb_breakpoint, delete_gdb_breakpoint)
5308 (clear_breakpoint_conditions): New declarations.
5309 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5310 (breakpoint_inserted_here): Update comment.
5311 (add_breakpoint_condition, add_breakpoint_commands): Replace
5312 address parameter with a breakpoint pointer parameter.
5313 (gdb_breakpoint_here): Update comment.
5314 (delete_gdb_breakpoint_at): Delete.
5315 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5316 * server.c (process_point_options): Take a struct breakpoint
5317 pointer instead of an address. Adjust.
5318 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5319 delete_gdb_breakpoint.
5320 * spu-low.c (spu_target_ops): Install NULL as
5321 supports_z_point_type method.
5322 * target.h: Include mem-break.h.
5323 (struct target_ops) <prepare_to_access_memory>: Update comment.
5324 <supports_z_point_type>: New field.
5325 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5326 instead of a char. Also take a raw breakpoint pointer.
5327 * win32-arm-low.c (the_low_target): Install NULL as
5328 supports_z_point_type.
5329 * win32-i386-low.c (i386_supports_z_point_type): New function.
5330 (i386_insert_point, i386_remove_point): Adjust to new interface.
5331 (the_low_target): Install i386_supports_z_point_type.
5332 * win32-low.c (win32_supports_z_point_type): New function.
5333 (win32_insert_point, win32_remove_point): Adjust to new interface.
5334 (win32_target_ops): Install win32_supports_z_point_type.
5335 * win32-low.h (struct win32_target_ops):
5336 <supports_z_point_type>: New method.
5337 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5338 instead of a char. Also take a raw breakpoint pointer.
5340 2014-05-20 Pedro Alves <palves@redhat.com>
5342 * mem-break.h: Include break-common.h.
5343 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5344 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5345 (Z_packet_to_target_hw_bp_type): New declaration.
5346 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5347 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5348 (Z_PACKET_ACCESS_WP): Delete macros.
5349 (Z_packet_to_hw_type): Delete function.
5350 * i386-low.h: Don't include break-common.h here.
5351 (Z_packet_to_hw_type): Delete declaration.
5352 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5353 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5354 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5355 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5356 * linux-aarch64-low.c: Don't include break-common.h here.
5357 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5358 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5359 (Z_packet_to_target_hw_bp_type): Delete function.
5360 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5362 (mips_insert_point, mips_remove_point): Use
5363 Z_packet_to_target_hw_bp_type.
5365 2014-05-20 Pedro Alves <palves@redhat.com>
5367 * linux-aarch64-low.c: Include break-common.h.
5368 (enum target_point_type): Delete.
5369 (Z_packet_to_point_type): Rename to ...
5370 (Z_packet_to_target_hw_bp_type): ... this, and return a
5371 target_hw_bp_type instead.
5372 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5373 instead of an enum target_point_type.
5374 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5376 (aarch64_dr_state_insert_one_point)
5377 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5378 (aarch64_handle_aligned_watchpoint)
5379 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5380 Take an enum target_hw_bp_type instead of an enum
5382 (aarch64_supports_z_point_type): New function.
5383 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5384 use Z_packet_to_target_hw_bp_type.
5386 2014-05-20 Joel Brobecker <brobecker@adacore.com>
5388 * configure.ac: Only use -Werror by default when DEVELOPMENT
5390 * configure: Regenerate.
5392 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5394 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5395 * linux-x86-low.c (X86_64_USER_REGS): New.
5396 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5398 2014-04-28 Yao Qi <yao@codesourcery.com>
5400 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5403 2014-04-25 Pedro Alves <palves@redhat.com>
5406 * linux-low.c (linux_attach_fail_reason_string): New function.
5407 (linux_attach_lwp): Delete.
5408 (linux_attach_lwp_1): Rename to ...
5409 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5410 argument. Remove "initial" parameter. Return int instead of
5411 void. Don't error or warn here.
5412 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5413 failure to attach to the tgid. Call warning when failing to
5415 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5416 argument. Remove "initial" parameter. Return int instead of
5417 void. Don't error or warn here.
5418 (linux_attach_fail_reason_string): New declaration.
5419 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5420 interface change. Use linux_attach_fail_reason_string.
5422 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
5423 Walfred Tedeschi <walfred.tedeschi@intel.com>
5425 * Makefile.in: Added rules to handle new files
5426 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5427 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5428 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5429 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5430 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5431 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5433 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5434 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5435 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5436 i386/x32-avx512.xml.
5437 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5438 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5439 i386/x32-avx512-linux.xml.
5440 * i387-fp.c (num_avx512_k_registers): New constant for number
5442 (num_avx512_zmmh_low_registers): New constant for number of
5443 lower ZMM registers (0-15).
5444 (num_avx512_zmmh_high_registers): New constant for number of
5445 higher ZMM registers (16-31).
5446 (num_avx512_ymmh_registers): New contant for number of higher
5447 YMM registers (ymm16-31 added by avx521 on x86_64).
5448 (num_avx512_xmm_registers): New constant for number of higher
5449 XMM registers (xmm16-31 added by AVX512 on x86_64).
5450 (struct i387_xsave): Add space for AVX512 registers.
5451 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5452 Add code to handle AVX512 registers.
5453 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5454 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5455 prototypei from generated file.
5456 (tdesc_amd64_avx512_linux): Likewise.
5457 (init_registers_x32_avx512_linux): Likewise.
5458 (tdesc_x32_avx512_linux): Likewise.
5459 (init_registers_i386_avx512_linux): Likewise.
5460 (tdesc_i386_avx512_linux): Likewise.
5461 (x86_64_regmap): Add AVX512 registers.
5462 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5464 (initialize_low_arch): Add code to initialize AVX512 registers.
5466 2014-04-23 Pedro Alves <palves@redhat.com>
5468 * mem-break.c (find_gdb_breakpoint_at): Make static.
5469 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5471 2014-04-23 Pedro Alves <palves@redhat.com>
5473 * i386-low.c: Don't include break-common.h here.
5474 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5475 prototype to take target_hw_bp_type as argument instead of a Z
5477 * i386-low.h: Include break-common.h here.
5478 (Z_packet_to_hw_type): Declare.
5479 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5481 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5482 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5483 (x86_remove_point): Convert the packet number to a
5484 target_hw_bp_type before calling i386_low_remove_watchpoint.
5485 * win32-i386-low.c (i386_insert_point): Convert the packet number
5486 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5487 (i386_remove_point): Convert the packet number to a
5488 target_hw_bp_type before calling i386_low_remove_watchpoint.
5490 2014-04-23 Pedro Alves <palves@redhat.com>
5492 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5494 2014-04-10 Pedro Alves <palves@redhat.com>
5496 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5497 Check if the condition or command is NULL before checking if the
5498 breakpoint is known. On success, return true.
5499 * mem-break.h (add_breakpoint_condition): Document return.
5500 (add_breakpoint_commands): Add describing comment.
5501 * server.c (skip_to_semicolon): New function.
5502 (process_point_options): Use it.
5504 2014-04-09 Pedro Alves <palves@redhat.com>
5506 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5509 2014-02-27 Pedro Alves <palves@redhat.com>
5512 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5514 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5516 (last_thread_of_process_p): Take a PID argument instead of a
5518 (linux_wait_for_lwp): Delete.
5519 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5521 (linux_low_filter_event): New function, party factored out from
5522 linux_wait_for_event.
5523 (linux_wait_for_event): Rename to ...
5524 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5525 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5526 sigsuspend. Check for zombie leaders.
5527 (linux_wait_for_event): Reimplement as wrapper around
5528 linux_wait_for_event_filtered.
5529 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5530 a normal or signal exit is seen, it's the whole process exiting.
5531 (wait_for_sigstop): No longer a for_each_inferior callback.
5532 Rewrite on top of linux_wait_for_event_filtered.
5533 (stop_all_lwps): Call wait_for_sigstop directly.
5534 * server.c (resume, handle_target_event): Handle
5535 TARGET_WAITKIND_NO_RESUMED.
5537 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5539 * win32-low.c (psapi_get_dll_name,
5540 * win32_CreateToolhelp32Snapshot): Delete.
5541 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5542 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5544 (handle_load_dll): Add function description.
5545 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5547 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5549 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5551 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5552 base address when calling win32_add_one_solib.
5553 (handle_load_dll): Delete local variable load_addr.
5554 Remove 0x1000 offset applied to DLL base address when calling
5555 win32_add_one_solib.
5556 (handle_unload_dll): Add comment.
5558 2014-02-26 Joel Brobecker <brobecker@adacore.com>
5560 * win32-low.c (win32_add_all_dlls): Renames
5561 win32_ensure_ntdll_loaded. Rewrite function documentation.
5562 Adjust implementation to always load all DLLs.
5563 Add 0x1000 offset to DLL base address when calling
5564 win32_add_one_solib.
5565 (child_initialization_done): New static global.
5566 (do_initial_child_stuff): Set child_initialization_done to
5567 zero during child initialization, and 1 after. Replace call
5568 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5570 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5571 (handle_unload_dll): Add function documentation.
5572 (get_child_debug_event): Ignore load and unload DLL events
5573 during child initialization.
5575 2014-02-20 Doug Evans <dje@google.com>
5577 Remove global all_lwps.
5578 * inferiors.h (ptid_of): Move here from linux-low.h.
5579 (pid_of, lwpid_of): Ditto.
5580 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5581 parameter is a struct thread_info * now.
5582 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5583 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5584 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5586 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5587 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5588 * linux-arm-low.c (update_registers_callback): Update, "entry"
5589 parameter is a struct thread_info * now.
5590 Fetch lwpid from current_inferior directly.
5591 (arm_insert_point): Pass &all_threads to find_inferior instead of
5593 (arm_remove_point): Ditto.
5594 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5595 (arm_prepare_to_resume): Fetch pid from thread.
5596 (arm_read_description): Fetch lwpid from current_inferior directly.
5597 * linux-low.c (all_lwps): Delete.
5598 (delete_lwp): Delete call to remove_inferior.
5599 (handle_extended_wait): Fetch lwpid from thread.
5600 (add_lwp): Don't set lwp->entry.id. Remove call to
5601 add_inferior_to_list.
5602 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5603 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5604 (kill_one_lwp_callback): Ditto.
5605 (linux_kill): Don't dereference NULL pointer.
5606 Fetch ptid,lwpid from thread.
5607 (get_detach_signal): Fetch ptid from thread.
5608 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5609 Simplify call to regcache_invalidate_thread.
5610 (delete_lwp_callback): Update, "entry" parameter is a
5611 struct thread_info * now. Fetch pid from thread.
5612 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5613 (status_pending_p_callback): Update, "entry" parameter is a
5614 struct thread_info * now. Fetch ptid from thread.
5615 (find_lwp_pid): Update, "entry" parameter is a
5616 struct thread_info * now.
5617 (linux_wait_for_lwp): Fetch pid from thread.
5618 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5619 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5620 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5621 (dequeue_one_deferred_signal): Ditto.
5622 (cancel_breakpoint): Fetch ptid from current_inferior.
5623 (linux_wait_for_event): Pass &all_threads to find_inferior,
5624 not &all_lwps. Fetch ptid, lwpid from thread.
5625 (count_events_callback): Update, "entry" parameter is a
5626 struct thread_info * now.
5627 (select_singlestep_lwp_callback): Ditto.
5628 (select_event_lwp_callback): Ditto.
5629 (cancel_breakpoints_callback): Ditto.
5630 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5632 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5633 (unsuspend_one_lwp): Update, "entry" parameter is a
5634 struct thread_info * now.
5635 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5637 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5638 Fetch lwpid from thread, not lwp.
5639 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5640 Pass &all_threads to find_inferior, not &all_lwps.
5641 (send_sigstop): Fetch lwpid from thread, not lwp.
5642 (send_sigstop_callback): Update, "entry" parameter is a
5643 struct thread_info * now.
5644 (suspend_and_send_sigstop_callback): Ditto.
5645 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5646 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5647 struct thread_info * now.
5648 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5650 (lwp_running): Update, "entry" parameter is a
5651 struct thread_info * now.
5652 (stop_all_lwps): Fetch ptid from thread.
5653 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5654 (linux_resume_one_lwp): Fetch lwpid from thread.
5655 (linux_set_resume_request): Update, "entry" parameter is a
5656 struct thread_info * now. Fetch pid, lwpid from thread.
5657 (resume_status_pending_p): Update, "entry" parameter is a
5658 struct thread_info * now.
5659 (need_step_over_p): Ditto. Fetch lwpid from thread.
5660 (start_step_over): Fetch lwpid from thread.
5661 (linux_resume_one_thread): Update, "entry" parameter is a
5662 struct thread_info * now. Fetch lwpid from thread.
5663 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5664 (proceed_one_lwp): Update, "entry" parameter is a
5665 struct thread_info * now. Fetch lwpid from thread.
5666 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5667 struct thread_info * now.
5668 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5669 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5670 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5672 (regsets_store_inferior_registers): Ditto.
5673 (fetch_register, store_register): Ditto.
5674 (linux_read_memory, linux_write_memory): Ditto.
5675 (linux_request_interrupt): Ditto.
5676 (linux_read_auxv): Ditto.
5677 (linux_xfer_siginfo): Ditto.
5678 (linux_qxfer_spu): Ditto.
5679 (linux_qxfer_libraries_svr4): Ditto.
5680 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5681 moved to inferiors.h.
5683 (get_thread_lwp): Update.
5684 (struct lwp_info): Delete member "entry". Simplify comment for
5687 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5688 current_inferior directly.
5689 (update_watch_registers_callback): Update, "entry" parameter is a
5690 struct thread_info * now. Fetch pid from thread.
5691 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5692 (mips_insert_point): Fetch lwpid from current_inferior.
5693 Pass &all_threads to find_inferior, not &all_lwps.
5694 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5695 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5697 (mips_stopped_data_address): Ditto.
5698 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5700 * linux-tile-low.c (tile_arch_setup): Ditto.
5701 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5702 (update_debug_registers_callback): Update, "entry" parameter is a
5703 struct thread_info * now. Fetch pid from thread.
5704 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5705 Pass &all_threads to find_inferior, not &all_lwps.
5706 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5707 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5708 Pass &all_threads to find_inferior, not &all_lwps.
5709 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5710 (i386_dr_low_get_status): Ditto.
5711 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5712 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5713 (x86_linux_read_description): Ditto.
5714 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5716 2014-02-20 Doug Evans <dje@google.com>
5718 * inferiors.c (get_first_inferior): Fix buglet.
5720 2014-02-19 Doug Evans <dje@google.com>
5722 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5723 * inferiors.c (add_thread): Change result type to struct thread_info *.
5724 All callers updated.
5725 (add_lwp): Call add_thread here instead of in callers.
5726 All callers updated.
5727 * linux-low.h (get_lwp_thread): Rewrite.
5728 (struct lwp_info): New member "thread".
5730 2014-02-19 Doug Evans <dje@google.com>
5732 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5733 All callers updated.
5735 2014-02-19 Doug Evans <dje@google.com>
5737 * inferiors.c (add_thread): Fix whitespace.
5739 2014-02-19 Doug Evans <dje@google.com>
5741 * dll.c (clear_dlls): Replace accessing list implemention details
5743 * gdbthread.h (get_first_thread): Declare.
5744 * inferiors.c (for_each_inferior_with_data): New function.
5745 (get_first_thread): New function.
5746 (find_thread_ptid): Simplify.
5747 (get_first_inferior): New function.
5748 (clear_list): Delete.
5749 (one_inferior_p): New function.
5750 (clear_inferior_list): New function.
5751 (clear_inferiors): Update.
5752 * inferiors.h (for_each_inferior_with_data): Declare.
5753 (clear_inferior_list): Declare.
5754 (one_inferior_p): Declare.
5755 (get_first_inferior): Declare.
5756 * linux-low.c (linux_wait_for_event): Replace accessing list
5757 implemention details with API function.
5758 * server.c (target_running): Ditto.
5759 (accumulate_file_name_length): New function.
5760 (emit_dll_description): New function.
5761 (handle_qxfer_libraries): Replace accessing list implemention
5762 details with API function.
5763 (handle_qxfer_threads_worker): New function.
5764 (handle_qxfer_threads_proper): Replace accessing list implemention
5765 details with API function.
5766 (handle_query): Ditto.
5767 (visit_actioned_threads_callback_ftype): New typedef.
5768 (visit_actioned_threads_data): New struct.
5769 (visit_actioned_threads): Rewrite to be find_inferior callback.
5770 (resume): Call find_inferior.
5771 (handle_status): Replace accessing list implemention
5772 details with API function.
5773 (process_serial_event): Replace accessing list implemention details
5775 * target.c (set_desired_inferior): Replace accessing list implemention
5776 details with API function.
5777 * tracepoint.c (same_process_p): New function.
5778 (gdb_agent_about_to_close): Replace accessing list implemention
5779 details with API function.
5780 * win32-low.c (child_delete_thread): Replace accessing list
5781 implemention details with API function.
5782 (match_dll_by_basename): New function.
5783 (dll_is_loaded_by_basename): New function.
5784 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5785 details call to dll_is_loaded_by_basename.
5787 2014-02-19 Doug Evans <dje@google.com>
5789 * dll.h (struct dll_info): Add comment.
5790 * gdbthread.h (struct thread_info): Add comment.
5791 (current_ptid): Simplify.
5792 * inferiors.c (add_process): Update.
5793 (remove_process): Update.
5794 * inferiors.h (struct process_info): Rename member "head" to "entry".
5795 * linux-low.c (delete_lwp): Update.
5797 (last_thread_of_process_p): Update.
5798 (kill_one_lwp_callback, linux_kill): Update.
5799 (status_pending_p_callback): Update.
5800 (wait_for_sigstop): Update. Simplify read of ptid.
5801 (start_step_over): Update.
5802 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5803 (get_lwp_thread): Update.
5804 (struct lwp_info): Rename member "head" to "entry".
5805 * regcache.h (inferior_list_entry): Delete.
5806 * server.c (kill_inferior_callback): Update.
5807 (detach_or_kill_inferior_callback): Update.
5808 (print_started_pid): Update.
5809 (print_attached_pid): Update.
5810 (process_serial_event): Simplify read of ptid.
5811 * thread-db.c (thread_db_create_event): Update.
5812 (thread_db_get_tls_address): Update.
5813 * win32-low.c (current_inferior_ptid): Simplify.
5815 2014-02-19 Tom Tromey <tromey@redhat.com>
5817 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5819 (target_supports_btrace): Update.
5821 2014-02-14 Yao Qi <yao@codesourcery.com>
5823 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5824 (rsp-low-ipa.o): New target.
5826 2014-02-12 Tom Tromey <tromey@redhat.com>
5828 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5829 convert_ascii_to_int.
5830 * regcache.c (registers_to_string): Likewise.
5831 * remote-utils.c (decode_M_packet): Likewise.
5832 * server.c (process_serial_event): Likewise.
5834 2014-02-12 Tom Tromey <tromey@redhat.com>
5836 * server.c (handle_query, handle_v_run): Use hex2bin, not
5838 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5840 2014-02-12 Tom Tromey <tromey@redhat.com>
5842 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5843 convert_int_to_ascii.
5844 * regcache.c (registers_to_string, collect_register_as_string):
5846 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5848 * server.c (process_serial_event): Likewise.
5849 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5850 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5852 2014-02-12 Tom Tromey <tromey@redhat.com>
5854 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5855 bin2hex, not hexify.
5856 * tracepoint.c (cmd_qtstatus): Likewise.
5858 2014-02-12 Tom Tromey <tromey@redhat.com>
5860 * remote-utils.c (monitor_output): Pass explicit length to
5863 2014-02-12 Tom Tromey <tromey@redhat.com>
5865 * tracepoint.c: Include rsp-low.h.
5866 * server.c: Include rsp-low.h.
5867 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5868 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5870 * remote-utils.c: Include rsp-low.h.
5871 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5872 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5873 (convert_int_to_ascii, convert_ascii_to_int): Move to
5875 * regcache.c: Include rsp-low.h.
5876 * ax.c: Include rsp-low.h.
5877 * Makefile.in (SFILES): Add common/rsp-low.c.
5878 (OBS): Add rsp-low.o.
5879 (rsp-low.o): New target.
5881 2014-02-12 Tom Tromey <tromey@redhat.com>
5883 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5884 Include print-utils.h.
5885 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5886 (plongest, thirty_two, phex_nz): Remove.
5887 * Makefile.in (SFILES): Add common/print-utils.c.
5888 (OBS): Add print-utils.o.
5889 (print-utils-ipa.o): New target.
5890 (print-utils.o): New target.
5891 (IPA_OBJS): Add print-utils-ipa.o.
5893 2014-02-06 Tom Tromey <tromey@redhat.com>
5895 * Makefile.in (SFILES): Fix indentation.
5897 2014-02-05 Doug Evans <dje@google.com>
5899 * linux-low.c (linux_wait_for_event): Improve comment.
5900 (linux_wait_1): Keep current_inferior in sync with event_child.
5902 2014-01-22 Doug Evans <dje@google.com>
5904 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5906 2014-01-22 Doug Evans <dje@google.com>
5908 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5909 * configure: Regenerate.
5910 * config.in: Regenerate.
5911 * Makefile.in (SFILES): Add debug.c.
5913 * debug.c: New file.
5914 * debug.h: New file.
5915 * linux-aarch64-low.c (*): Update all debugging printfs to use
5916 debug_printf instead of fprintf.
5917 * linux-arm-low.c (*): Ditto.
5918 * linux-cris-low.c (*): Ditto.
5919 * linux-crisv32-low.c (*): Ditto.
5920 * linux-m32r-low.c (*): Ditto.
5921 * linux-sparc-low.c (*): Ditto.
5922 * linux-x86.c (*): Ditto.
5923 * linux-low.c (*): Ditto.
5924 (linux_wait_1): Add calls to debug_enter, debug_exit.
5925 (linux_wait): Remove redundant debugging printf.
5926 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5927 (linux_resume, unstop_all_lwps): Ditto.
5928 * mem-break.c (*): Update all debugging printfs to use
5929 debug_printf instead of fprintf.
5930 * remote-utils.c (*): Ditto.
5931 * thread-db.c (*): Ditto.
5932 * server.c #include <ctype.h>, "gdb_vecs.h".
5933 (debug_threads): Moved to debug.c.
5934 (*): Update all debugging printfs to use debug_printf instead of
5936 (start_inferior): Replace call to fflush with call to debug_flush.
5937 (monitor_show_help): Mention set debug-format.
5938 (parse_debug_format_options): New function.
5939 (handle_monitor_command): Handle "monitor set debug-format".
5940 (gdbserver_usage): Mention --debug-format.
5941 (main): Parse --debug-format.
5942 * server.h (debug_threads): Declaration moved to debug.h.
5944 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5945 trace_debug_1 that uses debug_printf.
5946 (tracepoint_look_up_symbols): Update all debugging printfs to use
5947 debug_printf instead of fprintf.
5949 2014-01-20 Baruch Siach <baruch@tkos.co.il>
5951 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5954 2014-01-17 Pedro Alves <palves@redhat.com>
5957 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5958 defined after including gdb_proc_service.h.
5960 2014-01-16 Doug Evans <dje@google.com>
5962 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5963 (match_dll): Use it.
5965 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5967 * target.h (target_ops) <read_btrace>: Change parameters and
5968 return type to allow error reporting.
5969 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5970 trace reading errors on.
5971 * linux-low.c (linux_low_read_btrace): Pass trace reading
5973 (linux_low_disable_btrace): New.
5975 2014-01-15 Doug Evans <dje@google.com>
5977 * inferiors.c (thread_id_to_gdb_id): Delete.
5978 * inferiors.h (thread_id_to_gdb_id): Delete.
5980 2014-01-13 Eli Zaretskii <eliz@gnu.org>
5982 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5983 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5986 2014-01-08 Pedro Alves <palves@redhat.com>
5988 * server.c (handle_status): Don't discard previous queued stop
5989 replies or thread's pending status here.
5990 (main) <disconnection>: Do it here instead.
5992 2014-01-08 Pedro Alves <palves@redhat.com>
5994 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5995 * server.c (visit_actioned_threads, handle_pending_status): New
5997 (handle_v_cont): Factor out parts to ...
5998 (resume): ... this new function. If in all-stop, and a thread
5999 being resumed has a pending status, report it without actually
6001 (myresume): Adjust to use the new 'resume' function.
6002 (clear_pending_status_callback, set_pending_status_callback)
6003 (find_status_pending_thread_callback): New functions.
6004 (handle_status): Handle the case of multiple threads having
6005 interesting statuses to report. Report threads' real last signal
6006 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6007 with an interesting thread to report the status for, instead of
6008 always reporting the status of the first thread.
6010 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6012 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6013 * gdbreplay.c (gdbreplay_version): Likewise.
6015 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6017 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6018 iov.iov_len with the real length in use.
6020 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6022 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6023 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6024 for all targets that use win32-low.c.
6025 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6026 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6028 2013-12-13 Pedro Alves <palves@redhat.com>
6030 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6031 if equal to TARGET_WAITKIND_LOADED.
6032 * win32-low.c (cached_status): New static global.
6033 (win32_wait): Add declaration.
6034 (do_initial_child_stuff): Flush all initial pending debug events
6035 up to the initial breakpoint.
6036 (win32_wait): If CACHED_STATUS was set, return that instead
6037 of doing a real wait. Remove the code resuming the execution
6038 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6039 during the initial phase. Also remove the code changing
6040 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6041 TARGET_WAITKIND_STOPPED.
6043 2013-12-11 Yao Qi <yao@codesourcery.com>
6045 * notif.c (handle_notif_ack): Return 0 if no notification
6048 2013-11-20 Doug Evans <dje@google.com>
6050 * linux-low.c (linux_set_resume_request): Fix comment.
6052 2013-11-20 Doug Evans <dje@google.com>
6054 * linux-low.c (resume_status_pending_p): Tweak comment.
6056 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6058 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6059 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6060 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6061 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6062 (srv_amd64_regobj): Add amd64-mpx.o.
6063 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6064 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6065 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6066 * i387-fp.c (num_pl_bnd_register) Added constant.
6067 (num_pl_bnd_cfg_registers) Added constant.
6068 (struct i387_xsave) Added reserved area and MPX fields.
6069 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6070 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6072 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6073 (init_registers_amd64_mpx_linux): Declare new function.
6074 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6075 (x86_64_regmap): Add MPX registers.
6076 (x86_linux_read_description): Add MPX case.
6077 (initialize_low_arch): Initialize MPX targets.
6079 2013-11-18 Tom Tromey <tromey@redhat.com>
6081 * configure: Rebuild.
6082 * configure.ac: Don't check for stdlib.h.
6083 * gdbreplay.c: Unconditionally include stdlib.h.
6085 2013-11-18 Tom Tromey <tromey@redhat.com>
6087 * config.in: Rebuild.
6088 * configure: Rebuild.
6089 * configure.ac: Don't use AC_HEADER_DIRENT.
6091 2013-11-18 Tom Tromey <tromey@redhat.com>
6093 * server.h: Don't check HAVE_STRING_H.
6094 * gdbreplay.c: Don't check HAVE_STRING_H.
6095 * configure: Rebuild.
6097 2013-11-18 Tom Tromey <tromey@redhat.com>
6099 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6102 2013-11-08 Tom Tromey <tromey@redhat.com>
6104 * configure, config.in: Rebuild.
6105 * configure.ac: Remove unused configury.
6107 2013-11-08 Tom Tromey <tromey@redhat.com>
6109 * acinclude.m4: Include common.m4, codeset.m4.
6110 * configure, config.in: Rebuild.
6111 * configure.ac: Use GDB_AC_COMMON.
6113 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6115 * linux-s390-low.c (HWCAP_S390_TE): New define.
6116 (s390_arch_setup): Consider the TE field in the HWCAP for
6117 determining 'have_regset_tdb'.
6119 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6122 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6125 2013-10-02 Pedro Alves <palves@redhat.com>
6127 * server.c (process_serial_event): Don't output "GDBserver
6128 exiting" if GDB is connected through stdio.
6129 * target.c (mywait): Likewise, be silent if GDB is connected
6132 2013-10-01 Joel Brobecker <brobecker@adacore.com>
6134 * lynx-low.c (lynx_add_threads_after_attach): New function.
6135 (lynx_attach): Remove call to add_thread. Add call to
6136 lynx_add_threads_after_attach instead.
6138 2013-09-28 Mike Frysinger <vapier@gentoo.org>
6140 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6141 * config.in, configure: Regenerated.
6143 2013-09-18 Yao Qi <yao@codesourcery.com>
6146 * server.c (start_inferior): Clear 'resume_info'.
6148 2013-09-16 Jiong Wang <jiwang@tilera.com>
6150 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6153 2013-09-16 Jiong Wang <jiwang@tilera.com>
6155 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6156 linux-tile-low.o to srv_tgtobj.
6158 2013-09-16 Will Newton <will.newton@linaro.org>
6160 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6163 2013-09-06 Pedro Alves <palves@redhat.com>
6165 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6166 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6167 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6168 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6169 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6170 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6172 2013-09-06 Pedro Alves <palves@redhat.com>
6174 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6175 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6177 2013-09-06 Pedro Alves <palves@redhat.com>
6179 * linux-amd64-ipa.c: Include tracepoint.h.
6180 * linux-i386-ipa.c: Include tracepoint.h.
6182 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6184 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6185 (ps_get_thread_area): New function.
6187 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
6189 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6190 (initialize_low_arch): Call init_registers_crisv32 rather than
6191 init_register_crisv32.
6193 2013-09-05 Pedro Alves <palves@redhat.com>
6195 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6197 * hostio.h: ... this new file.
6198 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6199 win32-low.c: Include hostio.h.
6201 2013-09-05 Pedro Alves <palves@redhat.com>
6203 * server.h (gdb_client_data, handler_func, callback_handler_func)
6204 (delete_file_handler, add_file_handler, append_callback_event)
6205 (delete_callback_event, start_event_loop, initialize_event_loop):
6206 Move to event-loop.h and include it.
6207 * event-loop.h: New file.
6209 2013-09-05 Pedro Alves <palves@redhat.com>
6211 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6212 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6213 (loaded_dll, unloaded_dll): Move to ...
6214 * dll.h: ... this new file.
6215 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6217 2013-09-05 Pedro Alves <palves@redhat.com>
6219 * server.h (current_process, get_thread_process, all_processes)
6220 (add_inferior_to_list, for_each_inferior, current_inferior)
6221 (remove_inferior, add_process, remove_process, find_process_pid)
6222 (have_started_inferiors_p, have_attached_inferiors_p)
6223 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6224 (clear_inferiors, find_inferior, find_inferior_id)
6225 (inferior_target_data, set_inferior_target_data)
6226 (inferior_regcache_data, set_inferior_regcache_data): Move to
6227 inferiors.h, and include it.
6228 * inferiors.h: New file.
6230 2013-09-05 Pedro Alves <palves@redhat.com>
6232 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6236 2013-09-05 Pedro Alves <palves@redhat.com>
6238 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6240 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6241 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6242 (handle_tracepoint_general_set, handle_tracepoint_query)
6243 (tracepoint_finished_step, tracepoint_was_hit)
6244 (release_while_stepping_state_list, current_traceframe)
6245 (in_readonly_region, traceframe_read_mem)
6246 (fetch_traceframe_registers, traceframe_read_sdata)
6247 (traceframe_read_info, struct fast_tpoint_collect_status)
6248 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6249 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6250 (supply_fast_tracepoint_registers)
6251 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6252 (ipa_tdesc, claim_trampoline_space)
6253 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6254 (agent_mem_read, agent_get_trace_state_variable_value)
6255 (agent_set_trace_state_variable_value, agent_tsv_read)
6256 (agent_mem_read_string, get_raw_reg_func_addr)
6257 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6258 * tracepoint.h: ... this new file.
6260 2013-09-05 Pedro Alves <palves@redhat.com>
6262 * server.h (perror_with_name, error, fatal, warning, paddress)
6263 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6265 * utils.h: New file.
6267 2013-09-05 Pedro Alves <palves@redhat.com>
6269 * server.h (remote_debug, noack_mode, transport_is_reliable)
6270 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6271 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6272 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6273 (write_enn, initialize_async_io, enable_async_io)
6274 (disable_async_io, check_remote_input_interrupt_request)
6275 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6276 (dead_thread_notify, prepare_resume_reply)
6277 (decode_address_to_semicolon, decode_address, decode_m_packet)
6278 (decode_M_packet, decode_X_packet, decode_xfer_write)
6279 (decode_search_memory_packet, unhexify, hexify)
6280 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6281 (look_up_one_symbol, relocate_instruction)
6282 (monitor_output): Move to remote-utils.h, and include it.
6283 * remote-utils.h: New file.
6285 2013-09-05 Pedro Alves <palves@redhat.com>
6287 * server.h (_): Delete.
6289 2013-09-02 Pedro Alves <palves@redhat.com>
6291 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6292 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6294 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6296 2013-09-02 Pierre Muller <muller@sourceware.org>
6298 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6299 or WriteProcessMemory complete successfully and handle
6300 ERROR_PARTIAL_COPY error.
6302 2013-09-02 Pedro Alves <palves@redhat.com>
6304 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6305 error instead of EIO.
6307 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6310 * linux-low.c: Include filestuff.h.
6311 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6312 * lynx-low.c: Include filestuff.h.
6313 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6314 * server.c: Include filestuff.h.
6315 (main): Call notice_open_fds.
6316 * spu-low.c: Include filestuff.h.
6317 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6319 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
6321 * Makefile.in: Explain why ../target and ../nat are not
6322 listed as include file search paths.
6323 (linux-waitpid.o): New object file rule.
6324 * configure.srv (srv_native_linux_obj): New variable.
6325 Replace all occurrences of linux native object files with
6326 $srv_native_linux_obj.
6327 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6328 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6329 (linux_enable_event_reporting): Remove declaration.
6330 (my_waitpid): Moved to common/linux-waitpid.c.
6331 (linux_wait_for_event): Pass ptid when calling
6332 linux_enable_event_reporting.
6333 (linux_supports_tracefork_flag): Remove.
6334 (linux_enable_event_reporting): Likewise.
6335 (linux_tracefork_grandchild): Remove.
6336 (STACK_SIZE): Moved to common/linux-ptrace.c.
6337 (linux_tracefork_child): Remove.
6338 (linux_test_for_tracefork): Remove.
6339 (linux_look_up_symbols): Call linux_supports_traceclone.
6340 (initialize_low): Remove call to linux_test_for_tracefork.
6341 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6342 common/linux-ptrace.h.
6343 (PTRACE_TYPE_ARG4): Likewise.
6344 Include linux-ptrace.h.
6346 2013-08-21 Pedro Alves <palves@redhat.com>
6348 * config.in: Renegerate.
6350 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
6352 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6353 (SFILES): Remove $(srcdir)/common/target-common.c and
6354 add $(srcdir)/target/waitstatus.c.
6355 (OBS): Remove target-common.o and add waitstatus.o.
6356 (server_h): Remove $(srcdir)/../common/target-common.h and
6357 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6358 and $(srcdir)/../target/waitstatus.h.
6359 (target-common.o): Remove.
6360 (waitstatus.o): New target object file.
6361 * target.h: Do not include target-common.h and
6362 include target/resume.h, target/wait.h and
6363 target/waitstatus.h.
6365 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
6367 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6368 to PTRACE_TYPE_ARG3.
6369 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6370 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6372 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6373 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6375 2013-07-27 Jie Zhang <jie@codesourcery.com>
6376 Daniel Jacobowitz <dan@codesourcery.com>
6377 Yao Qi <yao@codesourcery.com>
6379 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6380 (mips-linux-watch.o): New rule.
6381 (mips_linux_watch_h): New variable.
6382 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6384 * linux-mips-low.c: Include mips-linux-watch.h.
6385 (struct arch_process_info, struct arch_lwp_info): New.
6386 (update_watch_registers_callback): New function.
6387 (mips_linux_new_process, mips_linux_new_thread) New functions.
6388 (mips_linux_prepare_to_resume, mips_insert_point): New
6390 (mips_remove_point, mips_stopped_by_watchpoint): New
6392 (rsp_bp_type_to_target_hw_bp_type): New function.
6393 (mips_stopped_data_address): New function.
6394 (the_low_target): Add watchpoint support functions.
6396 2013-07-27 Yao Qi <yao@codesourcery.com>
6398 * i386-low.c: Include break-common.h.
6399 (enum target_hw_bp_type): Remove.
6401 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
6403 * Makefile.in (SFILES): /common/target-common.c.
6404 (OBS): Add target-common.o.
6405 (server_h): Add $(srcdir)/../common/target-common.h.
6406 (target-common.o): New target.
6407 * server.c (queue_stop_reply_callback): Free
6408 status string after use.
6409 * target.c (target_waitstatus_to_string): Remove.
6410 * target.h: Include target-common.h.
6411 (resume_kind): Likewise.
6412 (target_waitkind): Likewise.
6413 (target_waitstatus): Likewise.
6414 (TARGET_WNOHANG): Likewise.
6416 2013-07-04 Yao Qi <yao@codesourcery.com>
6418 * Makefile.in (host_alias): Use @host_noncanonical@.
6419 (target_alias): Use @target_noncanonical@.
6420 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6421 ACX_NONCANONICAL_HOST.
6422 * configure: Regenerated.
6425 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6427 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6428 * configure: Rebuild.
6429 * Makefile.in (version_host, version_target): Get from configure.
6430 (version.c): Use $(version_host) and $(version_target).
6432 2013-07-03 Pedro Alves <palves@redhat.com>
6434 * Makefile.in (config.status): Depend on development.sh.
6435 * acinclude.m4: Include libmcheck.m4.
6436 * configure: Regenerate.
6438 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6440 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6441 attribute inside the parentheses.
6442 (winapi_DebugSetProcessKillOnExit): Ditto.
6443 (winapi_DebugBreakProcess): Ditto.
6444 (winapi_GenerateConsoleCtrlEvent): Ditto.
6446 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6448 * notif.h (notif_event): Add a dummy member to avoid compiler
6451 2013-07-01 Pedro Alves <palves@redhat.com>
6453 * hostio.c (HOSTIO_PATH_MAX): Define.
6454 (require_filename, handle_open, handle_unlink, handle_readlink):
6457 2013-07-01 Pedro Alves <palves@redhat.com>
6459 * server.h: Include "pathmax.h".
6460 * linux-low.c: Don't include sys/param.h.
6461 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6463 * win32-low.c: Don't include sys/param.h.
6464 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6466 2013-07-01 Pedro Alves <palves@redhat.com>
6468 * event-loop.c: Don't check HAVE_UNISTD_H before including
6470 * gdbreplay.c: Likewise.
6471 * remote-utils.c: Likewise.
6472 * server.c: Likewise.
6473 * configure.ac: Don't check for unistd.h.
6474 * configure: Regenerate.
6476 2013-06-28 Tom Tromey <tromey@redhat.com>
6478 * Makefile.in (version.c): Use version.in, not
6481 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
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).
6488 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6490 Fix trace-status to output user name without trailing colon.
6491 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6493 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6495 Fix trace-status to output proper start-time and stop-time.
6496 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6497 output start time and stop time in hex as gdb expects.
6499 2013-06-26 Pedro Alves <pedro@codesourcery.com>
6501 * tracepoint.c (build_traceframe_info_xml): Output trace state
6502 variables present in the trace buffer.
6504 2013-06-24 Tom Tromey <tromey@redhat.com>
6506 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6508 (version.o): Remove.
6509 * gdbreplay.c: Include version.h.
6510 (version, host_name): Don't declare.
6511 * server.h: Include version.h.
6512 (version, host_name): Don't declare.
6514 2013-06-12 Pedro Alves <palves@redhat.com>
6516 * linux-x86-low.c (linux_is_elf64): Delete global.
6517 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6518 with local linux_pid_exe_is_elf_64_file use.
6520 2013-06-11 Pedro Alves <palves@redhat.com>
6522 * linux-low.c (regset_disabled, disable_regset): New functions.
6523 (regsets_fetch_inferior_registers)
6524 (regsets_store_inferior_registers): Use them.
6525 (initialize_regsets_info); Don't allocate the disabled_regsets
6527 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6530 2013-06-11 Pedro Alves <palves@redhat.com>
6532 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6535 2013-06-11 Pedro Alves <palves@redhat.com>
6537 * linux-x86-low.c (initialize_low_arch): Call
6538 init_registers_x32_avx_linux.
6540 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6542 Fix compatibility with Android Bionic.
6543 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6546 2013-06-07 Pedro Alves <palves@redhat.com>
6549 * Makefile.in (OBS): Add tdesc.o.
6550 (IPA_OBJS): Add tdesc-ipa.o.
6551 (tdesc-ipa.o): New rule.
6552 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6554 * linux-low.c (new_inferior): Delete.
6555 (disabled_regsets, num_regsets): Delete.
6556 (linux_add_process): Adjust to set the new per-process
6558 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6559 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6560 was a stop. When calling arch_setup, switch the current inferior
6561 to the thread that got an event.
6562 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6563 (regsets_fetch_inferior_registers)
6564 (regsets_store_inferior_registers): New regsets_info parameter.
6566 (linux_register_in_regsets): New regs_info parameter. Adjust to
6568 (register_addr, fetch_register, store_register): New usrregs_info
6569 parameter. Adjust to use it.
6570 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6571 parameter regs_info. Adjust to use it.
6572 (linux_fetch_registers): Get the current inferior's regs_info, and
6574 (linux_store_registers): Ditto.
6575 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6576 (initialize_low): Don't initialize the target_regsets here. Call
6577 initialize_low_arch.
6578 * linux-low.h (target_regsets): Delete declaration.
6579 (struct regsets_info): New.
6580 (struct usrregs_info): New.
6581 (struct regs_info): New.
6582 (struct process_info_private) <new_inferior>: New field.
6583 (struct linux_target_ops): Delete the num_regs, regmap, and
6584 regset_bitmap fields. New field regs_info.
6585 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6586 * i387-fp.c (num_xmm_registers): Delete.
6587 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6588 calls to new interface.
6589 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6590 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6591 Infer the number of xmm registers from the regcache's target
6593 * i387-fp.h (num_xmm_registers): Delete.
6594 * inferiors.c (add_thread): Don't install the thread's regcache
6596 * proc-service.c (gregset_info): Fetch the current inferior's
6597 regs_info. Adjust to use it.
6598 * regcache.c: Include tdesc.h.
6599 (register_bytes, reg_defs, num_registers)
6600 (gdbserver_expedite_regs): Delete.
6601 (get_thread_regcache): If the thread doesn't have a regcache yet,
6602 create one, instead of aborting gdbserver.
6603 (regcache_invalidate_one): Rename to ...
6604 (regcache_invalidate_thread): ... this.
6605 (regcache_invalidate_one): New.
6606 (regcache_invalidate): Only invalidate registers of the current
6608 (init_register_cache): Add target_desc parameter, and use it.
6609 (new_register_cache): Ditto. Assert the target description has a
6610 non zero registers_size.
6611 (regcache_cpy): Add assertions. Adjust.
6612 (realloc_register_cache, set_register_cache): Delete.
6613 (registers_to_string, registers_from_string): Adjust.
6614 (find_register_by_name, find_regno, find_register_by_number)
6615 (register_cache_size): Add target_desc parameter, and use it.
6616 (free_register_cache_thread, free_register_cache_thread_one)
6617 (regcache_release, register_cache_size): New.
6618 (register_size): Add target_desc parameter, and use it.
6619 (register_data, supply_register, supply_register_zeroed)
6620 (supply_regblock, supply_register_by_name, collect_register)
6621 (collect_register_as_string, collect_register_by_name): Adjust.
6622 * regcache.h (struct target_desc): Forward declare.
6623 (struct regcache) <tdesc>: New field.
6624 (init_register_cache, new_register_cache): Add target_desc
6626 (regcache_invalidate_thread): Declare.
6627 (regcache_invalidate_one): Delete declaration.
6628 (regcache_release): Declare.
6629 (find_register_by_number, register_cache_size, register_size)
6630 (find_regno): Add target_desc parameter.
6631 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6633 * remote-utils.c: Include tdesc.h.
6634 (outreg, prepare_resume_reply): Adjust.
6635 * server.c: Include tdesc.h.
6636 (gdbserver_xmltarget): Delete declaration.
6637 (get_features_xml, process_serial_event): Adjust.
6638 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6640 (struct process_info) <tdesc>: New field.
6641 (ipa_tdesc): Declare.
6642 * tdesc.c: New file.
6643 * tdesc.h: New file.
6644 * tracepoint.c: Include tdesc.h.
6645 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6646 (get_context_regcache): Adjust to pass ipa_tdesc down.
6647 (do_action_at_tracepoint): Adjust to get the register cache size
6648 from the context regcache's description.
6649 (traceframe_walk_blocks): Adjust to get the register cache size
6650 from the current trace frame's description.
6651 (traceframe_get_pc): Adjust to get current trace frame's
6652 description and pass it down.
6653 (gdb_collect): Adjust to get the register cache size from the
6655 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6656 (gdbserver_xmltarget): Delete.
6657 (initialize_low_tracepoint): Set the ipa's target description.
6658 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6659 (initialize_low_tracepoint): Set the ipa's target description.
6660 * linux-x86-low.c: Include tdesc.h.
6661 [__x86_64__] (is_64bit_tdesc): New.
6662 (ps_get_thread_area, x86_get_thread_area): Use it.
6663 (i386_cannot_store_register): Rename to ...
6664 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6665 (i386_cannot_fetch_register): Rename to ...
6666 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6667 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6669 (target_regsets): Rename to ...
6670 (x86_regsets): ... this.
6671 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6673 (x86_siginfo_fixup): Use is_64bit_tdesc.
6674 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6675 (tdesc_x32_avx_linux, tdesc_x32_linux)
6676 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6678 (x86_linux_update_xmltarget): Delete.
6679 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6680 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6681 (AMD64_LINUX_USER64_CS): New.
6682 (x86_linux_read_description): New, based on
6683 x86_linux_update_xmltarget.
6684 (same_process_callback): New.
6685 (x86_arch_setup_process_callback): New.
6686 (x86_linux_update_xmltarget): New.
6687 (x86_regsets_info): New.
6688 (amd64_linux_regs_info): New.
6689 (i386_linux_usrregs_info): New.
6690 (i386_linux_regs_info): New.
6691 (x86_linux_regs_info): New.
6692 (x86_arch_setup): Reimplement.
6693 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6694 (x86_emit_ops): Ditto.
6695 (the_low_target): Adjust. Install x86_linux_regs_info,
6696 x86_cannot_fetch_register, and x86_cannot_store_register.
6697 (initialize_low_arch): New.
6698 * linux-ia64-low.c (tdesc_ia64): Declare.
6699 (ia64_fetch_register): Adjust.
6700 (ia64_usrregs_info, regs_info): New globals.
6701 (ia64_regs_info): New function.
6702 (the_low_target): Adjust.
6703 (initialize_low_arch): New function.
6704 * linux-sparc-low.c (tdesc_sparc64): Declare.
6705 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6707 (sparc_arch_setup): New function.
6708 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6709 (the_low_target): Adjust.
6710 (initialize_low_arch): New function.
6711 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6712 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6713 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6714 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6715 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6716 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6717 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6718 (tdesc_powerpc_isa205_vsx64l): Declare.
6719 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6720 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6721 (ppc_set_pc, ppc_get_hwcap): Adjust.
6722 (ppc_usrregs_info): Forward declare.
6723 (!__powerpc64__) ppc_regmap_adjusted: New global.
6724 (ppc_arch_setup): Adjust to the current process'es target
6726 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6727 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6728 (ppc_store_evrregset): Adjust.
6729 (target_regsets): Rename to ...
6730 (ppc_regsets): ... this, and make static.
6731 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6732 (ppc_regs_info): New function.
6733 (the_low_target): Adjust.
6734 (initialize_low_arch): New function.
6735 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6736 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6737 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6738 (tdesc_s390x_linux64v2): Declare.
6739 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6740 (s390_fill_gregset, s390_store_last_break): Adjust.
6741 (target_regsets): Rename to ...
6742 (s390_regsets): ... this, and make static.
6743 (s390_get_pc, s390_set_pc): Adjust.
6744 (s390_get_hwcap): New target_desc parameter, and use it.
6745 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6746 (s390_arch_setup): Adjust to set the current process'es target
6747 description. Don't adjust the regmap.
6748 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6749 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6750 (regs_info_3264): New globals.
6751 (s390_regs_info): New function.
6752 (the_low_target): Adjust.
6753 (initialize_low_arch): New function.
6754 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6755 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6756 [__mips64] (init_registers_mips_linux)
6757 (init_registers_mips_dsp_linux): Delete defines.
6758 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6759 (have_dsp): New global.
6760 (mips_read_description): New, based on mips_arch_setup.
6761 (mips_arch_setup): Reimplement.
6762 (get_usrregs_info): New function.
6763 (mips_cannot_fetch_register, mips_cannot_store_register)
6764 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6765 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6766 (target_regsets): Rename to ...
6767 (mips_regsets): ... this, and make static.
6768 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6769 (dsp_regs_info, regs_info): New globals.
6770 (mips_regs_info): New function.
6771 (the_low_target): Adjust.
6772 (initialize_low_arch): New function.
6773 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6774 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6776 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6777 (arm_read_description): New, with bits factored from
6779 (arm_arch_setup): Reimplement.
6780 (target_regsets): Rename to ...
6781 (arm_regsets): ... this, and make static.
6782 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6783 (arm_regs_info): New function.
6784 (the_low_target): Adjust.
6785 (initialize_low_arch): New function.
6786 * linux-m68k-low.c (tdesc_m68k): Declare.
6787 (target_regsets): Rename to ...
6788 (m68k_regsets): ... this, and make static.
6789 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6790 (m68k_regs_info): New function.
6791 (m68k_arch_setup): New function.
6792 (the_low_target): Adjust.
6793 (initialize_low_arch): New function.
6794 * linux-sh-low.c (tdesc_sharch): Declare.
6795 (target_regsets): Rename to ...
6796 (sh_regsets): ... this, and make static.
6797 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6798 (sh_regs_info, sh_arch_setup): New functions.
6799 (the_low_target): Adjust.
6800 (initialize_low_arch): New function.
6801 * linux-bfin-low.c (tdesc_bfin): Declare.
6802 (bfin_arch_setup): New function.
6803 (bfin_usrregs_info, regs_info): New globals.
6804 (bfin_regs_info): New function.
6805 (the_low_target): Adjust.
6806 (initialize_low_arch): New function.
6807 * linux-cris-low.c (tdesc_cris): Declare.
6808 (cris_arch_setup): New function.
6809 (cris_usrregs_info, regs_info): New globals.
6810 (cris_regs_info): New function.
6811 (the_low_target): Adjust.
6812 (initialize_low_arch): New function.
6813 * linux-cris-low.c (tdesc_crisv32): Declare.
6814 (cris_arch_setup): New function.
6815 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6816 (cris_regs_info): New function.
6817 (the_low_target): Adjust.
6818 (initialize_low_arch): New function.
6819 * linux-m32r-low.c (tdesc_m32r): Declare.
6820 (m32r_arch_setup): New function.
6821 (m32r_usrregs_info, regs_info): New globals.
6822 (m32r_regs_info): Adjust.
6823 (initialize_low_arch): New function.
6824 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6825 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6826 (tic6x_usrregs_info): Forward declare.
6827 (tic6x_read_description): New function, based on ...
6828 (tic6x_arch_setup): ... this. Reimplement.
6829 (target_regsets): Rename to ...
6830 (tic6x_regsets): ... this, and make static.
6831 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6832 (tic6x_regs_info): New function.
6833 (the_low_target): Adjust.
6834 (initialize_low_arch): New function.
6835 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6836 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6837 (target_regsets): Rename to ...
6838 (xtensa_regsets): ... this, and make static.
6839 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6841 (xtensa_arch_setup, xtensa_regs_info): New functions.
6842 (the_low_target): Adjust.
6843 (initialize_low_arch): New function.
6844 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6845 (nios2_arch_setup): Set the current process'es tdesc.
6846 (target_regsets): Rename to ...
6847 (nios2_regsets): ... this.
6848 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6849 (nios2_regs_info): New function.
6850 (the_low_target): Adjust.
6851 (initialize_low_arch): New function.
6852 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6853 (aarch64_arch_setup): Set the current process'es tdesc.
6854 (target_regsets): Rename to ...
6855 (aarch64_regsets): ... this.
6856 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6857 (aarch64_regs_info): New function.
6858 (the_low_target): Adjust.
6859 (initialize_low_arch): New function.
6860 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6862 (target_regsets): Rename to ...
6863 (tile_regsets): ... this.
6864 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6865 (tile_regs_info): New function.
6866 (tile_arch_setup): Set the current process'es tdesc.
6867 (the_low_target): Adjust.
6868 (initialize_low_arch): New function.
6869 * spu-low.c (tdesc_spu): Declare.
6870 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6871 * win32-arm-low.c (tdesc_arm): Declare.
6872 (arm_arch_setup): New function.
6873 (the_low_target): Install arm_arch_setup instead of
6875 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6876 (init_windows_x86): Rename to ...
6877 (i386_arch_setup): ... this. Set `win32_tdesc'.
6878 (the_low_target): Adjust.
6879 * win32-low.c (win32_tdesc): New global.
6880 (child_add_thread): Don't create the thread cache here.
6881 (do_initial_child_stuff): Set the new process'es tdesc.
6882 * win32-low.h (struct target_desc): Forward declare.
6883 (win32_tdesc): Declare.
6884 * lynx-i386-low.c (tdesc_i386): Declare global.
6885 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6886 * lynx-low.c (lynx_tdesc): New global.
6887 (lynx_add_process): Set the new process'es tdesc.
6888 * lynx-low.h (struct target_desc): Forward declare.
6889 (lynx_tdesc): Declare global.
6890 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6891 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6892 * nto-low.c (nto_tdesc): New global.
6893 (do_attach): Set the new process'es tdesc.
6894 * nto-low.h (struct target_desc): Forward declare.
6895 (nto_tdesc): Declare.
6896 * nto-x86-low.c (tdesc_i386): Declare.
6897 (nto_x86_arch_setup): Set `nto_tdesc'.
6899 2013-06-04 Gary Benson <gbenson@redhat.com>
6901 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6902 to qSupported response when appropriate.
6903 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6904 with nonzero-length annex.
6905 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6906 arguments supplied in annex.
6908 2013-05-31 Doug Evans <dje@google.com>
6911 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6912 64 bits in 64-cross-32 environment.
6914 2013-05-28 Pedro Alves <palves@redhat.com>
6916 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6917 (aarch64-without-fpu.c): Delete rule.
6918 * configure.srv (aarch64*-*-linux*): Remove references to
6919 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6920 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6923 2013-05-24 Pedro Alves <palves@redhat.com>
6925 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6926 instead of strchr/decode_address. Error if the range isn't split
6927 with a ','. Don't assume there's be a ':' in the action.
6929 2013-05-23 Yao Qi <yao@codesourcery.com>
6930 Pedro Alves <palves@redhat.com>
6932 * linux-low.c (lwp_in_step_range): New function.
6933 (linux_wait_1): If the thread was range stepping and stopped
6934 outside the stepping range, report the stop to GDB. Otherwise,
6935 continue stepping. Add range stepping debug output.
6936 (linux_set_resume_request): Copy the step range from the resume
6938 (linux_supports_range_stepping): New.
6939 (linux_target_ops) <supports_range_stepping>: Set to
6940 linux_supports_range_stepping.
6941 * linux-low.h (struct linux_target_ops)
6942 <supports_range_stepping>: New field.
6943 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6944 * linux-x86-low.c (x86_supports_range_stepping): New.
6945 (the_low_target) <supports_range_stepping>: Set to
6946 x86_supports_range_stepping.
6947 * server.c (handle_v_cont): Handle 'r' action.
6948 (handle_v_requests): Append ";r" if the target supports range
6950 * target.h (struct thread_resume) <step_range_start,
6951 step_range_end>: New fields.
6952 (struct target_ops) <supports_range_stepping>:
6954 (target_supports_range_stepping): New macro.
6956 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6958 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6959 confusion in comment.
6961 2013-05-17 Joel Brobecker <brobecker@adacore.com>
6963 * lynx-low.c (struct process_info_private): New type.
6964 (lynx_add_process): New function.
6965 (lynx_create_inferior, lynx_attach): Replace calls to
6966 add_process by calls to lynx_add_process.
6967 (lynx_resume): If PTID is null, then try using
6968 current_process()->private->last_wait_event_ptid.
6970 (lynx_clear_inferiors): Delete. The contents of that function
6971 has been inlined in lynx_mourn;
6972 (lynx_wait_1): Save the ptid in the process's private data.
6973 (lynx_mourn): Free the process' private data. Replace call
6974 to lynx_clear_inferiors by call to clear_inferiors.
6976 2013-05-17 Yao Qi <yao@codesourcery.com>
6978 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6981 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
6983 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6984 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6985 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6986 PT_TEXT_END_ADDR guards. Update comments.
6987 (linux_target_op) <read_offsets>: Conditionally define to
6988 linux_read_offsets if the target is UCLIBC and if it defines
6989 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6991 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6992 Andrew Jenner <andrew@codesourcery.com>
6994 * Makefile.in (SFILES): Add linux-nios2-low.c.
6995 (clean): Add action to delete nios2-linux.c.
6996 (nios2-linux.c): New rule.
6997 * configure.srv: Add nios2*-*-linux*.
6998 * linux-nios2-low.c: New.
7000 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7002 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7004 2013-04-25 Hui Zhu <hui@codesourcery.com>
7007 * ax.c (ax_printf): Add fflush.
7009 2013-04-22 Tom Tromey <tromey@redhat.com>
7011 * Makefile.in (SFILES): Add filestuff.c.
7012 (OBS): Add filestuff.o.
7013 (filestuff.o): New target.
7014 * config.in, configure: Rebuild.
7015 * configure.ac: Check for fdwalk, pipe2.
7017 2013-04-17 Pedro Alves <palves@redhat.com>
7019 * configure.ac (USE_THREAD_DB): Delete variable.
7020 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7021 Don't AC_SUBST USE_THREAD_DB.
7022 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7023 * config.in, configure: Regenerate.
7025 2013-04-16 Pedro Alves <palves@redhat.com>
7027 * linux-low.h (struct lwp_info) <thread_known>: Move under
7028 the USE_THREAD_DB #ifdef.
7030 2013-04-16 Pedro Alves <palves@redhat.com>
7032 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7033 (linux-low.o): Delete rule.
7034 * linux-low.h: Always include "gdb_thread_db.h" instead of
7035 conditionally including thread_db.h.
7036 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7039 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7041 * Makefile.in (install-only): Fix make install regression.
7043 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7045 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7046 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7048 * gdbserver.1: Remove.
7050 2013-03-22 Pedro Alves <palves@redhat.com>
7052 * linux-low.c (handle_extended_wait): Don't call
7053 linux_enable_event_reporting.
7055 2013-03-15 Tony Theodore <tonyt@logyst.com>
7058 * Makefile.in (SHELL): Use @SHELL@.
7060 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7062 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7065 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7067 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7068 Remove extraneous NULL element.
7070 2013-03-13 Yao Qi <yao@codesourcery.com>
7072 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7073 'V' block in trace frame.
7075 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7077 * target.h (struct target_ops): Add btrace ops.
7078 (target_supports_btrace): New macro.
7079 (target_enable_btrace): New macro.
7080 (target_disable_btrace): New macro.
7081 (target_read_btrace): New macro.
7082 * gdbthread.h (struct thread_info): Add btrace field.
7083 * server.c: Include btrace-common.h.
7084 (handle_btrace_general_set): New function.
7085 (handle_btrace_enable): New function.
7086 (handle_btrace_disable): New function.
7087 (handle_general_set): Call handle_btrace_general_set.
7088 (handle_qxfer_btrace): New function.
7089 (struct qxfer qxfer_packets[]): Add btrace entry.
7090 * inferiors.c (remove_thread): Disable btrace.
7091 * linux-low: Include linux-btrace.h.
7092 (linux_low_enable_btrace): New function.
7093 (linux_low_read_btrace): New function.
7094 (linux_target_ops): Add btrace ops.
7095 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7096 Add srv_linux_btrace=yes.
7097 (x86_64-*-linux*): Add linux-btrace.o.
7098 Add srv_linux_btrace=yes.
7099 * configure.ac: Define HAVE_LINUX_BTRACE.
7100 * config.in: Regenerated.
7101 * configure: Regenerated.
7103 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7105 * server.c (handle_qxfer): Preserve error message if -3 is
7107 (qxfer): Document the -3 return value.
7109 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7111 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7112 (linux_btrace_h): New variable.
7113 (linux-btrace.o): New rule.
7115 2013-03-08 Stan Shebs <stan@codesourcery.com>
7116 Hafiz Abid Qadeer <abidh@codesourcery.com>
7118 * tracepoint.c (trace_buffer_size): New global.
7119 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7120 (init_trace_buffer): Change to one-argument function. Allocate
7121 trace buffer memory.
7122 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7123 handle QTBuffer:size packet.
7124 (cmd_bigqtbuffer_size): New function.
7125 (initialize_tracepoint): Call init_trace_buffer with
7126 DEFAULT_TRACE_BUFFER_SIZE.
7127 * server.c (handle_query): Add QTBuffer:size in the
7130 2013-03-07 Yao Qi <yao@codesourcery.com>
7132 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7133 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7135 (cmd_qtsp): Adjust condition. Do post increment.
7136 Set cur_action and cur_step_action back to 0.
7138 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7141 * linux-low.c (linux_write_memory): Return early success if LEN is
7144 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
7146 * configure.srv: Add x86_64-*-cygwin* as target.
7148 2013-02-28 Tom Tromey <tromey@redhat.com>
7150 * configure.ac: Invoke AC_SYS_LARGEFILE.
7151 * configure, config.in: Rebuild.
7153 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
7155 * win32-low.c: Throughout, fix format strings and casts of
7156 printf-like functions to avoid type related warnings on all
7158 (get_child_debug_event): Print dwDebugEventCode as hex since
7159 that's how it's usually documented.
7161 2013-02-28 Yao Qi <yao@codesourcery.com>
7163 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7166 2013-02-27 Jiong Wang <jiwang@tilera.com>
7168 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7169 (reg-tilegx32.c): New rule.
7170 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7171 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7172 different register info initializer according to elf class.
7173 (init_registers_tilgx32): New function. The tilegx32 register info
7175 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7176 (tile_store_gregset): Likewise.
7178 2013-02-27 Yao Qi <yao@codesourcery.com>
7180 * server.c (process_point_options): Print debug message when
7181 debug_threads is true.
7183 2013-02-26 Yao Qi <yao@codesourcery.com>
7185 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7187 2013-02-19 Pedro Alves <palves@redhat.com>
7188 Kai Tietz <ktietz@redhat.com>
7192 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7193 instead of strtoul to extract address from packet.
7194 (process_serial_event) <'z'>: Likewise.
7196 2013-02-18 Yao Qi <yao@codesourcery.com>
7198 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7200 2013-02-14 Pedro Alves <palves@redhat.com>
7204 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7205 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7207 2013-02-14 Pedro Alves <palves@redhat.com>
7209 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7211 2013-02-14 Pedro Alves <palves@redhat.com>
7213 * tracepoint.c (save_string): Delete.
7214 (add_tracepoint_action): Use savestring instead of save_string.
7216 2013-02-12 Pedro Alves <palves@redhat.com>
7218 * linux-xtensa-low.c: Ditto.
7219 * xtensa-xtregs.c: Ditto.
7221 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7223 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7226 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7228 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7229 aarch64_num_wp_regs and aarch64_num_bp_regs to
7230 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7232 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7234 * linux-aarch64-low.c (ps_get_thread_area): Replace
7235 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7237 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7238 Marcus Shawcroft <marcus.shawcroft@arm.com>
7239 Nigel Stephens <nigel.stephens@arm.com>
7240 Yufeng Zhang <yufeng.zhang@arm.com>
7242 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7243 (aarch64.c, aarch64-without-fpu.c): New targets.
7244 * configure.srv (aarch64*-*-linux*): New.
7245 * linux-aarch64-low.c: New file.
7247 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7249 * linux-low.c (handle_extended_wait, linux_create_inferior)
7250 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7251 (dequeue_one_deferred_signal, linux_resume_one_thread)
7252 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7253 (linux_tracefork_grandchild, linux_test_for_tracefork)
7254 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7255 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7256 where the argument is 0.
7258 2013-01-25 Yao Qi <yao@codesourcery.com>
7260 * event-loop.c: Include "queue.h".
7261 (gdb_event_p): New typedef.
7262 (struct gdb_event) <next_event>: Remove.
7263 (event_queue): Change to QUEUE(gdb_event_p).
7264 (async_queue_event): Remove.
7265 (gdb_event_xfree): New.
7266 (initialize_event_loop): New.
7267 (process_event): Use API from QUEUE.
7268 (wait_for_event): Likewise.
7269 * server.c (main): Call initialize_event_loop.
7270 * server.h (initialize_event_loop): Declare.
7272 2013-01-18 Yao Qi <yao@codesourcery.com>
7274 * ax.h (struct eval_agent_expr_context): New.
7275 (gdb_eval_agent_expr): Update declaration.
7276 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7277 TFRAME. Add new argument CTX.
7278 * server.h (struct eval_agent_expr_context): Declare.
7279 (agent_mem_read, agent_tsv_read): Update declaration.
7280 (agent_mem_read_string): Likewise.
7281 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7282 (add_traceframe_block): Add new argument TPOINT.
7283 Increase TPOINT->traceframe_usage.
7284 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7285 eval_tracepoint_agent_expr.
7286 (condition_true_at_tracepoint): Likewise.
7287 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7288 (agent_mem_read_string, agent_tsv_read): Likewise.
7290 2013-01-16 Yao Qi <yao@codesourcery.com>
7292 * linux-low.c (linux_resume_one_lwp): Don't check
7293 'lwp->bp_reinsert != 0'.
7295 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7296 Pedro Alves <palves@redhat.com>
7298 * lynx-low.c (ptrace_request_to_str): Define a temporary
7299 macro and use it to simplify this function's implementation.
7301 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7303 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7306 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7308 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7310 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7312 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7314 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7316 * lynx-low.c (lynx_resume): Use the resume_info parameter
7317 to determine the ptid for the lynx_ptrace call, unless
7318 it is equal to minus_one_ptid, in which case we use the
7319 ptid of the current_inferior.
7320 (lynx_wait_1): After having received a thread create/exit
7321 event, resume the inferior's execution using the signaling
7322 thread's ptid, rather than the old ptid.
7324 2013-01-07 Joel Brobecker <brobecker@adacore.com>
7326 * lynx-low.c (lynx_resume): Delete variable ret.
7328 2013-01-01 Joel Brobecker <brobecker@adacore.com>
7330 * gdbreplay.c (gdbreplay_version): Update copyright year.
7331 * server.c (gdbserver_version): Likewise.
7333 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7335 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7338 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7340 * lynx-low.c (ptrace_request_to_str): Add handling for
7343 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7345 * lynx-low.c (lynx_attach): Delete variable new_process.
7347 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7349 * lynx-low.c (lynx_create_inferior): Delete variable
7352 2012-12-17 Joel Brobecker <brobecker@adacore.com>
7354 * lynx-low.c (ptrace_request_to_str): Do not handle
7355 PTRACE_GETTHREADLIST if this macro does not exist.
7357 2012-12-15 Yao Qi <yao@codesourcery.com>
7359 * Makefile.in (OBS): Add notif.o.
7360 * notif.c, notif.h: New.
7361 * server.c: Include "notif.h".
7362 (struct vstop_notif) <next>: Remove.
7364 (queue_stop_reply): Update.
7365 (push_event, send_next_stop_reply): Remove.
7366 (discard_queued_stop_replies): Update.
7367 (notif_stop): New variable.
7368 (handle_v_stopped): Remove.
7369 (handle_v_requests): Don't call handle_v_stopped. Call
7370 handle_ack_notif instead.
7371 (queue_stop_reply_callback): Call notif_event_enque instead
7372 of queue_stop_reply.
7373 (handle_status): Don't call send_next_stop_reply, call
7374 notif_write_event instead.
7375 (kill_inferior_callback): Likewise.
7376 (detach_or_kill_inferior_callback): Likewise.
7377 (main): Call initialize_notif.
7378 (process_serial_event): Call QUEUE_is_empty.
7379 (handle_target_event): Call notif_push instead of push event.
7380 * server.h (push_event): Remove declaration.
7382 2012-12-10 Tom Tromey <tromey@redhat.com>
7384 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7385 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7388 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7389 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7390 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7391 (amd64-linux-ipa.o, ax.o): Rewrite.
7392 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7393 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7394 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7395 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7396 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7397 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7398 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7399 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7400 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7401 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7402 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7403 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7404 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7405 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7406 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7407 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7408 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7409 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7410 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7411 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7412 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7413 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7414 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7415 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7416 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7417 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7418 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7419 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7420 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7421 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7422 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7423 (reg-tilegx.o): Remove.
7424 (all_object_files): New macro.
7425 Include .deps files.
7426 * aclocal.m4, configure: Rebuild.
7427 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7428 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7429 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7431 2012-12-05 Tom Tromey <tromey@redhat.com>
7434 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7436 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
7438 * configure.ac: Check for linux/perf_event.h.
7439 * config.in: Regenerated.
7440 * configure: Regenerated.
7442 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7444 * hostio.c (handle_readlink): Decrease buffer size
7445 parameter passed to readlink by one byte.
7447 2012-11-26 Yao Qi <yao@codesourcery.com>
7449 * configure.ac (build_warnings): Append '-Wempty-body'.
7450 * configure: Regenerated.
7451 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7454 2012-11-15 Pierre Muller <muller@sourceware.org>
7456 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7457 * config.in: Regenerate.
7458 * configure: Regenerate.
7459 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7460 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7461 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7462 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7464 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7465 instead of <sys/wait.h> header.
7466 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7468 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
7470 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7471 (various make rules): Remove -DGDBSERVER
7473 2012-11-09 Yao Qi <yao@codesourcery.com>
7475 * spu-low.c (current_ptid): Move it to ..
7476 * gdbthread.h: ... here. New.
7477 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7478 * server.c (myresume, process_serial_event): Likewise.
7479 * thread-db.c (thread_db_find_new_threads): Likewise.
7480 * tracepoint.c (run_inferior_command): Likewise.
7482 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
7484 * server.c (handle_search_memory_1): Include access length in
7487 2012-09-05 Michael Brandt <michael.brandt@axis.com>
7489 * linux-crisv32-low.c: Fix compile errors.
7491 2012-09-04 Yao Qi <yao@codesourcery.com>
7493 * tracepoint.c (cmd_qtsv): Adjust debug message.
7494 Don't check CUR_TPOINT.
7496 2012-08-28 Yao Qi <yao@codesourcery.com>
7498 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7499 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7500 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7501 Remove declarations of xmalloc, xreallloc, xstrdup and
7503 * Makefile.in (libiberty_h): New.
7504 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7505 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7507 2012-08-23 Yao Qi <yao@codesourcery.com>
7509 * server.h: Remove declaration of 'xsnprintf'.
7511 2012-08-22 Keith Seitz <keiths@redhat.com>
7513 * server.h: Include build-gnulib-gbserver/config.h.
7514 * gdbreplay.c: Likewise.
7516 2012-08-08 Doug Evans <dje@google.com>
7518 * Makefile.in (SFILES): Add gdb_vecs.c.
7519 (OBS): Add gdb_vecs.o.
7520 (gdb_vecs_h, host_defs_h): New variables.
7521 (thread-db.o): Add $(gdb_vecs_h) dependency.
7522 (gdb_vecs.o): New rule.
7523 * thread-db.c: #include "gdb_vecs.h".
7524 (thread_db_load_search): Use a vector to iterate over path elements.
7525 Handle text appearing after "$pdir".
7527 * configure.ac: Add check for strstr.
7528 * config.in: Regenerate.
7529 * configure: Regenerate.
7531 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7533 * hostio.c (handle_pread): If pread fails, fall back to attempting
7535 (handle_pwrite): Likewise for pwrite.
7537 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7539 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7540 between unsupported TYPE and unimplementable ADDR/LEN combination.
7541 (arm_insert_point): Act on new return value.
7543 2012-07-31 Pedro Alves <palves@redhat.com>
7545 * server.c (process_point_options): Only skip tokens if we find
7546 one that is unrecognized. Don't treat 'X' specially while
7547 skipping unrecognized tokens.
7549 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7551 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7552 to 4-byte-align HW breakpoint addresses for Thumb.
7554 2012-07-27 Yao Qi <yao@codesourcery.com>
7558 * server.h: Declare gdb_agent_about_to_close.
7559 * target.c (kill_inferior): Include "agent.h".
7560 New. Send command 'kill'.
7561 * target.h (kill_inferior): Removed macro.
7562 * tracepoint.c (gdb_agent_about_to_close): New.
7563 (gdb_agent_helper_thread): Handle command 'close'.
7564 Wait endlessly until the inferior stops.
7565 Install gdb_agent_remove_socket to atexit hook.
7566 (agent_socket_name): New static variable.
7567 (gdb_agent_socket_init): Replace local variable 'name' with
7568 'agent_socket_name'.
7569 (gdb_agent_remove_socket): New.
7571 2012-07-27 Yao Qi <yao@codesourcery.com>
7573 * server.c (process_point_options): Stop at 'X' when parsing.
7575 2012-07-19 Michael Eager <eager@eagercon.com>
7577 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7579 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7580 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7581 hardware breakpoint.
7583 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7585 * gdbserver/linux-low.c (initialize_low): Call
7586 linux_ptrace_init_warnings.
7588 2012-07-02 Doug Evans <dje@google.com>
7590 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7593 2012-07-02 Stan Shebs <stan@codesourcery.com>
7595 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7596 (ax.o): Add it to build rule.
7598 (OBS): Add format.o.
7599 (IPA_OBS): Add format.o.
7600 * server.c (handle_query): Claim support for breakpoint commands.
7601 (process_point_options): Add command case.
7602 (process_serial_event): Leave running if there are printfs in
7604 * mem-break.h (any_persistent_commands): Declare.
7605 (add_breakpoint_commands): Declare.
7606 (gdb_no_commands_at_breakpoint): Declare.
7607 (run_breakpoint_commands): Declare.
7608 * mem-break.c (struct point_command_list): New struct.
7609 (struct breakpoint): New field command_list.
7610 (any_persistent_commands): New function.
7611 (add_commands_to_breakpoint): New function.
7612 (add_breakpoint_commands): New function.
7613 (gdb_no_commands_at_breakpoint): New function.
7614 (run_breakpoint_commands): New function.
7615 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7617 * ax.c: Include format.h.
7618 (ax_printf): New function.
7619 (gdb_eval_agent_expr): Add printf opcode.
7621 2012-06-13 Yao Qi <yao@codesourcery.com>
7623 * server.c (start_inferior): Remove duplicated writes to fields
7624 'last_resume_kind' and 'last_status' of 'current_inferior'.
7626 2012-06-12 Yao Qi <yao@codesourcery.com>
7627 Pedro Alves <palves@redhat.com>
7629 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7631 * server.c (handle_v_cont): Extend comment.
7633 2012-06-11 Yao Qi <yao@codesourcery.com>
7635 * linux-low.c (linux_attach): Add 'static'.
7637 2012-06-06 Yao Qi <yao@codesourcery.com>
7639 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7641 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7643 Fix gcc -flto compilation warning.
7644 * server.c (main): Make variable multi_mode and attach volatile.
7646 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7648 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7649 if the platform doesn't know about it.
7651 2012-05-30 Jeff Kenton <jkenton@tilera.com>
7653 * Makefile.in (SFILES): Add linux-tile-low.c.
7654 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7655 * configure.srv: Handle tilegx-*-linux*.
7656 * linux-tile-low.c: New file.
7658 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7660 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7662 2012-05-24 Pedro Alves <palves@redhat.com>
7666 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7668 2012-05-24 Pedro Alves <palves@redhat.com>
7672 Replace target_signal with gdb_signal throughout.
7674 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7676 * linux-low.c (linux_store_registers): Avoid the copying sequence
7677 when no data has been retrieved by ptrace.
7679 2012-05-22 Will Deacon <will.deacon@arm.com>
7681 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7682 Include asm/ptrace.h.
7683 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7686 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7688 * linux-low.c (linux_store_registers): Don't re-retrieve data
7689 with ptrace that has already been obtained from /proc. Always
7690 copy any data retrieved with ptrace to the buffer supplied.
7692 2012-05-11 Yao Qi <yao@codesourcery.com>
7693 Pedro Alves <palves@redhat.com>
7695 * linux-low.c (enum stopping_threads_kind): New.
7696 (stopping_threads): Change type to `enum stopping_threads_kind'.
7697 (handle_extended_wait): If stopping and suspending threads, leave
7698 the new_lwp suspended too.
7699 (linux_wait_for_event): Adjust.
7700 (stop_all_lwps): Set `stopping_threads' to
7701 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7702 whether we're suspending threads or just stopping them. Assert no
7705 2012-04-29 Yao Qi <yao@codesourcery.com>
7707 * server.h: Move some code to ...
7708 * gdbthread.h: ... here. New.
7709 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7710 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7711 (nto-low.o, win32-low.o): Likewise.
7712 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7713 * regcache.c, remote-utils.c, server.c: Likewise.
7714 * target.c, tracepoint.c, win32-low.c: Likewise.
7716 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7718 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7719 (PTRACE_ARG4_TYPE): Likewise.
7720 (PTRACE_XFER_TYPE): Likewise.
7721 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7722 ptrace to PTRACE_ARG3_TYPE.
7723 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7724 (PTRACE_ARG4_TYPE): Likewise.
7725 (PTRACE_XFER_TYPE): Likewise.
7726 (linux_detach_one_lwp): Cast fourth argument of
7727 ptrace to long then PTRACE_ARG4_TYPE.
7728 (regsets_fetch_inferior_registers): Cast third argument of
7729 ptrace to long then PTRACE_ARG3_TYPE.
7730 (regsets_store_inferior_registers): Likewise.
7732 2012-04-20 Pedro Alves <palves@redhat.com>
7734 * configure: Regenerate.
7736 2012-04-19 Pedro Alves <palves@redhat.com>
7738 * Makefile.in (GNULIB_BUILDDIR): New.
7739 (LIBGNU, INCGNU, GNULIB_H): Adjust.
7740 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7741 (all, install-only, uninstall, clean-info, all-lib, clean): No
7742 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7743 (maintainer-clean realclean distclean): Use subdir_do.
7745 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
7746 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
7747 * acinclude.m4: Include acx_configure_dir.m4.
7748 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7749 calls. Call AC_PROG_RANLIB. Configure gnulib using
7752 (GNULIB_STDINT_H): Adjust.
7753 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7754 * gdbreplay.c: Include build-gnulib/config.h.
7755 * server.h: Likewise.
7756 * aclocal.m4: Regenerate.
7757 * config.in: Regenerate.
7758 * configure: Regenerate.
7760 2012-04-19 Pedro Alves <palves@redhat.com>
7762 * Makefile.in (LIBGNU, INCGNU): Adjust.
7763 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7764 (all, install-only, uninstall, clean-info, all-lib, clean)
7765 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7766 * configure.ac: Adjust AC_OUTPUT output.
7767 * aclocal.m4: Regenerate.
7768 * configure: Regenerate.
7770 2012-04-19 Pedro Alves <palves@redhat.com>
7772 * Makefile.in (generated_files): New.
7773 (server_h): Remove the explicit dependency on config.h, and depend
7774 on $generated_files.
7776 2012-04-19 Pedro Alves <palves@redhat.com>
7778 * Makefile.in (INCGNU): Add -Ignulib.
7780 2012-04-19 Pedro Alves <palves@redhat.com>
7782 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7783 (INCGNU): ... this, and spell out -I here.
7784 (GNULIB_LIB): Rename to ...
7786 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7788 2012-04-19 Pedro Alves <palves@redhat.com>
7790 * config.in: Regenerate.
7792 2012-04-19 Pedro Alves <palves@redhat.com>
7794 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7795 * server.h (memmem): Remove declaration.
7796 * config.in: Regenerate.
7797 * configure: Regenerate.
7799 2012-04-19 Yao Qi <yao@codesourcery.com>
7801 * Makefile.in (SFILES): Add common/vec.c.
7805 2012-04-19 Yao Qi <yao@codesourcery.com>
7807 * remote-utils.c (prepare_resume_reply): Replace with macro
7808 target_core_of_thread.
7809 * server.c (handle_qxfer_threads_proper): Likewise.
7810 * target.h (traget_core_of_thread): New macro.
7812 2012-04-18 Pedro Alves <palves@redhat.com>
7814 * aclocal.m4: Regenerate.
7815 * configure: Regenerate.
7817 2012-04-16 Yao Qi <yao@codesourcery.com>
7819 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7820 duplicated on address.
7822 2012-04-16 Yao Qi <yao@codesourcery.com>
7824 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7825 (struct tracepoint_action_ops) <send>: New field.
7826 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7827 (agent_expr_send, x_tracepoint_action_send): New.
7828 (l_tracepoint_action_send): New.
7829 (cmd_qtdp): Download and install tracepoint
7830 according to `use_agent'.
7831 (run_inferior_command): Add one more parameter `len'.
7833 (tracepoint_send_agent): New.
7834 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7836 2012-04-16 Yao Qi <yao@codesourcery.com>
7838 * tracepoint.c (download_tracepoints): Moved to ...
7839 (cmd_qtstart): ... here.
7841 2012-04-14 Yao Qi <yao@codesourcery.com>
7843 * tracepoint.c: Include inttypes.h.
7844 (struct collect_memory_action): Use sized types.
7845 (struct tracepoint): Likewise.
7846 (cmd_qtdp, stop_tracing): Update print specifiers.
7847 (cmd_qtp, response_tracepoint): Likewise.
7848 (collect_data_at_tracepoint): Likewise.
7849 (collect_data_at_step): Likewise.
7851 2012-04-14 Yao Qi <yao@codesourcery.com>
7853 Import gnulib module inttypes.
7854 * aclocal.m4, config.in, configure: Regenerated.
7856 2012-04-14 Yao Qi <yao@codesourcery.com>
7858 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7859 Makefile and config.status at last.
7861 2012-04-13 Yao Qi <yao@codesourcery.com>
7863 * tracepoint.c: Include stdint.h unconditionally.
7865 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7867 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7868 on BFD_HAVE_SYS_PROCFS_TYPE.
7869 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7870 * configure: Regenerate.
7871 * config.in: Likewise.
7873 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7875 * Makefile.in (clean): Also remove x32.c x32-linux.c
7876 x32-avx.c x32-avx-linux.c.
7877 (x32.o): New target.
7879 (x32-linux.o): Likewise.
7880 (x32-linux.c): Likewise.
7881 (x32-avx.o): Likewise.
7882 (x32-avx.c): Likewise.
7883 (x32-avx-linux.o): Likewise.
7884 (x32-avx-linux.c): Likewise.
7886 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7887 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7888 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7889 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7890 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7891 i386/x32-avx-linux.xml.
7893 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7894 (init_registers_x32_avx_linux): Likwise.
7895 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7896 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7898 2012-04-13 Pedro Alves <palves@redhat.com>
7900 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7901 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7902 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7903 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7906 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7908 * linux-x86-low.c (compat_x32_clock_t): New.
7909 (compat_x32_siginfo_t): Likewise.
7910 (compat_x32_siginfo_from_siginfo): Likewise.
7911 (siginfo_from_compat_x32_siginfo): Likewise.
7912 (linux_is_elf64): Likewise.
7913 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7914 and siginfo_from_compat_x32_siginfo for x32.
7915 (x86_arch_setup): Set linux_is_elf64.
7917 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7920 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7922 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7923 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7924 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7925 compatible with process.
7927 2012-04-12 Yao Qi <yao@codesourcery.com>
7929 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7930 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7931 (install-only, install-info, clean): Handle sub dir gnulib.
7932 (all-lib, am--refresh): New targets.
7933 (memmem.o): Remove target.
7934 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7935 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7936 (AC_REPLACE_FUNCS): Remove memmem.
7937 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7938 (AC_OUTPUT): Generate Makefile in gnulib/.
7939 * aclocal.m4, config.in, configure: Regenerated.
7941 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7943 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7945 2012-04-05 Pedro Alves <palves@redhat.com>
7947 -Werror=strict-aliasing
7949 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7952 2012-04-04 Pedro Alves <palves@redhat.com>
7954 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7955 (sparc_store_gregset_from_stack, sparc_store_gregset)
7956 (sparc_breakpoint_at): Fix formatting.
7958 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7960 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7962 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7963 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7964 * config.in: Regenerate.
7965 * configure: Likewise.
7967 2012-03-29 Pedro Alves <palves@redhat.com>
7969 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7970 Correct ptrace arguments.
7972 2012-03-28 Pedro Alves <palves@redhat.com>
7974 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7975 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7976 (IA64_FR1_REGNUM): New defines.
7977 (ia64_fetch_register): New.
7978 (the_low_target): Install it.
7979 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7981 * linux-low.c (linux_fetch_registers): Try the
7982 the_low_target.fetch_register hook first.
7984 * linux-arm-low.c (the_low_target): Adjust.
7985 * linux-bfin-low.c (the_low_target): Adjust.
7986 * linux-cris-low.c (the_low_target): Adjust.
7987 * linux-crisv32-low.c (the_low_target): Adjust.
7988 * linux-m32r-low.c (the_low_target): Adjust.
7989 * linux-m68k-low.c (the_low_target): Adjust.
7990 * linux-mips-low.c (the_low_target): Adjust.
7991 * linux-ppc-low.c (the_low_target): Adjust.
7992 * linux-s390-low.c (the_low_target): Adjust.
7993 * linux-sh-low.c (the_low_target): Adjust.
7994 * linux-sparc-low.c (the_low_target): Adjust.
7995 * linux-tic6x-low.c (the_low_target): Adjust.
7996 * linux-x86-low.c (the_low_target): Adjust.
7997 * linux-xtensa-low.c (the_low_target): Adjust.
7999 2012-03-26 Pedro Alves <palves@redhat.com>
8001 * server.c (handle_qxfer_libraries): Don't bail early if
8002 the_target->qxfer_libraries_svr4 is not NULL.
8004 2012-03-26 Pedro Alves <palves@redhat.com>
8006 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8008 2012-03-23 Pedro Alves <palves@redhat.com>
8010 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8011 "library-list-svr4" element's start tag when the the DSO list is
8014 2012-03-23 Pedro Alves <palves@redhat.com>
8016 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8017 a variable whose type size is the same as the inferior's pointer
8020 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8022 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8024 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8025 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8026 * linux-low.h: Include <signal.h>.
8027 (struct siginfo): Remove forward declaration.
8028 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8031 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8033 * .gitignore: Ignore more files.
8035 2012-03-19 Pedro Alves <palves@redhat.com>
8036 Jan Kratochvil <jan.kratochvil@redhat.com>
8038 * server.c (cont_thread, general_thread): Add describing comments.
8039 (start_inferior): Clear `cont_thread'.
8040 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8043 2012-03-15 Yao Qi <yao@codesourcery.com>
8045 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8047 (cmd_qtdp): ... here.
8049 2012-03-15 Yao Qi <yao@codesourcery.com>
8051 * tracepoint.c (struct tracepoint_action_ops): New.
8052 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8053 (m_tracepoint_action_download): New.
8054 (r_tracepoint_action_download): New.
8055 (x_tracepoint_action_download): New.
8056 (l_tracepoint_action_download): New.
8057 (add_tracepoint_action): Install `action->ops' according type.
8058 (download_tracepoint_1): Move code `download' function pointer
8059 of various tracepoint_action_ops.
8061 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8063 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8064 linux_ptrace_attach_warnings.
8066 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8068 * Makefile.in (linux-ptrace.o): New.
8069 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8070 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8071 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8072 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8073 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8075 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8077 2012-03-08 Yao Qi <yao@codesourcery.com>
8078 Pedro Alves <palves@redhat.com>
8080 Fix PR server/13392.
8081 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8083 * tracepoint.c (remove_tracepoint): New.
8084 (cmd_qtdp): Call remove_tracepoint when failed to install.
8086 2012-03-07 Pedro Alves <palves@redhat.com>
8088 * linux-low.c (get_detach_signal): New.
8089 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8090 Pass on pending signals to PTRACE_DETACH. Check the result of the
8092 * server.c (program_signals, program_signals_p): New.
8093 (handle_general_set): Handle QProgramSignals.
8094 * server.h (program_signals, program_signals_p): Declare.
8096 2012-03-05 Pedro Alves <palves@redhat.com>
8097 Jan Kratochvil <jan.kratochvil@redhat.com>
8099 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8102 2012-03-03 Yao Qi <yao@codesourcery.com>
8104 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8105 agent_look_up_symbols.
8107 2012-03-03 Yao Qi <yao@codesourcery.com>
8109 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8110 (linux-x86-low.o): Likewise.
8111 * server.h: Remove in_process_agent_loaded.
8112 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8116 2012-03-03 Yao Qi <yao@codesourcery.com>
8118 * tracepoint.c (gdb_agent_capability): New global.
8119 (in_process_agent_loaded_ust): Renamed to
8120 `in_process_agent_supports_ust'.
8122 (in_process_agent_supports_ust): Call agent_capability_check.
8123 (clear_installed_tracepoints): Assert that agent supports
8126 2012-03-03 Yao Qi <yao@codesourcery.com>
8128 * linux-low.c (linux_supports_agent): New.
8129 (linux_target_ops): Initialize field `supports_agent' with
8130 linux_supports_agent.
8131 * target.h (struct target_ops) <supports_agent>: New.
8132 (target_supports_agent): New macro.
8133 * server.c (handle_general_set): Handle packet 'QAgent'.
8134 (handle_query): Send `QAgent+'.
8135 * Makefile.in (server.o): Depends on agent.h.
8137 2012-03-03 Yao Qi <yao@codesourcery.com>
8139 * Makefile.in (OBS): Add agent.o.
8140 Add new rule for agent.o.
8141 Track dependence of tracepoint.c on agent.h.
8142 * tracepoint.c (run_inferior_command_1):
8143 (run_inferior_command): Call agent_run_command.
8144 (gdb_ust_connect_sync_socket): Deleted. Move it to
8146 (resume_thread, stop_thread): Likewise.
8147 (gdb_ust_socket_init): Renamed to ...
8148 (gdb_agent_socket_init): ... New.
8149 (gdb_ust_thread): Renamed to ...
8150 (gdb_agent_helper_thread): ... New.
8151 (gdb_ust_init): Move some code to ...
8152 (gdb_agent_init): ... here. New.
8153 [HAVE_UST]: Call gdb_ust_init.
8154 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8155 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8156 * config.in, configure: Regenerated.
8158 2012-03-02 Pedro Alves <palves@redhat.com>
8160 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8161 * linux-low.c (struct simple_pid_list): New.
8162 (stopped_pids): New a struct simple_pid_list pointer.
8163 (add_to_pid_list, pull_pid_from_list): New.
8164 (handle_extended_wait): Don't assume the first signal new children
8165 report is SIGSTOP. Adjust call to pull_pid_from_list.
8166 (linux_wait_for_lwp): Adjust.
8168 2012-03-02 Yao Qi <yao@codesourcery.com>
8170 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8173 2012-03-02 Yao Qi <yao@codesourcery.com>
8175 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8176 `stop_pc' and `tpoint'. Update caller.
8178 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8180 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8181 * linux-low.c (use_linux_regsets): New macro.
8182 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8183 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8184 (linux_register_in_regsets): New function.
8185 (usr_fetch_inferior_registers): Skip registers covered by
8187 (usr_store_inferior_registers): Likewise.
8188 (usr_fetch_inferior_registers): New macro.
8189 (usr_store_inferior_registers): Likewise.
8190 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8191 (linux_store_registers): Likewise.
8192 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8194 (init_registers_mips64_dsp_linux): Likewise.
8195 (init_registers_mips_linux): New macro.
8196 (init_registers_mips_dsp_linux): Likewise.
8197 (mips_dsp_num_regs): Likewise.
8198 (DSP_BASE, DSP_CONTROL): New fallback macros.
8199 (mips_base_regs): New macro.
8200 (mips_regmap): Use it. Fix the size.
8201 (mips_dsp_regmap): New variable.
8202 (mips_dsp_regset_bitmap): Likewise.
8203 (mips_arch_setup): New function.
8204 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8206 (mips_cannot_store_register): Likewise.
8207 (the_low_target): Update .arch_setup, .num_regs and .regmap
8208 initializers. Add .regset_bitmap initializer.
8209 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8211 * linux-bfin-low.c (the_low_target): Likewise.
8212 * linux-cris-low.c (the_low_target): Likewise.
8213 * linux-crisv32-low.c (the_low_target): Likewise.
8214 * linux-ia64-low.c (the_low_target): Likewise.
8215 * linux-m32r-low.c (the_low_target): Likewise.
8216 * linux-m68k-low.c (the_low_target): Likewise.
8217 * linux-ppc-low.c (the_low_target): Likewise.
8218 * linux-s390-low.c (the_low_target): Likewise.
8219 * linux-sh-low.c (the_low_target): Likewise.
8220 * linux-sparc-low.c (the_low_target): Likewise.
8221 * linux-tic6x-low.c (the_low_target): Likewise.
8222 * linux-x86-low.c (the_low_target): Likewise.
8223 * linux-xtensa-low.c (the_low_target): Likewise.
8224 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8225 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8226 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8228 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8229 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8231 2012-02-29 Yao Qi <yao@codesourcery.com>
8232 Pedro Alves <palves@redhat.com>
8234 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8235 `step_over_finished' is true.
8237 2012-02-27 Pedro Alves <palves@redhat.com>
8239 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8240 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8242 2012-02-27 Pedro Alves <palves@redhat.com>
8245 * linux-low.c (pid_is_stopped): New.
8246 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8248 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
8250 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8253 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8255 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8257 2012-02-24 Luis Machado <lgustavo@codesourcery>
8259 * server.c (handle_query): Advertise support for target-side
8260 breakpoint condition evaluation.
8261 (process_point_options): New function.
8262 (process_serial_event): When inserting a breakpoint, check for
8263 a target-side condition that should be evaluated.
8265 * mem-break.c: Include regcache.h and ax.h.
8266 (point_cond_list_t): New data structure.
8267 (breakpoint) <cond_list>: New field.
8268 (find_gdb_breakpoint_at): Make non-static.
8269 (delete_gdb_breakpoint_at): Clear any target-side
8271 (clear_gdb_breakpoint_conditions): New function.
8272 (add_condition_to_breakpoint): Likewise.
8273 (add_breakpoint_condition): Likewise.
8274 (gdb_condition_true_at_breakpoint): Likewise.
8275 (gdb_breakpoint_here): Return result directly instead
8276 of going through a local variable.
8278 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8279 (clear_gdb_breakpoint_conditions): Likewise.
8280 (add_breakpoint_condition): Likewise.
8281 (gdb_condition_true_at_breakpoint): Likewise.
8283 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8284 (need_step_over_p): Take target-side breakpoint condition into
8287 2012-02-24 Luis Machado <lgustavo@codesourcery>
8289 * server.h: Include tracepoint.h.
8290 (agent_mem_read, agent_get_trace_state_variable_value,
8291 agent_set_trace_state_variable_value,
8292 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8293 get_set_tsv_func_addr): New prototypes.
8295 * ax.h: New include file.
8296 * ax.c: New source file.
8298 * tracepoint.c: Include ax.h.
8299 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8300 agent_expr, eval_result_type): Move to ax.h.
8301 (parse_agent_expr): Rename to ...
8302 (gdb_parse_agent_expr): ... this, make it non-static and move
8304 (unparse_agent_expr) Rename to ...
8305 (gdb_unparse_agent_expr): ... this, make it non-static and move
8307 (eval_agent_expr): Rename to ...
8308 (eval_tracepoint_agent_expr): ... this.
8309 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8310 forward declarations.
8311 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8312 (agent_get_trace_state_variable_value): New function.
8313 (agent_set_trace_state_variable_value): New function.
8314 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8315 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8316 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8317 (condition_true_at_tracepoint): Likewise.
8318 (parse_agent_expr): Rename to ...
8319 (gdb_parse_agent_expr): ... this and move to ax.c.
8320 (unparse_agent_expr): Rename to ...
8321 (gdb_unparse_agent_expr): ... this and move to ax.c.
8322 (gdb_agent_op_name): Move to ax.c.
8323 (eval_agent_expr): Rename to ...
8324 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8326 (eval_tracepoint_agent_expr): New function.
8327 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8329 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8331 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8332 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8333 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8334 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8335 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8336 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8337 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8338 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8339 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8340 (compile_bytecodes): Remove forward declaration.
8341 (is_goto_target): Move to ax.c.
8342 (compile_bytecodes): Move to ax.c and call
8343 agent_get_trace_state_variable_value (...) and
8344 agent_set_trace_state_variable_value (...).
8346 * Makefile.in: Update ax.c and IPA dependencies.
8348 2012-02-24 Pedro Alves <palves@redhat.com>
8350 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8351 (cmd_bigqtbuffer_circular): ... this. Only handle
8352 'QTBuffer:circular:'.
8353 (handle_tracepoint_general_set): Adjust.
8355 2012-02-16 Yao Qi <yao@codesourcery.com>
8357 * inferiors.c: Move code to ...
8358 * dll.c: .... here. New.
8359 * server.h: Declare clear_dlls.
8360 * Makefile.in (SFILES): Add dll.c.
8364 2012-02-11 Yao Qi <yao@codesourcery.com>
8366 * server.c: (handle_monitor_command): Add a new parameter
8368 (handle_query): Update caller.
8370 2012-02-09 Joel Brobecker <brobecker@adacore.com>
8372 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8373 * configure, config.in: Regenerate.
8374 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8377 2012-02-02 Pedro Alves <palves@redhat.com>
8379 Try SIGKILL first, then PTRACE_KILL.
8380 * linux-low.c (linux_kill_one_lwp): New.
8381 (linux_kill_one_lwp): Rename to ...
8382 (kill_one_lwp_callback): ... this. Use the new
8385 2012-02-02 Pedro Alves <palves@redhat.com>
8387 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8390 2012-01-27 Pedro Alves <palves@redhat.com>
8392 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8393 (elf_64_file_p): Make static.
8394 (linux_pid_exe_is_elf_64_file): New.
8395 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8396 Delete declarations.
8397 (linux_pid_exe_is_elf_64_file): Declare.
8398 * linux-x86-low.c (x86_arch_setup): Use
8399 linux_pid_exe_is_elf_64_file.
8401 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8403 * linux-low.c (linux_wait_for_event_1): Rename to ...
8404 (linux_wait_for_event): ... here and merge it with former
8405 linux_wait_for_event - new variable wait_ptid, use it.
8406 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8408 2012-01-23 Pedro Alves <palves@redhat.com>
8410 * server.c (main): Avoid yet another case of infinite loop while
8411 detaching/killing after a longjmp.
8413 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8416 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8418 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8420 * hostio.c (handle_readlink): New function.
8421 (handle_vFile): Call it to handle "vFile:readlink" packets.
8423 2012-01-20 Pedro Alves <palves@redhat.com>
8424 Ulrich Weigand <ulrich.weigand@linaro.org>
8426 * server.c (handle_v_requests): Only support vAttach and vRun to
8427 start multiple processes when in extended protocol mode.
8429 2012-01-17 Pedro Alves <palves@redhat.com>
8431 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8432 memalign plus mprotect to allocate the scratch buffer.
8434 2012-01-13 Pedro Alves <palves@redhat.com>
8436 * server.c (attach_inferior): Clear `cont_thread'.
8438 2012-01-13 Pedro Alves <palves@redhat.com>
8440 * server.c (main): Avoid infinite loop while detaching/killing
8443 2012-01-09 Doug Evans <dje@google.com>
8445 * server.c (start_inferior): Set last_ptid in --wrapper case.
8447 2012-01-06 Yao Qi <yao@codesourcery.com>
8449 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8451 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8453 2012-01-04 Yao Qi <yao@codesourcery.com>
8455 * tracepoint.c (cmd_qtdp): Print debug message
8456 for static tracepoint.
8458 2012-01-04 Yao Qi <yao@codesourcery.com>
8460 * tracepoint.c (trace_vdebug): Differentiate debug message
8461 between gdbserver and IPA.
8463 2012-01-03 Yao Qi <yao@codesourcery.com>
8465 * tracepoint.c (tracepoint_was_hit): Don't collect for
8468 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8470 * terminal.h: Reformat copyright header.
8472 2012-01-02 Joel Brobecker <brobecker@adacore.com>
8474 * server.c (gdbserver_version): Update copyright year.
8475 * gdbreplay.c (gdbreplay_version): Likewise.
8477 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8479 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8482 2011-12-18 Hui Zhu <teawater@gmail.com>
8483 * linux-low.c (linux_create_inferior): Save return value to ret.
8485 2011-12-18 Hui Zhu <teawater@gmail.com>
8487 * linux-low.c (linux_create_inferior): Save return value to ret.
8489 2011-12-16 Doug Evans <dje@google.com>
8491 * linux-low.c (linux_create_inferior): If stdio connection,
8492 redirect stdin from /dev/null, stdout to stderr.
8493 * remote-utils.c (remote_is_stdio): New static global.
8494 (remote_connection_is_stdio): New function.
8495 (remote_prepare): Handle stdio connection.
8496 (remote_open): Ditto.
8497 (remote_close): Don't close stdin for stdio connections.
8498 (read_prim,write_prim): New functions. Replace all calls to
8499 read/write to these.
8500 * server.c (main): Watch for "-" argument. Move call to
8501 remote_prepare before start_inferior.
8502 * server.h (STDIO_CONNECTION_NAME): New macro.
8503 (remote_connection_is_stdio): Declare.
8505 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8506 in debugging output.
8508 2011-12-15 Yao Qi <yao@codesourcery.com>
8510 * tracepoint.c: Include sys/syscall.h.
8511 (gdb_ust_thread): Remove preprocessor conditional.
8513 2011-12-14 Pedro Alves <pedro@codesourcery.com>
8515 * linux-low.c (linux_detach_one_lwp): Call
8516 the_low_target.prepare_to_resume before detaching.
8518 2011-12-14 Yao Qi <yao@codesourcery.com>
8520 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8523 2011-12-14 Yao Qi <yao@codesourcery.com>
8525 * i386-low.c (i386_low_stopped_data_address): Initialize local
8528 2011-12-13 Pedro Alves <pedro@codesourcery.com>
8532 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8533 DR_CONTROL unless necessary. Extend comments.
8534 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8535 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8537 2011-12-13 Yao Qi <yao@codesourcery.com>
8539 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8541 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8543 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8545 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8546 Print new debug message for such case.
8548 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8550 Fix overlapping memcpy.
8551 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8552 the read_inferior_memory transfer.
8553 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8554 write_inferior_memory transfer.
8555 (set_fast_tracepoint_jump): New variable buf. Use it for the
8556 read_inferior_memory and write_inferior_memory transfers.
8557 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8558 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8559 Use it for the write_inferior_memory transfer.
8560 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8563 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8565 * linux-low.c (fetch_register, store_register): Make code
8566 consistent, fix formatting.
8568 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8570 * linux-low.c (usr_store_inferior_registers): Factor out code
8571 to handle individual registers into...
8572 (store_register): ... this new function.
8574 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8576 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8577 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8578 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8579 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8580 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8581 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8582 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8583 (srv_xmlfiles): Add new XML files.
8585 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8587 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8588 (init_registers_s390_linux32v1): Add prototype.
8589 (init_registers_s390_linux32v2): Likewise.
8590 (init_registers_s390_linux64v1): Likewise.
8591 (init_registers_s390_linux64v2): Likewise.
8592 (init_registers_s390x_linux64v1): Likewise.
8593 (init_registers_s390x_linux64v2): Likewise.
8594 (s390_num_regs): Increment to 52.
8595 (s390_regmap): Add orig_r2 register.
8596 (s390_num_regs_3264): Increment to 68.
8597 (s390_regmap_3264): Add orig_r2 register.
8598 (s390_collect_ptrace_register): Handle orig_r2 register.
8599 (s390_supply_ptrace_register): Likewise.
8600 (s390_fill_last_break): New function.
8601 (s390_store_last_break): Likewise.
8602 (s390_fill_system_call): New function.
8603 (s390_store_system_call): Likewise.
8604 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8606 (s390_check_regset): New function.
8607 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8608 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8609 Update target_regsets for available register sets.
8611 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8612 Jan Kratochvil <jan.kratochvil@redhat.com>
8614 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8615 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8617 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8618 * linux-low.h (struct process_info_private): New member r_debug.
8619 * server.c (handle_qxfer_libraries): Call
8620 the_target->qxfer_libraries_svr4.
8621 (handle_qxfer_libraries_svr4): New function.
8622 (qxfer_packets): New entry "libraries-svr4".
8623 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8624 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8625 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8626 PACKET_qXfer_libraries_svr4.
8628 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8630 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8631 PSW address/mask between 8-byte and 16-byte formats.
8632 (s390_supply_ptrace_register): Likewise.
8633 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8634 basic addressing mode bit.
8636 2011-11-24 Stan Shebs <stan@codesourcery.com>
8638 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8640 2011-11-17 Stan Shebs <stan@codesourcery.com>
8642 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8643 (tracing_start_time): New global.
8644 (tracing_stop_time): New global.
8645 (tracing_user_name): New global.
8646 (tracing_notes): New global.
8647 (tracing_stop_note): New global.
8648 (cmd_qtstart): Set traceframe_usage, start_time.
8649 (stop_tracing): Set stop_time.
8650 (cmd_qtstatus): Report additional status.
8651 (cmd_qtp): New function.
8652 (handle_tracepoint_query): Call it.
8653 (cmd_qtnotes): New function.
8654 (handle_tracepoint_general_set): Call it.
8655 (get_timestamp): Rename from tsv_get_timestamp.
8657 2011-11-14 Stan Shebs <stan@codesourcery.com>
8658 Kwok Cheung Yeung <kcy@codesourcery.com>
8660 * linux-x86-low.c (small_jump_insn): New.
8661 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8662 trampoline and error message, build a trampoline and issue a small
8663 jump instruction to it.
8664 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8665 trampoline and error message.
8666 (x86_get_min_fast_tracepoint_insn_len): New.
8667 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8668 * linux-low.h (struct linux_target_ops): Add arguments to
8669 install_fast_tracepoint_jump_pad operation, add new operation.
8670 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8672 (linux_get_min_fast_tracepoint_insn_len): New function.
8673 (linux_target_op): Add new operation.
8674 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8675 (gdb_trampoline_buffer_end): Ditto.
8676 (gdb_trampoline_buffer_error): Ditto.
8677 (struct ipa_sym_addresses): Add fields for new IPA variables.
8678 (symbol_list): Add entries for new IPA variables.
8679 (struct tracepoint): Add fields to hold the address range of the
8680 trampoline used by the tracepoint.
8681 (trampoline_buffer_head): New static variable.
8682 (trampoline_buffer_tail): Ditto.
8683 (claim_trampoline_space): New function.
8684 (have_fast_tracepoint_trampoline_buffer): New function.
8685 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8687 (install_fast_tracepoint): Ditto, also add error buffer argument.
8688 (cmd_qtminftpilen): New function.
8689 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8690 (fast_tracepoint_from_trampoline_address): New function.
8691 (fast_tracepoint_collecting): Handle trampoline as part of jump
8693 (set_trampoline_buffer_space): New function.
8694 (initialize_tracepoint): Initialize new IPA variables.
8695 * target.h (struct target_ops): Add arguments to
8696 install_fast_tracepoint_jump_pad operation, add new
8697 get_min_fast_tracepoint_insn_len operation.
8698 (target_get_min_fast_tracepoint_insn_len): New.
8699 (install_fast_tracepoint_jump_pad): Add arguments.
8700 * server.h (IPA_BUFSIZ): Define.
8701 * linux-i386-ipa.c: Include extra header files.
8702 (initialize_fast_tracepoint_trampoline_buffer): New function.
8703 (initialize_low_tracepoint): Call it.
8704 * server.h (set_trampoline_buffer_space): Declare.
8705 (claim_trampoline_space): Ditto.
8706 (have_fast_tracepoint_trampoline_buffer): Ditto.
8708 2011-11-14 Yao Qi <yao@codesourcery.com>
8710 * server.c (handle_query): Handle InstallInTrace for qSupported.
8711 * tracepoint.c (add_tracepoint): Sort list.
8712 (install_tracepoint, download_tracepoint): New.
8713 (cmd_qtdp): Call them to install and download tracepoints.
8714 (sort_tracepoints): Removed.
8715 (cmd_qtstart): Update.
8717 2011-11-14 Yao Qi <yao@codesourcery.com>
8719 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8720 * mem-break.h: Declare.
8721 * tracepoint.c (cmd_qtstart): Move some code to ...
8722 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8724 (download_tracepoints): Move some code to ...
8725 (download_tracepoint_1): ... here. New.
8727 2011-11-08 Yao Qi <yao@codesourcery.com>
8729 * remote-utils.c (relocate_instruction): A comment fix.
8731 2011-11-07 Joel Brobecker <brobecker@adacore.com>
8733 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8734 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8735 dr_status_mirror and dr_control_mirror from debug_reg_state.
8736 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8737 (i386_initial_stuff): Remove use of deleted globals.
8738 (i386_get_thread_context, i386_set_thread_context,
8739 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8740 from debug_reg_state.
8742 2011-11-05 Yao Qi <yao@codesourcery.com>
8744 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8745 address as TPOINT's.
8747 2011-11-02 Stan Shebs <stan@codesourcery.com>
8749 * tracepoint.c (agent_mem_read_string): New function.
8750 (eval_agent_expr): Call it for tracenz.
8751 * server.c (handle_query): Report support for tracenz.
8753 2011-11-02 Yao Qi <yao@codesourcery.com>
8755 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8757 2011-11-02 Yao Qi <yao@codesourcery.com>
8759 * target.h: Fix a typo in comment.
8761 2011-10-31 Pedro Alves <pedro@codesourcery.com>
8763 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8764 clobber the breakpoints' shadows with fast tracepoint jumps.
8765 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8766 * target.c (write_inferior_memory): Also pass MYADDR down to
8769 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8771 * configure.ac: Check support for personality routine.
8772 * configure: Regenerate.
8773 * config.in: Likewise.
8774 * linux-low.c: Include <sys/personality.h>.
8775 Define ADDR_NO_RANDOMIZE if necessary.
8776 (linux_create_inferior): Disable address space randomization when
8777 forking inferior, if requested.
8778 (linux_supports_disable_randomization): New function.
8779 (linux_target_ops): Install it.
8780 * server.h (disable_randomization): Declare.
8781 * server.c (disable_randomization): New global variable.
8782 (handle_general_set): Handle QDisableRandomization.
8783 (handle_query): Likewise for qSupported.
8784 (main): Support --disable-randomization and --no-disable-randomization
8785 command line arguments.
8786 * target.h (struct target_ops): Add supports_disable_randomization.
8787 (target_supports_disable_randomization): New macro.
8789 2011-09-29 Mike Frysinger <vapier@gentoo.org>
8791 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8793 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8794 [!PT_GETDSBT] (target_loadmap): New definition.
8795 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8796 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8797 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8798 and PT_GETDSBT to LINUX_LOADMAP.
8799 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8800 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8802 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8804 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8805 (arm_linux_hwbp_cap): New static variable.
8806 (arm_linux_get_hwbp_cap): Replace by ...
8807 (arm_linux_init_hwbp_cap): ... this new function.
8808 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8809 (arm_linux_get_hw_watchpoint_count): Likewise.
8810 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8811 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8812 (arm_prepare_to_resume): Use perror_with_name instead of error.
8814 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
8816 * linux-arm-low.c: Include <signal.h>.
8817 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8818 (struct arm_linux_hwbp_cap): New data type.
8819 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8820 (struct arm_linux_hw_breakpoint): New data type.
8821 (MAX_BPTS, MAX_WPTS): Define.
8822 (struct arch_process_info, struct arch_lwp_info): New data types.
8823 (arm_linux_get_hwbp_cap): New function.
8824 (arm_linux_get_hw_breakpoint_count): Likewise.
8825 (arm_linux_get_hw_watchpoint_count): Likewise.
8826 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8827 (arm_hwbp_control_initialize): Likewise.
8828 (arm_hwbp_control_is_enabled): Likewise.
8829 (arm_hwbp_control_is_initialized): Likewise.
8830 (arm_hwbp_control_disable): Likewise.
8831 (arm_linux_hw_breakpoint_equal): Likewise.
8832 (arm_linux_hw_point_initialize): Likewise.
8833 (struct update_registers_data): New data structure.
8834 (update_registers_callback: New function.
8835 (arm_insert_point): Likewise.
8836 (arm_remove_point): Likewise.
8837 (arm_stopped_by_watchpoint): Likewise.
8838 (arm_stopped_data_address): Likewise.
8839 (arm_new_process): Likewise.
8840 (arm_new_thread): Likewise.
8841 (arm_prepare_to_resume): Likewise.
8842 (the_low_target): Register arm_insert_point, arm_remove_point,
8843 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8844 arm_new_thread, and arm_prepare_to_resume.
8846 2011-09-15 Stan Shebs <stan@codesourcery.com>
8848 * server.h (struct emit_ops): Add compare-goto fields.
8849 * tracepoint.c (gdb_agent_op_sizes): New table.
8850 (emit_eq_goto): New function.
8851 (emit_ne_goto): New function.
8852 (emit_lt_goto): New function.
8853 (emit_le_goto): New function.
8854 (emit_gt_goto): New function.
8855 (emit_ge_goto): New function.
8856 (is_goto_target): New function.
8857 (compile_bytecodes): Recognize special cases of compare-goto
8858 combinations and call specialized emitters for them.
8859 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8860 (amd64_emit_ne_goto): New function.
8861 (amd64_emit_lt_goto): New function.
8862 (amd64_emit_le_goto): New function.
8863 (amd64_emit_gt_goto): New function.
8864 (amd64_emit_ge_goto): New function.
8865 (amd64_emit_ops): Add the new functions.
8866 (i386_emit_eq_goto): New function.
8867 (i386_emit_ne_goto): New function.
8868 (i386_emit_lt_goto): New function.
8869 (i386_emit_le_goto): New function.
8870 (i386_emit_gt_goto): New function.
8871 (i386_emit_ge_goto): New function.
8872 (i386_emit_ops): Add the new functions.
8874 2011-09-08 Stan Shebs <stan@codesourcery.com>
8876 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8877 (i386_emit_epilogue): Restore %ebx.
8879 2011-08-31 Jie Zhang <jzhang918@gmail.com>
8881 * server.c (step_thread): Remove definition.
8882 (process_serial_event): Don't handle Hs.
8883 * server.h (step_thread): Remove declaration.
8884 * target.c (set_desired_inferior): Remove use of step_thread.
8886 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8888 * linux-low.c: Include linux-procfs.h.
8889 (linux_attach_lwp_1): Update comments.
8890 (linux_attach): Scan for existing threads when attaching to a
8891 process that is the tgid.
8892 * Makefile.in: Update dependencies.
8894 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
8896 * configure.srv: Add linux-procfs.o dependencies.
8898 2011-08-14 Yao Qi <yao@codesourcery.com>
8900 * target.h (struct target_ops): Fix indent.
8901 * win32-low.c (win32_target_ops): Fix comment.
8903 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
8904 Yao Qi <yao@codesourcery.com>
8906 * Makefile.in (clean): Remove tic6x-*.c files.
8907 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8908 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8909 (tic6x-c64xp-linux.c): Likewise.
8910 * configure.srv: Add support for tic6x-*-uclinux.
8911 * linux-tic6x-low.c: New.
8912 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8914 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
8915 Yao Qi <yao@codesourcery.com>
8917 * target.h (struct target_ops): Add read_loadmap.
8918 * linux-low.c (struct target_loadseg): New type.
8919 (struct target_loadmap): New type.
8920 (linux_read_loadmap): New function.
8921 (linux_target_ops): Add linux_read_loadmap.
8922 * server.c (handle_query): Support qXfer:fdpic:read packet.
8923 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8926 2011-08-05 Eli Zaretskii <eliz@gnu.org>
8928 * win32-low.c: Include <stdint.h>.
8930 2011-07-22 Pedro Alves <pedro@codesourcery.com>
8932 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8933 to the inferior here.
8934 (i386_remove_aligned_watchpoint): Ditto.
8935 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8936 fit part of the watchpoint in the debug registers.
8937 (i386_update_inferior_debug_regs): New.
8938 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8939 registers, and only update the inferior on success.
8940 (i386_low_remove_watchpoint): Ditto.
8942 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8944 * linux-low.c (compare_ints, unique, list_threads, show_process,
8945 linux_core_of_thread): Delete.
8946 (linux_target_ops): Change linux_core_of_thread to
8947 linux_common_core_of_thread.
8948 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8949 * utils.c (malloc_failure): Change type of argument.
8950 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8951 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8952 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8953 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8954 (IPA_OBJS): Add common-utils-ipa.o.
8955 (ptid_h, linux_osdata_h): New macros.
8956 (server_h): Add common/common-utils.h, common/xml-utils.h,
8957 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8959 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8960 ptid.o, buffer.o): New rules.
8961 (linux-low.o): Add common/linux-osdata.h as a dependency.
8962 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8963 * configure.ac: Add AC_HEADER_DIRENT check.
8964 * config.in: Regenerate.
8965 * configure: Regenerate.
8966 * remote-utils.c (xml_escape_text): Delete.
8967 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8968 buffer_xml_printf): Move to common/buffer.c.
8969 * server.c (main): Remove call to initialize_inferiors.
8970 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8971 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8972 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8973 internal_error, gdb_assert, gdb_assert_fail): Delete.
8974 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8975 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8977 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8978 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8979 initialize_inferiors): Delete.
8981 2011-07-20 Pedro Alves <pedro@codesourcery.com>
8983 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8986 2011-05-31 Pedro Alves <pedro@codesourcery.com>
8988 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8990 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8992 2011-05-26 Yao Qi <yao@codesourcery.com>
8994 * Makefile.in (thread-db.o): Track dependence to
8995 common/gdb_thread_db.h.
8996 * thread-db.c: include gdb_thread_db.h from right place.
8998 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9000 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9001 __FILE__ and __LINE__ to internal_error.
9003 2011-05-13 Doug Evans <dje@google.com>
9005 * thread-db.c (try_thread_db_load_from_sdir): New function.
9006 (try_thread_db_load_from_dir): New function.
9007 (thread_db_load_search): Handle $sdir, ignore $pdir.
9008 Remove trying of system directories if search of
9009 libthread-db-search-path fails, that is now done via $sdir.
9011 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9013 * server.c (handle_query): Add EnableDisableTracepoints to the list
9014 of supported features.
9015 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9017 (cmd_qtenable_disable): New.
9018 (cmd_qtstart): Install tracepoints even if disabled.
9019 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9020 receiving a QTEnable or QTDisable packet.
9021 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9022 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9024 (gdb_probe): Skip data collection if static tracepoint is disabled.
9026 2011-05-10 Doug Evans <dje@google.com>
9028 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9030 2011-05-04 Doug Evans <dje@google.com>
9032 * linux-low.c (linux_join): Skip process lookup.
9033 * spu-low.c (spu_join): Ditto.
9034 * server.c (join_inferiors_callback): Delete.
9035 (process_serial_event): For 'D' packet (detach) call join_inferior
9038 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9040 * README: Don't mention xscale*-*-linux*.
9041 * configure.srv (xscale*-*-linux*): Don't handle target.
9043 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9045 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9047 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9048 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9049 (i386_emit_void_call_2): Likewise.
9051 2011-04-26 Yao Qi <yao@codesourcery.com>
9053 * linux-low.c: Move common macros to linux-ptrace.h.
9054 Include linux-ptrace.h.
9055 * Makefile.in (linux_ptrace_h): New.
9056 (linux-low.o): Depends on linux-ptrace.h.
9058 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9060 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9061 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9062 (remote_prepare): New function with most of the TCP code from ...
9063 (remote_open): ... here. Detect PORT here unconditionally. Move also
9064 setting transport_is_reliable.
9065 * server.c (run_once): New variable.
9066 (gdbserver_usage): Document it.
9067 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9068 the first run if RUN_ONCE.
9069 * server.h (run_once, remote_prepare): New declarations.
9071 2011-04-19 Tom Tromey <tromey@redhat.com>
9073 * win32-low.c (handle_load_dll): Remove duplicate "the".
9075 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9077 Remove support for old Cygwin 1.5 versions.
9078 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9079 function to avoid warning.
9080 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9083 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9085 * gdbserver/server.h (Macro _): Define it if not available.
9087 2011-03-14 Michael Snyder <msnyder@vmware.com>
9089 * hostio.c (handle_close): Remove unnecessary null test.
9091 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9093 * Makefile.in (maintainer-clean realclean distclean): Remove
9094 "make ... subdir_do" command.
9096 2011-03-10 Michael Snyder <msnyder@vmware.com>
9098 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9100 * server.c (handle_v_run): Free alloced buffer on early return.
9102 2011-03-09 Yao Qi <yao@codesourcery.com>
9105 2011-03-04 Yao Qi <yao@codesourcery.com>
9107 * Makefile.in: Remove GNU make feature --directory.
9109 2011-03-05 Yao Qi <yao@codesourcery.com>
9111 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9112 (subdir_do): New make target. Copied from gdb/Makefile.
9113 (maintainer-clean, realclean, distclean, clean): Call corresponding
9114 make targets in common/Makefile.
9116 2011-02-11 Yao Qi <yao@codesourcery.com>
9118 * configure.ac: Call AC_PROG_RANLIB.
9119 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9120 * configure: Regenerate.
9122 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9124 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9126 2011-03-06 Yao Qi <yao@codesourcery.com>
9128 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9130 2011-03-05 Yao Qi <yao@codesourcery.com>
9132 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9133 (subdir_do): New make target. Copied from gdb/Makefile.
9134 (maintainer-clean, realclean, distclean, clean): Call corresponding
9135 make targets in common/Makefile.
9137 2011-03-04 Yao Qi <yao@codesourcery.com>
9139 * Makefile.in: Remove GNU make feature --directory.
9141 2011-03-04 Michael Snyder <msnyder@vmware.com>
9143 * server.c (queue_stop_reply): Call xmalloc not malloc.
9145 2011-03-02 Michael Snyder <msnyder@vmware.com>
9147 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9149 2011-02-28 Michael Snyder <msnyder@vmware.com>
9151 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9152 (cmd_qtframe): Ditto.
9153 (cmd_qtbuffer): Ditto.
9154 (cmd_bigqtbuffer): Ditto.
9156 * utils.c (decimal2str): Initialize 'width' to nine, then
9159 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9161 * hostio.c (require_data): Free *data, not data.
9163 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9165 * hostio.c (require_data): Use free, not xfree.
9167 2011-02-27 Michael Snyder <msnyder@vmware.com>
9169 * server.c (handle_query): Discard unused value.
9171 * hostio.c (require_data): Free malloc memory before returning
9174 2011-02-26 Michael Snyder <msnyder@vmware.com>
9176 * linux-low.c (list_threads): Call closedir for dirent.
9178 2011-02-27 Michael Snyder <msnyder@vmware.com>
9180 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9181 a case statement falls through.
9183 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9185 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9188 2011-02-26 Michael Snyder <msnyder@vmware.com>
9190 * utils.c (decimal2str): Eliminate dead code and dead param.
9191 (pulongest): Drop dead param from call to decimal2str.
9194 2011-02-24 Joel Brobecker <brobecker@adacore.com>
9196 Revert the following patch (not approved yet):
9197 2011-02-21 Hui Zhu <teawater@gmail.com>
9198 * tracepoint.c (tp_printf): New function.
9199 (eval_agent_expr): Handle gdb_agent_op_printf.
9201 2011-02-21 Hui Zhu <teawater@gmail.com>
9203 * tracepoint.c (tp_printf): New function.
9204 (eval_agent_expr): Handle gdb_agent_op_printf.
9206 2011-02-18 Tom Tromey <tromey@redhat.com>
9208 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9209 (tracepoint.o): Likewise.
9210 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9211 (gdb_agent_op_names): Likewise.
9213 2011-02-18 Tom Tromey <tromey@redhat.com>
9215 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9216 gdb_agent_op_rot>: New constants.
9217 (gdb_agent_op_names): Add pick and roll.
9218 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9221 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9223 * aclocal.m4: Regenerated with aclocal-1.11.1.
9225 2011-02-14 Pedro Alves <pedro@codesourcery.com>
9227 * server.c (handle_qxfer_traceframe_info): New.
9228 (qxfer_packets): Register "traceframe-info".
9229 (handle_query): Report support for qXfer:traceframe-info:read+.
9230 * tracepoint.c (match_blocktype): New.
9231 (traceframe_find_block_type): Rename to ...
9232 (traceframe_walk_blocks): ... this. Add callback filter argument,
9234 (traceframe_find_block_type): New, reimplemented on top of
9235 traceframe_walk_blocks.
9236 (build_traceframe_info_xml): New.
9237 (traceframe_read_info): New.
9238 * server.h (traceframe_read_info): Declare.
9240 2011-02-11 Yao Qi <yao@codesourcery.com>
9242 * configure.ac: Call AC_PROG_RANLIB.
9243 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9244 * configure: Regenerate.
9246 2011-02-07 Pedro Alves <pedro@codesourcery.com>
9248 * server.c (gdb_read_memory): Change return semantics to allow
9250 (handle_search_memory_1): Adjust.
9251 (process_serial_event) <'m' packet>: Handle partial transfers.
9252 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9254 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9256 * regcache.c (init_register_cache): Initialize
9257 regcache->register_status.
9258 (free_register_cache): Release regcache->register_status.
9259 (regcache_cpy): Copy register_status.
9260 (registers_to_string): Print 'x's for unavailable registers.
9261 (supply_register): Mark the register's status valid or
9262 unavailable, depending on whether a buffer was passed in or not.
9263 (supply_register_zeroed): New.
9264 (supply_regblock): Mark the registers' status valid or
9265 unavailable, depending on whether a buffer was passed in or not.
9266 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9267 (struct regcache): New `register_status' field.
9268 (supply_register_zeroed): Declare.
9269 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9270 supply_register_zeroed, rather than passing a NULL buffer to
9272 * tracepoint.c (fetch_traceframe_registers): Update comment.
9274 2011-01-28 Pedro Alves <pedro@codesourcery.com>
9276 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9279 2011-01-25 Pedro Alves <pedro@codesourcery.com>
9281 * server.h (decode_xfer_write): Change prototype.
9282 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9283 and don't extract the annex here.
9284 * server.c (decode_xfer_read): Remove `annex' parameter,
9285 and don't extract the annex here.
9287 (struct qxfer): New.
9288 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9289 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9290 (handle_qxfer_statictrace): New functions, abstracted out from
9291 handle_query, and made to use the struct qxfer interface.
9292 (handle_threads_qxfer_proper): Rename to ...
9293 (handle_qxfer_threads_proper): ... this.
9294 (handle_threads_qxfer): Rename to ...
9295 (handle_qxfer_threads): ... this. Adjust.
9296 (qxfer_packets): New array.
9297 (handle_qxfer): New function.
9298 (handle_query): Use handle_qxfer.
9300 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9302 * gdbreplay.c: Shorten lines of >= 80 columns.
9303 * linux-low.c: Ditto.
9304 * linux-ppc-low.c: Ditto.
9305 * linux-s390-low.c: Ditto.
9306 * linux-sparc-low.c: Ditto.
9307 * linux-x86-low.c: Ditto.
9308 * linux-xtensa-low.c: Ditto.
9309 * mem-break.c: Ditto.
9311 * regcache.h: Ditto.
9312 * remote-utils.c: Ditto.
9315 * thread-db.c: Ditto.
9316 * tracepoint.c: Ditto.
9318 * win32-low.h: Ditto.
9320 2011-01-05 Joel Brobecker <brobecker@adacore.com>
9322 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9325 2011-01-01 Joel Brobecker <brobecker@adacore.com>
9327 * server.c (gdbserver_version): Update copyright year in version
9329 * gdbreplay.c (gdbreplay_version): Ditto.
9331 2010-12-29 Jie Zhang <jie.zhang@analog.com>
9333 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9334 * linux-bfin-low.c: New file.
9335 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9336 PT_DATA_ADDR for BFIN targets.
9337 * Makefile.in (SFILES): Add linux-bfin-low.c.
9338 (clean): Remove reg-bfin.c.
9339 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9340 * README: Mention supported Blackfin targets.
9342 2010-12-23 Mike Frysinger <vapier@gentoo.org>
9344 * .gitignore: New file.
9346 2010-11-16 Mike Frysinger <vapier@gentoo.org>
9348 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9350 2010-10-22 Jie Zhang <jie@codesourcery.com>
9352 * Makefile.in: Add FLAGS_TO_PASS variable.
9353 (install): Remove dependency of install-only and recursively
9354 invoke make for install-only.
9356 2010-10-04 Doug Evans <dje@google.com>
9358 * Makefile.in (uninstall): Use $(DESTDIR).
9360 2010-09-24 Pedro Alves <pedro@codesourcery.com>
9364 * linux-x86-low.c (compat_siginfo_from_siginfo)
9365 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9366 si_code is < 0. Check for si_code == SI_TIMER before checking for
9369 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9371 * lynx-i386-low.c: New file.
9372 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9374 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9376 * lynx-low.c (ptrace_request_to_str): Remove handling for
9377 request values that have been removed in LynxOS 5.x.
9379 2010-09-13 Joel Brobecker <brobecker@adacore.com>
9381 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9384 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9386 * configure.ac: Add --enable-inprocess-agent option.
9387 * configure: Rebuilt.
9389 2010-09-06 Yao Qi <yao@codesourcery.com>
9391 * linux-low.c (linux_kill): Remove unused variable.
9392 (linux_stabilize_threads): Likewise.
9393 * server.c (start_inferior): Likewise.
9394 (queue_stop_reply_callback): Likewise.
9395 * tracepoint.c (do_action_at_tracepoint): Likewise.
9397 2010-09-06 Yao Qi <yao@codesourcery.com>
9399 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9402 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9404 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9406 2010-09-06 Pedro Alves <pedro@codesourcery.com>
9408 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9411 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9413 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9414 gdbserver/lynx-ppc-low.c: New files.
9415 * Makefile.in (lynx_low_h): New variable.
9416 (lynx-low.o, lynx-ppc-low.o): New rules.
9417 * configure.ac: On LynxOS, link with -lnetinet.
9418 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9419 * configure: regenerate.
9421 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9423 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9424 * configure.ac: Add check for vasprintf and vsnprintf.
9425 * configure, config.in: Regenerate.
9426 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9428 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9430 * gdbreplay.c: Move include of alloca.h up, next to include of
9432 * server.h: Add include of malloc.h.
9433 * mem-break.c: Remove include of malloc.h.
9434 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9436 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9438 * Makefile.in (memmem.o): Build with -Wno-error.
9440 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9442 * utils.c (xsnprintf): Make non-static.
9443 * server.h: Add xsnprintf declaration.
9444 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9445 replace calls to snprintf by calls to xsnprintf throughout.
9447 2010-09-01 Joel Brobecker <brobecker@adacore.com>
9449 * configure.ac: Add configure check for alloca.
9450 * configure, config.in: Regenerate.
9451 * server.h: Include alloca.h if it exists.
9452 * gdbreplay.c: Include alloca.h if it exists.
9454 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9456 * linux-low.c (__SIGRTMIN): Define if not already defined.
9457 (linux_create_inferior): Check for __ANDROID__ rather than
9459 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9460 are already deferred.
9461 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9462 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9463 stopped and already has a pending signal to report.
9464 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9465 a pending signal to report or is moving out of a jump pad.
9466 (linux_init_signals): Check for __ANDROID__ rather than
9469 2010-08-28 Pedro Alves <pedro@codesourcery.com>
9471 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9472 debug_threads check. Avoid a linear search when not doing debug
9475 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9477 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9478 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9479 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9480 (process_event): Change local fd's type to gdb_fildes_t.
9481 (create_file_handler): Adjust prototype.
9482 (delete_file_handler): Adjust prototype.
9483 (handle_file_event): Adjust prototype. Use pfildes.
9484 (create_file_event): Adjsut prototype.
9485 * remote-utils.c (remote_desc, listen_desc): Change type to
9487 * server.h: New gdb_fildes_t typedef.
9488 [USE_WIN32API]: Include winsock2.h.
9489 (delete_file_handler, add_file_handler): Adjust prototypes.
9491 * utils.c (pfildes): New.
9493 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9495 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9496 * configure: Regenerate.
9498 2010-08-27 Pedro Alves <pedro@codesourcery.com>
9500 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9501 (linux_done_accessing_memory): ... this.
9502 (linux_target_ops): Adjust.
9503 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9504 * nto-low.c (nto_target_ops): Adjust comment.
9505 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9506 * spu-low.c (spu_target_ops): Adjust comment.
9507 * target.h (target_ops): Rename unprepare_to_access_memory field
9508 to done_accessing_memory.
9509 (unprepare_to_access_memory): Rename to ...
9510 (done_accessing_memory): ... this.
9512 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9514 * linux-low.c (linux_prepare_to_access_memory): New.
9515 (linux_unprepare_to_access_memory): New.
9516 (linux_target_ops): Install them.
9517 * server.c (read_memory): Rename to ...
9518 (gdb_read_memory): ... this. Use
9519 prepare_to_access_memory/prepare_to_access_memory.
9520 (write_memory): Rename to ...
9521 (gdb_write_memory): ... this. Use
9522 prepare_to_access_memory/prepare_to_access_memory.
9523 (handle_search_memory_1): Adjust.
9524 (process_serial_event): Adjust.
9525 * target.h (struct target_ops): New fields
9526 prepare_to_access_memory and unprepare_to_access_memory.
9527 (prepare_to_access_memory, unprepare_to_access_memory): New.
9528 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9529 prepare_to_access_memory/prepare_to_access_memory.
9530 * nto-low.c (nto_target_ops): Adjust.
9531 * spu-low.c (spu_target_ops): Adjust.
9532 * win32-low.c (win32_target_ops): Adjust.
9534 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9536 * Makefile.in (WARN_CFLAGS): Get it from configure.
9537 (WERROR_CFLAGS): New.
9538 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9539 * configure.ac: Introduce --enable-werror, which adds -Werror to
9540 the compiler command line. Enabled by default. Disable with
9541 --disable-werror. Add -Wdeclaration-after-statement
9542 Wpointer-arith and -Wformat-nonliteral to warning flags.
9543 * configure: Regenerate.
9545 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9547 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9549 2010-08-26 Pedro Alves <pedro@codesourcery.com>
9551 * gdbreplay.c (remote_error): New.
9553 (expect): Use gdbchar. Check for error reading from GDB.
9554 Clarify sync error output.
9555 (play): Check for errors writing to GDB.
9556 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9557 * remote-utils.c (getpkt): Check for errors writing to the remote
9560 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9562 * linux-low.c (linux_wait_1): Move non-debugging code out of
9563 `debug_threads' control.
9565 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9567 * linux-low.c (linux_wait_1): Don't set last_status here.
9568 * server.c (push_event, queue_stop_reply_callback): Assert we're
9569 not pushing a TARGET_WAITKIND_IGNORE event.
9570 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9571 (myresume, handle_target_event): Set the thread's last_resume_kind
9572 and last_status from the target returned status.
9574 2010-08-25 Pedro Alves <pedro@codesourcery.com>
9578 * linux-x86-low.c (update_debug_registers_callback): New.
9579 (i386_dr_low_set_addr): Use it.
9580 (i386_dr_low_get_addr): New.
9581 (i386_dr_low_set_control): Use update_debug_registers_callback.
9582 (i386_dr_low_get_control): New.
9583 (i386_dr_low_get_status): Adjust.
9584 * linux-low.c (linux_stop_lwp): New.
9585 * linux-low.h (linux_stop_lwp): Declare.
9587 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9588 argument instead of a i386_debug_reg_state.
9589 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9590 a i386_debug_reg_state.
9591 (i386_insert_aligned_watchpoint): Adjust.
9592 (i386_remove_aligned_watchpoint): Adjust.
9593 (i386_low_stopped_data_address): Read the debug registers from the
9594 inferior instead of from the mirrors.
9595 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9596 (i386_dr_low_get_addr): Declare.
9597 (i386_dr_low_get_control): Declare.
9598 (i386_dr_low_get_status): Change prototype.
9600 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9601 (i386_dr_low_get_addr): New.
9602 (i386_dr_low_get_control): New.
9603 (i386_dr_low_get_status): Adjust prototype. Return
9605 (i386_initial_stuff): Clear dr_status_mirror and
9607 (i386_get_thread_context): Adjust.
9608 (i386_set_thread_context): Adjust.
9609 (i386_thread_added): Adjust.
9611 2010-08-24 Pedro Alves <pedro@codesourcery.com>
9613 * linux-low.h (linux_thread_area): Delete declaration.
9615 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9617 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9618 after its termination.
9620 2010-08-09 Pedro Alves <pedro@codesourcery.com>
9622 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9623 (gdb_wants_all_stopped): Delete.
9624 (linux_wait_1): Don't call them.
9625 * server.c (handle_v_cont): Tag all threads as want-stopped.
9626 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9627 stopped as "client-wants-stopped".
9629 2010-07-31 Pedro Alves <pedro@codesourcery.com>
9631 * Makefile.in (signals_h): New.
9632 (server_h): Depend on it.
9633 (server.o): Don't depend on $(signals_def).
9634 (signals.o): Depend on $(signals_def).
9636 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9638 * Makefile.in (signals_def): New.
9639 (server_h): Append include/gdb/signals.h and signals_def.
9640 (server.o): Append signals_def.
9642 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9644 * server.c (handle_target_event): Use target_signal_to_host for
9645 resume_info.sig initialization.
9646 * target.h (struct thread_resume) <sig>: New comment.
9648 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9650 * server.c (handle_query): strcpy() the returned string from paddress()
9651 instead of sprintf().
9652 * utils.c (paddress): Return phex_nz().
9654 2010-07-07 Joel Brobecker <brobecker@adacore.com>
9656 * server.c (handle_v_cont): Call mourn_inferior if process
9658 (myresume): Likewise.
9660 2010-07-01 Pedro Alves <pedro@codesourcery.com>
9662 Static tracepoints, and integration with UST.
9664 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9665 * mem-break.c (uninsert_all_breakpoints)
9666 (reinsert_all_breakpoints): New.
9667 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9668 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9669 (gdb_agent_ust_loaded, helper_thread_id)
9670 (gdb_agent_helper_thread_id): New macros.
9671 (struct ipa_sym_addresses): Add addr_ust_loaded,
9672 addr_helper_thread_id, addr_cmd_buf.
9673 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9674 (in_process_agent_loaded_ust): New.
9675 (write_e_ust_not_loaded): New.
9676 (maybe_write_ipa_ust_not_loaded): New.
9677 (struct collect_static_trace_data_action): New.
9678 (enum tracepoint_type) <static_tracepoint>: New.
9679 (struct tracepoint) <handle>: Mention static tracepoints.
9680 (struct static_tracepoint_ctx): New.
9681 (CMD_BUF_SIZE): New.
9682 (add_tracepoint_action): Handle static tracepoint actions.
9683 (unprobe_marker_at): New.
9684 (clear_installed_tracepoints): Handle static tracepoints.
9685 (cmd_qtdp): Handle static tracepoints.
9686 (probe_marker_at): New.
9687 (cmd_qtstart): Handle static tracepoints.
9688 (response_tracepoint): Handle static tracepoints.
9689 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9690 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9691 (get_context_regcache): Handle static tracepoints.
9692 (do_action_at_tracepoint): Handle static tracepoint actions.
9693 (traceframe_find_block_type): Handle static trace data blocks.
9694 (traceframe_read_sdata): New.
9695 (download_tracepoints): Download static tracepoint actions.
9696 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9697 (GDB_PROBE_NAME): New.
9702 (ust_marker_to_static_tracepoint): New.
9704 (collect_ust_data_at_tracepoint): New.
9705 (gdb_ust_probe): New.
9706 (UNIX_PATH_MAX, SOCK_DIR): New.
9707 (gdb_ust_connect_sync_socket): New.
9708 (resume_thread, stop_thread): New.
9709 (run_inferior_command): New.
9710 (init_named_socket): New.
9711 (gdb_ust_socket_init): New.
9712 (cstr_to_hexstr): New.
9714 (first_marker, next_marker): New.
9715 (response_ust_marker): New.
9716 (cmd_qtfstm, cmd_qtsstm): New.
9717 (unprobe_marker_at, probe_marker_at): New.
9718 (cmd_qtstmat, gdb_ust_thread): New.
9719 (gdb_ust_init): New.
9720 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9721 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9723 (x86_64_st_collect_regmap): New.
9724 (X86_64_NUM_ST_COLLECT_GREGS): New.
9725 (AMD64_RIP_REGNUM): New.
9726 (supply_static_tracepoint_registers): New.
9727 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9729 (i386_st_collect_regmap): New.
9730 (i386_NUM_ST_COLLECT_GREGS): New.
9731 (supply_static_tracepoint_registers): New.
9732 * server.c (handle_query): Handle qXfer:statictrace:read.
9733 <qSupported>: Report support for StaticTracepoints, and
9734 qXfer:statictrace:read features.
9735 * server.h (traceframe_read_sdata)
9736 (supply_static_tracepoint_registers): Declare.
9737 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9738 (unpack_varlen_hex): Include in IPA build.
9739 * Makefile.in (ustlibs, ustinc): New.
9740 (IPA_OBJS): Add remote-utils-ipa.o.
9741 ($(IPA_LIB)): Link -ldl and -lpthread.
9743 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9744 * config.in, configure: Regenerate.
9746 2010-06-20 Ian Lance Taylor <iant@google.com>
9747 Pedro Alves <pedro@codesourcery.com>
9749 * linux-x86-low.c (always_true): Delete.
9750 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9751 trying to fool the compiler with always_true.
9753 2010-06-20 Pedro Alves <pedro@codesourcery.com>
9755 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9756 conditions in gdbserver.
9758 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9760 * spu-low.c (spu_read_memory): Wrap around local store limit.
9761 (spu_write_memory): Likewise.
9763 2010-06-15 Pedro Alves <pedro@codesourcery.com>
9765 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9766 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9768 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9770 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9771 uses with LONGEST uses.
9773 2010-06-14 Stan Shebs <stan@codesourcery.com>
9774 Pedro Alves <pedro@codesourcery.com>
9778 * linux-x86-low.c: Include limits.h.
9783 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9784 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9785 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9786 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9787 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9788 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9789 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9790 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9791 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9792 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9793 (amd64_emit_void_call_2): New.
9794 (amd64_emit_ops): New.
9795 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9796 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9797 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9798 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9799 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9800 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9801 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9802 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9803 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9804 (i386_emit_stack_adjust, i386_emit_int_call_1)
9805 (i386_emit_void_call_2): New.
9806 (i386_emit_ops): New.
9807 (x86_emit_ops): New.
9808 (the_low_target): Install x86_emit_ops.
9809 * server.h (struct emit_ops): New.
9810 (get_raw_reg_func_addr): Declare.
9811 (current_insn_ptr, emit_error): Declare.
9812 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9813 (set_trace_state_variable_value): New defines.
9814 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9815 addr_get_trace_state_variable_value and
9816 addr_set_trace_state_variable_value.
9817 (symbol_list): New fields for get_raw_reg,
9818 get_trace_state_variable_value and set_trace_state_variable_value.
9819 (condfn): New typedef.
9820 (struct tracepoint): New field `compiled_cond'.
9821 (do_action_at_tracepoint): Clear compiled_cond.
9822 (get_trace_state_variable_value, set_trace_state_variable_value):
9824 (condition_true_at_tracepoint): If there's a compiled condition,
9826 (current_insn_ptr, emit_error): New globals.
9827 (struct bytecode_address): New.
9828 (get_raw_reg_func_addr): New.
9829 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9830 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9831 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9832 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9833 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9834 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9835 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9836 (compile_tracepoint_condition, compile_bytecodes): New.
9837 * target.h (emit_ops): Forward declare.
9838 (struct target_ops): New field emit_ops.
9839 (target_emit_ops): New.
9840 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9841 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9842 * linux-low.c (linux_emit_ops): New.
9843 (linux_target_ops): Install it.
9844 * linux-low.h (struct linux_target_ops): New field emit_ops.
9846 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9848 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9849 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9851 2010-06-01 Pedro Alves <pedro@codesourcery.com>
9852 Stan Shebs <stan@codesourcery.com>
9854 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9855 (all): Depend on $(extra_libraries).
9856 (install-only): Install the IPA.
9857 (IPA_OBJS, IPA_LIB): New.
9858 (clean): Remove the IPA lib.
9859 (IPAGENT_CFLAGS): New.
9860 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9861 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9862 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9863 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9864 * configure.ac: Check for atomic builtins support in the compiler.
9865 (IPA_DEPFILES, extra_libraries): Define.
9866 * configure.srv (ipa_obj): Add description.
9867 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9868 (i[34567]86-*-linux*): Set ipa_obj.
9869 (x86_64-*-linux*): Set ipa_obj.
9870 * linux-low.c (stabilizing_threads): New.
9871 (supports_fast_tracepoints): New.
9872 (linux_detach): Stabilize threads before detaching.
9873 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9874 the lwp is either not stabilizing, or is moving out of a jump pad.
9875 (linux_fast_tracepoint_collecting): New.
9876 (maybe_move_out_of_jump_pad): New.
9877 (enqueue_one_deferred_signal): New.
9878 (dequeue_one_deferred_signal): New.
9879 (linux_wait_for_event_1): If moving out of a jump pad, defer
9880 pending signals to later.
9881 (linux_stabilize_threads): New.
9882 (linux_wait_1): Check if threads need moving out of jump pads, and
9884 (stuck_in_jump_pad_callback): New.
9885 (move_out_of_jump_pad_callback): New.
9887 (linux_resume_one_lwp): Handle moving out of jump pads.
9888 (linux_set_resume_request): Dequeue deferred signals.
9889 (need_step_over_p): Also step over fast tracepoint jumps.
9890 (start_step_over): Also uninsert fast tracepoint jumps.
9891 (finish_step_over): Also reinsert fast tracepoint jumps.
9892 (linux_install_fast_tracepoint_jump): New.
9893 (linux_target_ops): Install linux_stabilize_threads and
9894 linux_install_fast_tracepoint_jump_pad.
9895 * linux-low.h (linux_target_ops) <get_thread_area,
9896 install_fast_tracepoint_jump_pad>: New fields.
9897 (struct lwp_info) <collecting_fast_tracepoint,
9898 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9899 (linux_get_thread_area): Declare.
9900 * linux-x86-low.c (jump_insn): New.
9901 (x86_get_thread_area): New.
9902 (append_insns): New.
9904 (amd64_install_fast_tracepoint_jump_pad): New.
9905 (i386_install_fast_tracepoint_jump_pad): New.
9906 (x86_install_fast_tracepoint_jump_pad): New.
9907 (the_low_target): Install x86_get_thread_area and
9908 x86_install_fast_tracepoint_jump_pad.
9909 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9910 (struct fast_tracepoint_jump): New.
9911 (fast_tracepoint_jump_insn): New.
9912 (fast_tracepoint_jump_shadow): New.
9913 (find_fast_tracepoint_jump_at): New.
9914 (fast_tracepoint_jump_here): New.
9915 (delete_fast_tracepoint_jump): New.
9916 (set_fast_tracepoint_jump): New.
9917 (uninsert_fast_tracepoint_jumps_at): New.
9918 (reinsert_fast_tracepoint_jumps_at): New.
9919 (set_breakpoint_at): Use write_inferior_memory.
9920 (uninsert_raw_breakpoint): Use write_inferior_memory.
9921 (check_mem_read): Mask out fast tracepoint jumps.
9922 (check_mem_write): Mask out fast tracepoint jumps.
9923 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9924 (set_fast_tracepoint_jump): Declare.
9925 (delete_fast_tracepoint_jump)
9926 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9927 (reinsert_fast_tracepoint_jumps_at): Declare.
9928 * regcache.c: Don't compile many functions when building the
9929 in-process agent library.
9930 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9931 the register buffer in the heap.
9932 (free_register_cache): If the register buffer isn't owned by the
9933 regcache, don't free it.
9934 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9935 pre-existing register caches.
9936 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9938 (convert_ascii_to_int): : Constify `from' parameter type.
9939 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9940 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9941 the needed buffer in-place.
9942 (relocate_instruction): New.
9943 * server.c (handle_query) <qSymbols>: If the target supports
9944 tracepoints, give it a chance of looking up symbols. Report
9945 support for fast tracepoints.
9946 (handle_status): Stabilize threads.
9947 (process_serial_event): Adjust.
9948 * server.h (struct fast_tracepoint_jump): Forward declare.
9949 (struct process_info) <fast_tracepoint_jumps>: New field.
9950 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9951 (decode_X_packet, decode_M_packet): Adjust.
9952 (relocate_instruction): Declare.
9953 (in_process_agent_loaded): Declare.
9954 (tracepoint_look_up_symbols): Declare.
9955 (struct fast_tpoint_collect_status): Declare.
9956 (fast_tracepoint_collecting): Declare.
9957 (force_unlock_trace_buffer): Declare.
9958 (handle_tracepoint_bkpts): Declare.
9959 (initialize_low_tracepoint)
9960 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9961 * target.h (struct target_ops) <stabilize_threads,
9962 install_fast_tracepoint_jump_pad>: New fields.
9963 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9964 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9965 [HAVE_STDINT_H]: Include stdint.h.
9966 (trace_debug_1): Rename to ...
9967 (trace_vdebug): ... this.
9968 (trace_debug): Rename to ...
9969 (trace_debug_1): ... this. Add `level' parameter.
9971 (ATTR_USED, ATTR_NOINLINE): New.
9972 (IP_AGENT_EXPORT): New.
9973 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9974 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9975 (about_to_request_buffer_space, trace_buffer_is_full)
9976 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9977 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9978 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9979 (traceframe_write_count, traceframes_created)
9980 (trace_state_variables)
9981 New renaming defines.
9982 (struct ipa_sym_addresses): New.
9983 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9985 (ipa_sym_addrs): New.
9986 (all_tracepoint_symbols_looked_up): New.
9987 (in_process_agent_loaded): New.
9988 (write_e_ipa_not_loaded): New.
9989 (maybe_write_ipa_not_loaded): New.
9990 (tracepoint_look_up_symbols): New.
9991 (debug_threads) [IN_PROCESS_AGENT]: New.
9992 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9993 (UNKNOWN_SIDE_EFFECTS): New.
9994 (stop_tracing): New.
9995 (flush_trace_buffer): New.
9996 (stop_tracing_bkpt): New.
9997 (flush_trace_buffer_bkpt): New.
9998 (read_inferior_integer): New.
9999 (read_inferior_uinteger): New.
10000 (read_inferior_data_pointer): New.
10001 (write_inferior_data_pointer): New.
10002 (write_inferior_integer): New.
10003 (write_inferior_uinteger): New.
10004 (struct collect_static_trace_data_action): Delete.
10005 (enum tracepoint_type): New.
10006 (struct tracepoint) <type>: New field `type'.
10007 <actions_str, step_actions, step_actions_str>: Only include in
10009 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10010 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10011 (tracepoints): Use IP_AGENT_EXPORT.
10012 (last_tracepoint): Don't include in the IPA.
10013 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10014 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10015 (alloced_trace_state_variables): New.
10016 (trace_state_variables): Use IP_AGENT_EXPORT.
10017 (traceframe_t): Delete unused variable.
10018 (circular_trace_buffer): Don't include in the IPA.
10019 (trace_buffer_start): Delete.
10020 (struct trace_buffer_control): New.
10021 (trace_buffer_free): Delete.
10022 (struct ipa_trace_buffer_control): New.
10023 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10024 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10026 (trace_buffer_ctrl): New.
10027 (TRACE_BUFFER_CTRL_CURR): New.
10028 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10029 Reimplement as macros.
10030 (trace_buffer_wrap): Delete.
10031 (traceframe_write_count, traceframe_read_count)
10032 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10033 (struct tracepoint_hit_ctx) <type>: New field.
10034 (struct fast_tracepoint_ctx): New.
10035 (memory_barrier): New.
10037 (record_tracepoint_error): Update atomically in the IPA.
10038 (clear_inferior_trace_buffer): New.
10039 (about_to_request_buffer_space): New.
10040 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10041 updating the same buffer.
10042 (add_tracepoint): Default the tracepoint's type to trap
10043 tracepoint, and orig_size to -1.
10044 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10045 internal variables.
10046 (create_trace_state_variable): New parameter `gdb'. Handle it.
10047 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10048 (cmd_qtdp): Handle fast tracepoints.
10049 (cmd_qtdv): Adjust.
10050 (max_jump_pad_size): New.
10051 (gdb_jump_pad_head): New.
10052 (get_jump_space_head): New.
10053 (claim_jump_space): New.
10054 (sort_tracepoints): New.
10055 (MAX_JUMP_SIZE): New.
10056 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10058 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10059 support. Upload fast traceframes, and delete internal IPA
10061 (stop_tracing_handler): New.
10062 (flush_trace_buffer_handler): New.
10063 (cmd_qtstop): Upload fast tracepoints.
10064 (response_tracepoint): Handle fast tracepoints.
10065 (tracepoint_finished_step): Upload fast traceframes. Set the
10066 tracepoint hit context's tracepoint type.
10067 (handle_tracepoint_bkpts): New.
10068 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10069 type. Add comment about fast tracepoints.
10070 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10071 non-existing action_str field.
10072 (get_context_regcache): Handle fast tracepoints.
10073 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10075 (fast_tracepoint_from_jump_pad_address): New.
10076 (fast_tracepoint_from_ipa_tpoint_address): New.
10077 (collecting_t): New.
10078 (force_unlock_trace_buffer): New.
10079 (fast_tracepoint_collecting): New.
10081 (gdb_collect): New.
10082 (write_inferior_data_ptr): New.
10083 (target_tp_heap): New.
10084 (target_malloc): New.
10085 (download_agent_expr): New.
10087 (download_tracepoints): New.
10088 (download_trace_state_variables): New.
10089 (upload_fast_traceframes): New.
10090 (IPA_FIRST_TRACEFRAME): New.
10091 (IPA_NEXT_TRACEFRAME_1): New.
10092 (IPA_NEXT_TRACEFRAME): New.
10093 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10094 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10095 (gdb_jump_pad_buffer_end): New.
10096 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10097 (initialize_tracepoint): Adjust.
10098 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10099 buffer. Initialize the low module.
10100 * utils.c (PREFIX, TOOLNAME): New.
10101 (malloc_failure): Use PREFIX.
10102 (error): In the IPA, an error causes an exit.
10103 (fatal, warning): Use PREFIX.
10104 (internal_error): Use TOOLNAME.
10105 (NUMCELLS): Increase to 10.
10106 * configure, config.in: Regenerate.
10108 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10110 * server.c (handle_query) <qSupported>: Do two passes over the
10111 qSupported string to avoid nesting strtok.
10113 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10115 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10117 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10118 -Wl,--dynamic-list.
10119 * configure: Regenerate.
10120 * proc-service.list: New.
10122 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10124 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10127 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10129 * gdbreplay.c (remote_open): Check error return from socket() call by
10130 its equality to -1 not by it being negative.
10131 * remote-utils.c (remote_open): Likewise.
10133 2010-05-23 Pedro Alves <pedro@codesourcery.com>
10135 * config.h: Regenerate.
10137 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10139 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10140 doesn't provide PTRACE_GET_THREAD_AREA.
10142 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10144 * linux-m68k-low.c: Include <asm/ptrace.h>
10145 (ps_get_thread_area): Implement.
10147 2010-05-03 Doug Evans <dje@google.com>
10149 * event-loop.c (struct callback_event): New struct.
10150 (callback_list): New global.
10151 (append_callback_event, delete_callback_event): New functions.
10152 (process_callback): New function.
10153 (start_event_loop): Call it.
10154 * remote-utils.c (NOT_SCHEDULED): Define.
10155 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10156 moved out of readchar.
10157 (readchar): Rewrite. Call reschedule before returning.
10158 (reset_readchar): New function.
10159 (remote_close): Call it.
10160 (process_remaining, reschedule): New functions.
10161 * server.h (callback_handler_func): New typedef.
10162 (append_callback_event, delete_callback_event): Declare.
10164 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10166 * proc-service.c (ps_pglobal_lookup): Use
10167 thread_db_look_up_one_symbol.
10168 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10169 parameter. Use it instead of all_symbols_looked_up.
10170 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10172 (all_symbols_looked_up): Don't declare.
10173 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10174 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10176 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10177 Set all_symbols_looked_up here.
10178 (thread_db_look_up_one_symbol): New.
10179 (thread_db_get_tls_address): Adjust.
10180 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10181 thread_db object on the heap, and tentatively set it in the
10183 (thread_db_init): Don't set all_symbols_looked_up here.
10184 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10186 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10188 * linux-low.c (linux_kill, linux_detach): Adjust.
10189 (status_pending_p_callback): Remove redundant statement. Check
10190 for !TARGET_WAITIKIND_IGNORE, instead of
10191 TARGET_WAITKIND_STOPPED.
10192 (handle_tracepoints): Make sure LWP is locked. Adjust.
10193 (linux_wait_for_event_1): Adjust.
10194 (linux_cancel_breakpoints): New.
10195 (unsuspend_one_lwp): New.
10196 (unsuspend_all_lwps): New.
10197 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10198 (send_sigstop_callback): Change return type to int, add new
10199 `except' parameter and handle it.
10200 (suspend_and_send_sigstop_callback): New.
10201 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10202 pass them down. If SUSPEND, also increment the lwp's suspend
10204 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10205 (need_step_over_p): Don't consider suspended LWPs.
10206 (start_step_over): Adjust.
10207 (proceed_one_lwp): Change return type to int, add new `except'
10208 parameter and handle it.
10209 (unsuspend_and_proceed_one_lwp): New.
10210 (proceed_all_lwps): Use find_inferior instead of
10212 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10213 also decrement the suspend count of LWPs. Pass `except' down,
10214 instead of hacking its suspend count.
10215 (linux_pause_all): Add `freeze' parameter. Adjust.
10216 (linux_unpause_all): New.
10217 (linux_target_ops): Install linux_unpause_all.
10218 * server.c (handle_status): Adjust.
10219 * target.h (struct target_ops): New fields `unpause_all' and
10220 `cancel_breakpoints'. Add new parameter to `pause_all'.
10221 (pause_all): Add new `freeze' parameter.
10222 (unpause_all): New.
10223 (cancel_breakpoints): New.
10224 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10225 cancel breakpoints.
10226 (cmd_qtstart): Pause threads.
10227 (stop_tracing): Pause threads, and cancel breakpoints.
10228 * win32-low.c (win32_target_ops): Adjust.
10230 2010-05-03 Pedro Alves <pedro@codesourcery.com>
10232 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10233 the inferior right away from here...
10234 (linux_wait_1): ... to here, and adjust to check the thread's
10235 last_resume_kind instead of the lwp's step or stop_expected flags.
10237 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10239 * README: Use consistent `GDB' and `GDBserver' spellings.
10241 2010-05-02 Pedro Alves <pedro@codesourcery.com>
10243 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10244 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10245 (linux_detach_one_lwp): Assume the lwp is stopped.
10246 (any_thread_of): Delete.
10247 (linux_detach): Stop all lwps here. Don't blindly delete all
10249 (delete_lwp_callback): New.
10250 (linux_mourn): Delete all lwps of the process that is gone.
10251 (linux_wait_1): Don't delete the last lwp of the process here.
10252 * mem-break.h (mark_breakpoints_out): Declare.
10253 * mem-break.c (mark_breakpoints_out): New.
10254 (free_all_breakpoints): Use it.
10255 * server.c (handle_target_event): If the process is gone, mark
10257 * thread-db.c (struct thread_db) <create_bp>: New field.
10258 (thread_db_enable_reporting): Fix prototype. Store a thread event
10259 breakpoint reference in the thread_db struct.
10260 (thread_db_load_search): Clear the thread_db object.
10261 (try_thread_db_load_1): Ditto.
10262 (switch_to_process): New.
10263 (disable_thread_event_reporting): Use it.
10264 (remove_thread_event_breakpoints): New.
10265 (thread_db_detach, thread_db_mourn): Use it.
10267 2010-05-01 Pedro Alves <pedro@codesourcery.com>
10269 * linux-low.c (linux_enable_event_reporting): New.
10270 (linux_wait_for_event_1, handle_extended_wait): Use it.
10272 2010-04-30 Pedro Alves <pedro@codesourcery.com>
10274 * linux-low.c (linux_kill_one_lwp, linux_kill)
10275 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10276 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10277 SIGSTOP even if the LWP is stopped.
10278 (send_sigstop_callback): New.
10279 (stop_all_lwps): Use send_sigstop_callback instead.
10280 (linux_resume_one_thread): Adjust.
10281 (proceed_one_lwp): Still proceed an LWP that the client has
10282 requested to stop, if we haven't reported it as stopped yet. Make
10283 sure that LWPs the client want stopped, have a pending SIGSTOP.
10285 2010-04-26 Doug Evans <dje@google.com>
10287 * server.c (handle_general_set): Make static.
10289 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10290 Print received char after testing for error/eof instead of before.
10291 (input_interrupt): Tweak comment.
10293 2010-04-23 Doug Evans <dje@google.com>
10295 * server.c (start_inferior): Print inferior argv if --debug.
10297 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10299 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10300 * nto-x86-low.c: Include server.h
10302 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10304 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10305 be consistent with other sources of this directory.
10306 (init_registers_amd64): Correct name of source file of this function
10309 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10311 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10312 64-bit executables.
10314 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10316 * win32-i386-low.c: Add 64-bit support.
10317 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10318 (init_registers_amd64): Declare.
10319 (mappings): Add 64-bit version of array.
10320 (init_windows_x86): New function.
10321 (the_low_target): Change init_arch field to init_windows_x86.
10323 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10325 * win32-low.c: Adapt to support also 64-bit architecture.
10326 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10327 (get_image_name): Use SIZE_T type for local variable `done'.
10328 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10329 (toolhelp_get_dll_name): Idem.
10330 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10331 Use uintptr_t typecast to avoid warning.
10332 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10333 (handle_exception): Use phex_nz to avoid warning.
10334 (win32_wait): Remove unused local variable `process'.
10336 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10338 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10341 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10343 * configure.ac: Use `ws2_32' library for srv_mingw.
10344 * configure: Regenerate.
10345 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10346 * remote-utils.c: Likewise.
10348 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10350 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10351 if __x86_64__ is defined.
10353 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10355 * configure: Regenerate.
10357 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10359 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10360 * target.h (target_ops): New get_tib_address field.
10361 * win32-low.h (win32_thread_info): Add thread_local_base field.
10362 * win32-low.c (child_add_thread): Add tlb argument.
10363 Set thread_local_base field to TLB.
10364 (get_child_debug_event): Adapt to child_add_thread change.
10365 (win32_get_tib_address): New function.
10366 (win32_target_ops): Set get_tib_address field to
10367 win32_get_tib_address.
10368 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10370 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10372 * linux-low.c (linux_mourn): Also remove the process.
10373 * server.c (handle_target_event): Don't remove the process here.
10374 * nto-low.c (nto_mourn): New.
10375 (nto_target_ops): Install it.
10376 * spu-low.c (spu_mourn): New.
10377 (spu_target_ops): Install it.
10378 * win32-low.c (win32_mourn): New.
10379 (win32_target_ops): Install it.
10381 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10383 * server.h (buffer_xml_printf): Remove redundant `;'.
10385 2010-04-12 Pedro Alves <pedro@codesourcery.com>
10387 * regcache.c (set_register_cache): Invalidate regcaches before
10388 changing the register cache layout.
10389 (regcache_invalidate_one): Allow a NULL regcache.
10390 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10391 regcaches before changing the register cache layout or the target
10394 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10396 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10397 variable warning on Linux/x86-64.
10399 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10401 GDBserver disconnected tracing support.
10403 * linux-low.c (linux_remove_process): Delete.
10404 (add_lwp): Don't set last_resume_kind here.
10405 (linux_kill): Use `mourn'.
10406 (linux_detach): Use `thread_db_detach', and `mourn'.
10407 (linux_mourn): New.
10408 (linux_attach_lwp_1): Adjust comment.
10409 (linux_attach): last_resume_kind moved the thread_info; adjust.
10410 (status_pending_p_callback): Adjust.
10411 (linux_wait_for_event_1): Adjust.
10412 (count_events_callback, select_singlestep_lwp_callback)
10413 (select_event_lwp_callback, cancel_breakpoints_callback)
10414 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10415 (proceed_one_lwp): Adjust.
10416 (linux_async): Add debug output.
10417 (linux_thread_stopped): New.
10418 (linux_pause_all): New.
10419 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10421 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10422 (thread_db_free): Delete declaration.
10423 (thread_db_detach, thread_db_mourn): Declare.
10424 * thread-db.c (thread_db_init): Use thread_db_mourn.
10425 (thread_db_free): Delete, split in two.
10426 (disable_thread_event_reporting): New.
10427 (thread_db_detach): New.
10428 (thread_db_mourn): New.
10430 * server.h (struct thread_info) <last_resume_kind>: New field.
10431 <attached>: Add comment.
10432 <gdb_detached>: New field.
10433 (handler_func): Change return type to int.
10434 (handle_serial_event, handle_target_event): Ditto.
10435 (gdb_connected): Declare.
10437 (disconnected_tracing): Declare.
10438 (stop_tracing): Declare.
10440 * server.c (handle_query) <qSupported>: Report support for
10441 disconnected tracing.
10442 (queue_stop_reply_callback): Account for running threads.
10443 (gdb_wants_thread_stopped): New.
10444 (gdb_wants_all_threads_stopped): New.
10445 (gdb_reattached_process): New.
10446 (handle_status): Clear the `gdb_detached' flag of all processes.
10447 In all-stop, stop all threads.
10448 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10449 (process_serial_event): If the remote connection breaks, or if an
10450 exit was forced with "monitor exit", force an event loop exit.
10451 Handle disconnected tracing on detach.
10452 (handle_serial_event): Adjust.
10453 (handle_target_event): If GDB isn't connected, forward events back
10454 to the inferior, unless the last process exited, in which case,
10455 exit gdbserver. Adjust interface.
10457 * remote-utils.c (remote_open): Don't block in accept. Instead
10458 register an event loop source on the listen socket file
10459 descriptor. Refactor bits into ...
10460 (listen_desc): ... this new global.
10461 (gdb_connected): ... this new function.
10462 (enable_async_notification): ... this new function.
10463 (handle_accept_event): ... this new function.
10464 (remote_close): Clear remote_desc.
10466 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10468 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10470 (mourn_inferior): Define.
10471 (target_process_qsupported): Avoid the dangling else problem.
10472 (thread_stopped): Define.
10473 (pause_all): Define.
10474 (target_waitstatus_to_string): Declare.
10475 * target.c (target_waitstatus_to_string): New.
10477 * tracepoint.c (tracing): Make extern.
10478 (disconnected_tracing): New.
10479 (stop_tracing): Make extern. Handle tracing stops due to GDB
10481 (cmd_qtdisconnected): New.
10482 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10483 (handle_tracepoint_general_set): Handle QTDisconnected.
10485 * event-loop.c (event_handler_func): Change return type to int.
10486 (process_event): Bail out if the event handler wants the event
10488 (handle_file_event): Ditto.
10489 (start_event_loop): Bail out if the event handler wants the event
10492 * nto-low.c (nto_target_ops): Adjust.
10493 * spu-low.c (spu_wait): Don't remove the process here.
10494 (spu_target_ops): Adjust.
10495 * win32-low.c (win32_wait): Don't remove the process here.
10496 (win32_target_ops): Adjust.
10498 2010-04-11 Pedro Alves <pedro@codesourcery.com>
10500 * regcache.c (realloc_register_cache): Invalidate inferior's
10501 regcache before recreating it.
10503 2010-04-09 Pedro Alves <pedro@codesourcery.com>
10505 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10507 2010-04-09 Stan Shebs <stan@codesourcery.com>
10508 Pedro Alves <pedro@codesourcery.com>
10510 * server.h (LONGEST): New.
10511 (struct thread_info) <while_stepping>: New field.
10512 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10514 (initialize_tracepoint, handle_tracepoint_general_set)
10515 (handle_tracepoint_query, tracepoint_finished_step)
10516 (tracepoint_was_hit, release_while_stepping_state_list):
10517 (current_traceframe): Declare.
10518 * server.c (handle_general_set): Handle tracepoint packets.
10519 (read_memory): New.
10520 (write_memory): New.
10521 (handle_search_memory_1): Use read_memory.
10522 (handle_query): Report support for conditional tracepoints, trace
10523 state variables, and tracepoint sources. Handle tracepoint
10525 (main): Initialize the tracepoints module.
10526 (process_serial_event): Handle traceframe reads/writes.
10528 * linux-low.c (handle_tracepoints): New.
10529 (linux_wait_1): Call it.
10530 (linux_resume_one_lwp): Handle while-stepping.
10531 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10532 (linux_target_ops): Install them.
10533 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10535 * linux-x86-low.c (x86_supports_tracepoints): New.
10536 (the_low_target). Install it.
10538 * mem-break.h (delete_breakpoint): Declare.
10539 * mem-break.c (delete_breakpoint): Make external.
10541 * target.h (struct target_ops): Add `supports_tracepoints',
10542 `read_pc', and `write_pc' fields.
10543 (target_supports_tracepoints): Define.
10544 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10547 * regcache.h (struct regcache) <registers_owned>: New field.
10548 (init_register_cache, regcache_cpy): Declare.
10549 (regcache_read_pc, regcache_write_pc): Declare.
10550 (register_cache_size): Declare.
10551 (supply_regblock): Declare.
10552 * regcache.c (init_register_cache): New.
10553 (new_register_cache): Use it.
10554 (regcache_cpy): New.
10555 (register_cache_size): New.
10556 (supply_regblock): New.
10557 (regcache_read_pc, regcache_write_pc): New.
10559 * tracepoint.c: New.
10561 * Makefile.in (OBS): Add tracepoint.o.
10562 (tracepoint.o): New rule.
10564 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10566 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10568 (i386-mmx.c): Likewise.
10569 (i386-mmx-linux.o): Likewise.
10570 (i386-mmx-linux.c): Likewise.
10572 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10573 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10574 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10575 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10577 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10578 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10579 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10581 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10583 * Makefile.in (clean): Updated.
10585 (i386-avx.c): Likewise.
10586 (i386-avx-linux.o): Likewise.
10587 (i386-avx-linux.c): Likewise.
10588 (amd64-avx.o): Likewise.
10589 (amd64-avx.c): Likewise.
10590 (amd64-avx-linux.o): Likewise.
10591 (amd64-avx-linux.c): Likewise.
10593 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10594 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10595 (srv_amd64_regobj): Add amd64-avx.o.
10596 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10597 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10598 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10599 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10600 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10601 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10602 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10604 * i387-fp.c: Include "i386-xstate.h".
10606 (i387_cache_to_xsave): Likewise.
10607 (i387_xsave_to_cache): Likewise.
10608 (x86_xcr0): Likewise.
10610 * i387-fp.h (i387_cache_to_xsave): Likewise.
10611 (i387_xsave_to_cache): Likewise.
10612 (x86_xcr0): Likewise.
10614 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10615 * linux-crisv32-low.c (target_regsets): Likewise.
10616 * linux-m68k-low.c (target_regsets): Likewise.
10617 * linux-mips-low.c (target_regsets): Likewise.
10618 * linux-ppc-low.c (target_regsets): Likewise.
10619 * linux-s390-low.c (target_regsets): Likewise.
10620 * linux-sh-low.c (target_regsets): Likewise.
10621 * linux-sparc-low.c (target_regsets): Likewise.
10622 * linux-xtensa-low.c (target_regsets): Likewise.
10624 * linux-low.c: Include <sys/uio.h>.
10625 (regsets_fetch_inferior_registers): Support nt_type.
10626 (regsets_store_inferior_registers): Likewise.
10627 (linux_process_qsupported): New.
10628 (linux_target_ops): Add linux_process_qsupported.
10630 * linux-low.h (regset_info): Add nt_type.
10631 (linux_target_ops): Add process_qsupported.
10633 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10635 (init_registers_i386_avx_linux): New.
10636 (init_registers_amd64_avx_linux): Likewise.
10637 (xmltarget_i386_linux_no_xml): Likewise.
10638 (xmltarget_amd64_linux_no_xml): Likewise.
10639 (PTRACE_GETREGSET): Likewise.
10640 (PTRACE_SETREGSET): Likewise.
10641 (x86_fill_xstateregset): Likewise.
10642 (x86_store_xstateregset): Likewise.
10643 (use_xml): Likewise.
10644 (x86_linux_update_xmltarget): Likewise.
10645 (x86_linux_process_qsupported): Likewise.
10646 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10647 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10648 init_registers_i386_linux here. Call
10649 x86_linux_update_xmltarget.
10650 (the_low_target): Add x86_linux_process_qsupported.
10652 * server.c (handle_query): Call target_process_qsupported.
10654 * target.h (target_ops): Add process_qsupported.
10655 (target_process_qsupported): New.
10657 2010-04-03 Pedro Alves <pedro@codesourcery.com>
10659 * inferiors.c (add_thread): Set last_status kind to
10660 TARGET_WAITKIND_IGNORE.
10661 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10662 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10663 (linux_wait_1): Move `thread' local definition to block that uses
10664 it. Don't NULL initialize `event_child'.
10665 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10666 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10667 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10669 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10671 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10672 an extended waitstatus, or by a watchpoint.
10673 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10674 thread was stepping or has been stopped by a watchpoint.
10676 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10678 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10679 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10680 of another, then delete the previous, and validate all
10682 (validate_inserted_breakpoint): New.
10683 (delete_disabled_breakpoints): New.
10684 (validate_breakpoints): New.
10685 (check_mem_read): Validate breakpoints before trusting their
10686 shadow. Delete disabled breakpoints.
10687 (check_mem_write): Validate breakpoints before trusting they
10688 should be inserted. Delete disabled breakpoints.
10689 * mem-break.h (validate_breakpoints):
10690 * server.c (handle_query): Validate breakpoints when we see a
10693 2010-04-01 Pedro Alves <pedro@codesourcery.com>
10695 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10696 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10697 if we could tell there's a GDB breakpoint at stop_pc.
10698 (need_step_over_p): Don't do a step over if we find a GDB
10699 breakpoint at the resume PC.
10701 * mem-break.c (struct raw_breakpoint): New.
10702 (enum bkpt_type): New type `gdb_breakpoint'.
10703 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10704 fields. New field `raw'.
10705 (find_raw_breakpoint_at): New.
10706 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10707 breakpoint instead.
10708 (set_breakpoint_at): Adjust.
10709 (delete_raw_breakpoint): New.
10710 (release_breakpoint): New.
10711 (delete_breakpoint): Rename to...
10712 (delete_breakpoint_1): ... this. Add proc parameter. Use
10713 release_breakpoint. Return ENOENT.
10714 (delete_breakpoint): Reimplement.
10715 (find_breakpoint_at): Delete.
10716 (find_gdb_breakpoint_at): New.
10717 (delete_breakpoint_at): Delete.
10718 (set_gdb_breakpoint_at): New.
10719 (delete_gdb_breakpoint_at): New.
10720 (gdb_breakpoint_here): New.
10721 (set_reinsert_breakpoint): Use release_breakpoint.
10722 (uninsert_breakpoint): Rename to ...
10723 (uninsert_raw_breakpoint): ... this.
10724 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10725 (reinsert_raw_breakpoint): Change parameter type to
10727 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10729 (check_breakpoints): Adjust. Use release_breakpoint.
10730 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10731 (breakpoint_inserted_here): Ditto.
10732 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10733 Don't trust the breakpoint's shadow if it is not inserted.
10734 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10735 (delete_all_breakpoints): Adjust.
10736 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10737 use delete_breakpoint_1.
10739 * mem-break.h (breakpoints_supported): Delete declaration.
10740 (set_gdb_breakpoint_at): Declare.
10741 (gdb_breakpoint_here): Declare.
10742 (delete_breakpoint_at): Delete.
10743 (delete_gdb_breakpoint_at): Declare.
10745 * server.h (struct raw_breakpoint): Forward declare.
10746 (struct process_info): New field `raw_breakpoints'.
10748 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10751 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10753 * linux-low.c (status_pending_p_callback): Fix comment.
10754 (linux_wait_for_event_1): Move most of the internal breakpoint
10755 handling from here...
10756 (linux_wait_1): ... to here.
10757 (count_events_callback): New.
10758 (select_singlestep_lwp_callback): New.
10759 (select_event_lwp_callback): New.
10760 (cancel_breakpoints_callback): New.
10761 (select_event_lwp): New.
10762 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10763 priority to all LWPs that have had events that should be reported
10764 to the client. Cancel breakpoints when about to reporting the
10765 event to the client, not while stopping lwps. No longer cancel
10766 finished single-steps here.
10767 (cancel_finished_single_step): Delete.
10768 (cancel_finished_single_steps): Delete.
10770 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10772 * mem-break.c (enum bkpt_type): New.
10773 (struct breakpoint): New field `type'.
10774 (set_breakpoint_at): Change return type to struct breakpoint
10775 pointer. Set type to `other_breakpoint' by default.
10776 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10777 in the breakpoint list.
10778 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10779 (reinsert_breakpoint): Rename to ...
10780 (reinsert_raw_breakpoint): ... this.
10781 (reinsert_breakpoints_at): Adjust.
10782 * mem-break.h (struct breakpoint): Declare.
10783 (set_breakpoint_at): Change return type to struct breakpoint
10786 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10788 * server.c (handle_query): Assign, not compare.
10790 2010-03-24 Pedro Alves <pedro@codesourcery.com>
10792 Teach linux gdbserver to step-over-breakpoints.
10794 * linux-low.c (can_hardware_single_step): New.
10795 (supports_breakpoints): New.
10796 (handle_extended_wait): If stopping threads, read the stop pc of
10797 the new cloned LWP.
10799 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10800 low target doesn't support retrieving the PC.
10801 (add_lwp): Set last_resume_kind to resume_continue.
10802 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10803 (linux_attach): Don't clear stop_expected. Set the lwp's
10804 last_resume_kind to resume_stop.
10805 (linux_detach_one_lwp): Don't check for removed breakpoints.
10806 (check_removed_breakpoint): Delete.
10807 (status_pending_p): Rename to ...
10808 (status_pending_p_callback): ... this. Don't check for removed
10809 breakpoints. Don't consider threads that are stopped from GDB's
10811 (linux_wait_for_lwp): Always read the stop_pc here.
10812 (cancel_breakpoint): New.
10813 (step_over_bkpt): New global.
10814 (linux_wait_for_event_1): Implement stepping over breakpoints.
10815 (gdb_wants_lwp_stopped): New.
10816 (gdb_wants_all_stopped): New.
10817 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10818 single-step traps here. Store the thread's last reported target
10820 (send_sigstop): Don't clear stop_expected. Always set it,
10822 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10823 (cancel_finished_single_step): New.
10824 (cancel_finished_single_steps): New.
10825 (wait_for_sigstop): Don't cancel finished single-step traps here.
10826 (linux_resume_one_lwp): Don't check for removed breakpoints.
10827 Don't set `step' on non-hardware step archs.
10828 (linux_set_resume_request): Ignore resume_stop requests if already
10829 stopping or stopped. Set the lwp's last_resume_kind.
10830 (resume_status_pending_p): Don't check for removed breakpoints.
10831 (need_step_over_p): New.
10832 (start_step_over): New.
10833 (finish_step_over): New.
10834 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10835 requests. Clear the thread's last reported target waitstatus.
10836 Don't use the `suspended' flag. Don't consider pending breakpoints.
10837 (linux_resume): Start a step-over if necessary.
10838 (proceed_one_lwp): New.
10839 (proceed_all_lwps): New.
10840 (unstop_all_lwps): New.
10841 * linux-low.h (struct lwp_info): Rewrite comment for the
10842 `suspended' flag. Add the `stop_pc' field. Delete the
10843 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10844 Add `'last_resume_kind' and `need_step_over' fields.
10845 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10846 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10847 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10848 (set_raw_breakpoint_at): New.
10849 (set_breakpoint_at): Rewrite to use it.
10850 (reinsert_breakpoint_handler): Delete.
10851 (set_reinsert_breakpoint): New.
10852 (reinsert_breakpoint_by_bp): Delete.
10853 (delete_reinsert_breakpoints): New.
10854 (uninsert_breakpoint): Rewrite.
10855 (uninsert_breakpoints_at): New.
10856 (reinsert_breakpoint): Rewrite.
10857 (reinsert_breakpoints_at): New.
10858 (check_breakpoints): Rewrite.
10859 (breakpoint_here): New.
10860 (breakpoint_inserted_here): New.
10861 (check_mem_read): Adjust.
10862 * mem-break.h (breakpoints_supported, breakpoint_here)
10863 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10864 (reinsert_breakpoint_by_bp): Delete declaration.
10865 (delete_reinsert_breakpoints): Declare.
10866 (reinsert_breakpoint): Delete declaration.
10867 (reinsert_breakpoints_at): Declare.
10868 (uninsert_breakpoint): Delete declaration.
10869 (uninsert_breakpoints_at): Declare.
10870 (check_breakpoints): Adjust prototype.
10871 * server.h: Adjust include order.
10872 (struct thread_info): Declare here. Add a `last_status' field.
10874 2010-03-23 Michael Snyder <msnyder@vmware.com>
10876 * server.c (crc32): New function.
10877 (handle_query): Add handling for 'qCRC:' request.
10879 2010-03-23 Pedro Alves <pedro@codesourcery.com>
10881 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10882 lwp had been stopped by a watchpoint.
10884 2010-03-16 Pedro Alves <pedro@codesourcery.com>
10886 * server.h (internal_error): Declare.
10887 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10888 * utils.c (internal_error): New function.
10890 2010-03-15 Andreas Schwab <schwab@redhat.com>
10892 * configure.srv: Fix typo setting srv_regobj.
10894 2010-03-15 Pedro Alves <pedro@codesourcery.com>
10896 * linux-low.c (fetch_register): Avoid passing a non string literal
10898 (usr_store_inferior_registers): Ditto.
10900 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10902 * linux-low.c (linux_write_memory): Bail out early if peeking
10905 2010-03-14 Pedro Alves <pedro@codesourcery.com>
10907 * linux-low.h (struct lwp_info): New fields
10908 `stopped_by_watchpoint' and `stopped_data_address'.
10909 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10910 here, and cache them in the lwp object.
10911 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10913 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10915 (linux_stopped_by_watchpoint): Rewrite.
10916 (linux_stopped_data_address): Rewrite.
10918 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
10920 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10921 switching the current inferior, not before.
10923 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10925 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10926 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10927 i386-linux.c and amd64-linux.c.
10928 (reg-i386.o): Removed.
10929 (reg-i386.c): Likewise.
10930 (reg-i386-linux.o): Likewise.
10931 (reg-i386-linux.c): Likewise.
10932 (reg-x86-64.o): Likewise.
10933 (reg-x86-64.c): Likewise.
10934 (reg-x86-64-linux.o): Likewise.
10935 (reg-x86-64-linux.c): Likewise.
10937 (i386.c): Likewise.
10938 (i386-linux.o): Likewise.
10939 (i386-linux.c): Likewise.
10940 (amd64.o): Likewise.
10941 (amd64.c): Likewise.
10942 (amd64-linux.o): Likewise.
10943 (amd64-linux.c): Likewise.
10945 * configure.srv (srv_i386_regobj): New.
10946 (srv_i386_linux_regobj): Likewise.
10947 (srv_amd64_regobj): Likewise.
10948 (srv_amd64_linux_regobj): Likewise.
10949 (srv_i386_32bit_xmlfiles): Likewise.
10950 (srv_i386_64bit_xmlfiles): Likewise.
10951 (srv_i386_xmlfiles): Likewise.
10952 (srv_amd64_xmlfiles): Likewise.
10953 (srv_i386_linux_xmlfiles): Likewise.
10954 (srv_amd64_linux_xmlfiles): Likewise.
10955 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10956 srv_xmlfiles to $srv_i386_xmlfiles.
10957 (i[34567]86-*-mingw32ce*): Likewise.
10958 (i[34567]86-*-mingw*): Likewise.
10959 (i[34567]86-*-nto*): Likewise.
10960 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10961 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10962 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10963 (x86_64-*-linux*): Likewise.
10965 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10966 (init_registers_amd64_linux): New.
10967 (x86_arch_setup): Replace init_registers_x86_64_linux with
10968 init_registers_amd64_linux.
10970 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10972 * configure.ac: Check for libdl. If it is not available link against
10973 static libthread_db.
10974 * configure: Regenerate.
10976 2010-02-22 Pedro Alves <pedro@codesourcery.com>
10980 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10981 handing a read watchpoint.
10982 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10984 2010-02-12 Doug Evans <dje@google.com>
10986 * linux-low.c (linux_supports_tracefork_flag): Document.
10987 (linux_look_up_symbols): Add comment.
10989 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10991 * regcache.c (supply_register): Clear regcache if buf is NULL.
10993 2010-02-02 Nicolas Roche <roche@sourceware.org>
10994 Joel Brobecker <brobecker@adacore.com>
10996 * inferiors.c (find_inferior): Add function documentation.
10997 (unloaded_dll): Handle the case where the unloaded dll has not
10998 been previously registered in the dll list.
11000 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11002 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11003 (thumb2_breakpoint): New.
11004 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11006 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11008 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11009 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11012 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11014 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11016 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11018 * linux-s390-low.c (s390_collect_ptrace_register)
11019 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11021 2010-01-21 Doug Evans <dje@google.com>
11023 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11024 (PTRACE_ARG4_TYPE): New macro.
11025 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11026 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11027 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11028 (usr_store_inferior_registers): Ditto.
11029 (linux_read_memory, linux_write_memory): Ditto.
11030 (linux_test_for_tracefork): Ditto.
11032 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11033 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11035 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11037 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11040 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11042 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11043 prototype to take a regcache. Adjust.
11045 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11047 * regcache.h (struct thread_info): Forward declare.
11048 (struct regcache): New.
11049 (new_register_cache): Adjust prototype.
11050 (get_thread_regcache): Declare.
11051 (free_register_cache): Adjust prototype.
11052 (registers_to_string, registers_from_string): Ditto.
11053 (supply_register, supply_register_by_name, collect_register)
11054 (collect_register_as_string, collect_register_by_name): Ditto.
11055 * regcache.c (struct inferior_regcache_data): Delete.
11056 (get_regcache): Rename to ...
11057 (get_thread_regcache): ... this. Adjust. Switch inferior before
11058 fetching registers.
11059 (regcache_invalidate_one): Adjust.
11060 (regcache_invalidate): Fix prototype.
11061 (new_register_cache): Return the new register cache.
11062 (free_register_cache): Change prototype.
11063 (realloc_register_cache): Adjust.
11064 (registers_to_string): Change prototype to take a regcache. Adjust.
11065 (registers_from_string): Ditto.
11066 (register_data): Ditto.
11067 (supply_register): Ditto.
11068 (supply_register_by_name): Ditto.
11069 (collect_register): Ditto.
11070 (collect_register_as_string): Ditto.
11071 (collect_register_by_name): Ditto.
11072 * server.c (process_serial_event): Adjust.
11073 * linux-low.h (regset_fill_func, regset_store_func): Change
11075 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11077 * linux-low.c (get_stop_pc): Adjust.
11078 (check_removed_breakpoint): Adjust.
11079 (linux_wait_for_event): Adjust.
11080 (linux_resume_one_lwp): Adjust.
11081 (fetch_register): Add regcache parameter. Adjust.
11082 (usr_store_inferior_registers): Ditto.
11083 (regsets_fetch_inferior_registers): Ditto.
11084 (regsets_store_inferior_registers): Ditto.
11085 (linux_fetch_registers, linux_store_registers): Ditto.
11086 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11088 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11090 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11091 prototype to take a regcache.
11092 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11093 * remote-utils.c (convert_ascii_to_int, outreg)
11094 (prepare_resume_reply): Change prototype to take a regcache.
11096 * target.h (struct target_ops) <fetch_registers, store_registers>:
11097 Change prototype to take a regcache.
11098 (fetch_inferior_registers, store_inferior_registers): Change
11099 prototype to take a regcache. Adjust.
11100 * proc-service.c (ps_lgetregs): Adjust.
11101 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11102 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11103 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11104 take a regcache. Adjust.
11105 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11106 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11107 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11108 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11109 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11110 (cris_cannot_fetch_register):
11111 (cris_breakpoint_at): Change prototype to take a regcache.
11113 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11114 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11115 to take a regcache. Adjust.
11116 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11118 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11119 take a regcache. Adjust.
11120 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11121 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11122 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11123 * linux-mips-low.c (mips_get_pc):
11124 (mips_set_pc): Change prototype to take a regcache. Adjust.
11125 (mips_reinsert_addr): Adjust.
11126 (mips_collect_register): Change prototype to take a regcache.
11128 (mips_supply_register):
11129 (mips_collect_register_32bit, mips_supply_register_32bit)
11130 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11131 (mips_store_fpregset): Ditto.
11132 * linux-ppc-low.c (ppc_supply_ptrace_register)
11133 (ppc_supply_ptrace_register): Ditto.
11134 (parse_spufs_run): Adjust.
11135 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11136 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11137 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11138 take a regcache. Adjust.
11139 * linux-s390-low.c (s390_collect_ptrace_register)
11140 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11141 (s390_set_pc): Change prototype to take a regcache. Adjust.
11142 (s390_arch_setup): Adjust.
11143 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11144 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11145 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11146 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11147 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11149 (sparc_breakpoint_at): Adjust.
11150 * linux-xtensa-low.c (xtensa_fill_gregset):
11151 (xtensa_store_gregset):
11152 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11153 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11154 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11155 prototype to take a regcache. Adjust.
11156 * win32-arm-low.c (arm_fetch_inferior_register)
11157 (arm_store_inferior_register): Change prototype to take a
11159 * win32-i386-low.c (i386_fetch_inferior_register)
11160 (i386_store_inferior_register): Change prototype to take a
11162 * win32-low.c (child_fetch_inferior_registers)
11163 (child_store_inferior_registers): Change prototype to take a
11165 (win32_wait): Adjust.
11166 (win32_fetch_inferior_registers): Change prototype to take a
11168 (win32_store_inferior_registers): Adjust.
11169 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11170 store_inferior_register>: Change prototype to take a regcache.
11172 2010-01-20 Doug Evans <dje@google.com>
11174 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11176 (linux_wait_for_event1, linux_init_signals): Ditto.
11177 (W_STOPCODE): Provide definition if missing.
11179 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11181 * linux-low.c (linux_core_of_thread): New.
11182 (compare_ints, show_process, list_threads): New.
11183 (linux_qxfer_osdata): Report threads and cores.
11184 (linux_target_op): Register linux_core_of_thread.
11185 * remote-utils.c (prepare_resume_reply): Report the core.
11186 (buffer_xml_printf): Support %d specifier.
11187 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11189 (handle_query): Handle qXfer:threads. Announce availability
11191 * target.h (struct target_ops): New field core_of_thread.
11193 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11195 * Makefile.in (clean): Remove new generated files.
11196 (reg-s390.o, reg-s390.c): Remove rules.
11197 (reg-s390x.o, reg-s390x.c): Likewise.
11198 (s390-linux32.o, s390-linux32.c): Add rules.
11199 (s390-linux64.o, s390-linux64.c): Likewise.
11200 (s390x-linux64.o, s390x-linux64.c): Likewise.
11201 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11202 * linux-s390-low.c: Include <elf.h>.
11203 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11204 (init_registers_s390): Remove prototype.
11205 (init_registers_s390x): Likewise.
11206 (init_registers_s390_linux32): Add prototype.
11207 (init_registers_s390_linux64): Likewise.
11208 (init_registers_s390x_linux64): Likewise.
11209 (s390_num_regs_3264): New define.
11210 (s390_regmap_3264): New global variable.
11211 (s390_cannot_fetch_register): Remove obsolete check.
11212 (s390_cannot_store_register): Likewise.
11213 (s390_collect_ptrace_register): Handle upper/lower register halves.
11214 (s390_supply_ptrace_register): Likewise.
11215 (s390_fill_gregset): Update to register number changes.
11216 (s390_get_hwcap): New routine.
11217 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11218 Install appropriate regmap and register set.
11220 2010-01-01 Joel Brobecker <brobecker@adacore.com>
11222 * server.c (gdbserver_version): Update copyright year to 2010.
11223 * gdbreplay.c (gdbreplay_version): Likewise.
11225 2009-12-28 Doug Evans <dje@google.com>
11227 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11228 elf/external.h. Include <elf.h> instead but only if necessary.
11230 2009-12-28 Pedro Alves <pedro@codesourcery.com>
11232 * linux-low.c (linux_remove_process): Remove `detaching'
11233 parameter. Don't release/detach from thread_db here.
11234 (linux_kill): Release/detach from thread_db here, ...
11235 (linux_detach): ... and here, before actually detaching.
11236 (linux_wait_1): ... and here, when a process exits.
11237 * thread-db.c (any_thread_of): New.
11238 (thread_db_free): Switch the current inferior to a thread of the
11241 2009-12-21 Doug Evans <dje@google.com>
11243 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11245 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11246 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11247 warning ifndef __NR_tkill. Move setting of errno there too.
11248 Delete unnecessary resetting of errno after syscall.
11249 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11251 * configure.ac: Check for dladdr.
11252 * config.in: Regenerate.
11253 * configure: Regenerate.
11254 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11255 (try_thread_db_load): Update.
11257 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11259 2009-12-18 Doug Evans <dje@google.com>
11261 * event-loop.c: Include unistd.h if it exists.
11263 * linux-low.c (my_waitpid): Move definition away from being in
11264 between linux_tracefork_child/linux_test_for_tracefork.
11266 * gdb_proc_service.h (psaddr_t): Fix type.
11267 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11268 signature to match glibc.
11270 2009-12-16 Doug Evans <dje@google.com>
11272 * linux-low.c (linux_read_memory): Fix argument to read.
11274 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11276 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11277 events, don't leave current_inferior pointing at null.
11279 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11281 * win32-low.c (LOG): Delete.
11282 (OUTMSG): Output to stderr.
11283 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11284 on compile time LOG macro.
11285 (win32_wait): Fix debug output.
11287 2009-11-26 Pedro Alves <pedro@codesourcery.com>
11289 * win32-low.c (win32_add_one_solib): If the dll name is
11290 "ntdll.dll", prepend the system directory to the dll path.
11292 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11294 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11296 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
11297 Vladimir Prus <vladimir@codesourcery.com>
11299 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11300 * configure.ac: Check for __mcoldfire__ and set
11301 gdb_cv_m68k_is_coldfire.
11302 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11303 reg-cf.o and reg-m68k.o.
11304 * configure: Regenerated.
11306 2009-11-16 Pedro Alves <pedro@codesourcery.com>
11308 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11309 Pass it to thread_db_free.
11310 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11311 proper `detaching' argument to linux_remove_process.
11312 * linux-low.h (thread_db_free): Add `detaching' parameter.
11313 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11315 (thread_db_free): Add `detaching' parameter. Only
11316 call td_ta_clear_event if detaching from process.
11318 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11320 * thread-db.c (thread_db_free): Fix typo.
11322 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11325 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11327 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11329 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11330 with an i686 compiler.
11331 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11333 * configure: Rebuilt.
11335 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11339 * server.c (handle_search_memory_1): Correct read_addr initialization
11340 in loop for searching subsequent chunks.
11342 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11344 * configure.ac: New --with-libthread-db option.
11345 * thread-db.c: Allow direct dependence on libthread_db.
11346 (thread_db_free): Adjust.
11347 * config.in: Regenerate.
11348 * configure: Likewise.
11350 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11353 * thread-db.c (attach_thread): New function.
11354 (maybe_attach_thread): Return success/failure.
11355 (find_new_threads_callback): Adjust.
11356 (thread_db_find_new_threads): Loop until no new threads.
11358 2009-10-13 Pedro Alves <pedro@codesourcery.com>
11360 * proc-service.c (ps_lgetregs): Formatting.
11362 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11364 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11365 * configure.ac: Adjust.
11366 * linux-low.h (struct process_info_private): Move members to struct
11368 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11369 * linux-low.c (linux_remove_process): Adjust.
11370 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11371 * server.c (handle_query): Move code ...
11372 (handle_monitor_command): ... here. New function.
11373 * target.h (struct target_ops): New member.
11374 * thread-db.c (struct thread_db): New.
11375 (libthread_db_search_path): New variable.
11376 (thread_db_create_event, thread_db_enable_reporting)
11377 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11378 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11379 (try_thread_db_load_1, dladdr_to_soname): New functions.
11380 (try_thread_db_load, thread_db_load_search): New functions.
11381 (thread_db_init): Search for libthread_db.
11382 (thread_db_free): New function.
11383 (thread_db_handle_monitor_command): Likewise.
11384 * config.in: Regenerate.
11385 * configure: Regenerate.
11387 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11389 * spu-low.c (spu_kill): Wait for inferior to terminate.
11390 Call clear_inferiors.
11391 (spu_detach): Call clear_inferiors.
11393 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11395 * aclocal.m4: Regenerate.
11396 * config.in: Likewise.
11397 * configure: Likewise.
11399 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11401 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11402 (parse_spufs_run): New function.
11403 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11404 (ppc_breakpoint_at): Handle SPU breakpoints.
11406 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11408 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11409 (SPUFS_MAGIC): Define.
11410 (spu_enumerate_spu_ids): New function.
11411 (linux_qxfer_spu): New function.
11412 (linux_target_ops): Install linux_qxfer_spu.
11414 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11416 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11417 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11418 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11419 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11420 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11421 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11422 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11423 (init_registers_powerpc_cell32l): Add prototype.
11424 (init_registers_powerpc_cell64l): Likewise.
11425 (ppc_arch_setup): Detect Cell/B.E. architecture.
11427 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11429 * Makefile.in (datarootdir): New variable.
11431 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11433 * linux-low.c (linux_write_memory): Update debugging output.
11434 * Makefile.in (clean): Add new descriptions.
11435 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11436 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11437 * configure.srv: Add new files for arm*-*-linux*.
11438 * linux-arm-low.c: Add new declarations.
11439 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11440 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11441 (HWCAP_VFPv3D16): New.
11442 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11443 instead of __IWMMXT__.
11444 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11445 (arm_arch_setup): New.
11446 (target_regsets): Remove #ifdef. Add VFP regset.
11447 (the_low_target): Use arm_arch_setup.
11449 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11451 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11452 the main thread again.
11454 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11456 Adding Neutrino gdbserver.
11457 * configure: Regenerated.
11458 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11459 * configure.srv (i[34567]86-*-nto*): New target.
11460 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11461 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11462 (nto_comctrl) [__QNX__]: New function.
11463 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11465 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
11467 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11470 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11471 Pedro Alves <pedro@codesourcery.com>
11473 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11474 don't support CONTEXT_EXTENDED_REGISTERS.
11475 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11476 (the_low_target): Install them.
11477 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11478 failing with ERROR_PIPE_NOT_CONNECTED.
11480 2009-06-30 Doug Evans <dje@google.com>
11481 Pierre Muller <muller@ics.u-strasbg.fr>
11483 Add h/w watchpoint support to x86-linux, win32-i386.
11484 * Makefile.in (SFILES): Add i386-low.c
11485 (i386_low_h): Define.
11486 (i386-low.o): Add dependencies.
11487 (linux-x86-low.o): Add i386-low.h dependency.
11488 (win32-i386-low.o): Ditto.
11489 * i386-low.c: New file.
11490 * i386-low.h: New file.
11491 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11492 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11493 * linux-low.c (linux_add_process): Initialize arch_private.
11494 (linux_remove_process): Free arch_private.
11495 (add_lwp): Initialize arch_private.
11496 (delete_lwp): Free arch_private.
11497 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11499 * linux-low.h (process_info_private): New member arch_private.
11500 (lwp_info): New member arch_private.
11501 (linux_target_ops): New members new_process, new_thread,
11503 (ptid_of): New macro.
11504 * linux-x86-low.c: Include stddef.h, i386-low.h.
11505 (arch_process_info): New struct.
11506 (arch_lwp_info): New struct.
11507 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11508 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11509 (i386_dr_low_get_status): New function.
11510 (x86_insert_point, x86_remove_point): New functions.
11511 (x86_stopped_by_watchpoint): New function.
11512 (x86_stopped_data_address): New function.
11513 (x86_linux_new_process, x86_linux_new_thread): New functions.
11514 (x86_linux_prepare_to_resume): New function.
11515 (the_low_target): Add entries for insert_point, remove_point,
11516 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11518 * server.c (debug_hw_points): New global.
11519 (monitor_show_help): Document set debug-hw-points.
11520 (handle_query): Process "set debug-hw-points".
11521 * server.h (debug_hw_points): Declare.
11522 (paddress): Declare.
11523 * utils.c (NUMCELLS, CELLSIZE): New macros.
11524 (get_sell, xsnprintf, paddress): New functions.
11525 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11526 remove_point, stopped_by_watchpoint, stopped_data_address.
11527 * win32-i386-low.c: Include i386-low.h.
11528 (debug_reg_state): Replaces dr.
11529 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11530 (i386_dr_low_get_status): New function.
11531 (i386_insert_point, i386_remove_point): New functions.
11532 (i386_stopped_by_watchpoint): New function.
11533 (i386_stopped_data_address): New function.
11534 (i386_initial_stuff): Update.
11535 (get_thread_context,set_thread_context,i386_thread_added): Update.
11536 (the_low_target): Add entries for insert_point,
11537 remove_point, stopped_by_watchpoint, stopped_data_address.
11538 * win32-low.c (win32_insert_watchpoint): New function.
11539 (win32_remove_watchpoint): New function.
11540 (win32_stopped_by_watchpoint): New function.
11541 (win32_stopped_data_address): New function.
11542 (win32_target_ops): Add entries for insert_watchpoint,
11543 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11544 * win32-low.h (win32_target_ops): New members insert_point,
11545 remove_point, stopped_by_watchpoint, stopped_data_address.
11547 2009-06-25 Pedro Alves <pedro@codesourcery.com>
11549 * server.c (process_serial_event): Re-return unsupported, not
11550 error, if the type isn't recognized. Re-allow supporting only
11551 insert or remove packets. Also call require_running for
11552 breakpoints. Add missing break statement to default case. Tidy.
11553 * target.h (struct target_ops): Rename insert_watchpoint to
11554 insert_point, and remove_watchpoint to remove_point.
11556 * linux-low.h (struct linux_target_ops): Likewise.
11557 * linux-low.c (linux_insert_watchpoint): Rename to ...
11558 (linux_insert_point): ... this. Adjust.
11559 (linux_remove_watchpoint): Rename to ...
11560 (linux_remove_point): ... this. Adjust.
11561 (linux_target_ops): Adjust.
11562 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11563 (cris_insert_point): ... this.
11564 (cris_remove_watchpoint): Rename to ...
11565 (cris_remove_point): ... this.
11566 (the_low_target): Adjust.
11568 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11570 * server.c (handle_v_kill): Pass signal_pid to
11571 kill_inferior if multi_process is zero.
11573 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11575 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11576 * target.h (target_ops): Comment for *_watchpoint to make it clear
11577 the functions can get types '0' and '1'.
11579 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11581 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11582 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11583 * regcache.c (get_regcache): Likewise.
11584 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11585 * win32-low.c (child_fetch_inferior_registers): Remove check for
11588 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11589 Pedro Alves <pedro@codesourcery.com>
11591 * target.h (struct target_ops) <supports_multi_process>: New
11593 (target_supports_multi_process): New.
11594 * server.c (handle_query): Even if GDB reports support, only
11595 enable multi-process if the target also supports it. Report
11596 multi-process support only if the target backend supports it.
11597 * linux-low.c (linux_supports_multi_process): New function.
11598 (linux_target_ops): Install it as target_supports_multi_process
11601 2009-05-24 Doug Evans <dje@google.com>
11603 Global renaming of find_thread_pid to find_thread_ptid.
11604 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11605 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11606 All callers updated.
11608 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11609 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11612 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11613 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11614 (linux_resume_one_lwp): Ditto.
11616 2009-05-23 Doug Evans <dje@google.com>
11618 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11619 from struct inferior_list_entry * to struct lwp_info *.
11620 All callers updated.
11622 2009-05-13 Doug Evans <dje@google.com>
11624 * linux-x86-low.c: Don't include assert.h.
11625 (x86_siginfo_fixup): Use fatal, not assert.
11626 (x86_arch_setup): Fix comment.
11628 2009-05-12 Doug Evans <dje@google.com>
11630 Biarch support for i386/amd64 gdbserver.
11631 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11632 Add linux-x86-low.c.
11633 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11634 (linux-x86-low.o): Add.
11635 * linux-x86-64-low.c: Delete.
11636 * linux-i386-low.c: Delete.
11637 * linux-x86-low.c: New file.
11638 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11640 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11642 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11643 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11644 (linux_child_pid_to_exec_file): New function.
11645 (elf_64_header_p, elf_64_file_p): New functions.
11646 (siginfo_fixup): New function.
11647 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11648 give target a chance to convert layout.
11649 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11650 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11652 2009-05-07 Doug Evans <dje@google.com>
11654 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11655 (regsets_store_inferior_registers): Ditto.
11657 2009-05-06 Pedro Alves <pedro@codesourcery.com>
11661 * linux-low.c (must_set_ptrace_flags): Delete.
11662 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11664 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11665 `lwp->must_set_ptrace_flags' instead.
11666 (linux_wait_for_event_1): Set ptrace options here.
11667 (linux_wait_1): ... not here.
11669 2009-04-30 Doug Evans <dje@google.com>
11671 * inferiors.c (started_inferior_callback): New function.
11672 (attached_inferior_callback): New function.
11673 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11674 * server.c (print_started_pid, print_attached_pid): New functions.
11675 (detach_or_kill_for_exit): New function.
11676 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11677 * server.h (have_started_inferiors_p): Declare.
11678 (have_attached_inferiors_p): Declare.
11680 * inferiors.c (remove_process): Fix memory leak, free process.
11681 * linux-low.c (linux_remove_process): New function.
11682 (linux_kill): Call it instead of remove_process.
11683 (linux_detach, linux_wait_1): Ditto.
11685 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11687 * configure.srv: Add x86 Windows CE target.
11689 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11691 * inferiors.c (get_thread_process): Make global.
11692 * server.h (get_thread_process): Add prototype.
11693 * thread-db.c (find_one_thread): Use get_thread_process
11694 instead of current_process.
11695 (thread_db_get_tls_address): Do not crash if called when
11696 thread layer is not yet initialized.
11698 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11700 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11701 * spu-low.c (current_tid): Rename to ...
11702 (current_ptid): ... this.
11703 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11704 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11705 ptid_get_lwp (current_ptid) instead of current_tid.
11706 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11707 instead of current_tid. Use find_process_pid to verify pid
11708 argument is valid. Pass proper argument to remove_process.
11709 (spu_thread_alive): Compare current_ptid instead of current_tid.
11710 (spu_resume): Likewise.
11712 2009-04-02 Pedro Alves <pedro@codesourcery.com>
11714 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11717 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11719 Implement the multiprocess extensions, and add linux multiprocess
11722 * server.h (ULONGEST): Declare.
11723 (struct ptid, ptid_t): New.
11724 (minus_one_ptid, null_ptid): Declare.
11725 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11726 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11727 (struct inferior_list_entry): Change `id' type from unsigned from
11729 (struct sym_cache, struct breakpoint, struct
11730 process_info_private): Forward declare.
11731 (struct process_info): Declare.
11732 (current_process): Declare.
11733 (all_processes): Declare.
11734 (initialize_inferiors): Declare.
11735 (add_thread): Adjust to use ptid_t.
11736 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11737 (add_process, remove_process, find_thread_pid): Declare.
11738 (find_inferior_id): Adjust to use ptid_t.
11739 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11740 (multi_process): Declare.
11741 (push_event): Adjust to use ptid_t.
11742 (read_ptid, write_ptid): Declare.
11743 (prepare_resume_reply): Adjust to use ptid_t.
11744 (clear_symbol_cache): Declare.
11745 * inferiors.c (all_processes): New.
11746 (null_ptid, minus_one_ptid): New.
11747 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11748 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11749 (add_thread): Change unsigned long to ptid. Remove gdb_id
11751 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11752 (gdb_id_to_thread): Rename to ...
11753 (find_thread_pid): ... this. Change unsigned long to ptid.
11754 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11755 (loaded_dll, pull_pid_from_list): Adjust.
11756 (add_process, remove_process, find_process_pid)
11757 (get_thread_process, current_process, initialize_inferiors): New.
11758 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11759 (struct target_waitstatus) <related_pid>: Ditto.
11760 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11761 return type to int.
11762 (struct target_ops) <join>: Add `pid' argument.
11763 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11764 (struct target_ops) <wait>: Add `ptid' field. Change return type
11766 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11767 (mywait): Add `ptid' argument. Change return type to ptid_t.
11768 (target_pid_to_str): Declare.
11769 * target.c (set_desired_inferior): Adjust to use ptids.
11770 (mywait): Add new `ptid' argument. Adjust.
11771 (target_pid_to_str): New.
11772 * mem-break.h (free_all_breakpoints): Declare.
11773 * mem-break.c (breakpoints): Delelete.
11774 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11775 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11776 to use per-process breakpoint list.
11777 (free_all_breakpoints): New.
11778 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11779 (symbol_cache, all_symbols_looked_up): Delete.
11781 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11783 (prepare_resume_reply): Change ptid argument's type from unsigned
11784 long to ptid_t. Adjust. Implement W;process and X;process.
11785 (free_sym_cache, clear_symbol_cache): New.
11786 (look_up_one_symbol): Adjust to per-process symbol cache. *
11787 * server.c (cont_thread, general_thread, step_thread): Change type
11789 (attached): Delete.
11790 (multi_process): New.
11791 (last_ptid): Change type to ptid_t.
11792 (struct vstop_notif) <ptid>: Change type to ptid_t.
11793 (queue_stop_reply, push_event): Change `ptid' argument's type to
11795 (discard_queued_stop_replies): Add `pid' argument.
11796 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11797 changes. Don't reference the `attached' global.
11798 (attach_inferior): Adjust to mywait interface changes.
11799 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11800 features. Handle and report "multiprocess+". Handle
11802 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11804 (handle_v_kill): New.
11805 (handle_v_stopped): Adjust to use target_pid_to_str.
11806 (handle_v_requests): Allow multiple attaches and runs when
11807 multiprocess extensions are in effect. Handle "vKill".
11808 (myresume): Adjust to use ptids.
11809 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11810 (handle_status): Adjust to discard_queued_stop_replies interface
11812 (first_thread_of, kill_inferior_callback)
11813 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11814 (main): Call initialize_inferiors. Adjust to use ptids, killing
11815 and detaching from all inferiors. Handle multiprocess packet
11817 * linux-low.h: Include gdb_proc_service.h.
11818 (struct process_info_private): New.
11819 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11820 <lwpid_of>: Use ptid_get_lwp.
11821 (get_lwp_thread): Adjust.
11822 (struct lwp_info): Add `dead' member.
11823 (find_lwp_pid): Declare.
11824 * linux-low.c (thread_db_active): Delete.
11825 (new_inferior): Adjust comment.
11826 (inferior_pid): Delete.
11827 (linux_add_process): New.
11828 (handle_extended_wait): Adjust.
11829 (add_lwp): Change unsigned long to ptid.
11830 (linux_create_inferior): Add process to processes table. Adjust
11831 to use ptids. Don't set new_inferior here.
11832 (linux_attach_lwp): Rename to ...
11833 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11834 it. Adjust to use ptids.
11835 (linux_attach_lwp): New.
11836 (linux_attach): Add process to processes table. Don't set
11838 (struct counter): New.
11839 (second_thread_of_pid_p, last_thread_of_process_p): New.
11840 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11841 multiple processes.
11842 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11843 processes. Remove process from process table.
11844 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11845 to multiple processes.
11846 (any_thread_of): New.
11847 (linux_detach): Add `pid' argument, and handle it. Remove process
11848 from processes table.
11849 (linux_join): Add `pid' argument. Handle it.
11850 (linux_thread_alive): Change unsighed long argument to ptid_t.
11851 Consider dead lwps as not being alive.
11852 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11853 threads we're not interested in.
11854 (same_lwp, find_lwp_pid): New.
11855 (linux_wait_for_lwp): Change `pid' argument's type from int to
11857 (linux_wait_for_event): Rename to ...
11858 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11859 from int to ptid_t. Adjust.
11860 (linux_wait_for_event): New.
11861 (linux_wait_1): Add `ptid' argument. Change return type to
11862 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11863 that exit from the process table.
11864 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11866 (mark_lwp_dead): New.
11867 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11868 stopping all threads, mark its main lwp as dead.
11869 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11871 (fetch_register, usr_store_inferior_registers)
11872 (regsets_fetch_inferior_registers)
11873 (regsets_store_inferior_registers, linux_read_memory)
11874 (linux_write_memory): Inline `inferior_pid'.
11875 (linux_look_up_symbols): Adjust to use per-process
11876 `thread_db_active'.
11877 (linux_request_interrupt): Adjust to use ptids.
11878 (linux_read_auxv): Inline `inferior_pid'.
11879 (initialize_low): Don't reference thread_db_active.
11880 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11881 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11882 (ps_getpid): Return the pid of the current inferior.
11883 * thread-db.c (proc_handle, thread_agent): Delete.
11884 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11886 (find_one_thread): Change argument type to ptid_t. Adjust to
11888 (maybe_attach_thread): Adjust to per-process data and ptids.
11889 (thread_db_find_new_threads): Ditto.
11890 (thread_db_init): Ditto.
11891 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11892 processes table. Adjust to use ptids.
11893 (spu_kill, spu_detach): Adjust interface. Remove process from
11895 (spu_join, spu_thread_alive): Adjust interface.
11896 (spu_wait): Adjust interface. Remove process from processes
11897 table. Adjust to use ptids.
11898 * win32-low.c (current_inferior_tid): Delete.
11899 (current_inferior_ptid): New.
11900 (debug_event_ptid): New.
11901 (thread_rec): Take a ptid. Adjust.
11902 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11903 (child_delete_thread): Ditto.
11904 (do_initial_child_stuff): Add `attached' argument. Add process to
11906 (child_fetch_inferior_registers, child_store_inferior_registers):
11908 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11909 (win32_attach): Pass 1 to do_initial_child_stuff.
11910 (win32_kill): Adjust interface. Remove process from processes
11912 (win32_detach): Ditto.
11913 (win32_join): Adjust interface.
11914 (win32_thread_alive): Take a ptid.
11915 (win32_resume): Adjust to use ptids.
11916 (get_child_debug_event): Ditto.
11917 (win32_wait): Adjust interface. Remove exiting process from
11920 2009-04-01 Pedro Alves <pedro@codesourcery.com>
11922 Non-stop mode support.
11924 * server.h (non_stop): Declare.
11925 (gdb_client_data, handler_func): Declare.
11926 (delete_file_handler, add_file_handler, start_event_loop):
11928 (handle_serial_event, handle_target_event, push_event)
11929 (putpkt_notif): Declare.
11930 * target.h (enum resume_kind): New.
11931 (struct thread_resume): Replace `step' field by `kind' field.
11932 (TARGET_WNOHANG): Define.
11933 (struct target_ops) <wait>: Add `options' argument.
11934 <supports_non_stop, async, start_non_stop>: New fields.
11935 (target_supports_non_stop, target_async): New.
11936 (start_non_stop): Declare.
11937 (mywait): Add `options' argument.
11938 * target.c (mywait): Add `options' argument. Print child exit
11939 notifications here.
11940 (start_non_stop): New.
11941 * server.c (non_stop, own_buf, mem_buf): New globals.
11942 (struct vstop_notif): New.
11943 (notif_queue): New global.
11944 (queue_stop_reply, push_event, discard_queued_stop_replies)
11945 (send_next_stop_reply): New.
11946 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11948 (attach_inferior): In non-stop mode, don't wait for the target
11950 (handle_general_set): Handle QNonStop.
11951 (handle_query): When handling qC, return the current general
11952 thread, instead of the first thread of the list.
11953 (handle_query): If the backend supports non-stop mode, include
11954 QNonStop+ in the qSupported query response.
11955 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11957 (handle_v_attach, handle_v_run): Handle non-stop mode.
11958 (handle_v_stopped): New.
11959 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11960 (myresume): Adjust to use resume_kind. Handle non-stop.
11961 (queue_stop_reply_callback): New.
11962 (handle_status): Handle non-stop mode.
11963 (main): Clear non_stop flag on reconnection. Use the event-loop.
11964 Refactor serial protocol handling from here ...
11965 (process_serial_event): ... to this new function. When GDB
11966 selects any thread, select one here. In non-stop mode, wait until
11967 GDB acks all pending events before exiting.
11968 (handle_serial_event, handle_target_event): New.
11969 * remote-utils.c (remote_open): Install remote_desc in the event
11971 (remote_close): Remove remote_desc from the event loop.
11972 (putpkt_binary): Rename to...
11973 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11974 (putpkt_binary): New as wrapper around putpkt_binary_1.
11975 (putpkt_notif): New.
11976 (prepare_resume_reply): In non-stop mode, don't change the
11978 * event-loop.c: New.
11979 * Makefile.in (OBJ): Add event-loop.o.
11980 (event-loop.o): New rule.
11982 * linux-low.h (pid_of): Moved here.
11984 (get_lwp_thread): Use lwpid_of.
11985 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11986 * linux-low.c (pid_of): Delete.
11987 (inferior_pid): Use lwpid_of.
11988 (linux_event_pipe): New.
11989 (target_is_async_p): New.
11991 (handle_extended_wait): Use lwpid_of.
11992 (add_lwp): Don't set lwpid field.
11993 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11994 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11995 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11996 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11997 first. Adjust to linux_wait_for_event interface changes. Use
11999 (linux_detach): Don't delete the main lwp here.
12000 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12001 (status_pending_p): Don't consider explicitly suspended lwps.
12002 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12003 pointer. Add OPTIONS argument. Change return type to int. Use
12004 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12005 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12006 pointer. Add status pointer argument. Return a pid instead of a
12007 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12008 changes. In non-stop mode, don't switch to a random thread.
12009 (linux_wait): Rename to...
12010 (linux_wait_1): ... this. Add target_options argument, and handle
12011 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12012 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12013 clean exit and signal exit code. Don't stop all threads in
12014 non-stop mode. In all-stop mode, only stop all threads when
12015 reporting a stop to GDB. Handle explicit thread stop requests.
12016 (async_file_flush, async_file_mark): New.
12018 (send_sigstop): Use lwpid_of.
12019 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12020 interface changes. In non-stop mode, don't switch to a random
12022 (linux_resume_one_lwp): Use lwpid_of.
12023 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12024 (linux_resume_one_thread): ... this. Handle resume_stop. In
12025 non-stop mode, don't look for pending flag in all threads.
12026 (resume_status_pending_p): Don't consider explicitly suspended
12028 (my_waitpid): Reimplement. Emulate __WALL.
12029 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12031 (sigchld_handler, linux_supports_non_stop, linux_async)
12032 (linux_start_non_stop): New.
12033 (linux_target_ops): Register linux_supports_non_stop, linux_async
12034 and linux_start_non_stop.
12035 (initialize_low): Install SIGCHLD handler.
12036 * thread-db.c (thread_db_create_event, find_one_thread)
12037 (thread_db_get_tls_address): Use lwpid_of.
12038 * win32-low.c (win32_detach): Adjust to use resume_kind.
12039 (win32_wait): Add `options' argument.
12040 * spu-low.c (spu_resume): Adjust to use resume_kind.
12041 (spu_wait): Add `options' argument.
12043 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12045 Decouple target code from remote protocol.
12047 * target.h (enum target_waitkind): New.
12048 (struct target_waitstatus): New.
12049 (struct target_ops) <wait>: Return an unsigned long. Take a
12050 target_waitstatus pointer instead of a char pointer.
12051 (mywait): Likewise.
12052 * target.c (mywait): Change prototype to return an unsigned long.
12053 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12054 * server.h (thread_from_wait, old_thread_from_wait): Delete
12056 (prepare_resume_reply): Change prototype to take a
12058 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12059 (last_status, last_ptid): New.
12060 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12061 pid instead of a signal.
12062 (attach_inferior): Remove "status" and "signal" parameters.
12064 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12066 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12067 (handle_v_requests, myresume): Remove "status" and "signal"
12068 parameters. Adjust.
12069 (handle_status): New.
12070 (main): Delete local `status'. Adjust.
12071 * remote-utils.c: Include target.h.
12072 (prepare_resume_reply): Change prototype to take a
12073 target_waitstatus. Adjust.
12075 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12077 * spu-low.c (spu_wait): Adjust.
12078 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12080 (win32_wait): Adjust.
12082 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12084 * target.h (struct thread_resume): Delete leave_stopped member.
12085 (struct target_ops): Add a `n' argument to the `resume' callback.
12086 * server.c (start_inferior): Adjust.
12087 (handle_v_cont, myresume): Adjust.
12088 * linux-low.c (check_removed_breakpoint): Adjust to resume
12089 interface change, and to removed leave_stopped field.
12090 (resume_ptr): Delete.
12091 (struct thread_resume_array): New.
12092 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12093 resume interface change.
12094 (linux_continue_one_thread, linux_queue_one_thread)
12095 (resume_status_pending_p): Check if the resume field is NULL
12096 instead of checking the leave_stopped member.
12097 (linux_resume): Adjust to the target resume interface change.
12098 * spu-low.c (spu_resume): Adjust to the target resume interface
12100 * win32-low.c (win32_detach, win32_resume): Ditto.
12102 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12104 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12106 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12108 (linux_continue_one_thread): Only preserve the stepping flag if
12109 there's a pending breakpoint.
12111 2009-03-31 Pedro Alves <pedro@codesourcery.com>
12113 * server.c (main): After the inferior having exited, call
12114 remote_close before exiting gdbserver.
12116 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12118 Fix size of FPSCR in Power 7 processors.
12119 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12120 (PPC_FEATURE_HAS_DFP): New #define.
12121 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12124 2009-03-23 Pedro Alves <pedro@codesourcery.com>
12126 * server.c (handle_query) Whitespace and formatting.
12128 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12130 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12131 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12132 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12133 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12134 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12135 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12136 Makefile.in, configure.ac: Fix whitespace throughout.
12137 * configure: Regenerate.
12139 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12141 * inferiors.c (find_inferior): Make it safe for the callback
12142 function to delete the currently iterated inferior.
12144 2009-03-22 Pedro Alves <pedro@codesourcery.com>
12146 * Makefile.in (linuw_low_h): Move higher.
12147 (thread-db.o): Depend on $(linux_low_h).
12149 2009-03-17 Pedro Alves <pedro@codesourcery.com>
12151 Rename "process" to "lwp" throughout.
12153 * linux-low.c (all_processes): Rename to...
12154 (all_lwps): ... this.
12155 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12156 (add_process): Rename to ...
12157 (add_lwp): ... this. Adjust.
12158 (linux_create_inferior): Adjust.
12159 (linux_attach_lwp): Adjust.
12160 (linux_attach): Adjust.
12161 (linux_kill_one_process): Rename to ...
12162 (linux_kill_one_lwp): ... this. Adjust.
12163 (linux_kill): Adjust.
12164 (linux_detach_one_process): Rename to ...
12165 (linux_detach_one_lwp): ... this. Adjust.
12166 (linux_detach): Adjust.
12167 (check_removed_breakpoint): Adjust.
12168 (status_pending_p): Adjust.
12169 (linux_wait_for_process): Rename to ...
12170 (linux_wait_for_lwp): ... this. Adjust.
12171 (linux_wait_for_event): Adjust.
12172 (send_sigstop): Adjust.
12173 (wait_for_sigstop): Adjust.
12174 (stop_all_processes): Rename to ...
12175 (stop_all_lwps): ... this.
12176 (linux_resume_one_process): Rename to ...
12177 (linux_resume_one_lwp): ... this. Adjust.
12178 (linux_set_resume_request, linux_continue_one_thread)
12179 (linux_queue_one_thread, resume_status_pending_p)
12180 (usr_store_inferior_registers, regsets_store_inferior_registers)
12181 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12183 * linux-low.h (get_process): Rename to ...
12184 (get_lwp): ... this. Adjust.
12185 (get_thread_process): Rename to ...
12186 (get_thread_lwp): ... this. Adjust.
12187 (get_process_thread): Rename to ...
12188 (get_lwp_thread): ... this. Adjust.
12189 (struct process_info): Rename to ...
12190 (struct lwp_info): ... this.
12191 (all_processes): Rename to ...
12192 (all_lwps): ... this.
12193 * proc-service.c (ps_lgetregs): Adjust.
12194 * thread-db.c (thread_db_create_event, find_one_thread)
12195 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12197 2009-03-14 Pedro Alves <pedro@codesourcery.com>
12199 * server.c (handle_query): Handle "qAttached".
12201 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12203 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12204 GPLv3, update license URL.
12206 2009-03-01 Doug Evans <dje@google.com>
12208 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12209 (server_h): Add gdb_signals.h.
12210 (signals.o): Update.
12211 * server.h (target_signal_from_host,target_signal_to_host_p)
12212 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12214 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12216 * remote-utils.c (getpkt): Also generate remote-debug
12217 information if noack_mode is set.
12219 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12221 * server.c (handle_query): Report qXfer:siginfo:read and
12222 qXfer:siginfo:write as supported and handle them.
12223 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12224 * linux-low.c (linux_xfer_siginfo): New.
12225 (linux_target_ops): Set it.
12227 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12229 * server.c (gdbserver_usage): Mention --remote-debug.
12230 (main): Accept '--remote-debug' switch.
12232 2009-01-18 Doug Evans <dje@google.com>
12234 * regcache.c (new_register_cache): No need to check result of xcalloc.
12235 * server.c (handle_search_memory): Back out calls to xmalloc,
12236 result is checked and error is returned to user upon failure.
12237 (handle_query): Ditto. Add more checks for result of malloc.
12238 (handle_v_cont): Check result of malloc, report error back to
12240 (handle_v_run): Ditto. Call freeargv.
12241 * server.h (freeargv): Declare.
12242 * utils.c (freeargv): New fn.
12244 2009-01-15 Doug Evans <dje@google.com>
12246 * gdbreplay.c (perror_with_name): Make arg const char *.
12247 * server.h (target_signal_to_name): Make return type const char *.
12248 * thread-db.c (thread_db_err_str): Make return type const char *.
12249 * utils.c (perror_with_name): Make arg const char *.
12251 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12253 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12254 when handling a EXIT_PROCESS_DEBUG_EVENT.
12256 2009-01-06 Joel Brobecker <brobecker@adacore.com>
12258 * gdbreplay.c (gdbreplay_version): Update copyright year.
12259 * server.c (gdbserver_version): Likewise.
12261 2009-01-05 Doug Evans <dje@google.com>
12263 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12264 (handle_extended_wait): Improve comment.
12266 2008-12-13 Doug Evans <dje@google.com>
12268 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12269 * server.h (ATTR_MALLOC): New macro.
12270 (xmalloc,xcalloc,xstrdup): Declare.
12271 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12272 * inferiors.c: Ditto.
12273 * linux-low.c: Ditto.
12274 * mem-break.c: Ditto.
12275 * regcache.c: Ditto.
12276 * remote-utils.c: Ditto.
12279 * win32-low.c: Ditto.
12281 2008-12-12 Doug Evans <dje@google.com>
12283 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12284 in debugging printf.
12286 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12288 2008-12-09 Doug Evans <dje@google.com>
12290 * linux-low.h (struct process_info): Delete member tid, unused.
12291 * thread-db.c (find_one_thread): Update.
12292 (maybe_attach_thread): Update.
12294 2008-12-02 Pedro Alves <pedro@codesourcery.com>
12296 * target.h (struct target_ops): Add qxfer_osdata member.
12297 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12299 (linux_qxfer_osdata): New functions.
12300 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12302 * server.c (handle_query): Handle "qXfer:osdata:read:".
12303 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12304 (buffer_xml_printf): New functions.
12305 * server.h (struct buffer): New.
12306 (buffer_grow_str, buffer_grow_str0): New macros.
12307 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12308 (buffer_xml_printf): Declare.
12310 2008-11-24 Doug Evans <dje@google.com>
12312 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12314 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12316 * server.c (handle_v_run): Always use the supplied argument list.
12318 2008-11-19 Bob Wilson <bob.wilson@acm.org>
12320 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12321 (xtensa_regmap_table): Add entry for scompare1.
12323 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12325 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12326 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12327 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12328 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12329 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12330 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12331 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12332 XML target descriptions.
12333 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12334 when inferior is running on an ISA 2.05 or later processor. Add
12335 special case to return offset for full 64-bit slot of FPSCR when
12338 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12340 * Makefile.in (SFILES, clean): Added sparc64 files.
12341 (reg-sparc64.o, reg-sparc64.c): New.
12342 * configure.srv (sparc*-*-linux*): New configuration.
12343 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12344 syscall arguments for SPARC.
12345 (regsets_store_inferior_registers): Likewise.
12346 * linux-sparc-low.c: New file.
12348 2008-10-21 Doug Evans <dje@google.com>
12350 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12351 (READLINE_DIR,READLINE_DEP): Delete.
12352 (INTERNAL_CFLAGS): Update.
12353 (LINTFLAGS): Update.
12355 2008-10-10 Pedro Alves <pedro@codesourcery.com>
12357 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12358 whole argv from the last run, not just argv[0].
12360 2008-09-08 Pedro Alves <pedro@codesourcery.com>
12362 * regcache.c (new_register_cache): Return NULL if the register
12363 cache size isn't known yet.
12364 (free_register_cache): Avoid dereferencing a NULL regcache.
12366 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12368 * configure.srv: Merge MIPS and MIPS64.
12370 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12372 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12374 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
12376 * Makefile.in: Add required vsx dependencies.
12378 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12379 Declare init_registers_powerpc_vsx32l.
12380 Declare init_registers_powerpc_vsx64l.
12381 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12382 (ppc_arch_setup): Check for VSX in hwcap.
12383 (ppc_fill_vsxregset): New function.
12384 (ppc_store_vsxregset): New function.
12385 Add new VSX entry in regset_info target_regsets.
12387 * configure.srv: Add new VSX dependencies.
12389 2008-08-12 Pedro Alves <pedro@codesourcery.com>
12391 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12392 (remote_open): Set or clear transport_is_reliable.
12393 (putpkt_binary): Don't expect acks in noack mode.
12394 (getpkt): Don't send ack/nac in noack mode.
12395 * server.c (handle_general_set): Handle QStartNoAckMode.
12396 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12398 (main): Reset noack_mode on every connection.
12399 * server.h (noack_mode): Declare.
12401 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12403 * Makefile.in (GDBREPLAY_OBS): New variable.
12404 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12406 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12407 Daniel Jacobowitz <dan@codesourcery.com>
12409 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12410 (usr_store_inferior_registers): Likewise.
12411 (regsets_store_inferior_registers): Likewise.
12413 2008-07-31 Rolf Jansen <rj@surtec.com>
12414 Pedro Alves <pedro@codesourcery.com>
12416 * configure.ac: Check for memmem declaration.
12417 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12418 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12419 (disable_packet_qfThreadInfo): Unconditionally compile.
12420 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12421 * configure, config.in: Regenerate.
12423 2008-07-28 Doug Kwan <dougkwan@google.com>
12425 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12426 (linux_write_memory): Remove declaration of errno.
12428 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12430 * linux-low.c (handle_extended_wait): Do not use "status"
12431 variable uninitialized.
12433 2008-07-07 Pedro Alves <pedro@codesourcery.com>
12435 * server.c (handle_v_attach): Inhibit reporting dll changes.
12437 2008-06-27 Pedro Alves <pedro@codesourcery.com>
12439 * remote-utils.c (prepare_resume_reply): If requested, don't
12440 output "thread:TID" in the T stop reply.
12442 * server.c (disable_packet_vCont, disable_packet_Tthread)
12443 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12444 (handle_query): If requested, disable support for qC, qfThreadInfo
12446 (handle_v_requests): If requested, disable support for vCont.
12447 (gdbserver_show_disableable): New.
12448 (main): Handle --disable-packet and --disable-packet=LIST.
12450 * server.h (disable_packet_vCont, disable_packet_Tthread)
12451 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12453 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12455 * server.c (gdbserver_usage): Mention --version.
12457 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12459 * Makefile.in (gdbreplay.o): New rule.
12461 2008-06-06 Joseph Myers <joseph@codesourcery.com>
12463 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12464 message, not gdbserver.
12466 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
12467 Nathan Sidwell <nathan@codesourcery.com>
12468 Joseph Myers <joseph@codesourcery.com>
12470 * acinclude.m4: Include ../../config/acx.m4.
12471 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12472 * configure, config.in: Regenerate.
12473 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12474 * server.c (gdbserver_version): Print PKGVERSION.
12475 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12476 (main): Adjust gdbserver_usage calls.
12477 * gdbreplay.c (version, host_name): Add declarations.
12478 (gdbreplay_version, gdbreplay_usage): New.
12479 (main): Accept --version and --help options.
12481 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12483 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12484 (arm_breakpoint_at): Handle Thumb.
12485 (the_low_target): Add comment.
12487 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12489 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12491 2008-05-09 Doug Evans <dje@google.com>
12493 * server.h (decode_search_memory_packet): Declare.
12494 * remote-utils.c (decode_search_memory_packet): New fn.
12495 * server.c (handle_search_memory_1): New fn.
12496 (handle_search_memory): New fn.
12497 (handle_query): Process qSearch:memory packets.
12499 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12501 * regcache.c (registers_length): Remove.
12502 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12503 full register packet.
12504 * regcache.h (registers_length): Remove prototype.
12505 * server.h (PBUFSIZ): Define to 16384.
12507 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12509 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12510 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12511 powerpc-64l.o, and powerpc-altivec64l.o.
12512 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12513 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12514 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12515 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12516 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12519 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12520 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12521 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12522 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12523 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12524 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12525 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12526 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12527 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12528 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12531 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12532 (init_registers_powerpc_32l): ... this new prototype.
12533 (init_registers_powerpc_32): Remove, replace by ...
12534 (init_registers_powerpc_altivec32l): ... this new prototype.
12535 (init_registers_powerpc_e500): Remove, replace by ...
12536 (init_registers_powerpc_e500l): ... this new prototype.
12537 (init_registers_ppc64): Remove, replace by ...
12538 (init_registers_powerpc_64l): ... this new prototype.
12539 (init_registers_powerpc_64): Remove, replace by ...
12540 (init_registers_powerpc_altivec64l): ... this new prototype.
12541 (ppc_num_regs): Set to 73.
12542 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12543 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12544 (ppc_cannot_store_register): Handle orig_r3 and trap.
12545 (ppc_arch_setup): Update init_registers_... calls.
12546 (ppc_fill_gregset): Handle orig_r3 and trap.
12548 * inferiors.c (clear_inferiors): Reset current_inferior.
12550 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
12552 * acinclude.m4: Add override.m4.
12553 * configure: Regenerate.
12555 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12557 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12558 initial call to init_register_ppc64.
12560 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12562 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12563 single powerpc*-*-linux* case.
12564 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12566 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12568 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12569 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12571 * linux-ppc-low.c: Include <elf.h>.
12572 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12573 (ppc_hwcap): New global variable.
12574 (ppc_regmap): Remove __SPE__ #ifdef sections.
12575 (ppc_regmap_e500): New global variable.
12576 (ppc_cannot_store_register): Update __SPE__ special case.
12577 (ppc_get_hwcap): New function.
12578 (ppc_arch_setup): Use it to determine whether inferior supports
12579 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12580 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12581 Do not access registers if target does not support AltiVec.
12582 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12583 Do not access registers if target does not support SPE.
12584 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12586 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12588 * linux-low.c (disabled_regsets, num_regsets): New.
12589 (use_regsets_p): Delete.
12590 (linux_wait_for_process): Clear disabled_regsets.
12591 (regsets_fetch_inferior_registers): Check and set it.
12592 (regsets_store_inferior_registers): Likewise.
12593 (linux_fetch_registers, linux_store_registers): Do not use
12595 (initialize_low): Allocate disabled_regsets.
12597 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12599 * Makefile.in (LIBOBJS): New.
12600 (OBS): Use LIBOBJS.
12601 (memmem.o): New rule.
12602 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12603 * configure: Regenerated.
12605 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12607 * server.c (handle_query): Never return "unsupported" for
12608 qXfer:features:read queries.
12610 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12612 * server.c (get_features_xml): Fix inverted condition.
12613 (handle_query): Always support qXfer:feature:read.
12615 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12617 * server.c (wrapper_argv): New.
12618 (start_inferior): Handle wrapper_argv. If set, expect an extra
12620 (gdbserver_usage): Document --wrapper.
12621 (main): Parse --wrapper.
12623 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12625 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12626 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12627 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12628 (ppc_set_pc): Likewise.
12629 (ppc_arch_setup): New function.
12630 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12631 of collect_register.
12632 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12634 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12636 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12637 instead of linux-ppc64-low.o.
12638 * linux-ppc64-low.c: Remove file.
12639 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12640 (linux-ppc64-low.o): Remove rule.
12642 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12643 (init_registers_powerpc_64): Likewise.
12644 (ppc_regmap): Conditionally define depending on __powerpc64__.
12645 (ppc_cannot_store_register): Do not special-case "fpscr" when
12646 compiled on __powerpc64__.
12647 (ppc_collect_ptrace_register): New function.
12648 (ppc_supply_ptrace_register): New function.
12649 (ppc_breakpoint): Change type to "unsigned int".
12650 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12651 (the_low_target): Conditionally provide initializers for the
12652 arch_setup member depending on __powerpc64__. Install
12653 collect_ptrace_register and supply_ptrace_register members.
12655 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12657 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12658 * server.c (gdbserver_xmltarget): Define.
12659 (get_features_xml): Use it to replace "target.xml" and arch_string.
12661 * configure.srv: Remove srv_xmltarget. Add XML files that were
12662 mentioned there to srv_xmlfiles instead. Remove conditional tests
12663 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12664 srv_xmlfiles and srv_regobj to include all possible choices.
12665 * configure.ac (srv_xmltarget): Remove.
12666 (srv_xmlfiles): Do not add "target.xml".
12667 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12668 checks for supplementary target information.
12669 * configure: Regenerate.
12670 * Makefile.in (XML_TARGET): Remove.
12671 (target.xml): Remove rule.
12672 (clean): Do not clean up target.xml.
12673 (.PRECIOUS): Do not mention target.xml.
12675 * target.h (struct target_ops): Remove arch_string member.
12676 * linux-low.c (linux_arch_string): Remove.
12677 (linux_target_ops): Remove arch_string initializer.
12678 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12679 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12680 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12681 * spu-low.c (spu_arch_string): Remove.
12682 (spu_target_ops): Remove arch_string initializer.
12683 * win32-low.c (win32_arch_string): Remove.
12684 (win32_target_ops): Remove arch_string initializer.
12685 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12686 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12687 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12689 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12691 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12692 by collect_ptrace_register and supply_ptrace_register hooks.
12693 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12694 instead of checking for the_low_target.left_pad_xfer.
12695 (usr_store_inferior_registers): Use collect_ptrace_register callback
12696 instead of checking for the_low_target.left_pad_xfer.
12698 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12699 (s390_supply_ptrace_register): Likewise.
12700 (s390_fill_gregset): Call s390_collect_ptrace_register.
12701 (the_low_target): Update.
12703 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12704 (ppc_supply_ptrace_register): Likewise.
12705 (the_low_target): Update.
12707 * linux-i386-low.c (the_low_target): Update.
12708 * linux-x86-64-low.c (the_low_target): Update.
12710 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12712 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12713 reg-s390.o and reg-s390x.o.
12715 * linux-low.c (new_inferior): New global variable.
12716 (linux_create_inferior, linux_attach): Set it.
12717 (linux_wait_for_process): Call the_low_target.arch_setup after the
12718 target has stopped for the first time.
12719 (initialize_low): Do not call the_low_target.arch_setup.
12721 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12722 (s390_set_pc): Likewise.
12723 (s390_arch_setup): New function.
12724 (the_low_target): Use s390_arch_setup as arch_setup routine.
12726 * regcache.c (realloc_register_cache): New function.
12727 (set_register_cache): Call it for each existing regcache.
12729 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12731 * server.h (init_registers): Remove prototype.
12733 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12734 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12735 instead of init_registers ().
12736 * linux-arm-low.c (init_registers_arm): Add prototype.
12737 (init_registers_arm_with_iwmmxt): Likewise.
12738 (the_low_target): Add initializer for arch_setup field.
12739 * linux-cris-low.c (init_registers_cris): Add prototype.
12740 (the_low_target): Add initializer for arch_setup field.
12741 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12742 (the_low_target): Add initializer for arch_setup field.
12743 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12744 (the_low_target): Add initializer for arch_setup field.
12745 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12746 (the_low_target): Add initializer for arch_setup field.
12747 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12748 (the_low_target): Add initializer for arch_setup field.
12749 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12750 (the_low_target): Add initializer for arch_setup field.
12751 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12752 (init_registers_mips64_linux): Likewise.
12753 (the_low_target): Add initializer for arch_setup field.
12754 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12755 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12756 (the_low_target): Add initializer for arch_setup field.
12757 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12758 (init_registers_powerpc_64): Likewise.
12759 (the_low_target): Add initializer for arch_setup field.
12760 * linux-s390-low.c (init_registers_s390): Add prototype.
12761 (init_registers_s390x): Likewise.
12762 (the_low_target): Add initializer for arch_setup field.
12763 * linux-sh-low.c (init_registers_sh): Add prototype.
12764 (the_low_target): Add initializer for arch_setup field.
12765 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12766 (the_low_target): Add initializer for arch_setup field.
12767 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12768 (the_low_target): Add initializer for arch_setup field.
12770 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12771 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12772 instead of init_registers ().
12773 * win32-arm-low.c (init_registers_arm): Add prototype.
12774 (the_low_target): Add initializer for arch_setup field.
12775 * win32-i386-low.c (init_registers_i386): Add prototype.
12776 (the_low_target): Add initializer for arch_setup field.
12778 * spu-low.c (init_registers_spu): Add prototype.
12779 (initialize_low): Call initialie_registers_spu () instead of
12780 initialize_registers ().
12782 2008-02-19 Pedro Alves <pedro@codesourcery.com>
12784 * server.c (handle_v_requests): When handling the vRun and vAttach
12785 packets, if already debugging a process, don't kill it. Return an
12788 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12790 * server.c (handle_query): Correct length check.
12792 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12794 * win32-low.c (do_initial_child_stuff): Add process handle
12795 parameter. Set current_process_handle and current_process_id from the
12796 parameters. Clear globals.
12797 (win32_create_inferior): Don't set current_process_handle and
12798 current_process_id here. Instead pass them on the call to
12799 do_initial_child_stuff.
12800 (win32_attach): Likewise.
12801 (win32_clear_inferiors): New.
12802 (win32_kill): Don't close the current process handle or the
12803 current thread handle here. Instead call win32_clear_inferiors.
12804 (win32_detach): Don't open a new handle to the process. Call
12805 win32_clear_inferiors.
12806 (win32_join): Don't rely on current_process_handle; open a new
12807 handle using the process id.
12808 (win32_wait): Call win32_clear_inferiors when the inferior process
12811 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12813 * server.c (monitor_show_help): Add "exit".
12815 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12817 * Makefile.in (SFILES): Add linux-xtensa-low.c.
12818 (clean): Add reg-xtensa.c.
12819 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12820 * configure.srv (xtensa*-*-linux*) New target.
12821 * linux-xtensa-low.c: New.
12822 * xtensa-xtregs.c: New.
12824 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12826 * hostio.c: Don't include errno.h.
12827 (errno_to_fileio_errno): Move to hostio-errno.
12828 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12829 error number outputting to the target->hostio_last_error callback.
12830 (hostio_packet_error): Use FILEIO_EINVAL directly.
12831 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12832 calls to hostio_error.
12833 * hostio-errno.c: New.
12834 * server.h (hostio_last_error_from_errno): Declare.
12835 * target.h (target_ops): Add hostio_last_error member.
12836 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12837 as hostio_last_error handler.
12838 * spu-low.c (spu_target_ops): Likewise.
12839 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12840 (wince_hostio_last_error): New functions.
12841 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12842 as hostio_last_error handler.
12843 (win32_target_ops) [!_WIN32_WCE]: Register
12844 hostio_last_error_from_errno as hostio_last_error handler.
12845 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12846 (hostio-errno.o): New rule.
12847 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12848 * configure.srv (srv_hostio_err_objs): New variable. Default to
12850 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12851 * configure: Regenerate.
12853 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12855 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12856 (linux_kill, linux_detach): Clean up the process list.
12857 * remote-utils.c (remote_open): Improve port number parsing.
12858 (putpkt_binary, input_interrupt): Only send interrupts if the target
12860 * server.c (extended_protocol): Make static.
12861 (attached): Define earlier.
12862 (exit_requested, response_needed, program_argv): New variables.
12863 (target_running): New.
12864 (start_inferior): Clear attached here.
12865 (attach_inferior): Set attached here.
12866 (require_running): Define.
12867 (handle_query): Use require_running and target_running. Implement
12869 (handle_v_attach, handle_v_run): New.
12870 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12871 (gdbserver_usage): Update.
12872 (main): Redo argument parsing. Handle --debug and --multi. Handle
12873 --attach along with other options or after the port. Save
12874 program_argv. Support no initial program. Resynchronize
12875 communication with GDB after an error. Handle "monitor exit".
12876 Use require_running and target_running. Always allow the extended
12877 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12878 restart in extended mode.
12879 * README: Refer to the GDB manual. Update --attach usage.
12881 2007-12-20 Andreas Schwab <schwab@suse.de>
12883 * linux-low.c (STACK_SIZE): Define.
12884 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12885 (linux_test_for_tracefork): Likewise.
12887 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12889 * linux-low.c (linux_wait_for_event): Update messages. Do not
12890 reinsert auto-delete breakpoints.
12891 * mem-break.c (struct breakpoint): Change return type of handler to
12893 (set_breakpoint_at): Update handler type.
12894 (reinsert_breakpoint_handler): Return 1 instead of calling
12896 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12898 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12899 * mem-break.h (set_breakpoint_at): Update handler type.
12900 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12901 * win32-low.c (auto_delete_breakpoint): New.
12902 (get_child_debug_event): Use it.
12904 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12906 * configure.ac: Check for pread and pwrite.
12907 * hostio.c (handle_pread): Fall back to lseek and read.
12908 (handle_pwrite): Fall back to lseek and write.
12909 * config.in, configure: Regenerated.
12911 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12913 * server.c (myresume): Add own_buf argument.
12914 (main): Update calls.
12916 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12918 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12919 * remote-utils.c (remote_open): Do not call disable_async_io.
12920 (block_async_io): Delete.
12921 (unblock_async_io): Make static.
12922 (initialize_async_io): New.
12923 * server.c (handle_v_cont): Handle async I/O here.
12924 (myresume): Likewise. Move other common resume tasks here...
12925 (main): ... from here. Call initialize_async_io. Disable async
12926 I/O before the main loop.
12927 * server.h (initialize_async_io): Declare.
12928 (block_async_io, unblock_async_io): Delete prototypes.
12929 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12931 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12933 * remote-utils.c (readchar): Allow binary data in received messages.
12935 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12937 * win32-low.c (attaching): New global.
12938 (win32_create_inferior): Clear the `attaching' global.
12939 (win32_attach): Set the `attaching' global.
12940 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12941 attaching. Only set a breakpoint at the entry point if not
12944 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12946 * server.c (main): Don't report dll events on the initial
12947 connection on attaches.
12949 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12951 * server.c (main): Relax numerical bases supported for the pid of
12952 the --attach command line argument.
12954 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12956 * win32-low.c (win32_attach): Call OpenProcess before
12957 DebugActiveProcess, not after. Add last error output to error
12960 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12962 * win32-low.c (win32_get_thread_context)
12963 (win32_set_thread_context): New functions.
12964 (thread_rec): Use win32_get_thread_context.
12965 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12966 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12969 2007-12-03 Leo Zayas
12970 Pedro Alves <pedro_alves@portugalmail.pt>
12972 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12974 (child_add_thread): Minor cleanup.
12975 (child_continue): Resume artificially suspended threads before
12976 calling ContinueDebugEvent.
12977 (suspend_one_thread): New.
12978 (fake_breakpoint_event): New.
12979 (get_child_debug_event): Change return type to int. Check here if
12980 gdb sent an interrupt request. If a soft interrupt was requested,
12981 fake a breakpoint event. Return 0 if there is no event to handle,
12983 (win32_wait): Don't check here if gdb sent an interrupt request.
12984 Ensure there is a valid event to handle.
12985 (win32_request_interrupt): Add soft interruption method as last
12988 2007-12-03 Leo Zayas
12989 Pedro Alves <pedro_alves@portugalmail.pt>
12991 * win32-low.h (win32_thread_info): Add descriptions to the
12992 structure members. Replace `suspend_count' counter by a
12994 * win32-low.c (thread_rec): Update condition of when to get the
12995 context from the inferior. Rely on ContextFlags being set if it
12996 has already been retrieved. Only suspend the inferior thread if
12997 we haven't already. Warn if that fails.
12998 (continue_one_thread): s/suspend_count/suspended/. Only call
12999 ResumeThread once. Warn if that fails.
13001 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13003 * win32-low.c (win32_wait): Don't read from the inferior when it
13004 has already exited.
13006 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13008 * Makefile.in (win32_low_h): New variable.
13009 (win32-low.o): Add dependency on $(win32_low_h).
13010 (win32-arm-low.o, win32-i386-low.o): New rules.
13012 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13014 * hostio.c: Correct copyright year.
13016 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13018 * Makefile.in (OBS): Add hostio.o.
13019 (hostio.o): New rule.
13020 * server.h (handle_vFile): Declare.
13021 * hostio.c: New file.
13022 * server.c (handle_v_requests): Take packet_len and new_packet_len
13023 for binary packets. Call handle_vFile.
13024 (main): Update call to handle_v_requests.
13026 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13028 * linux-low.c: Include <sched.h>.
13030 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13032 * linux-low.c (linux_tracefork_grandchild): New.
13033 (linux_tracefork_child): Use clone.
13034 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13036 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13038 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13040 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13042 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13044 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13046 * inferiors.c (change_inferior_id): Delete.
13047 (add_pid_to_list, pull_pid_from_list): New.
13048 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13049 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13050 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13051 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13052 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13053 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13054 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13055 (using_threads): Always set to 1.
13056 (handle_extended_wait): New.
13057 (add_process): Do not set TID.
13058 (linux_create_inferior): Set must_set_ptrace_flags.
13059 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13060 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13061 (linux_thread_alive): Rename TID argument to LWPID.
13062 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13063 (linux_wait_for_event): Do not use TID or check using_threads. Update
13064 call to dead_thread_notify. Call handle_extended_wait.
13065 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13066 (send_sigstop): Delete sigstop_sent.
13067 (wait_for_sigstop): Avoid TID.
13068 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13069 (linux_test_for_tracefork): New.
13070 (linux_lookup_signals): Use thread_db_active and
13071 linux_supports_tracefork_flag.
13072 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13073 * linux-low.h (get_process_thread): Avoid TID.
13074 (struct process_ifo): Move thread_known and tid to the end. Remove
13076 (linux_attach_lwp, thread_db_init): Update prototypes.
13077 * server.h (change_inferior_id): Delete prototype.
13078 (add_pid_to_list, pull_pid_from_list): New prototypes.
13079 * thread-db.c (thread_db_use_events): New.
13080 (find_first_thread): Rename to...
13081 (find_one_thread): ...this. Update callers and messages. Do not
13082 call fatal. Check thread_db_use_events. Do not call
13083 change_inferior_id or new_thread_notify.
13084 (maybe_attach_thread): Update. Do not call new_thread_notify.
13085 (thread_db_init): Set thread_db_use_events. Check use_events.
13086 * utils.c (fatal, warning): Correct message prefix.
13088 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13090 * Makefile.in (clean): Remove new files.
13091 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13092 (powerpc-64.o, powerpc-64.c): New rules.
13093 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13094 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13096 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13098 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13099 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13100 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13101 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13102 (target_regsets): Add AltiVec and SPE register sets.
13103 * configure.ac: Check for AltiVec and SPE.
13104 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13105 (ppc_fill_vrregset, ppc_store_vrregset): New.
13106 (target_regsets): Add AltiVec register set.
13107 * configure: Regenerated.
13109 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13111 * linux-low.c (O_LARGEFILE): Define.
13112 (linux_read_memory): Use /proc/PID/mem.
13113 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13114 * configure, config.in: Regenerated.
13116 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13118 * linux-low.c (linux_wait_for_event): Do not pass signals while
13121 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13123 * win32-low.c (create_process): New.
13124 (win32_create_inferior): Use create_process instead of
13125 CreateProcess. If create_process failed retry appending an ".exe"
13126 suffix. Store the GetLastError result immediatelly after
13127 create_process calls and use it on the call to error.
13129 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13131 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13133 2007-08-23 Joel Brobecker <brobecker@adacore.com>
13135 * configure.ac: Switch license to GPLv3.
13137 2007-08-01 Michael Snyder <msnyder@access-company.com>
13139 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13141 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13143 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13145 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13146 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13147 CloseToolhelp32Snapshot.
13148 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13149 CloseToolhelp32Snapshot.
13151 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
13153 * server.c (main): Check for inferior exit before main loop.
13155 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13157 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13158 instead of on tmp_desc.
13160 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13161 Daniel Jacobowitz <dan@codesourcery.com>
13163 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13164 (add_thread): Minor cleanups.
13165 (clear_inferiors): Move lower in the file. Clear the DLL
13167 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13168 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13169 (xml_escape_text): New.
13170 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13172 (handle_v_cont): Report errors.
13173 (gdbserver_version): Update.
13174 (main): Correct size of own_buf. Do not report initial DLL events.
13175 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13176 (unloaded_dll, xml_escape_text): New.
13177 * win32-low.c (enum target_waitkind): Update comments.
13178 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13179 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13180 (win32_EnumProcessModules, win32_GetModuleInformation)
13181 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13182 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13183 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13184 (win32_Module32First, win32_Module32Next, load_toolhelp)
13185 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13186 (get_child_debug_event): Handle DLL events.
13187 (win32_wait): Likewise.
13189 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13191 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13192 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13194 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13196 * win32-low.c (handle_output_debug_string): Ignore event if not
13199 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13201 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13203 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13205 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13207 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13209 * inferiors.c (change_inferior_id): Add comment.
13210 * linux-low.c (check_removed_breakpoint): Add an early
13211 prototype. Improve debug output.
13212 (linux_attach): Doc update.
13213 (linux_detach_one_process, linux_detach): Clean up before releasing
13215 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13216 * linux-low.h (struct process_info): Doc improvement.
13217 * mem-break.c (delete_all_breakpoints): New.
13218 * mem-break.h (delete_all_breakpoints): New prototype.
13219 * thread-db.c (find_first_thread): New.
13220 (thread_db_create_event): Call it instead of
13221 thread_db_find_new_threads. Clean up unused variables.
13222 (maybe_attach_thread): Remove first thread handling.
13223 (thread_db_find_new_threads): Use find_first_thread.
13224 (thread_db_get_tls_address): Likewise.
13226 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13228 * thread-db.c (thread_db_find_new_threads): Add prototype.
13229 (thread_db_create_event): Check for the main thread before adding
13231 (maybe_attach_thread): Only enable event reporting if TID == 0.
13232 (thread_db_get_tls_address): Check for new threads.
13234 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13236 * linux-low.c (linux_create_inferior): Try execv before execvp.
13237 * spu-low.c (spu_create_inferior): Likewise.
13239 2007-06-13 Mike Frysinger <vapier@gentoo.org>
13241 * linux-low.c (linux_create_inferior): Change execv to execvp.
13242 * spu-low.c (spu_create_inferior): Likewies.
13244 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13246 * Makefile.in (clean): Clean new files instead of deleted ones.
13247 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13248 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13250 * configure.srv: Specify XML files and new regformats for MIPS and
13252 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13253 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13254 an entry for the restart register.
13255 (mips_cannot_fetch_register, mips_cannot_store_register)
13256 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13257 register names to match the XML descriptions.
13258 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13259 restart register instead of $0.
13261 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13262 Markus Deuling <deuling@de.ibm.com>
13264 * remote-utils.c (decode_xfer_write): New function.
13265 * server.h (decode_xfer_write): Add prototype.
13266 * server.c (handle_query): Add PACKET_LEN argument. Support
13267 qXfer:spu:read and qXfer:spu:write packets.
13268 (main): Pass packet_len to handle_query.
13269 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13270 * target.h (target_ops): Add qxfer_spu.
13272 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13274 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13275 accessing non-seekable spufs files.
13277 2007-05-16 Markus Deuling <deuling@de.ibm.com>
13279 * server.c (handle_query): Add reply for qC packet.
13281 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13282 Leo Zayas <lerele@champenstudios@com>
13284 * server.h (check_remote_input_interrupt_request): New function.
13285 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13286 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13287 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13288 (check_remote_input_interrupt_request): New function.
13289 * server.h (check_remote_input_interrupt_request): Declare.
13290 * win32-low.c (winapi_DebugBreakProcess,
13291 winapi_GenerateConsoleCtrlEvent): New typedefs.
13292 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13294 (win32_wait): Check for remote interrupt request
13295 with check_remote_input_interrupt_request.
13296 (win32_request_interrupt): New function.
13297 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13299 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13301 * win32-low.c (debug_registers_changed,
13302 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13303 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13304 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13305 (thread_rec): Get context using the low target.
13306 (child_add_thread): Call thread_added on the low target,
13307 which does the same thing.
13309 (do_initial_child_stuff): Remove debug registers references.
13310 Set context using the low target. Resume threads after
13311 setting the contexts.
13312 (child_continue): Remove dead variable. Remove debug
13313 registers references.
13314 (child_fetch_inferior_registers): Go through the low target.
13315 (do_child_store_inferior_registers): Remove.
13316 (child_store_inferior_registers): Go through the low target.
13317 (win32_resume): Remove debug registers references.
13318 Set context using the low target.
13319 (handle_exception): Change return type to void. Don't record
13320 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13321 first chance exception.
13322 (get_child_debug_event): Change return type to void. Remove
13323 goto loop. Always return after waiting for debug event.
13324 (win32_wait): Convert to switch statement. Handle spurious
13327 * win32-i386-low.c (debug_registers_changed,
13328 debug_registers_used): New.
13329 (initial_stuff): Rename to ...
13330 (i386_initial_stuff): ... this. Clear debug registers
13332 (store_debug_registers): Delete.
13333 (i386_get_thread_context): New.
13334 (load_debug_registers): Delete.
13335 (i386_set_thread_context): New.
13336 (i386_thread_added): New.
13337 (single_step): Rename to ...
13338 (i386_single_step): ... this.
13339 (do_fetch_inferior_registers): Rename to ...
13340 (i386_fetch_inferior_register): ... this.
13341 (i386_store_inferior_register): New.
13342 (the_low_target): Adapt to new interface.
13344 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13345 (arm_get_thread_context): New.
13346 (arm_set_thread_context): New.
13348 (do_fetch_inferior_registers): Rename to ...
13349 (arm_fetch_inferior_register): ... this.
13350 (arm_store_inferior_register): New.
13351 (arm_wince_breakpoint): Reimplement as unsigned long.
13352 (arm_wince_breakpoint_len): Define.
13353 (the_low_target): Adapt to new interface.
13355 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13356 load_debug_registers. Add get_thread_context, set_thread_context,
13357 thread_added and store_inferior_register. Rename
13358 fetch_inferior_registers to fetch_inferior_register.
13359 (regptr): Remove declaration.
13361 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13363 * linux-low.c (linux_detach): Change return type to int. Return 0.
13364 * spu-low.c (spu_detach): Likewise.
13366 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13368 * target.h (target_ops): Change return type of detach to int.
13370 (join_inferior): New.
13371 * server.c (main): Don't skip detach support on mingw32.
13372 If the inferior doesn't support detaching return error.
13373 Call join_inferior instead of using waitpid.
13374 * linux-low.c (linux_join): New.
13375 (linux_target_op): Add linux_join.
13376 * spu-low.c (spu_join): New.
13377 (spu_target_ops): Add spu_join.
13378 * win32-low.c (win32_detach): Adapt to new interface.
13379 Reopen current_process_handle before detaching. Issue a child
13380 resume before detaching.
13382 (win32_target_op): Add win32_join.
13384 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13386 * win32-low.c (win32-attach): Fix return value.
13387 * target.h (target_ops): Describe ATTACH return values.
13389 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13391 * win32-low.c (GETPROCADDRESS): Define.
13392 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13393 (winapi_DebugSetProcessKillOnExit): Likewise.
13394 (win32_create_inferior): Force usage of ansi CreateProcessA.
13395 (win32_attach): Use GETPROCADDRESS.
13396 (win32_detach): Likewise.
13398 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13400 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13402 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13404 * win32-low.c: Commit leftover changes from 2007-03-29.
13406 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13408 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13409 fields short instead of int. Add explicit padding.
13410 (i387_cache_to_fsave): Remove unnecessary casts.
13411 (i387_fsave_to_cache): Doc fix.
13412 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13414 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13416 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13417 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13419 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13421 * configure.srv (arm*-*-mingw32ce*): Move near the other
13424 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13426 * configure.ac: Add errno checking.
13427 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13428 sys/file.h and malloc.h.
13429 (AC_CHECK_DECLS): Add perror.
13430 (srv_mingwce): Handle.
13431 * configure.srv (i[34567]86-*-cygwin*): Add
13432 win32-i386-low.o to srv_tgtobj.
13433 (i[34567]86-*-mingw*): Likewise.
13434 (arm*-*-mingw32ce*): Add case.
13435 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13436 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13437 [__MINGW32CE__] (strerror): New function.
13438 [__MINGW32CE__] (errno): Define to GetLastError.
13439 [__MINGW32CE__] (COUNTOF): New macro.
13440 (remote_open): Remove extra close call.
13441 * mem-break.c (delete_breakpoint_at): New function.
13442 * mem-break.h (delete_breakpoint_at): Declare.
13443 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13444 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13445 [USE_WIN32API] (read, write): Add char* casts.
13446 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13447 * server.h: Include wincecompat.h on Windows CE.
13448 [HAVE_ERRNO_H]: Check.
13449 (perror): Declare if not declared.
13450 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13451 (perror_with_name): Remove errno declaration.
13452 * wincecompat.h: New.
13453 * wincecompat.c: New.
13454 * win32-low.h: New.
13455 * win32-arm-low.c: New.
13456 * win32-i386-low.c: New.
13457 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13458 (OUTMSG2): Make it safe.
13460 (COUNTOF): New macro.
13461 (NUM_REGS): Get it from the low target.
13462 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13463 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13464 (thread_rec): Let low target handle debug registers.
13465 (child_add_thread): Likewise.
13466 (child_init_thread_list): Likewise.
13467 (continue_one_thread): Likewise.
13469 (do_child_fetch_inferior_registers): Move to ...
13470 * win32-i386-low.c: ... here, and rename to ...
13471 (do_fetch_inferior_registers): ... this.
13472 * win32-low.c (child_fetch_inferior_registers):
13473 Go through the low target.
13474 (do_child_store_inferior_registers): Use regptr.
13475 (strwinerror): New function.
13476 (win32_create_inferior): Handle Windows CE.
13477 Use strwinerror instead of strerror on Windows error
13478 codes. Add program to the error output.
13479 Don't close the main thread handle on Windows CE.
13480 (win32_attach): Use coredll.dll on Windows CE.
13481 (win32_kill): Close current process and current
13483 (win32_detach): Use coredll.dll on Windows CE.
13484 (win32_resume): Let low target handle debug registers, and
13486 (handle_exception): Add/Remove initial breakpoint. Avoid
13487 non-existant WSTOPSIG on Windows CE.
13488 (win32_read_inferior_memory): Cast to remove warning.
13489 (win32_arch_string): Go through the low target.
13490 (initialize_low): Call set_breakpoint_data with the low
13491 target's breakpoint.
13492 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13493 FOP_REGNUM, mappings): Move to ...
13494 * win32-i386-low.c: ... here.
13495 * win32-low.c (win32_thread_info): Move to ...
13496 * win32-low.h: ... here.
13497 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13498 win32-arm-low.c and wincecompat.c.
13499 (all:): Add $EXEEXT.
13500 (install-only:): Likewise.
13501 (gdbserver:): Likewise.
13502 (gdbreplay:): Likewise.
13503 * config.in: Regenerate.
13504 * configure: Regenerate.
13506 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13508 * win32-low.c: Rename typedef thread_info to
13509 win32_thread_info throughout.
13511 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13513 * win32-i386-low.c: Rename to ...
13514 * win32-low.c: ... this.
13515 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13516 * Makefile.in: Likewise.
13518 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13520 * remote-utils.c (monitor_output): Constify msg parameter.
13521 * server.h (monitor_output): Likewise.
13522 * win32-i386-low.c (handle_output_debug_string): New.
13523 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13524 handle_output_debug_string.
13525 (get_child_debug_event): Likewise.
13527 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13529 * server.c (main): Correct strtoul check.
13531 2007-03-27 Jon Ringle <jon@ringle.org>
13533 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13535 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13537 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13539 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13541 * terminal.h: Check HAVE_SGTTY_H.
13543 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
13545 * remote-utils.c (remote_open): Print out the assigned port number.
13547 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13549 * remote-utils.c (monitor_output): New function.
13550 * server.c (debug_threads): Define here.
13551 (monitor_show_help): New function.
13552 (handle_query): Handle qRcmd.
13553 (main): Do not handle 'd' packet.
13554 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13555 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13558 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13560 * Makefile.in (EXEEXT): New.
13561 (clean): Use $(EXEEXT).
13563 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13565 * target.h (target_ops): Rename send_signal to request_interrupt,
13566 and remove enum target_signal parameter.
13567 * linux-low.c (linux_request_interrupt): Rename from
13568 linux_send_signal, and always send SIGINT.
13569 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13570 and always send SIGINT.
13571 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13573 (input_interrupt): Likewise.
13575 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13577 * server.c (get_features_xml): Check if target implemented
13579 * win32-i386-low.c (win32_arch_string): New.
13580 (win32_target_ops): Add win32_arch_string as arch_string member.
13582 2007-02-22 Markus Deuling <deuling@de.ibm.com>
13584 * spu-low.c (spu_arch_string): New.
13585 (spu_target_ops): Add spu_arch_string.
13587 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13589 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13590 * configure.ac: Do not check for terminal.h.
13591 * configure, config.in: Regenerated.
13593 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13595 * Makefile.in (OBS): Add $(XML_BUILTIN).
13596 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13598 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13599 (arm-with-iwmmxt.c): New.
13600 * config.in, configure: Regenerate.
13601 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13602 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13603 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13604 (arm*-*-linux*): Add iWMMXt and regset support.
13605 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13606 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13607 (arm_store_wmmxregset, target_regsets): New.
13608 * server.c (get_features_xml): Take annex argument. Check builtin
13610 (handle_query): Handle multiple annexes.
13612 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13614 * remote-utils.c [USE_WIN32API] (read, write): Define.
13615 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13618 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13620 * linux-i386-low.c (the_low_target): Set arch_string.
13621 * linux-x86-64-low.c (the_low_target): Likewise.
13622 * linux-low.c (linux_arch_string): New.
13623 (linux_target_ops): Add it.
13624 * linux-low.h (struct linux_target_ops): Add arch_string.
13625 * server.c (write_qxfer_response): Use const void * for DATA.
13626 (get_features_xml): New.
13627 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13628 * target.h (struct target_ops): Add arch_string method.
13630 2007-01-03 Denis Pilat <denis.pilat@st.com>
13631 Daniel Jacobowitz <dan@codesourcery.com>
13633 * linux-low.c (linux_kill): Handle being called with no threads.
13634 * win32-i386-low.c (win32_kill): Likewise.
13635 (get_child_debug_event): Clear current_process_handle.
13637 2006-12-30 Denis PILAT <denis.pilat@st.com>
13638 Daniel Jacobowitz <dan@codesourcery.com>
13640 * remote-utils.c (remote_open): Check the type of specified
13641 serial port devices before opening them.
13642 * server.c (main): Kill the inferior if an error occurs during
13643 the first remote_open.
13645 2006-12-05 Markus Deuling <deuling@de.ibm.com>
13647 * README: Update supported targets.
13649 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13651 * Makefile.in (clean): Remove reg-mips64.c.
13652 (reg-mips64.c, reg-mips64.o): New rules.
13653 * configure.srv: Handle mips64. Include regset support for mips.
13654 * linux-mips-low.c (union mips_register): New.
13655 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13656 (mips_breakpoint, mips_breakpoint_at): Use int.
13657 (mips_collect_register, mips_supply_register)
13658 (mips_collect_register_32bit, mips_supply_register_32bit)
13659 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13660 (mips_store_fpregset, target_regsets): New.
13661 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13663 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13665 * configure.srv: Add target "spu*-*-*".
13666 * Makefile.in (clean): Remove reg-spu.c.
13667 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13668 * spu-low.c: New file.
13670 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13672 * configure.ac: Correct td_thr_tls_get_addr test.
13673 * configure: Regenerated.
13675 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13677 * linux-low.c (linux_wait_for_event): Reformat. Use the
13678 pass_signals array.
13679 * remote-utils.c (decode_address_to_semicolon): New.
13680 * server.c (pass_signals, handle_general_set): New.
13681 (handle_query): Mention QPassSignals for qSupported.
13682 (main): Call handle_general_set.
13683 * server.h (pass_signals, decode_address_to_semicolon): New.
13685 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13687 * server.c (handle_query): Correct error handling for read_auxv.
13689 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13691 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13692 and srv_linux_thread_db to yes.
13693 * linux-s390-low.c (s390_fill_gregset): New function.
13694 (target_regsets): Define data structure.
13696 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13698 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13699 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13700 * config.in, configure: Regenerated.
13701 * inferiors.c (gdb_id_to_thread): New function.
13702 (gdb_id_to_thread_id): Use it.
13703 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13704 * linux-low.h (struct process_info): Add th member.
13705 (thread_db_get_tls_address): New prototype.
13706 * remote-utils.c (decode_address): Make non-static.
13707 * server.c (handle_query): Handle qGetTLSAddr.
13708 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13709 * target.h (struct target_ops): Add get_tls_address.
13710 * thread-db.c (maybe_attach_thread): Save the thread handle.
13711 (thread_db_get_tls_address): New.
13713 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13715 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13716 (linux_resume_one_process): Take a siginfo_t *. Update all
13717 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13718 (struct pending_signals): Add a siginfo_t.
13719 (linux_wait_for_process): Always set last_status.
13720 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13721 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13722 * linux-low.h (struct process_info): Add last_status.
13724 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13726 * remote-utils.c (try_rle): New function.
13727 (putpkt_binary): Use it.
13729 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13731 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13732 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13733 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13734 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13735 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13738 2006-08-08 Richard Sandiford <richard@codesourcery.com>
13740 * server.c (terminal_fd): New variable.
13741 (old_foreground_pgrp): Likewise.
13742 (restore_old_foreground_pgrp): New function.
13743 (start_inferior): Record the terminal file descriptor in terminal_fd
13744 and its original foreground group in old_foreground_pgrp. Register
13745 restore_old_foreground_pgrp with atexit().
13747 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13749 * server.c (handle_query): Correct qPart to qXfer.
13751 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13753 * configure.ac: Check for more headers which are missing on
13754 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13755 * configure.srv: Add Cygwin and mingw32.
13756 * remote-utils.c: Don't include headers unconditionally which
13757 are missing on mingw32. Include <winsock.h> for mingw32.
13758 (remote_open): Adjust for mingw32 support. Flush
13759 standard error after writing to it.
13760 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13761 (unblock_async_io, enable_async_io, disable_async_io)
13762 (readchar, getpkt): Update for Winsock support.
13763 (prepare_resume_reply): Expect a protocol signal number.
13764 * server.c: Disable <sys/wait.h> on mingw32.
13765 (start_inferior): Adjust for mingw32 support. Flush
13766 standard error after writing to it.
13767 (attach_inferior): Likewise. Use protocol signal
13769 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13771 * win32-i386-low.c: New file.
13772 * Makefile.in (XM_CLIBS): Set.
13773 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13774 (win32-i386-low.o): New dependency rule.
13775 * linux-low.c (linux_wait): Use target signal numbers.
13776 * target.h (struct target_ops): Doc fix.
13777 * server.h (target_signal_to_name): New prototype.
13778 * gdbreplay.c: Don't include headers unconditionally which
13779 are missing on mingw32. Include <winsock.h> for mingw32.
13780 (remote_close, remote_open): Adjust for Winsock support.
13781 * configure, config.in: Regenerated.
13783 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13785 * server.c (decode_xfer_read, write_qxfer_response): New.
13786 (handle_query): Take a packet length argument. Handle
13787 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13788 the qSupported response.
13789 (main): Update call to handle_query.
13791 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13793 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13794 (putpkt_binary): Renamed from putpkt and adjusted for binary
13796 (putpkt): New wrapper for putpkt_binary.
13797 (readchar): Don't mask off the high bit.
13798 (decode_X_packet): New function.
13799 * server.c (main): Call putpkt_binary if a handler sets the packet
13800 length. Save the length of the incoming packet. Handle 'X'.
13801 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13803 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13805 * server.c (handle_query): Handle qSupported.
13807 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13809 * remote-utils.c (all_symbols_looked_up): New variable.
13810 (look_up_one_symbol): Check it.
13811 * server.h (look_up_one_symbol): New declaration.
13812 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13814 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13816 * Makefile.in (linux-arm-low.o): Update dependencies.
13817 * linux-arm-low.c: Include "gdb_proc_service.h".
13818 (PTRACE_GET_THREAD_AREA): Define.
13819 (ps_get_thread_area): New function.
13821 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13823 * configure.srv (m68k*-*-uclinux*): New target.
13824 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13825 (linux_resume_one_process): Remove extraneous cast.
13826 (linux_read_offsets): New.
13827 (linux_target_op): Add linux_read_offsets on mmuless systems.
13828 * server.c (handle_query): Add qOffsets logic.
13829 * target.h (struct target_ops): Add read_offsets.
13831 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13833 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13834 (PTRACE_GET_THREAD_AREA): Define.
13835 (ps_get_thread_area): New function.
13836 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13837 (linux-x86-64-low.o): Update.
13839 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13841 * configure.ac: Remove checks for prfpregset_t.
13842 * gdb_proc_service.h: New file.
13843 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13844 new "gdb_proc_service.h".
13845 * proc-service.c: Likewise.
13846 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13847 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13848 * Makefile.in (gdb_proc_service_h): Updated.
13849 * configure, config.in: Regenerated.
13851 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13853 * remote-utils.c (prepare_resume_reply): Move declaration
13854 of gdb_id_from_wait to the top of the block.
13856 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13858 * linux-low.c (regsets_store_inferior_registers): Read the regset
13859 from the target before filling it.
13861 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13863 * server.c (attach_inferior): Return SIGTRAP for a successful
13866 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13868 * Makefile.in (OBS): Add version.o.
13869 (STAGESTUFF): Delete.
13870 (version.o): Add dependencies.
13871 (version.c): Replace rule.
13872 (clean): Remove version.c.
13873 * server.c (gdbserver_version): New.
13874 (gdbserver_usage): Use printf.
13875 (main): Handle --version and --help.
13876 * server.h (version, host_name): Add declarations.
13878 2005-12-23 Eli Zaretskii <eliz@gnu.org>
13890 * linux-x86-64-low.c:
13892 * linux-s390-low.c:
13893 * linux-ppc64-low.c:
13895 * linux-mips-low.c:
13896 * linux-m68k-low.c:
13897 * linux-m32r-low.c:
13900 * linux-ia64-low.c:
13901 * linux-i386-low.c:
13902 * linux-crisv32-low.c:
13914 * gdbserver.1: Add (C) after Copyright. Update the FSF
13917 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13919 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13920 (arm_breakpoint_at): Recognize both breakpoints.
13921 (the_low_target): Use the correct breakpoint instruction.
13923 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13925 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13926 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13927 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13928 (the_low_target): Update.
13930 2005-10-25 Andreas Schwab <schwab@suse.de>
13932 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13934 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13935 (ia64_num_regs): Reduce to 462.
13937 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13939 * acinclude.m4: Correct quoting.
13940 * aclocal.m4: Regenerated.
13942 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13943 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13944 (thread_db_init): Call thread_db_err_str.
13945 * configure.ac: Check for TD_VERSION.
13946 * config.in, configure: Regenerated.
13948 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13950 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13952 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13954 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13955 is not available. Define HAVE_PTRACE_GETREGS if it is.
13956 * config.in, configure: Regenerated.
13957 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13958 * linux-i386-low.c, linux-m68k-low.c: Update to use
13959 HAVE_PTRACE_GETREGS.
13960 * linux-low.c (regsets_fetch_inferior_registers)
13961 (regsets_store_inferior_registers): Only return 0 if we processed
13963 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13964 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13966 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13968 * inferiors.c (struct thread_info): Add gdb_id.
13969 (add_thread): Add gdb_id argument.
13970 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13971 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13972 calls to add_thread.
13973 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13974 * server.c (handle_query): Use thread_to_gdb_id.
13975 (handle_v_cont, main): Use gdb_id_to_thread_id.
13976 * server.h (add_thread): Update prototype.
13977 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13980 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13982 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13983 left-padded registers.
13984 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13985 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13987 2005-07-01 Steve Ellcey <sje@cup.hp.com>
13989 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13990 * configure: Regenerate.
13991 * config.in: Regenerate.
13992 * server.h (NEED_DECLARATION_STRERROR):
13993 Replace with !HAVE_DECL_STRERROR.
13995 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13997 * linux-low.c (linux_wait, linux_send_signal): Don't test
13998 an unsigned long variable for > 0 if it could be MAX_ULONG.
13999 * server.c (myresume): Likewise.
14000 * target.c (set_desired_inferior): Likewise.
14002 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14004 * configure.ac: Simplify and improve check for socklen_t.
14005 * configure, config.in: Regenerate.
14007 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14009 * acconfig.h: Remove.
14010 * configure.ac: Add a test for socklen_t. Use three-argument
14011 AC_DEFINE throughout.
14012 * config.in: Regenerated using autoheader 2.59.
14013 * configure: Regenerated.
14015 * gdbreplay.c (socklen_t): Provide a default.
14016 (remote_open): Use socklen_t.
14017 * remote-utils.c (socklen_t): Provide a default.
14018 (remote_open): Use socklen_t.
14019 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14022 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14024 * linux-low.c (linux_read_memory, linux_write_memory)
14025 (linux_read_auxv): Likewise.
14026 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14027 (check_mem_write): Likewise.
14028 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14030 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14031 (registers_from_string, register_data): Likewise.
14032 * server.c (handle_query, main): Likewise.
14033 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14034 (decode_M_packet): Likewise.
14035 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14036 * target.h (struct target_ops): Update read_memory, write_memory,
14038 (read_inferior_memory, write_inferior_memory): Update.
14039 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14040 to unsigned char *.
14041 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14042 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14043 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14044 linux-s390-low.c, linux-sh-low.c: Update for changes in
14045 read_inferior_memory and the_low_target->breakpoint.
14047 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14049 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14050 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14051 * configure.srv: Add powerpc64-*-linux*.
14052 * linux-ppc64-low.c: New file.
14054 2005-05-23 Orjan Friberg <orjanf@axis.com>
14056 * linux-cris-low.c: New file with support for CRIS.
14057 * linux-crisv32-low.c: Ditto for CRISv32.
14058 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14059 (clean): Add reg-cris.c and reg-crisv32.c.
14060 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14061 reg-crisv32.o, and reg-crisv32.c to make rules.
14062 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14063 recognized targets.
14065 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14067 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14068 of sizeof (PTRACE_XFER_TYPE).
14069 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14071 2005-05-12 Orjan Friberg <orjanf@axis.com>
14073 * target.h (struct target_ops): Add insert_watchpoint,
14074 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14075 pointers for hardware watchpoint support.
14076 * linux-low.h (struct linux_target_ops): Ditto.
14077 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14078 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14079 to linux_target_ops.
14080 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14082 * server.c (main): Recognize 'Z' and 'z' packets.
14084 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14086 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14087 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14088 (the_low_target): Add new members.
14090 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14092 * proc-service.c (ps_lgetregs): Search all_processes instead of
14095 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14097 * server.c (start_inferior): Change return type to int.
14098 (attach_inferior): Change sigptr to int *.
14099 (handle_v_cont, handle_v_requests): Change signal to int *.
14100 (main): Change signal to int.
14102 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
14104 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14105 * configure.srv: Add m32r*-*-linux*.
14106 * linux-m32r-low.c: New file.
14108 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14110 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14112 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14114 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14115 Take unsigned long arguments for PIDs.
14116 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14117 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14118 (wait_for_sigstop, linux_resume_one_process)
14119 (regsets_fetch_inferior_registers, linux_send_signal)
14120 (linux_read_auxv): Likewise. Update the types of variables holding
14121 PIDs. Update format string specifiers.
14122 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14123 * remote-utils.c (prepare_resume_reply): Likewise.
14124 * server.c (cont_thread, general_thread, step_thread)
14125 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14127 (handle_query): Update format specifiers.
14128 (handle_v_cont, main): Use strtoul for thread IDs.
14129 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14130 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14131 (general_thread, step_thread, thread_from_wait)
14132 (old_thread_from_wait): Update.
14133 * target.h (struct thread_resume): Use unsigned long for THREAD.
14134 (struct target_ops): Use unsigned long for arguments to attach and
14137 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14139 * acinclude.m4: Include bfd/bfd.m4 directly.
14140 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14141 <agriffis@toolchain.org>.
14142 * aclocal.m4, configure: Regenerated.
14144 2005-01-07 Andrew Cagney <cagney@gnu.org>
14146 * configure.ac: Rename configure.in, require autoconf 2.59.
14147 * configure: Re-generate.
14149 2004-12-08 Daniel Jacobowitz <dan@debian.org>
14151 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14152 LIBS when finished.
14153 * aclocal.m4: Regenerated.
14154 * configure: Regenerated.
14156 2004-11-21 Andreas Schwab <schwab@suse.de>
14158 * linux-m68k-low.c (m68k_num_gregs): Define.
14159 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14160 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14161 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14162 (m68k_breakpoint_at): New. Add to the_low_target.
14164 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14165 srv_linux_thread_db to yes.
14167 2004-10-20 Joel Brobecker <brobecker@gnat.com>
14169 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14170 (ARCH_SET_FS): Likewise.
14171 (ARCH_GET_FS): Likewise.
14172 (ARCH_GET_GS): Likewise.
14174 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14176 * linux-i386-low.c (ps_get_thread_area): New.
14177 * linux-x86-64-low.c (ps_get_thread_area): New.
14178 * linux-low.c: Include <sys/syscall.h>.
14179 (linux_kill_one_process): Don't kill the first thread here.
14180 (linux_kill): Kill the first thread here.
14181 (kill_lwp): New function.
14182 (send_sigstop, linux_send_signal): Use it.
14183 * proc-service.c: Clean up #ifdefs.
14184 (fpregset_info): Delete.
14185 (ps_lgetregs): Update and enable implementation.
14186 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14188 * remote-utils.c (struct sym_cache, symbol_cache): New.
14189 (input_interrupt): Print a clearer message.
14190 (async_io_enabled): New variable.
14191 (enable_async_io, disable_async_io): Use it. Update comments.
14192 (look_up_one_symbol): Use the symbol cache.
14193 * thread-db.c (thread_db_look_up_symbols): New function.
14194 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14196 2004-10-16 Daniel Jacobowitz <dan@debian.org>
14198 * configure.in: Test for -rdynamic.
14199 * configure: Regenerated.
14200 * Makefile (INTERNAL_LDFLAGS): New.
14201 (gdbserver, gdbreplay): Use it.
14203 2004-09-02 Andrew Cagney <cagney@gnu.org>
14205 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14207 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
14209 * linux-low.c (linux_wait): Clear all_processes list also.
14211 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14213 * linux-low.c: Include <errno.h>. Remove extern declaration of
14216 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
14218 * gdbreplay.c, server.h, utils.c: Update copyright years.
14220 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14222 * server.c (main): Print child status or termination signal from
14223 variable 'signal', not 'sig'.
14225 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14227 * linux-low.c (linux_read_memory): Change return type to
14228 int. Check for and return error from ptrace().
14229 * target.c (read_inferior_memory): Change return type to int. Pass
14230 back return status from the_target->read_memory().
14231 * target.h (struct target_ops): Adapt *read_memory() prototype.
14233 (read_inferior_memory): Adapt prototype.
14234 * server.c (main): Return an error packet if
14235 read_inferior_memory() returns an error.
14237 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
14239 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14240 Unify with other clean targets.
14242 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14244 * server.c (handle_v_cont): Call set_desired_inferior.
14246 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14248 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14250 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14252 * linux-low.c (linux_wait): Unblock async I/O.
14253 (linux_resume): Block and enable async I/O.
14254 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14255 * server.h (block_async_io, unblock_async_io): Add prototypes.
14257 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14259 * remote-utils.c (remote_open): Print a status notice after
14260 opening a TCP port.
14261 * server.c (attach_inferior): Print a status notice after
14264 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
14266 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14268 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
14270 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14272 * server.c, target.h: Update copyright years.
14274 2004-02-25 Roland McGrath <roland@redhat.com>
14276 * target.h (struct target_ops): New member `read_auxv'.
14277 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14278 * linux-low.c (linux_read_auxv): New function.
14279 (linux_target_ops): Initialize `read_auxv' member to that.
14281 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14283 Committed by Jim Blandy <jimb@redhat.com>.
14285 * linux-s390-low.c (s390_num_regs): Update.
14286 (s390_regmap): Remove control registers. Use __s390x__ predefine
14287 instead of GPR_SIZE to distiguish s390 and s390x targets.
14289 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
14291 * linux-low.c: Update copyright year.
14292 (check_removed_breakpoint): Clear pending_is_breakpoint.
14293 (linux_set_resume_request, linux_queue_one_thread)
14294 (resume_status_pending_p): New functions.
14295 (linux_continue_one_thread): Use process->resume.
14296 (linux_resume): Only resume threads if there are no pending events.
14297 * linux-low.h (struct process_info): Add resume request
14300 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
14302 * regcache.c (new_register_cache): Clear the allocated register
14303 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14305 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
14307 * linux-low.c (linux_resume): Take a struct thread_resume *
14309 (linux_wait): Update call.
14310 (resume_ptr): New static variable.
14311 (linux_continue_one_thread): Renamed from
14312 linux_continue_one_process. Use resume_ptr.
14313 (linux_resume): Use linux_continue_one_thread.
14314 * server.c (handle_v_cont, handle_v_requests): New functions.
14315 (myresume): New function.
14316 (main): Handle 'v' case.
14317 * target.h (struct thread_resume): New type.
14318 (struct target_ops): Change argument of "resume" to struct
14320 (myresume): Delete macro.
14322 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14324 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14325 (uninstall): Support DESTDIR.
14327 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14329 * configure.srv: Add xscale*linux copy of arm*linux entry.
14331 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
14333 * linux-arm-low.c (arm_reinsert_addr): New function.
14334 (the_low_target): Add arm_reinsert_addr.
14336 2003-07-08 Mark Kettenis <kettenis@gnu.org>
14338 * mem-break.c: Remove whitespace at end of file.
14340 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14342 * configure.in: Check whether we need to prototype strerror.
14343 * server.h: Optionally prototype strerror.
14344 * gdbreplay.c (perror_with_name): Use strerror.
14345 * linux-low.c (linux_attach_lwp): Use strerror.
14346 * utils.c (perror_with_name): Use strerror.
14347 * config.in, configure: Regenerated.
14349 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
14351 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14352 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14354 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
14356 * Makefile.in (SFILES): Update.
14357 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14358 low-sun3.c: Remove files.
14360 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
14362 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14363 (linux_detach_one_process, linux_detach): New functions.
14364 (linux_target_ops): Add linux_detach.
14365 * server.c (main): Handle 'D' packet.
14366 * target.h (struct target_ops): Add "detach" member.
14367 (detach_inferior): Define.
14369 2003-06-13 Mark Kettenis <kettenis@gnu.org>
14371 From Kelley Cook <kelleycook@wideopenwest.com>:
14372 * configure.srv: Accept i[34567]86 variants.
14374 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
14376 * linux-low.c (linux_wait_for_event): Correct comment typos.
14377 (linux_resume_one_process): Call check_removed_breakpoint.
14378 (linux_send_signal): New function.
14379 (linux_target_ops): Add linux_send_signal.
14380 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14382 * target.h (struct target_ops): Add send_signal.
14384 2003-05-29 Jim Blandy <jimb@redhat.com>
14386 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14387 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14388 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14389 away part of the register's value.
14391 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
14393 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14394 (linux_wait_for_event, linux_init_signals): Likewise.
14396 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
14398 * configure.in: Check for stdlib.h.
14399 * configure: Regenerated.
14400 * config.in: Regenerated.
14402 2003-01-04 Andreas Schwab <schwab@suse.de>
14404 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14406 2003-01-02 Andrew Cagney <ac131313@redhat.com>
14408 * Makefile.in: Remove obsolete code.
14410 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
14412 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14413 defined(PT_FPR0_HI).
14415 2002-11-17 Stuart Hughes <seh@zee2.com>
14417 * linux-arm-low.c (arm_num_regs): Increase.
14418 (arm_regmap): Include status register.
14420 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
14422 * linux-low.c (register_addr): Remove incorrect -1 check.
14424 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
14426 * linux-low.c (linux_create_inferior): Call setpgid. Return
14428 (unstopped_p, linux_signal_pid): Remove.
14429 (linux_target_ops): Remove linux_signal_pid.
14430 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14431 global instead of target method.
14432 * target.h (struct target_ops): Remove signal_pid. Update comment
14433 for create_inferior.
14434 * server.c (signal_pid): New variable.
14435 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
14436 gdbserver. Set the child to be the foreground process group.
14437 (attach_inferior): Set signal_pid.
14439 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
14441 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14443 2002-08-20 Jim Blandy <jimb@redhat.com>
14445 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14448 2002-08-01 Andrew Cagney <cagney@redhat.com>
14450 * Makefile.in: Make chill references obsolete.
14452 2002-07-24 Kevin Buettner <kevinb@redhat.com>
14454 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14455 * configure: Regenerate.
14456 * config.in: Regenerate.
14458 2002-07-09 David O'Brien <obrien@FreeBSD.org>
14460 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14461 (perror_with_name, remote_close, remote_open, expect, play): Static.
14463 2002-07-04 Michal Ludvig <mludvig@suse.cz>
14465 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14466 byte offsets instead of an array of indexes.
14467 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14469 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
14471 * regcache.c: Add comment.
14473 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
14475 * thread-db.c: New file.
14476 * proc-service.c: New file.
14477 * acinclude.m4: New file.
14478 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14479 proc-service.o, and thread-db.o.
14480 (linux-low.o): Add USE_THREAD_DB.
14481 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14482 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14483 * aclocal.m4: Regenerated.
14484 * config.in: Regenerated.
14485 * configure: Regenerated.
14486 * configure.in: Check for proc_service.h, sys/procfs.h,
14487 thread_db.h, and linux/elf.h headrs.
14488 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14489 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14490 Check for -lthread_db and thread support.
14491 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14492 PowerPC, and SuperH.
14493 * i387-fp.c: Constify arguments.
14494 * i387-fp.h: Likewise.
14495 * inferiors.c: (struct thread_info): Renamed from
14496 `struct inferior_info'. Remove PID member. Use generic inferior
14497 list header. All uses updated.
14498 (inferiors, signal_pid): Removed.
14499 (all_threads): New variable.
14500 (get_thread): Define.
14501 (add_inferior_to_list): New function.
14502 (for_each_inferior): New function.
14503 (change_inferior_id): New function.
14504 (add_inferior): Removed.
14505 (remove_inferior): New function.
14506 (add_thread): New function.
14507 (free_one_thread): New function.
14508 (remove_thread): New function.
14509 (clear_inferiors): Use for_each_inferior and free_one_thread.
14510 (find_inferior): New function.
14511 (find_inferior_id): New function.
14512 (inferior_target_data): Update argument type.
14513 (set_inferior_target_data): Likewise.
14514 (inferior_regcache_data): Likewise.
14515 (set_inferior_regcache_data): Likewise.
14516 * linux-low.c (linux_bp_reinsert): Remove.
14517 (all_processes, stopping_threads, using_thrads)
14518 (struct pending_signals, debug_threads, pid_of): New.
14519 (inferior_pid): Replace with macro.
14520 (struct inferior_linux_data): Remove.
14521 (get_stop_pc, add_process): New functions.
14522 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14523 Use add_process and add_thread.
14524 (linux_attach_lwp): New function, based on old linux_attach. Use
14525 add_process and add_thread. Set stop_expected for new threads.
14526 (linux_attach): New function.
14527 (linux_kill_one_process): New function.
14528 (linux_kill): Kill all LWPs.
14529 (linux_thread_alive): Use find_inferior_id.
14530 (check_removed_breakpoints, status_pending_p): New functions.
14531 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14532 Update. Use WNOHANG. Wait for cloned processes also. Update process
14533 struct for the found process.
14534 (linux_wait_for_event): New function.
14535 (linux_wait): Use it. Support LWPs.
14536 (send_sigstop, wait_for_sigstop, stop_all_processes)
14537 (linux_resume_one_process, linux_continue_one_process): New functions.
14538 (linux_resume): Support LWPs.
14539 (REGISTER_RAW_SIZE): Remove.
14540 (fetch_register): Use register_size instead. Call supply_register.
14541 (usr_store_inferior_registers): Likewise. Call collect_register.
14542 Fix recursive case.
14543 (regsets_fetch_inferior_registers): Improve error message.
14544 (regsets_store_inferior_registers): Add debugging.
14545 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14546 (unstopped_p, linux_signal_pid): New functions.
14547 (linux_target_ops): Add linux_signal_pid.
14548 (linux_init_signals): New function.
14549 (initialize_low): Call it. Initialize using_threads.
14550 * regcache.c (inferior_regcache_data): Add valid
14552 (get_regcache): Fetch registers lazily. Add fetch argument
14553 and update all callers.
14554 (regcache_invalidate_one, regcache_invalidate): New
14556 (new_register_cache): Renamed from create_register_cache.
14557 Return the new regcache.
14558 (free_register_cache): Change argument to a void *.
14559 (registers_to_string, registers_from_string): Call get_regcache
14560 with fetch flag set.
14561 (register_data): Make static. Pass fetch flag to get_regcache.
14562 (supply_register): Call get_regcache with fetch flag clear.
14563 (collect_register): Call get_regcache with fetch flag set.
14564 (collect_register_as_string): New function.
14565 * regcache.h: Update.
14566 * remote-utils.c (putpkt): Flush after debug output and use
14568 Handle input interrupts while waiting for an ACK.
14569 (input_interrupt): Use signal_pid method.
14570 (getpkt): Flush after debug output and use stderr.
14571 (outreg): Use collect_register_as_string.
14572 (new_thread_notify, dead_thread_notify): New functions.
14573 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14574 and general_thread.
14575 (look_up_one_symbol): Flush after debug output.
14576 * server.c (step_thread, server_waiting): New variables.
14577 (start_inferior): Don't use signal_pid. Update call to mywait.
14578 (attach_inferior): Update call to mywait.
14579 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14580 (main): Don't fetch/store registers explicitly. Use
14581 set_desired_inferior. Support proposed ``Hs'' packet. Update
14583 * server.h: Update.
14584 (struct inferior_list, struct_inferior_list_entry): New.
14585 * target.c (set_desired_inferior): New.
14586 (write_inferior_memory): Constify.
14587 (mywait): New function.
14588 * target.h: Update.
14589 (struct target_ops): New signal_pid method.
14590 (mywait): Removed macro, added prototype.
14592 * linux-low.h (regset_func): Removed.
14593 (regset_fill_func, regset_store_func): New.
14594 (enum regset_type): New.
14595 (struct regset_info): Add type field. Use new operation types.
14596 (struct linux_target_ops): stop_pc renamed to get_pc.
14597 Add decr_pc_after_break and breakpoint_at.
14598 (get_process, get_thread_proess, get_process_thread)
14599 (strut process_info, all_processes, linux_attach_lwp)
14600 (thread_db_init): New.
14602 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14603 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14604 (the_low_target): Add new members.
14605 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14606 (i386_store_fpxregset): Constify.
14607 (target_regsets): Add new kind identifier.
14608 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14609 (i386_set_pc): Add debugging.
14610 (i386_breakpoint_at): New function.
14611 (the_low_target): Add new members.
14612 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14613 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14614 (mips_breakpoint_at): New.
14615 (the_low_target): Add new members.
14616 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14617 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14618 (the_low_target): Add new members.
14619 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14620 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14621 (the_low_target): Add new members.
14622 * linux-x86-64-low.c (target_regsets): Add new kind
14625 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
14627 From Martin Pool <mbp@samba.org>:
14628 * server.c (gdbserver_usage): New function.
14631 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
14633 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14634 stop_at -> stop_pc.
14636 2002-05-04 Andrew Cagney <ac131313@redhat.com>
14638 * Makefile.in: Remove obsolete code.
14640 2002-04-24 Michal Ludvig <mludvig@suse.cz>
14642 * linux-low.c (regsets_fetch_inferior_registers),
14643 (regsets_store_inferior_registers): Removed cast to int from
14645 * regcache.h: Added declaration of struct inferior_info.
14647 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14649 * inferiors.c (struct inferior_info): Add regcache_data.
14650 (add_inferior): Call create_register_cache.
14651 (clear_inferiors): Call free_register_cache.
14652 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14653 * regcache.c (struct inferior_regcache_data): New.
14654 (registers): Remove.
14655 (get_regcache): New function.
14656 (create_register_cache, free_register_cache): New functions.
14657 (set_register_cache): Don't initialize the register cache here.
14658 (registers_to_string, registers_from_string, register_data): Call
14660 * regcache.h: Add prototypes.
14661 * server.h: Likewise.
14663 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
14665 * mem-break.c: New file.
14666 * mem-break.h: New file.
14667 * Makefile.in: Add mem-break.o rule; update server.h
14669 * inferiors.c (struct inferior_info): Add target_data
14671 (clear_inferiors): Free target_data member if set.
14672 (inferior_target_data, set_inferior_target_data): New functions.
14673 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14674 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14675 * linux-low.c (linux_bp_reinsert): New variable.
14676 (struct inferior_linux_data): New.
14677 (linux_create_inferior): Use set_inferior_target_data.
14678 (linux_attach): Likewise. Call add_inferior.
14679 (linux_wait_for_one_inferior): New function.
14680 (linux_wait): Call it.
14681 (linux_write_memory): Add const.
14682 (initialize_low): Call set_breakpoint_data.
14683 * linux-low.h (struct linux_target_ops): Add breakpoint
14685 * server.c (attach_inferior): Remove extra add_inferior
14687 * server.h: Include mem-break.h. Update inferior.c
14689 * target.c (read_inferior_memory)
14690 (write_inferior_memory): New functions.
14691 * target.h (read_inferior_memory)
14692 (write_inferior_memory): Change macros to prototypes.
14693 (struct target_ops): Update comments. Add const to write_memory
14696 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
14698 * linux-low.c (usr_store_inferior_registers): Support
14699 registers which are allowed to fail to store.
14700 * linux-low.h (linux_target_ops): Likewise.
14701 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14702 (ppc_cannot_store_register): FPSCR may not be storable.
14704 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14706 * server.h: Include <string.h> if HAVE_STRING_H.
14707 * ChangeLog: Correct paths in last ChangeLog entry.
14709 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14711 * linux-low.h: Remove obsolete prototypes.
14712 (struct linux_target_ops): New.
14713 (extern the_low_target): New.
14714 * linux-low.c (num_regs, regmap): Remove declarations.
14715 (register_addr): Use the_low_target explicitly.
14716 (fetch_register): Likewise.
14717 (usr_fetch_inferior_registers): Likewise.
14718 (usr_store_inferior_registers): Likewise.
14719 * linux-arm-low.c (num_regs): Remove.
14720 (arm_num_regs): Define.
14721 (arm_regmap): Renamed from regmap, made static.
14722 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14724 (arm_cannot_store_register): Renamed from cannot_store_register,
14726 (the_low_target): New.
14727 * linux-i386-low.c (num_regs): Remove.
14728 (i386_num_regs): Define.
14729 (i386_regmap): Renamed from regmap, made static.
14730 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14732 (i386_cannot_store_register): Renamed from cannot_store_register,
14734 (the_low_target): New.
14735 * linux-ia64-low.c (num_regs): Remove.
14736 (ia64_num_regs): Define.
14737 (ia64_regmap): Renamed from regmap, made static.
14738 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14740 (ia64_cannot_store_register): Renamed from cannot_store_register,
14742 (the_low_target): New.
14743 * linux-m68k-low.c (num_regs): Remove.
14744 (m68k_num_regs): Define.
14745 (m68k_regmap): Renamed from regmap, made static.
14746 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14748 (m68k_cannot_store_register): Renamed from cannot_store_register,
14750 (the_low_target): New.
14751 * linux-mips-low.c (num_regs): Remove.
14752 (mips_num_regs): Define.
14753 (mips_regmap): Renamed from regmap, made static.
14754 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14756 (mips_cannot_store_register): Renamed from cannot_store_register,
14758 (the_low_target): New.
14759 * linux-ppc-low.c (num_regs): Remove.
14760 (ppc_num_regs): Define.
14761 (ppc_regmap): Renamed from regmap, made static.
14762 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14764 (ppc_cannot_store_register): Renamed from cannot_store_register,
14766 (the_low_target): New.
14767 * linux-s390-low.c (num_regs): Remove.
14768 (s390_num_regs): Define.
14769 (s390_regmap): Renamed from regmap, made static.
14770 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14772 (s390_cannot_store_register): Renamed from cannot_store_register,
14774 (the_low_target): New.
14775 * linux-sh-low.c (num_regs): Remove.
14776 (sh_num_regs): Define.
14777 (sh_regmap): Renamed from regmap, made static.
14778 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14780 (sh_cannot_store_register): Renamed from cannot_store_register,
14782 (the_low_target): New.
14783 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14784 (the_low_target): New.
14786 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14788 * Makefile.in: Add stamp-h target.
14789 * configure.in: Create stamp-h.
14790 * configure: Regenerated.
14792 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14794 * inferiors.c: New file.
14795 * target.c: New file.
14796 * target.h: New file.
14797 * Makefile.in: Add target.o and inferiors.o. Update
14799 * linux-low.c (inferior_pid): New static variable,
14800 moved from server.c.
14801 (linux_create_inferior): Renamed from create_inferior.
14802 Call add_inferior. Return 0 on success instead of a PID.
14803 (linux_attach): Renamed from myattach.
14804 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14805 (linux_thread_alive): Renamed from mythread_alive.
14806 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14808 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14809 (regsets_store_inferior_registers): Correct error message.
14810 Add missing ``return 0''.
14811 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14812 (linux_store_registers): Renamed from store_inferior_registers.
14813 (linux_read_memory): Renamed from read_inferior_memory.
14814 (linux_write_memory): Renamed from write_inferior_memory.
14815 (linux_target_ops): New structure.
14816 (initialize_low): Call set_target_ops ().
14817 * remote-utils.c (unhexify): New function.
14818 (hexify): New function.
14819 (input_interrupt): Send signals to ``signal_pid''.
14820 * server.c (inferior_pid): Remove.
14821 (start_inferior): Update create_inferior call.
14822 (attach_inferior): Call add_inferior.
14823 (handle_query): New function.
14824 (main): Call handle_query for `q' packets.
14825 * server.h: Include "target.h". Remove obsolete prototypes.
14826 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14828 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
14830 * Makefile.in: Add WARN_CFLAGS. Update configury
14832 * configure.in: Check for <string.h>
14833 * configure: Regenerate.
14834 * config.in: Regenerate.
14835 * gdbreplay.c: Include needed system headers.
14836 (remote_open): Remove strchr prototype.
14837 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14838 * regcache.c (supply_register): Change buf argument to const void *.
14839 (supply_register_by_name): Likewise.
14840 (collect_register): Change buf argument to void *.
14841 (collect_register_by_name): Likewise.
14842 * regcache.h: Add missing prototypes.
14843 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14844 * server.c (handle_query): New function.
14845 (attached): New static variable, moved out of main.
14846 (main): Quiet longjmp clobber warnings.
14847 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14848 * utils.c (error): Remove NORETURN.