Change return type of gdbarch_software_single_step to vector<CORE_ADDR>
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a0ff9e1a
SM
12017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4 software_single_step change of return type to
5 std::vector<CORE_ADDR>.
6 * linux-low.c (install_software_single_step_breakpoints):
7 Likewise.
8 * linux-low.h (install_software_single_step_breakpoints):
9 Likewise.
10
be628ab8
SDJ
112017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12
13 * remote-utils.c: Include "gdb_termios.h" instead of
14 "terminal.h".
15 * terminal.h: Delete file.
16
7c5ded6a
SDJ
172017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
18
19 * server.c: Include <vector>.
20 <program_argv, wrapper_argv>: Convert to std::vector.
21 (start_inferior): Rewrite function to use C++.
22 (handle_v_run): Likewise. Update code that calculates the argv
23 based on the vRun packet; use C++.
24 (captured_main): Likewise.
25
436252de
SM
262017-04-06 Simon Marchi <simon.marchi@ericsson.com>
27
28 * server.c (handle_v_cont): Initialize thread_resume::thread
29 with null_ptid.
30
9bf2a700
PA
312017-04-05 Pedro Alves <palves@redhat.com>
32
33 * configure: Regenerate.
34
a121b7c1
PA
352017-04-05 Pedro Alves <palves@redhat.com>
36
37 * gdbreplay.c (sync_error): Constify.
38 * linux-x86-low.c (push_opcode): Constify.
39
21c8a587
PA
402017-04-05 Pedro Alves <palves@redhat.com>
41
42 * win32-low.c (get_child_debug_event)
43 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
44 Report TARGET_WAITKIND_SPURIOUS instead.
45
fb32b4f7
PA
462017-04-05 Pedro Alves <palves@redhat.com>
47
48 * remote-utils.c (remote_prepare, remote_open): Constify.
49 * remote-utils.h (remote_prepare, remote_open): Constify.
50 * server.c (captured_main): Constify 'port' handling.
51
65dd1e59
SM
522017-04-04 Simon Marchi <simon.marchi@ericsson.com>
53
54 * Makefile.in (clean): Clear .deps.
55
8fa5b777
SM
562017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
57
58 * .gitignore: Remove generated files, replace with wildcard.
59 * (clean): Replace removal of generated files with wildcard.
60 (version.c): Replace with...
61 (version-generated.c): ...this.
62 (xml-builtin.c): Replace with...
63 (xml-builtin-generated.c): ...this.
64 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
65 (%.c: *regformats*): Replace with...
66 (%-generated.c: *regformats*): ...this.
67
a12e714b
MF
682017-03-27 Max Filippov <jcmvbkbc@gmail.com>
69
70 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
71 (xtensa_fill_gregset): Call collect_register_by_name for
72 threadptr register.
73 (xtensa_store_gregset): Call supply_register_by_name for
74 threadptr register.
75
1a09b50a
MF
762017-03-27 Max Filippov <jcmvbkbc@gmail.com>
77
78 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
79 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
80 (xtensa_store_gregset): Call supply_register for all registers in
81 a0_regnum..a0_regnum + C0_NREGS range.
82
1a01e7c6
SM
832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
84
85 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
86 (ax-ipa.o: ax.c): Remove.
87 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
88 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
89 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
90 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
91 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
92
36bc18a8
SM
932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
94
95 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
96 (print-utils-ipa.o: ../common/print-utils.c): Remove.
97 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
98 (errors-ipa.o: ../common/errors.c): Remove.
99 (format-ipa.o: ../common/format.c): Remove.
100 (common-utils-ipa.o: ../common/common-utils.c): Remove.
101
a8ebe3d5
SM
1022017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
103
104 * Makefile.in (%-ipa.o: %.c): New rule.
105 (tracepoint-ipa.o: tracepoint.c): Remove.
106 (utils-ipa.o: utils.c): Remove.
107 (remote-utils-ipa.o: remote-utils.c): Remove.
108 (regcache-ipa.o: regcache.c): Remove.
109 (i386-linux-ipa.o: i386-linux.c): Remove.
110 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
111 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
112 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
113 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
114 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
115 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
116 (amd64-linux-ipa.o: amd64-linux.c): Remove.
117 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
118 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
119 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
120 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
121 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
122 (aarch64-ipa.o: aarch64.c): Remove.
123 (s390-linux32-ipa.o: s390-linux32.c): Remove.
124 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
125 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
126 (s390-linux64-ipa.o: s390-linux64.c): Remove.
127 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
128 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
129 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
130 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
131 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
132 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
133 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
134 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
135 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
136 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
137 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
138 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
139 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
140 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
141 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
142 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
143 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
144 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
145 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
146 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
147 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
148 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
149 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
150 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
151 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
152 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
153 (tdesc-ipa.o: tdesc.c): Remove.
154 (x32-linux-ipa.o: x32-linux.c): Remove.
155 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
156 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
157
50cfacb7
SM
1582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
159
160 * Makefile.in (%.o: ../arch/%.c): New rule.
161 (arm.o: ../arch/arm.c): Remove.
162 (arm-linux.o: ../arch/arm-linux.c): Remove.
163 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
164 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
165
c5a22423
SM
1662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
167
168 * Makefile.in (%.o: ../nat/%.c): New rule.
169 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
170 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
171 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
172 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
173 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
174 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
175 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
176 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
177 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
178 (linux-personality.o: ../nat/linux-personality.c): Remove.
179 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
180 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
181 (x86-linux.o: ../nat/x86-linux.c): Remove.
182 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
183 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
184
6bda016b
SM
1852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
186
187 * Makefile.in (%.o: ../common/%.c): New rule.
188 (signals.o: ../common/signals.c): Remove.
189 (print-utils.o: ../common/print-utils.c): Remove.
190 (rsp-low.o: ../common/rsp-low.c): Remove.
191 (common-utils.o: ../common/common-utils.c): Remove.
192 (posix-strerror.o: ../common/posix-strerror.c): Remove.
193 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
194 (vec.o: ../common/vec.c): Remove.
195 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
196 (xml-utils.o: ../common/xml-utils.c): Remove.
197 (ptid.o: ../common/ptid.c): Remove.
198 (buffer.o: ../common/buffer.c): Remove.
199 (format.o: ../common/format.c): Remove.
200 (filestuff.o: ../common/filestuff.c): Remove.
201 (agent.o: ../common/agent.c): Remove.
202 (errors.o: ../common/errors.c): Remove.
203 (environ.o: ../common/environ.c): Remove.
204 (common-debug.o: ../common/common-debug.c): Remove.
205 (cleanups.o: ../common/cleanups.c): Remove.
206 (common-exceptions.o: ../common/common-exceptions.c): Remove.
207 (fileio.o: ../common/fileio.c): Remove.
208 (common-regcache.o: ../common/common-regcache.c): Remove.
209 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
210 (new-op.o: ../common/new-op.c): Remove.
211 (btrace-common.o: ../common/btrace-common.c): Remove.
212
21122961
SM
2132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
214
215 * Makefile.in (%.o: ../target/%.c): New rule.
216 (waitstatus.o: ../target/waitstatus.c): Remove.
217
c362e621
SM
2182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
219
220 * Makefile.in
221 (%.c: ../regformats/%.dat,
222 (%.c: ../regformats/arm/%.dat,
223 (%.c: ../regformats/i386/%.dat,
224 (%.c: ../regformats/rs6000/%.dat): New rules.
225 (aarch64.c): Remove.
226 (reg-arm.c): Remove.
227 (arm-with-iwmmxt.c): Remove.
228 (arm-with-vfpv2.c): Remove.
229 (arm-with-vfpv3.c): Remove.
230 (arm-with-neon.c): Remove.
231 (reg-bfin.c): Remove.
232 (reg-cris.c): Remove.
233 (reg-crisv32.c): Remove.
234 (i386.c): Remove.
235 (i386-linux.c): Remove.
236 (i386-avx.c): Remove.
237 (i386-avx-linux.c): Remove.
238 (i386-avx-avx512.c): Remove.
239 (i386-avx-avx512-linux.c): Remove.
240 (i386-mpx.c): Remove.
241 (i386-mpx-linux.c): Remove.
242 (i386-avx-mpx-avx512-pku.c): Remove.
243 (i386-avx-mpx-avx512-pku-linux.c): Remove.
244 (i386-avx-mpx.c): Remove.
245 (i386-avx-mpx-linux.c): Remove.
246 (i386-mmx.c): Remove.
247 (i386-mmx-linux.c): Remove.
248 (reg-ia64.c): Remove.
249 (reg-m32r.c): Remove.
250 (reg-m68k.c): Remove.
251 (reg-cf.c): Remove.
252 (mips-linux.c): Remove.
253 (mips-dsp-linux.c): Remove.
254 (mips64-linux.c): Remove.
255 (mips64-dsp-linux.c): Remove.
256 (nios2-linux.c): Remove.
257 (powerpc-32.c): Remove.
258 (powerpc-32l.c): Remove.
259 (powerpc-altivec32l.c): Remove.
260 (powerpc-cell32l.c): Remove.
261 (powerpc-vsx32l.c): Remove.
262 (powerpc-isa205-32l.c): Remove.
263 (powerpc-isa205-altivec32l.c): Remove.
264 (powerpc-isa205-vsx32l.c): Remove.
265 (powerpc-e500l.c): Remove.
266 (powerpc-64l.c): Remove.
267 (powerpc-altivec64l.c): Remove.
268 (powerpc-cell64l.c): Remove.
269 (powerpc-vsx64l.c): Remove.
270 (powerpc-isa205-64l.c): Remove.
271 (powerpc-isa205-altivec64l.c): Remove.
272 (powerpc-isa205-vsx64l.c): Remove.
273 (s390-linux32.c): Remove.
274 (s390-linux32v1.c): Remove.
275 (s390-linux32v2.c): Remove.
276 (s390-linux64.c): Remove.
277 (s390-linux64v1.c): Remove.
278 (s390-linux64v2.c): Remove.
279 (s390-te-linux64.c): Remove.
280 (s390-vx-linux64.c): Remove.
281 (s390-tevx-linux64.c): Remove.
282 (s390x-linux64.c): Remove.
283 (s390x-linux64v1.c): Remove.
284 (s390x-linux64v2.c): Remove.
285 (s390x-te-linux64.c): Remove.
286 (s390x-vx-linux64.c): Remove.
287 (s390x-tevx-linux64.c): Remove.
288 (tic6x-c64xp-linux.c): Remove.
289 (tic6x-c64x-linux.c): Remove.
290 (tic6x-c62x-linux.c): Remove.
291 (reg-sh.c): Remove.
292 (reg-sparc64.c): Remove.
293 (reg-spu.c): Remove.
294 (amd64.c): Remove.
295 (amd64-linux.c): Remove.
296 (amd64-avx.c): Remove.
297 (amd64-avx-linux.c): Remove.
298 (amd64-avx-avx512.c): Remove.
299 (amd64-avx-avx512-linux.c): Remove.
300 (amd64-mpx.c): Remove.
301 (amd64-mpx-linux.c): Remove.
302 (amd64-avx-mpx-avx512-pku.c): Remove.
303 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
304 (amd64-avx-mpx.c): Remove.
305 (amd64-avx-mpx-linux.c): Remove.
306 (x32.c): Remove.
307 (x32-linux.c): Remove.
308 (x32-avx.c): Remove.
309 (x32-avx-linux.c): Remove.
310 (x32-avx-avx512.c): Remove.
311 (x32-avx-avx512-linux.c): Remove.
312 (reg-xtensa.c): Remove.
313 (reg-tilegx.c): Remove.
314 (reg-tilegx32.c): Remove.
315
1672e0d9
SDJ
3162017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
317
318 * Makefile.in (SFILES): Add "common/environ.c".
319 (OBJS): Add "common/environ.h".
320
239b6d10
WT
3212017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
322
323 * configure.ac: Check if the fs_base and gs_base members of
324 `struct user_regs_struct' exist.
325 * config.in: Regenerated.
326 * configure: Likewise.
327
694b382c
AT
3282017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
329
330 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
331 target_read_memory.
332 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
333 (get_next_pcs_syscall_next_pc): Likewise.
334
7dc53023
LM
3352016-12-23 Luis Machado <lgustavo@codesourcery.com>
336
337 * win32-i386-low.c: Fix incorrect reference to a couple source files.
338 * nto-x86-low.c: Likewise.
339
ad02e4fe
SM
3402016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
341
342 * Makefile.in: Include disable-implicit-rules.mk.
343
dcb07cfa
PA
3442016-11-23 Pedro Alves <palves@redhat.com>
345
346 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
347 (debug_vprintf): Use std::chrono::steady_clock instead of
348 gettimeofday. Use '.' instead of ':'.
349 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
350 (get_timestamp): Use std::chrono::steady_clock instead of
351 gettimeofday.
352
8629c02c
SM
3532016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
354
355 * Makefile.in: Fix whitespace formatting.
356
b593ecca
SM
3572016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
358
359 * Makefile.in (SFILES, OBS): Flatten list and order
360 alphabetically.
361
9986ba08
PA
3622016-11-23 Pedro Alves <palves@redhat.com>
363
364 * event-loop.c (handle_file_event): Use warning.
365 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
366 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
367 Use warning.
368
4eefa7bc
PA
3692016-11-23 Pedro Alves <palves@redhat.com>
370
371 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
372 output.
373 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
374 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
375 debug_printf and debug_flush for debug output.
376 * server.c (handle_general_set): Likewise.
377 * thread-db.c (try_thread_db_load): Use debug_printf for debug
378 output.
379
5443506e
SM
3802016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
381
382 * Makefile.in (.c.o): Replace rule with ...
383 (%.o: %.c): ... this one.
384
3b165252
SM
3852016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
386
387 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
388 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
389 make.
390 * configure.ac: Remove checks for the make program.
391 * configure: Re-generate.
392
0bcda685
PA
3932016-10-28 Pedro Alves <palves@redhat.com>
394
395 * Makefile.in (CXX_DIALECT): Get from configure.
396 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
397 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
398 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
399 * config.in: Regenerate.
400 * configure: Regenerate.
401
c3805894
YQ
4022016-10-27 Yao Qi <yao.qi@linaro.org>
403
404 * linux-low.c (linux_supports_range_stepping): Return true if
405 can_software_single_step return true.
406
89342618
YQ
4072016-10-27 Yao Qi <yao.qi@linaro.org>
408
409 * inferiors.c (find_inferior_in_random): New function.
410 * inferiors.h (find_inferior_in_random): Declare.
411 * linux-low.c (linux_wait_for_event_filtered): Call
412 find_inferior_in_random instead of find_inferior.
413
e3652c84
YQ
4142016-10-27 Yao Qi <yao.qi@linaro.org>
415
416 * linux-low.c (linux_wait_1): If single-step breakpoints are
417 inserted, remove them.
418
5a04c4cf
PA
4192016-10-26 Pedro Alves <palves@redhat.com>
420
421 * linux-low.c (handle_extended_wait): Link parent/child fork
422 threads.
423 (linux_wait_1): Unlink them.
424 (linux_set_resume_request): Ignore resume requests for
425 already-resumed and unhandled fork child threads.
426 * linux-low.h (struct lwp_info) <fork_relative>: New field.
427 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
428 New functions.
429 (handle_v_requests) <vCont>: Don't call require_running.
430 * server.h (in_queued_stop_replies): New declaration.
431
cb93dc7f
YQ
4322016-10-24 Yao Qi <yao.qi@linaro.org>
433
434 PR server/20733
435 * linux-aarch64-low.c (append_insns): Cast the return value to
436 'uint32_t *'.
437
a1078bea
YQ
4382016-10-10 Yao Qi <yao.qi@linaro.org>
439
440 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
441
1fb77080
SDJ
4422016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
443
444 * target.c (target_supports_multi_process): New function, moved
445 from...
446 * target.h (target_supports_multi_process): ... here. Remove
447 macro.
448
39b5a3b9
TT
4492016-10-05 Tom Tromey <tom@tromey.com>
450
451 PR remote/20655:
452 * tracepoint.c (handle_tracepoint_bkpts): Check
453 ipa_error_tracepoint, not ipa_stopping_tracepoint.
454
c1d0b70a
YQ
4552016-10-05 Yao Qi <yao.qi@linaro.org>
456
457 * configure.srv: Update the path of arm-*.xml files.
458
0a69eedb
YQ
4592016-10-05 Terry Guo <terry.guo@arm.com>
460 Yao Qi <yao.qi@linaro.org>
461
462 * Makefile.in: Adjust the path of rules.
463 * configure.srv: Update the path of xml files.
464 * regformats/arm-with-iwmmxt.dat: Regenerated.
465 * regformats/arm-with-neon.dat: Likewise.
466 * regformats/arm-with-vfpv2.dat: Likewise.
467 * regformats/arm-with-vfpv3.dat Likewise.
468
17e16485
YQ
4692016-09-30 Yao Qi <yao.qi@linaro.org>
470
471 PR gdbserver/20627
472 * target.c (target_stop_and_wait): Don't call
473 target_continue_no_signal, use resume_stop instead.
474
edeeb602
YQ
4752016-09-26 Yao Qi <yao.qi@linaro.org>
476
477 * linux-low.c (linux_wait_1): Call debug_exit.
478
503b1c39
PA
4792016-09-23 Pedro Alves <palves@redhat.com>
480
481 * Makefile.in (SFILES): Add common/new-op.c.
482 (OBS): Add common/new-op.o.
483 (new-op.o): New rule.
484
74172ecf
SM
4852016-09-21 Simon Marchi <simon.marchi@ericsson.com>
486
487 * .gitinore: Ignore more files.
488
fc6cda2e
YQ
4892016-09-21 Yao Qi <yao.qi@linaro.org>
490
491 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
492 23.
493
bc1e6c81
SDJ
4942016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
495
496 * server.c (start_inferior): Call target_mourn_inferior instead of
497 mourn_inferior; pass ptid_t argument to it.
498 (resume): Likewise.
499 (handle_target_event): Likewise.
500 * target.c (target_mourn_inferior): New function.
501 * target.h (mourn_inferior): Delete macro.
502
0e00e962
AA
5032016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
504
505 * linux-low.c (lwp_is_stepping): New function.
506
1d8cb77d
CL
5072016-09-06 Carl Love <cel@us.ibm.com>
508
509 * server.c (start_inferior): Fixed comment, requested comment change
510 didn't get updated correctly. Removed reference to ptrace () call as
511 it is only true on Linux systems.
512
7313bced
CL
5132016-09-06 Carl Love <cel@us.ibm.com>
514
515 * server.c (start_inferior): Do not call
516 function target_post_create_inferior () if the
517 inferior process has already exited.
518
cf6de44d
PA
5192016-09-05 Pedro Alves <palves@redhat.com>
520
521 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
522 (COMPILE.pre, CC_LD): Use CXX directly.
523 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
524 * acinclude.m4: Don't include build-with-cxx.m4.
525 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
526 * configure: Regenerate.
527
c1da6748
AT
5282016-09-02 Akash Trehan <akash.trehan123@gmail.com>
529
530 PR gdb/19495
531 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
532 call writing data to own_buf.
533
f2b9e3df
SDJ
5342016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
535
536 * target.c (mywait): Call target_wait instead of
537 the_target->wait.
538 (target_wait): New function.
539
049a8570
SDJ
5402016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
541
542 * server.c (start_inferior): New variable 'ptid'. Replace calls
543 to the_target->resume by target_continue{,_no_signal}, depending
544 on the case.
545 * target.c (target_stop_and_wait): Call target_continue_no_signal
546 instead of the_target->resume.
547 (target_continue): New function.
548
3aa5cfa0
AT
5492016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
550
551 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
552
754653a7
AZ
5532016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
554
555 PR server/20491
556 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
557 ps_prochandle.
558 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
559 * linux-arm-low.c (ps_get_thread_area): Likewise.
560 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
561 * linux-m68k-low.c (ps_get_thread_area): Likewise.
562 * linux-mips-low.c (ps_get_thread_area): Likewise.
563 * linux-nios2-low.c (ps_get_thread_area): Likewise.
564 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
565 * linux-x86-low.c (ps_get_thread_area): Likewise.
566 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
567
ed036b40
PA
5682016-08-19 Pedro Alves <palves@redhat.com>
569
570 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
571
c8ef42ee
PA
5722016-08-19 Pedro Alves <palves@redhat.com>
573
574 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
575 comment. Use memcpy instead of casting through unsigned long.
576
9c235a72
PA
5772016-08-19 Pedro Alves <palves@redhat.com>
578
579 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
580 allocating around 0x80000000.
581
201506da
PA
5822016-08-19 Pedro Alves <palves@redhat.com>
583
584 PR gdb/20415
585 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
586 (x32-avx512-linux-ipa.o): New rules.
587 * configure.ac (x86_64-*-linux*): New x32 check.
588 * configure.srv (ipa_x32_linux_regobj): New.
589 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
590 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
591 descriptions.
592 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
593 descriptions.
594 * configure: Regenerate.
595
f348d89a
PA
5962016-08-09 Pedro Alves <palves@redhat.com>
597
598 PR gdb/18653
599 * Makefile.in (OBS): Add signals-state-save-restore.o.
600 (signals-state-save-restore.o): New rule.
601 * config.in: Regenerate.
602 * configure: Regenerate.
603 * linux-low.c: Include "signals-state-save-restore.h".
604 (linux_create_inferior): Call
605 restore_original_signals_state.
606 * server.c: Include "dispositions-save-restore.h".
607 (captured_main): Call save_original_signals_state.
608
1baf5149
PA
6092016-08-05 Pedro Alves <palves@redhat.com>
610
611 * configure: Regenerate.
612
fcd4a73d
YQ
6132016-08-04 Yao Qi <yao.qi@linaro.org>
614
615 * linux-low.c (regsets_fetch_inferior_registers): Check
616 errno is ESRCH or not.
617
979659d0
YQ
6182016-08-02 Yao Qi <yao.qi@linaro.org>
619
620 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
621 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
622 (thread_db_load_search): Update.
623 (try_thread_db_load_1): Don't look for td_ta_event_addr,
624 td_ta_set_event and td_ta_event_getmsg.
625
6598661d
PA
6262016-07-26 Pedro Alves <palves@redhat.com>
627
628 PR server/20414
629 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
630 of unsigned long for 64-bit registers and use uint32_t instead of
631 unsigned int for 32-bit registers.
632
9cf12d57
PA
6332016-07-26 Pedro Alves <palves@redhat.com>
634
635 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
636 to 'ptrace'.
637
305450ed
TT
6382016-07-21 Tom Tromey <tom@tromey.com>
639
640 * configure: Rebuild.
641
2583da7c
YQ
6422016-07-21 Yao Qi <yao.qi@linaro.org>
643
644 * mem-break.c (find_gdb_breakpoint): Cast bp to
645 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
646
21536b36
YQ
6472016-07-21 Yao Qi <yao.qi@linaro.org>
648
649 * server.c (handle_v_requests): Support s and S actions
650 if target_supports_software_single_step return true.
651
8901d193
YQ
6522016-07-21 Yao Qi <yao.qi@linaro.org>
653
654 * linux-low.c (resume_stopped_resumed_lwps): If resume request
655 is resume_step, call maybe_hw_step.
656 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
657 and unstop them.
658 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
659 breakpoints or not.
660 (proceed_one_lwp): If resume request is resume_step, install
661 reinsert breakpoints and call maybe_hw_step.
662
0e9a339e
YQ
6632016-07-21 Yao Qi <yao.qi@linaro.org>
664
665 * linux-low.c (proceed_one_lwp): Declare.
666 (linux_resume_one_thread): Remove local variable 'step'.
667 Lift code enqueue signal. Call proceed_one_lwp instead of
668 linux_resume_one_lwp.
669
4281b351
YQ
6702016-07-21 Yao Qi <yao.qi@linaro.org>
671
672 * linux-low.c (linux_resume_one_thread): Call
673 enqueue_pending_signal.
674
984a2c04
YQ
6752016-07-21 Yao Qi <yao.qi@linaro.org>
676
677 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
678 * inferiors.c (do_restore_current_thread_cleanup): New function.
679 (make_cleanup_restore_current_thread): Likewise.
680 * linux-low.c (install_software_single_step_breakpoints): Call
681 make_cleanup_restore_current_thread. Switch current_thread to
682 thread.
683
bec903c9
YQ
6842016-07-21 Yao Qi <yao.qi@linaro.org>
685
686 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
687 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
688 (clone_one_breakpoint): Likewise.
689 (delete_reinsert_breakpoints): Change parameter to thread.
690 Callers updated.
691 (has_reinsert_breakpoints): Likewise.
692 (uninsert_reinsert_breakpoints): Likewise.
693 (reinsert_reinsert_breakpoints): Likewise.
694 * mem-break.h (set_reinsert_breakpoint): Update declaration.
695 (delete_reinsert_breakpoints): Likewise.
696 (reinsert_reinsert_breakpoints): Likewise.
697 (uninsert_reinsert_breakpoints): Likewise.
698 (has_reinsert_breakpoints): Likewise.
699
63c40ec7
YQ
7002016-07-21 Yao Qi <yao.qi@linaro.org>
701
702 * inferiors.c (get_thread_process): Make parameter const.
703 * inferiors.h (get_thread_process): Update declaration.
704 * mem-break.c (clone_all_breakpoints): Remove all parameters.
705 Add new parameters child_thread and parent_thread. Callers
706 updated.
707 * mem-break.h (clone_all_breakpoints): Update declaration.
708
9aa76cd0
YQ
7092016-07-21 Yao Qi <yao.qi@linaro.org>
710
711 * mem-break.c (struct breakpoint) <cond_list>: Remove.
712 <command_list, handler>: Remove.
713 (struct gdb_breakpoint): New.
714 (struct other_breakpoint): New.
715 (struct reinsert_breakpoint): New.
716 (is_gdb_breakpoint): New function.
717 (any_persistent_commands): Update command_list if
718 is_gdb_breakpoint returns true.
719 (set_breakpoint): Create breakpoints according to their types.
720 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
721 (set_gdb_breakpoint_1): Likewise.
722 (set_gdb_breakpoint): Likewise.
723 (clear_breakpoint_conditions): Change parameter type to
724 'struct gdb_breakpoint *'.
725 (clear_breakpoint_commands): Likewise.
726 (clear_breakpoint_conditions_and_commands): Likewise.
727 (add_condition_to_breakpoint): Likewise.
728 (add_breakpoint_condition): Likewise.
729 (add_commands_to_breakpoint): Likewise.
730 (check_breakpoints): Check other_breakpoint.
731 (clone_one_breakpoint): Clone breakpopint according to its type.
732 * mem-break.h (struct gdb_breakpoint): Declare.
733 (set_gdb_breakpoint): Update declaration.
734 (clear_breakpoint_conditions_and_commands): Likewise.
735 (add_breakpoint_condition): Likewise.
736 (add_breakpoint_commands): Likewise.
737 * server.c (process_point_options): Change parameter type to
738 'struct gdb_breakpoint *'.
739
811f8301
YQ
7402016-07-21 Yao Qi <yao.qi@linaro.org>
741
742 * mem-break.c (set_breakpoint_at): Rename it to ...
743 (set_breakpoint_type_at): ... it.
744 (set_breakpoint_at): Call set_breakpoint_type_at.
745 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
746 * mem-break.h (set_breakpoint_at): Update comments.
747
b1c51e36
CLT
7482016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
749
750 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
751 to buf parameter.
752 (nios2_store_gregset): Likewise.
753
ced2dffb
PA
7542016-07-01 Pedro Alves <palves@redhat.com>
755 Antoine Tremblay <antoine.tremblay@ericsson.com>
756
757 * linux-low.c: Change interface to take the target lwp_info
758 pointer directly and return void. Handle detaching from a zombie
759 thread.
760 (linux_detach_lwp_callback): New function.
761 (linux_detach): Detach from the leader thread after detaching from
762 the clone threads.
763
2ac09a5b
YQ
7642016-06-28 Yao Qi <yao.qi@linaro.org>
765
766 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
767 for variable new_offset.
768 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
769 (aarch64_ftrace_insn_reloc_cb): Likewise.
770 (aarch64_ftrace_insn_reloc_tb): Likewise.
771 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
772 PRIx64 instead of PRIx32.
773
79e7fd4f
YQ
7742016-06-28 Yao Qi <yao.qi@linaro.org>
775
776 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
777 (the_low_target): Install arm_get_syscall_trapinfo.
778
061fc021
YQ
7792016-06-28 Yao Qi <yao.qi@linaro.org>
780
781 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
782 function.
783 (the_low_target): Install aarch64_get_syscall_trapinfo.
784
4cc32bec
YQ
7852016-06-28 Yao Qi <yao.qi@linaro.org>
786
787 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
788 Callers updated.
789 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
790 Remove parameter sysno.
791 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
792 sysret.
793
782c1122
AA
7942016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
795
796 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
797 (s390_emit_ne_goto): Likewise.
798 (s390_emit_lt_goto): Likewise.
799 (s390_emit_le_goto): Likewise.
800 (s390_emit_gt_goto): Likewise.
801 (s390_emit_ge_goto): Likewise.
802 (s390x_emit_eq_goto): Likewise.
803 (s390x_emit_ne_goto): Likewise.
804 (s390x_emit_lt_goto): Likewise.
805 (s390x_emit_le_goto): Likewise.
806 (s390x_emit_gt_goto): Likewise.
807 (s390x_emit_ge_goto): Likewise.
808 (s390_emit_ops_impl): Mark variable static.
809 (s390x_emit_ops): Likewise.
810
2e7b624b
YQ
8112016-06-17 Yao Qi <yao.qi@linaro.org>
812
813 * linux-low.c (handle_extended_wait): Call
814 uninsert_reinsert_breakpoints for the parent process. Remove
815 reinsert breakpoints from the child process. Reinsert them to
816 the parent process when vfork is done.
817 * mem-break.c (uninsert_reinsert_breakpoints): New function.
818 (reinsert_reinsert_breakpoints): New function.
819 * mem-break.h (uninsert_reinsert_breakpoints): Declare
820 (reinsert_reinsert_breakpoints): Declare.
821
8a81c5d7
YQ
8222016-06-17 Yao Qi <yao.qi@linaro.org>
823
824 * linux-low.c (handle_extended_wait): If the parent is doing
825 step-over, remove the reinsert breakpoints from the forked child.
826
f50bf8e5
YQ
8272016-06-17 Yao Qi <yao.qi@linaro.org>
828
829 * linux-low.c (unsuspend_all_lwps): Declare.
830 (linux_low_filter_event): If thread exited, call finish_step_over.
831 If step-over is finished, unsuspend other threads.
832
8376a3cb
YQ
8332016-06-17 Yao Qi <yao.qi@linaro.org>
834
835 * linux-low.c (linux_resume_one_lwp_throw): Assert
836 has_reinsert_breakpoints returns false.
837 * mem-break.c (delete_disabled_breakpoints): Assert
838 bp type isn't reinsert_breakpoint.
839
f79b145d
YQ
8402016-06-17 Yao Qi <yao.qi@linaro.org>
841
842 * linux-low.c (maybe_hw_step): New function.
843 (linux_resume_one_lwp_throw): Call maybe_hw_step.
844 (finish_step_over): Switch current_thread to lwp temporarily,
845 and assert has_reinsert_breakpoints returns true.
846 (proceed_one_lwp): Call maybe_hw_step.
847 * mem-break.c (has_reinsert_breakpoints): New function.
848 * mem-break.h (has_reinsert_breakpoints): Declare.
849
0ae534d2
JT
8502016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
851
852 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
853
fcdad592
YQ
8542016-05-17 Yao Qi <yao.qi@linaro.org>
855
856 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
857 instead of find_inferior.
858
9e784964
YQ
8592016-05-05 Yao Qi <yao.qi@linaro.org>
860
861 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
862 Initialize res to zero.
863
cf2ebb6e
YQ
8642016-05-05 Yao Qi <yao.qi@linaro.org>
865
866 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
867 to uint32_t.
868
c1aebf87
UW
8692016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
870
871 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
872 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
873 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
874
35fd2deb 8752016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 876 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
877
878 * tracepoint.c (write_inferior_int8): New function.
879 (cmd_qtenable_disable): Write enable flag using
880 write_inferior_int8.
881
484b3c32
YQ
8822016-04-25 Yao Qi <yao.qi@linaro.org>
883
884 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
885 (need_step_over_p): Return zero if the LWP has pending signals
886 can be delivered on software single step target.
887
85ba7d86
YQ
8882016-04-25 Yao Qi <yao.qi@linaro.org>
889
890 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
891 return instead of error.
892
3539aa13
YQ
8932016-04-22 Yao Qi <yao.qi@linaro.org>
894
895 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
896 to 23.
897
5b061e98
YQ
8982016-04-22 Yao Qi <yao.qi@linaro.org>
899
900 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
901 signal when stepping over breakpoint with software single
902 step.
903
3451269c
PA
9042016-04-21 Pedro Alves <palves@redhat.com>
905
906 * linux-s390-low.c (s390_collect_ptrace_register)
907 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
908 add casts.
909 (s390_check_regset): Use void * instead of gdb_byte *.
910
a2358508
PA
9112016-04-20 Pedro Alves <palves@redhat.com>
912
913 * configure: Renegerate.
914
6885166d
YQ
9152016-04-20 Yao Qi <yao.qi@linaro.org>
916
917 * linux-aarch32-low.c: Include "arch/arm-linux.h".
918 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
919 number 16.
920 (arm_store_gregset): Likewise.
921
2b863f51
WT
9222016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
923
924 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
925 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
926 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
927 (amd64-avx-mpx-linux.c): New rules.
928 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
929 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
930 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
931 (srv_amd64_regobj): Add amd64-avx-mpx.o.
932 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
933 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
934 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
935 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
936 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
937 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
938 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
939 * linux-x86-low.c (x86_linux_read_description): Add case for
940 X86_XSTATE_AVX_MPX_MASK.
941 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
942 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
943 init_registers_i386_avx_mpx_linux.
944 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
945 (initialize_low_tracepoint): Call
946 init_registers_i386_avx_mpx_linux.
947 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
948 (initialize_low_tracepoint): Call
949 init_registers_amd64_avx_mpx_linux.
950 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
951 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
952 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
953 declarations.
954
9b30624b
PA
9552016-04-18 Pedro Alves <palves@redhat.com>
956
957 * configure: Regenerate.
958
45e3745e
AT
9592016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
960
961 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
962 (aarch64_emit_sub): Likewise.
963
2afc13ff
PA
9642016-04-12 Pedro Alves <palves@redhat.com>
965
966 * utils.c (prepare_to_throw_exception): Delete.
967
6e774b13
SM
9682016-04-05 Simon Marchi <simon.marchi@ericsson.com>
969
970 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
971
4dca19f8
MK
9722016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
973
974 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
975
d0a9981f
MK
9762016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
977
978 * linux-aarch64-ipa.c: Add <elf.h> include.
979 * linux-ppc-ipa.c: Add <elf.h> include.
980 * linux-s390-ipa.c: Add <elf.h> include.
981
252db07e
MK
9822016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
983
984 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
985 (get_raw_reg_ptr): Likewise.
986 (get_trace_state_variable_value_ptr): Likewise.
987 (set_trace_state_variable_value_ptr): Likewise.
988 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
989 char *.
990
14e2b6d9
MK
9912016-03-31 Wei-cheng Wang <cole945@gmail.com>
992 Marcin Kościelnicki <koriakin@0x04.net>
993
994 PR/17221
995 * linux-ppc-low.c (emit_insns): New function.
996 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
997 (ppc_emit_prologue): New function.
998 (ppc_emit_epilogue): New function.
999 (ppc_emit_add): New function.
1000 (ppc_emit_sub): New function.
1001 (ppc_emit_mul): New function.
1002 (ppc_emit_lsh): New function.
1003 (ppc_emit_rsh_signed): New function.
1004 (ppc_emit_rsh_unsigned): New function.
1005 (ppc_emit_ext): New function.
1006 (ppc_emit_zero_ext): New function.
1007 (ppc_emit_log_not): New function.
1008 (ppc_emit_bit_and): New function.
1009 (ppc_emit_bit_or): New function.
1010 (ppc_emit_bit_xor): New function.
1011 (ppc_emit_bit_not): New function.
1012 (ppc_emit_equal): New function.
1013 (ppc_emit_less_signed): New function.
1014 (ppc_emit_less_unsigned): New function.
1015 (ppc_emit_ref): New function.
1016 (ppc_emit_const): New function.
1017 (ppc_emit_reg): New function.
1018 (ppc_emit_pop): New function.
1019 (ppc_emit_stack_flush): New function.
1020 (ppc_emit_swap): New function.
1021 (ppc_emit_stack_adjust): New function.
1022 (ppc_emit_call): New function.
1023 (ppc_emit_int_call_1): New function.
1024 (ppc_emit_void_call_2): New function.
1025 (ppc_emit_if_goto): New function.
1026 (ppc_emit_goto): New function.
1027 (ppc_emit_eq_goto): New function.
1028 (ppc_emit_ne_goto): New function.
1029 (ppc_emit_lt_goto): New function.
1030 (ppc_emit_le_goto): New function.
1031 (ppc_emit_gt_goto): New function.
1032 (ppc_emit_ge_goto): New function.
1033 (ppc_write_goto_address): New function.
1034 (ppc_emit_ops_impl): New static variable.
1035 (ppc64v1_emit_prologue): New function.
1036 (ppc64v2_emit_prologue): New function.
1037 (ppc64_emit_epilogue): New function.
1038 (ppc64_emit_add): New function.
1039 (ppc64_emit_sub): New function.
1040 (ppc64_emit_mul): New function.
1041 (ppc64_emit_lsh): New function.
1042 (ppc64_emit_rsh_signed): New function.
1043 (ppc64_emit_rsh_unsigned): New function.
1044 (ppc64_emit_ext): New function.
1045 (ppc64_emit_zero_ext): New function.
1046 (ppc64_emit_log_not): New function.
1047 (ppc64_emit_bit_and): New function.
1048 (ppc64_emit_bit_or): New function.
1049 (ppc64_emit_bit_xor): New function.
1050 (ppc64_emit_bit_not): New function.
1051 (ppc64_emit_equal): New function.
1052 (ppc64_emit_less_signed): New function.
1053 (ppc64_emit_less_unsigned): New function.
1054 (ppc64_emit_ref): New function.
1055 (ppc64_emit_const): New function.
1056 (ppc64v1_emit_reg): New function.
1057 (ppc64v2_emit_reg): New function.
1058 (ppc64_emit_pop): New function.
1059 (ppc64_emit_stack_flush): New function.
1060 (ppc64_emit_swap): New function.
1061 (ppc64v1_emit_call): New function.
1062 (ppc64v2_emit_call): New function.
1063 (ppc64v1_emit_int_call_1): New function.
1064 (ppc64v2_emit_int_call_1): New function.
1065 (ppc64v1_emit_void_call_2): New function.
1066 (ppc64v2_emit_void_call_2): New function.
1067 (ppc64_emit_if_goto): New function.
1068 (ppc64_emit_eq_goto): New function.
1069 (ppc64_emit_ne_goto): New function.
1070 (ppc64_emit_lt_goto): New function.
1071 (ppc64_emit_le_goto): New function.
1072 (ppc64_emit_gt_goto): New function.
1073 (ppc64_emit_ge_goto): New function.
1074 (ppc64v1_emit_ops_impl): New static variable.
1075 (ppc64v2_emit_ops_impl): New static variable.
1076 (ppc_emit_ops): New function.
1077 (linux_low_target): Wire in ppc_emit_ops.
1078
a2174ba4
MK
10792016-03-31 Wei-cheng Wang <cole945@gmail.com>
1080 Marcin Kościelnicki <koriakin@0x04.net>
1081
1082 PR/17221
1083 * Makefile.in: Add powerpc-*-ipa.o
1084 * configure.srv: Add ipa_obj for powerpc*-linux.
1085 * linux-ppc-ipa.c: New file.
1086 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1087 includes.
1088 (PPC_FIELD): New macro.
1089 (PPC_SEXT): New macro.
1090 (PPC_OP6): New macro.
1091 (PPC_BO): New macro.
1092 (PPC_LI): New macro.
1093 (PPC_BD): New macro.
1094 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1095 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1096 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1097 (ppc_get_thread_area): New function.
1098 (is_elfv2_inferior): New function.
1099 (gen_ds_form): New function.
1100 (GEN_STD): New macro.
1101 (GEN_STDU): New macro.
1102 (GEN_LD): New macro.
1103 (GEN_LDU): New macro.
1104 (gen_d_form): New function.
1105 (GEN_ADDI): New macro.
1106 (GEN_ADDIS): New macro.
1107 (GEN_LI): New macro.
1108 (GEN_LIS): New macro.
1109 (GEN_ORI): New macro.
1110 (GEN_ORIS): New macro.
1111 (GEN_LWZ): New macro.
1112 (GEN_STW): New macro.
1113 (GEN_STWU): New macro.
1114 (gen_xfx_form): New function.
1115 (GEN_MFSPR): New macro.
1116 (GEN_MTSPR): New macro.
1117 (GEN_MFCR): New macro.
1118 (GEN_MTCR): New macro.
1119 (GEN_SYNC): New macro.
1120 (GEN_LWSYNC): New macro.
1121 (gen_x_form): New function.
1122 (GEN_OR): New macro.
1123 (GEN_MR): New macro.
1124 (GEN_LWARX): New macro.
1125 (GEN_STWCX): New macro.
1126 (GEN_CMPW): New macro.
1127 (gen_md_form): New function.
1128 (GEN_RLDICL): New macro.
1129 (GEN_RLDICR): New macro.
1130 (gen_i_form): New function.
1131 (GEN_B): New macro.
1132 (GEN_BL): New macro.
1133 (gen_b_form): New function.
1134 (GEN_BNE): New macro.
1135 (GEN_LOAD): New macro.
1136 (GEN_STORE): New macro.
1137 (gen_limm): New function.
1138 (gen_atomic_xchg): New function.
1139 (gen_call): New function.
1140 (ppc_relocate_instruction): New function.
1141 (ppc_install_fast_tracepoint_jump_pad): New function.
1142 (ppc_get_min_fast_tracepoint_insn_len): New function.
1143 (ppc_get_ipa_tdesc_idx): New function.
1144 (the_low_target): Wire in the new functions.
1145 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1146 tdescs.
1147 * linux-ppc-tdesc.h: New file.
1148
a13c4696
MK
11492016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1150
1151 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1152 (alloc_jump_pad_buffer): New function.
1153 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1154 (alloc_jump_pad_buffer): New function.
1155 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1156 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1157 (alloc_jump_pad_buffer): New function.
1158 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1159 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1160 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1161 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1162
1cda1512
MK
11632016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1164
1165 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1166 * linux-amd64-ipa.c: Likewise.
1167 * linux-i386-ipa.c: Likewise.
1168 * linux-s390-ipa.c: Likewise.
1169 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1170 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1171 set_trace_state_variable_value_ptr.
1172 (struct ipa_sym_addresses): Likewise.
1173 (symbol_list): Likewise.
1174 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1175 accessing gdb_collect directly.
1176 (gdb_collect_ptr_type): New typedef.
1177 (get_raw_reg_ptr_type): New typedef.
1178 (get_trace_state_variable_value_ptr_type): New typedef.
1179 (set_trace_state_variable_value_ptr_type): New typedef.
1180 (gdb_collect_ptr): New global.
1181 (get_raw_reg_ptr): New global.
1182 (get_trace_state_variable_value_ptr): New global.
1183 (set_trace_state_variable_value_ptr): New global.
1184 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1185 accessing get_raw_reg directly.
1186 (get_get_tsv_func_addr): Likewise for
1187 get_trace_state_variable_value_ptr.
1188 (get_set_tsv_func_addr): Likewise for
1189 set_trace_state_variable_value_ptr.
1190 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1191
72fb5488
SM
11922016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1193
1194 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1195
28170b88
MK
11962016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1197
1198 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1199 packets.
1200 (relocate_instruction): Remove own_buf.
1201 * server.c (own_buf): Make global.
1202 (handle_v_requests): Make global.
1203 * server.h (own_buf): New declaration.
1204 (handle_v_requests): New prototype.
1205
f39e8743
MK
12062016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1207
1208 PR 18377
1209 * linux-s390-low.c (add_insns): New function.
1210 (s390_emit_prologue): New function.
1211 (s390_emit_epilogue): New function.
1212 (s390_emit_add): New function.
1213 (s390_emit_sub): New function.
1214 (s390_emit_mul): New function.
1215 (s390_emit_lsh): New function.
1216 (s390_emit_rsh_signed): New function.
1217 (s390_emit_rsh_unsigned): New function.
1218 (s390_emit_ext): New function.
1219 (s390_emit_log_not): New function.
1220 (s390_emit_bit_and): New function.
1221 (s390_emit_bit_or): New function.
1222 (s390_emit_bit_xor): New function.
1223 (s390_emit_bit_not): New function.
1224 (s390_emit_equal): New function.
1225 (s390_emit_less_signed): New function.
1226 (s390_emit_less_unsigned): New function.
1227 (s390_emit_ref): New function.
1228 (s390_emit_if_goto): New function.
1229 (s390_emit_goto): New function.
1230 (s390_write_goto_address): New function.
1231 (s390_emit_litpool): New function.
1232 (s390_emit_const): New function.
1233 (s390_emit_call): New function.
1234 (s390_emit_reg): New function.
1235 (s390_emit_pop): New function.
1236 (s390_emit_stack_flush): New function.
1237 (s390_emit_zero_ext): New function.
1238 (s390_emit_swap): New function.
1239 (s390_emit_stack_adjust): New function.
1240 (s390_emit_set_r2): New function.
1241 (s390_emit_int_call_1): New function.
1242 (s390_emit_void_call_2): New function.
1243 (s390_emit_eq_goto): New function.
1244 (s390_emit_ne_goto): New function.
1245 (s390_emit_lt_goto): New function.
1246 (s390_emit_le_goto): New function.
1247 (s390_emit_gt_goto): New function.
1248 (s390_emit_ge_goto): New function.
1249 (s390x_emit_prologue): New function.
1250 (s390x_emit_epilogue): New function.
1251 (s390x_emit_add): New function.
1252 (s390x_emit_sub): New function.
1253 (s390x_emit_mul): New function.
1254 (s390x_emit_lsh): New function.
1255 (s390x_emit_rsh_signed): New function.
1256 (s390x_emit_rsh_unsigned): New function.
1257 (s390x_emit_ext): New function.
1258 (s390x_emit_log_not): New function.
1259 (s390x_emit_bit_and): New function.
1260 (s390x_emit_bit_or): New function.
1261 (s390x_emit_bit_xor): New function.
1262 (s390x_emit_bit_not): New function.
1263 (s390x_emit_equal): New function.
1264 (s390x_emit_less_signed): New function.
1265 (s390x_emit_less_unsigned): New function.
1266 (s390x_emit_ref): New function.
1267 (s390x_emit_if_goto): New function.
1268 (s390x_emit_const): New function.
1269 (s390x_emit_call): New function.
1270 (s390x_emit_reg): New function.
1271 (s390x_emit_pop): New function.
1272 (s390x_emit_stack_flush): New function.
1273 (s390x_emit_zero_ext): New function.
1274 (s390x_emit_swap): New function.
1275 (s390x_emit_stack_adjust): New function.
1276 (s390x_emit_int_call_1): New function.
1277 (s390x_emit_void_call_2): New function.
1278 (s390x_emit_eq_goto): New function.
1279 (s390x_emit_ne_goto): New function.
1280 (s390x_emit_lt_goto): New function.
1281 (s390x_emit_le_goto): New function.
1282 (s390x_emit_gt_goto): New function.
1283 (s390x_emit_ge_goto): New function.
1284 (s390_emit_ops): New function.
1285 (struct linux_target_ops): Fill in emit_ops hook.
1286
abd9baf9
MK
12872016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1288
1289 PR 18377
1290 * Makefile.in: Add s390 IPA files.
1291 * configure.srv: Build IPA for s390.
1292 * linux-s390-ipa.c: New file.
1293 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1294 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1295 (tdesc_s390_linux32): Likewise.
1296 (init_registers_s390_linux32v1): Likewise.
1297 (tdesc_s390_linux32v1): Likewise.
1298 (init_registers_s390_linux32v2): Likewise.
1299 (tdesc_s390_linux32v2): Likewise.
1300 (init_registers_s390_linux64): Likewise.
1301 (tdesc_s390_linux64): Likewise.
1302 (init_registers_s390_linux64v1): Likewise.
1303 (tdesc_s390_linux64v1): Likewise.
1304 (init_registers_s390_linux64v2): Likewise.
1305 (tdesc_s390_linux64v2): Likewise.
1306 (init_registers_s390_te_linux64): Likewise.
1307 (tdesc_s390_te_linux64): Likewise.
1308 (init_registers_s390_vx_linux64): Likewise.
1309 (tdesc_s390_vx_linux64): Likewise.
1310 (init_registers_s390_tevx_linux64): Likewise.
1311 (tdesc_s390_tevx_linux64): Likewise.
1312 (init_registers_s390x_linux64): Likewise.
1313 (tdesc_s390x_linux64): Likewise.
1314 (init_registers_s390x_linux64v1): Likewise.
1315 (tdesc_s390x_linux64v1): Likewise.
1316 (init_registers_s390x_linux64v2): Likewise.
1317 (tdesc_s390x_linux64v2): Likewise.
1318 (init_registers_s390x_te_linux64): Likewise.
1319 (tdesc_s390x_te_linux64): Likewise.
1320 (init_registers_s390x_vx_linux64): Likewise.
1321 (tdesc_s390x_vx_linux64): Likewise.
1322 (init_registers_s390x_tevx_linux64): Likewise.
1323 (tdesc_s390x_tevx_linux64): Likewise.
1324 (have_hwcap_s390_vx): New static variable.
1325 (s390_arch_setup): Fill have_hwcap_s390_vx.
1326 (s390_get_thread_area): New function.
1327 (s390_ft_entry_gpr_esa): New const.
1328 (s390_ft_entry_gpr_zarch): New const.
1329 (s390_ft_entry_misc): New const.
1330 (s390_ft_entry_fr): New const.
1331 (s390_ft_entry_vr): New const.
1332 (s390_ft_main_31): New const.
1333 (s390_ft_main_64): New const.
1334 (s390_ft_exit_fr): New const.
1335 (s390_ft_exit_vr): New const.
1336 (s390_ft_exit_misc): New const.
1337 (s390_ft_exit_gpr_esa): New const.
1338 (s390_ft_exit_gpr_zarch): New const.
1339 (append_insns): New function.
1340 (s390_relocate_instruction): New function.
1341 (s390_install_fast_tracepoint_jump_pad): New function.
1342 (s390_get_min_fast_tracepoint_insn_len): New function.
1343 (s390_get_ipa_tdesc_idx): New function.
1344 (struct linux_target_ops): Wire in the above functions.
1345 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1346 * linux-s390-tdesc.h: New file.
1347
a4105d04
MK
13482016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1349
1350 * linux-s390-low.c (s390_supports_tracepoints): New function.
1351 (struct linux_target_ops): Fill supports_tracepoints hook.
1352
35ac8b3e
YQ
13532016-03-18 Yao Qi <yao.qi@linaro.org>
1354
1355 * linux-low.c (lwp_signal_can_be_delivered): New function.
1356 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1357
94610ec4
YQ
13582016-03-18 Yao Qi <yao.qi@linaro.org>
1359
1360 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1361 0 if signal is enqueued. Remove 'signal' from one debugging
1362 message. Move one debugging message to some lines below.
1363 Remove code setting 'signal' to 0.
1364
80aea927
YQ
13652016-03-18 Yao Qi <yao.qi@linaro.org>
1366
1367 * linux-low.c (linux_low_filter_event): Remove redundant
1368 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1369
b04fd3be
MK
13702016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1371
1372 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1373 (struct linux_target_ops): Wire in the above.
1374
c40c8d4b
YQ
13752016-03-03 Yao Qi <yao.qi@linaro.org>
1376
1377 * linux-low.c: Update comments to start_step_over.
1378
0f8288ae
YQ
13792016-03-03 Yao Qi <yao.qi@linaro.org>
1380
1381 PR server/19736
1382 * linux-low.c (handle_extended_wait): Set child suspended
1383 if event_lwp->bp_reinsert isn't zero.
1384
fdbd04a8
YQ
13852016-03-02 Yao Qi <yao.qi@linaro.org>
1386
1387 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1388 enqueue_pending_signal.
1389
6896a8fa
MK
13902016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1391
1392 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1393 is actually loaded.
1394
ab503087
MK
13952016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1396
1397 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1398 (s390_regmap_3264) [!__s390x__]: New global.
1399 (s390_collect_ptrace_register): Skip map entries containing -1.
1400 (s390_supply_ptrace_register): Ditto.
1401 (s390_fill_gprs_high): New function.
1402 (s390_store_gprs_high): New function.
1403 (s390_regsets): Add NT_S390_HIGH_GPRS.
1404 (s390_get_hwcap): Enable on 31-bit.
1405 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1406 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1407 Detect NT_S390_HIGH_GPRS.
1408 (s390_usrregs_info_3264): Enable on 31-bit.
1409 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1410 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1411
ae91f625
MK
14122016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1413
1414 PR gdb/13808
1415 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1416 * configure.srv: Ditto.
1417 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1418 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1419 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1420 (init_registers_amd64_linux): Remove prototype.
1421 (tdesc_amd64_linux): Remove declaration.
1422 (get_ipa_tdesc): New function.
1423 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1424 initialize remaining tdescs.
1425 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1426 (init_registers_i386_linux): Remove prototype.
1427 (tdesc_i386_linux): Remove declaration.
1428 (get_ipa_tdesc): New function.
1429 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1430 initialize remaining tdescs.
1431 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1432 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1433 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1434 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1435 (x86_get_ipa_tdesc_idx): New function.
1436 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1437 * linux-x86-tdesc.h: New file.
1438 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1439 (target_get_ipa_tdesc_idx): New macro.
1440 * tracepoint.c (ipa_tdesc_idx): New macro.
1441 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1442 (symbol_list): Add ipa_tdesc_idx.
1443 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1444 (ipa_tdesc): Remove.
1445 (ipa_tdesc_idx): New variable.
1446 (get_context_regcache): Use get_ipa_tdesc.
1447 (gdb_collect): Ditto.
1448 (gdb_probe): Ditto.
1449 * tracepoint.h (get_ipa_tdesc): New prototype.
1450 (ipa_tdesc): Remove.
1451
e7ad2f14
PA
14522016-02-24 Pedro Alves <palves@redhat.com>
1453
1454 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1455 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1456 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1457 Factor out common code between the USE_SIGTRAP_SIGINFO and
1458 !USE_SIGTRAP_SIGINFO blocks.
1459 (linux_low_filter_event): Call save_stop_reason instead of
1460 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1461 Update comments.
1462 (linux_wait_1): Update comments.
1463
657f9cde
WW
14642016-02-24 Wei-cheng Wang <cole945@gmail.com>
1465
1466 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1467 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1468 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1469 ppc_insert_point, ppc_remove_point.
1470
b00b61e1
MK
14712016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1472
1473 * linux-s390-low.c (s390_supports_z_point_type): New function.
1474 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1475
553cb527
YQ
14762016-02-16 Yao Qi <yao.qi@linaro.org>
1477
1478 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1479 PC. Get pc from regcache_read_pc.
1480
a5652c21
YQ
14812016-02-12 Yao Qi <yao.qi@linaro.org>
1482
1483 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1484 or linux_get_pc_32bit.
1485 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1486
ed443b61
YQ
14872016-02-12 Yao Qi <yao.qi@linaro.org>
1488
1489 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1490 arm_linux_get_next_pcs_fixup.
1491
020ecd38
MK
14922016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1493
1494 * tracepoint.c (x_tracepoint_action_download): Change
1495 write_inferior_data_ptr to write_inferior_data_pointer.
1496 (cmd_qtstart): Likewise.
1497 (write_inferior_data_ptr): Remove.
1498 (download_agent_expr): Change write_inferior_data_ptr to
1499 write_inferior_data_pointer.
1500 (download_tracepoint_1): Likewise.
1501 (download_tracepoint): Likewise.
1502 (download_trace_state_variables): Likewise.
1503
7cae9051
WW
15042016-02-11 Wei-cheng Wang <cole945@gmail.com>
1505 Marcin Kościelnicki <koriakin@0x04.net>
1506
1507 * tracepoint.c (struct tracepoint_action_ops): Remove.
1508 (struct tracepoint_action): Remove ops.
1509 (m_tracepoint_action_download, r_tracepoint_action_download)
1510 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1511 size and offset accordingly.
1512 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1513 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1514 (tracepoint_action_send, tracepoint_action_download): New functions.
1515 Helpers for trace action handlers.
1516 (add_tracepoint_action): Remove setup actions ops.
1517 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1518
9f6a71b4
YQ
15192016-02-10 Yao Qi <yao.qi@linaro.org>
1520
1521 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1522
1e94266c
SM
15232016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1524
1525 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1526 to AC_OUTPUT.
1527 * configure: Regenerate.
1528
8adce034
SM
15292016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1530
1531 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1532 void * to gdb_byte *.
1533 * linux-low.c (siginfo_fixup): Likewise.
1534 (linux_xfer_siginfo): Likewise.
1535 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1536 Likewise.
1537 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1538
93813b37
WT
15392016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1540
1541 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1542 to srv_tgtobj.
1543 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1544 to srv_tgtobj.
1545 * linux-x86-low.c [__x86_64__]: Include
1546 "nat/amd64-linux-siginfo.h".
1547 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1548 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1549 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1550 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1551 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1552 (cpt_si_fd, si_timerid, si_overrun): Move from
1553 nat/amd64-linux-siginfo.c.
1554 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1555
8424cc97
SM
15562016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1557
1558 * server.c (skip_to_semicolon): Remove.
1559 (process_point_options): Use strchrnul instead of
1560 skip_to_semicolon.
1561
4d18591b
YQ
15622016-01-26 Yao Qi <yao.qi@linaro.org>
1563
1564 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1565 * linux-low.c (install_software_single_step_breakpoints): Don't
1566 call regcache_read_pc.
1567 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1568 argument pc.
1569
d8020970
YQ
15702016-01-26 Yao Qi <yao.qi@linaro.org>
1571
1572 * linux-low.c (install_software_single_step_breakpoints): Call
1573 regcache_read_pc instead of get_pc.
1574
8b207339
YQ
15752016-01-26 Yao Qi <yao.qi@linaro.org>
1576
1577 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1578 (unblock_async_io): Rename to ...
1579 (block_unblock_async_io): ... it. New function.
1580 (enable_async_io): Don't install SIGIO handler. Unblock it
1581 instead.
1582 (disable_async_io): Don't ignore SIGIO. Block it instead.
1583 (initialize_async_io): Install SIGIO handler. Don't call
1584 unblock_async_io.
1585
18879fef
YQ
15862016-01-26 Yao Qi <yao.qi@linaro.org>
1587
1588 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1589 first character is '\003', call *the_target->request_interrupt.
1590
a0f8e08a
YQ
15912016-01-25 Yao Qi <yao.qi@linaro.org>
1592
1593 * remote-utils.c (new_thread_notify): Remove.
1594 (dead_thread_notify): Likewise.
1595 * remote-utils.h (new_thread_notify): Remove declaration.
1596 (dead_thread_notify): Likewise.
1597
cc5fd9ab
MK
15982016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1599
1600 * gdb.trace/pending.exp: Fix expected message on continue.
1601
99e8eb11
MK
16022016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1603
1604 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1605 it works properly on big-endian machines where sizeof (CORE_ADDR)
1606 != sizeof (void *).
1607
a994041d
PA
16082016-01-21 Pedro Alves <palves@redhat.com>
1609
1610 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1611 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1612 * configure: Regenerate.
1613
f7a6a40d
YQ
16142016-01-21 Yao Qi <yao.qi@linaro.org>
1615
1616 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1617 is_thumb and set it according to CPSR saved on the stack.
1618 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1619 arm_sigreturn_next_pc.
1620
6f69e520
YQ
16212016-01-18 Yao Qi <yao.qi@linaro.org>
1622
1623 * linux-low.c (linux_set_pc_64bit): New function.
1624 (linux_get_pc_64bit): New function.
1625 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1626 Declare.
1627 * linux-sparc-low.c (debug_threads): Remove declaration.
1628 (sparc_get_pc): Remove.
1629 (the_low_target): Use linux_get_pc_64bit instead of
1630 sparc_get_pc.
1631 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1632 (the_low_target): Use linux_get_pc_64bit and
1633 linux_set_pc_64bit.
1634
276d4552
YQ
16352016-01-18 Yao Qi <yao.qi@linaro.org>
1636
1637 * linux-arm-low.c (debug_threads): Remove declaration.
1638 (arm_get_pc, arm_set_pc): Remove.
1639 (the_low_target): Use linux_get_pc_32bit and
1640 linux_set_pc_32bit.
1641 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1642 (the_low_target): Use linux_get_pc_32bit and
1643 linux_set_pc_32bit.
1644 * linux-cris-low.c (debug_threads): Remove declaration.
1645 (cris_get_pc, cris_set_pc,): Remove.
1646 (the_low_target): Use linux_get_pc_32bit and
1647 linux_set_pc_32bit.
1648 * linux-crisv32-low.c (debug_threads): Remove declaration.
1649 (cris_get_pc, cris_set_pc): Remove.
1650 (the_low_target): Use linux_get_pc_32bit and
1651 linux_set_pc_32bit.
1652 * linux-low.c: Include inttypes.h.
1653 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1654 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1655 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1656 (the_low_target): Use linux_get_pc_32bit and
1657 linux_set_pc_32bit.
1658 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1659 (the_low_target): Use linux_get_pc_32bit and
1660 linux_set_pc_32bit.
1661 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1662 (the_low_target): Use linux_get_pc_32bit and
1663 linux_set_pc_32bit.
1664 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1665 (the_low_target): Use linux_get_pc_32bit and
1666 linux_set_pc_32bit.
1667 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1668 (the_low_target): Use linux_get_pc_32bit and
1669 linux_set_pc_32bit.
1670
eb0edac8
GB
16712016-01-18 Gary Benson <gbenson@redhat.com>
1672
1673 * configure.ac (AC_FUNC_FORK): New check.
1674 * config.in: Regenerate.
1675 * configure: Likewise.
1676
1b451dda
YQ
16772016-01-14 Yao Qi <yao.qi@linaro.org>
1678
1679 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1680 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1681 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1682 arm_get_next_pcs_ctor.
1683
82075af2
JS
16842016-01-12 Josh Stone <jistone@redhat.com>
1685 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1686
1687 * inferiors.h: Include "gdb_vecs.h".
1688 (struct process_info): Add syscalls_to_catch.
1689 * inferiors.c (remove_process): Free syscalls_to_catch.
1690 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1691 syscall_return stops.
1692 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1693 * server.c (handle_general_set): Handle QCatchSyscalls.
1694 (handle_query): Report support for QCatchSyscalls.
1695 * target.h (struct target_ops): Add supports_catch_syscall.
1696 (target_supports_catch_syscall): New macro.
1697 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1698 (struct lwp_info): Add syscall_state.
1699 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1700 Maintain syscall_state and syscalls_to_catch across exec.
1701 (get_syscall_trapinfo): New function, proxy to the_low_target.
1702 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1703 (linux_low_filter_event): Toggle syscall_state entry/return for
1704 syscall traps, and set it ignored for all others.
1705 (gdb_catching_syscalls_p): New function.
1706 (gdb_catch_this_syscall_p): New function.
1707 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1708 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1709 (linux_supports_catch_syscall): New function.
1710 (linux_target_ops): Install it.
1711 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1712 (the_low_target): Install it.
1713
8f13a3ce
MF
17142016-01-12 Mike Frysinger <vapier@gentoo.org>
1715
1716 * acinclude.m4: Include new ../warning.m4 file.
1717 * configure: Regenerated.
1718 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1719
5b3da067
MF
17202016-01-12 Mike Frysinger <vapier@gentoo.org>
1721
1722 * ax.c (is_goto_target): Mark static.
1723 * linux-low.c (register_addr): Likewise.
1724 (linux_fetch_registers, linux_store_registers): Likewise.
1725 * mem-break.c (any_persistent_commands): Fix old prototype.
1726 (add_commands_to_breakpoint): Mark static.
1727 * regcache.c (find_register_by_name): Delete unused func.
1728 * remote-utils.c (hex_or_minus_one): Mark static.
1729 * server.c (monitor_show_help): Mark static.
1730 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1731 handle_v_requests): Likewise.
1732
bc504a31
PA
17332016-01-12 Pedro Alves <palves@redhat.com>
1734
1735 Remove use of the registered trademark symbol throughout.
1736
5a0dd67a
YQ
17372016-01-08 Yao Qi <yao.qi@linaro.org>
1738
1739 * remote-utils.c (getpkt): If c is '\003', call target hook
1740 request_interrupt.
1741
b2ca446f
YQ
17422016-01-06 Yao Qi <yao.qi@linaro.org>
1743
1744 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1745 linux-aarch32-low.c.
1746 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1747 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1748 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1749 (thumb2_breakpoint): Declare.
1750 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1751 linux-aarch32-low.h.
1752 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1753 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1754 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1755
edd88788
JB
17562016-01-01 Joel Brobecker <brobecker@adacore.com>
1757
1758 * gdbreplay.c (gdbreplay_version): Change copyright year in
1759 version message.
1760 * server.c (gdbserver_version): Likewise.
1761
65da7f14
PP
17622015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1763
1764 * server.c (crc32_table): Delete.
1765 (crc32): Use libiberty's xcrc32 function.
1766
4abd5ed2
JB
17672015-12-22 Joel Brobecker <brobecker@adacore.com>
1768
1769 * lynx-low.c (lynx_delete_thread_callback): New function.
1770 (lynx_mourn): Properly delete our process and all of its
1771 threads. Remove call to clear_inferiors.
1772
0e50fe5c
JB
17732015-12-22 Joel Brobecker <brobecker@adacore.com>
1774
1775 * target.c (thread_search_callback): Add check that
1776 the thread_stopped target callback is not NULL before
1777 calling it.
1778
35adc03f
YQ
17792015-12-21 Yao Qi <yao.qi@linaro.org>
1780
1781 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1782 arm breakpoint.
1783
bd2b2909
AT
17842015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1785
1786 * server.c (handle_query): Call target_supports_software_single_step.
1787
7fe5e27e
AT
17882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1789
1790 * linux-low.c (single_step): New function.
1791 (linux_resume_one_lwp_throw): Call single_step.
1792 (start_step_over): Likewise.
1793
d9311bfa
AT
17942015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1795
1796 * Makefile.in (SFILES): Append arch/arm-linux.c,
1797 arch/arm-get-next-pcs.c.
1798 (arm-linux.o): New rule.
1799 (arm-get-next-pcs.o): New rule.
1800 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1801 arm-linux.o.
1802 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1803 to linux-aarch32-low.c.
1804 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1805 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1806 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1807 (thumb2_breakpoint_len): Likewise.
1808 (arm_is_thumb_mode): Make non-static.
1809 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1810 from linux-aarch32-low.c.
1811 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1812 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1813 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1814 (thumb2_breakpoint_len): Likewise.
1815 (arm_is_thumb_mode): New declaration.
1816 * linux-arm-low.c: Include arch/arm-linux.h
1817 aarch/arm-get-next-pcs.h, sys/syscall.h.
1818 (get_next_pcs_ops): New struct.
1819 (get_next_pcs_addr_bits_remove): New function.
1820 (get_next_pcs_is_thumb): New function.
1821 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1822 (arm_sigreturn_next_pc): Likewise.
1823 (get_next_pcs_syscall_next_pc): Likewise.
1824 (arm_gdbserver_get_next_pcs): Likewise.
1825 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1826 Initialize.
1827 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1828 * server.h: Include gdb_vecs.h.
1829
68ce2059
AT
18302015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1831
1832 * Makefile.in (SFILES): Append common/common-regcache.c.
1833 (OBS): Append common-regcache.o.
1834 (common-regcache.o): New rule.
1835 * regcache.c (init_register_cache): Initialize cache to
1836 REG_UNAVAILABLE.
1837 (regcache_raw_read_unsigned): New function.
1838 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1839 register_status enum.
1840
fa5308bd
AT
18412015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1842
1843 * linux-aarch64-low.c (the_low_targets): Rename
1844 breakpoint_reinsert_addr to get_next_pcs.
1845 * linux-arm-low.c (the_low_targets): Likewise.
1846 * linux-bfin-low.c (the_low_targets): Likewise.
1847 * linux-cris-low.c (the_low_targets): Likewise.
1848 * linux-crisv32-low.c (the_low_targets): Likewise.
1849 * linux-low.c (can_software_single_step): Likewise.
1850 (install_software_single_step_breakpoints): New function.
1851 (start_step_over): Use install_software_single_step_breakpoints.
1852 * linux-low.h: New CORE_ADDR vector.
1853 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1854 get_next_pcs.
1855 * linux-mips-low.c (the_low_targets): Likewise.
1856 * linux-nios2-low.c (the_low_targets): Likewise.
1857 * linux-sparc-low.c (the_low_targets): Likewise.
1858
4a6ed09b
PA
18592015-12-17 Pedro Alves <palves@redhat.com>
1860
1861 * linux-low.c (linux_kill_one_lwp): Remove references to
1862 LinuxThreads.
1863 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1864 to 'kill'.
1865 (linux_init_signals): Delete.
1866 (initialize_low): Adjust.
1867 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1868
7544db95
PA
18692015-12-16 Pedro Alves <palves@redhat.com>
1870
1871 * configure.ac (compiler warning flags): When testing a
1872 -Wno-foo option, check whether -Wfoo works instead.
1873 * configure: Regenerate.
1874
8020350c
DB
18752015-12-11 Don Breazeal <donb@codesourcery.com>
1876
1877 * server.c (process_serial_event): Don't exit from gdbserver
1878 in remote mode if there are still active inferiors.
1879
db91f502
YQ
18802015-12-11 Yao Qi <yao.qi@linaro.org>
1881
1882 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1883 arm_breakpoint_at if the process is 32-bit.
1884
b37a6290
YQ
18852015-12-11 Yao Qi <yao.qi@linaro.org>
1886
1887 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1888 arm breakpoint.
1889
17b1509a
YQ
18902015-12-07 Yao Qi <yao.qi@linaro.org>
1891
1892 * configure.srv: Append arm.o to srv_tgtobj for
1893 aarch64*-*-linux* target.
1894 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1895 from linux-arm-low.c.
1896 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1897 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1898 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1899 (thumb2_breakpoint_len): Likewise.
1900 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1901 (arm_breakpoint_kinds): Likewise.
1902 (arm_breakpoint_kind_from_pc): Likewise.
1903 (arm_sw_breakpoint_from_kind): Likewise.
1904 (arm_breakpoint_kind_from_current_state): Likewise.
1905 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1906 (arm_sw_breakpoint_from_kind): Declare.
1907 (arm_breakpoint_kind_from_current_state): Declare.
1908 (arm_breakpoint_at): Declare.
1909 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1910 arm_sw_breakpoint_from_kind if process is 32-bit.
1911 (aarch64_breakpoint_kind_from_pc): New function.
1912 (aarch64_breakpoint_kind_from_current_state): New function.
1913 (the_low_target): Initialize fields breakpoint_kind_from_pc
1914 and breakpoint_kind_from_current_state.
1915 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1916 linux-aarch32-low.c.
1917 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1918 (arm_breakpoint, arm_breakpoint_len): Likewise.
1919 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1920 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1921 (arm_is_thumb_mode): Likewise.
1922 (arm_breakpoint_at): Likewise.
1923 (arm_breakpoint_kind_from_pc): Likewise.
1924 (arm_sw_breakpoint_from_kind): Likewise.
1925 (arm_breakpoint_kind_from_current_state): Likewise.
1926
1927 Revert:
1928 2015-08-04 Yao Qi <yao.qi@linaro.org>
1929
1930 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1931 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1932 * server.c (extended_protocol): Remove "static".
1933 * server.h (extended_protocol): Declare it.
1934
ece66d65
JS
19352015-12-04 Josh Stone <jistone@redhat.com>
1936
1937 * target.h (struct target_ops) <arch_setup>: Rename to ...
1938 (struct target_ops) <post_create_inferior>: ... this.
1939 (target_arch_setup): Rename to ...
1940 (target_post_create_inferior): ... this, calling post_create_inferior.
1941 * server.c (start_inferior): Update target_arch_setup calls to
1942 target_post_create_inferior.
1943 * linux-low.c (linux_low_ptrace_options): Forward declare.
1944 (linux_arch_setup): Update its comment for general use.
1945 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1946 (struct linux_target_ops): Use linux_post_create_inferior.
1947 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1948 to post_create_inferior.
1949 * nto-low.c (struct nto_target_ops): Likewise.
1950 * spu-low.c (struct spu_target_ops): Likewise.
1951 * win32-low.c (struct win32_target_ops): Likewise.
1952
e58c48b4
AT
19532015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1954
1955 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1956
fbec8956
AT
19572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1958
1959 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1960 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1961 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1962 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1963 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1964 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1965 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1966 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1967 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1968 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1969 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1970 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1971
9b4c5f87
AT
19722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1973
1974 * linux-low.c (linux_look_up_symbols): Don't call
1975 linux_supports_traceclone.
1976 * linux-low.h (thread_db_init): Remove use_events argument.
1977 * thread-db.c (thread_db_use_event): Remove global variable.
1978 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1979 (struct thread_db) <td_create_bp>: Remove field.
1980 (thread_db_create_event): Remove function.
1981 (thread_db_enable_reporting): Likewise.
1982 (find_one_thread): Don't check for thread_db_use_events.
1983 (attach_thread): Likewise.
1984 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1985 (try_thread_db_load_1): Don't check for thread_db_use_events.
1986 (thread_db_init): Remove use_events argument and thread events
1987 handling.
1988 (remove_thread_event_breakpoints): Remove function.
1989 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1990
7d00775e
AT
19912015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1992
1993 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1994 New function.
1995 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1996 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1997 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1998 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1999 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2000 Initialize.
2001 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2002 New function.
2003 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2004 * linux-low.c (can_hardware_single_step): Use
2005 supports_hardware_single_step.
2006 (can_software_single_step): New function.
2007 (start_step_over): Call can_software_single_step.
2008 (linux_supports_hardware_single_step): New function.
2009 (struct target_ops) <supports_software_single_step>: Initialize.
2010 * linux-low.h (struct linux_target_ops)
2011 <supports_hardware_single_step>: Initialize.
2012 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2013 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2014 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2015 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2016 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2017 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2018 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2019 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2020 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2021 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2022 Initialize.
2023 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2024 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2025 Initialize.
2026 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2027 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2028 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2029 New function.
2030 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2031 * target.h (struct target_ops): <supports_software_single_step>:
2032 New field.
2033 (target_supports_software_single_step): New macro.
2034
2d97cd35
AT
20352015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2036
2037 * linux-low.c (linux_wait_1): Fix pc advance condition.
2038 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2039 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2040
769ef81f
AT
20412015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2042
2043 * linux-arm-low.c (arm_is_thumb_mode): New function.
2044 (arm_breakpoint_at): Use arm_is_thumb_mode.
2045 (arm_breakpoint_kind_from_current_state): New function.
2046 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2047 Initialize.
2048 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2049 (linux_breakpoint_kind_from_current_state): New function.
2050 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2051 * linux-low.h (struct linux_target_ops)
2052 <breakpoint_kind_from_current_state>: New field.
2053 * target.h (struct target_ops): Likewise.
2054 (target_breakpoint_kind_from_current_state): New macro.
2055
1bebeeca
PA
20562015-11-30 Pedro Alves <palves@redhat.com>
2057
2058 * linux-low.c (linux_resume): Wake up the event loop before
2059 returning.
2060
a67a9fae
PA
20612015-11-30 Pedro Alves <palves@redhat.com>
2062
2063 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2064 check.
2065 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2066 to -1.
2067 * target.c (struct thread_search): New structure.
2068 (thread_search_callback): New function.
2069 (prev_general_thread): New global.
2070 (prepare_to_access_memory, done_accessing_memory): New functions.
2071 * target.h (prepare_to_access_memory, done_accessing_memory):
2072 Replace macros with function declarations.
2073
f2faf941
PA
20742015-11-30 Pedro Alves <palves@redhat.com>
2075
2076 PR 14618
2077 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2078 report TARGET_WAITKIND_NO_RESUMED.
2079 * remote-utils.c (prepare_resume_reply): Handle
2080 TARGET_WAITKIND_NO_RESUMED.
2081 * server.c (report_no_resumed): New global.
2082 (handle_query) <qSupported>: Handle "no-resumed+". Report
2083 "no-resumed+" support.
2084 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2085 return error if the client doesn't support no-resumed events.
2086 (push_stop_notification): New function.
2087 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2088 events if the client supports them.
2089
a681f9c9
PA
20902015-11-30 Pedro Alves <palves@redhat.com>
2091
2092 * linux-low.c (thread_still_has_status_pending_p): Don't check
2093 vCont;t here.
2094 (lwp_resumed): New function.
2095 (status_pending_p_callback): Return early if the LWP is not
2096 supposed to be resumed.
2097
65706a29
PA
20982015-11-30 Pedro Alves <palves@redhat.com>
2099
2100 * linux-low.c (handle_extended_wait): Assert that the LWP's
2101 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2102 thread create events, leave the new child's status pending.
2103 (linux_low_filter_event): If GDB wants to hear about thread exit
2104 events, leave the LWP marked dead and don't delete it.
2105 (linux_wait_for_event_filtered): Don't check for thread exit.
2106 (filter_exit_event): New function.
2107 (linux_wait_1): Use it, when returning an exit event.
2108 (linux_resume_one_lwp_throw): Assert that the LWP's
2109 waitstatus is TARGET_WAITKIND_IGNORE.
2110 * remote-utils.c (prepare_resume_reply): Handle
2111 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2112 * server.c (report_thread_events): New global.
2113 (handle_general_set): Handle QThreadEvents.
2114 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2115 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2116 TARGET_WAITKIND_THREAD_EXITED.
2117 * server.h (report_thread_events): Declare.
2118
56cf4bed
PA
21192015-11-30 Pedro Alves <palves@redhat.com>
2120
2121 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2122 the thread's last_resume_kind was resume_stop.
2123
500c1d85
PA
21242015-11-30 Pedro Alves <palves@redhat.com>
2125
2126 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2127 before returning.
2128
de979965
PA
21292015-11-30 Pedro Alves <palves@redhat.com>
2130
2131 * server.c (handle_v_requests): Handle vCtrlC.
2132
34c65914
PA
21332015-11-30 Pedro Alves <palves@redhat.com>
2134
2135 * gdbthread.h (find_any_thread_of_pid): Declare.
2136 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2137 functions.
2138 * server.c (handle_query): If current_thread is NULL, look for
2139 another thread of the selected process.
2140
79efa585 21412015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2142 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2143
2144 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2145 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2146 name in reply.
2147 * target.h (struct target_ops) <thread_name>: New field.
2148 (target_thread_name): New macro.
2149
80d82c19
JB
21502015-11-23 Joel Brobecker <brobecker@adacore.com>
2151
2152 * regcache.h (regcache_invalidate_pid): Add declaration.
2153 * regcache.c (regcache_invalidate_pid): New function, extracted
2154 from regcache_invalidate.
2155 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2156 Add trivial documentation comment.
2157 * lynx-low.c: Use regcache_invalidate_pid instead of
2158 regcache_invalidate.
2159
64da5dd5
JB
21602015-11-23 Joel Brobecker <brobecker@adacore.com>
2161
2162 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2163 and Elf64_auxv_t if the target is Android.
2164
37ce4055
DE
21652015-11-22 Doug Evans <xdje42@gmail.com>
2166
2167 * target.h: #include <sys/types.h>.
2168
06e03fff
PA
21692015-11-19 Pedro Alves <palves@redhat.com>
2170
2171 * linux-low.c (linux_process_qsupported): Change prototype.
2172 Adjust.
2173 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2174 Change prototype.
2175 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2176 and adjust to loop over all features.
2177 * server.c (handle_query) <qSupported>: Adjust to call
2178 target_process_qsupported once, passing it a vector of unprocessed
2179 features.
2180 * target.h (struct target_ops) <process_qsupported>: Change
2181 prototype.
2182 (target_process_qsupported): Adjust.
2183
9a084706
PA
21842015-11-19 Pedro Alves <palves@redhat.com>
2185
2186 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2187 mode.
2188 * configure: Regenerate.
2189
dad44a1f
PA
21902015-11-19 Pedro Alves <palves@redhat.com>
2191
2192 * configure: Regenerate.
2193
231c0592
YQ
21942015-11-19 Yao Qi <yao.qi@linaro.org>
2195
2196 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2197 type to uint32_t.
2198
6c1c9a8b
YQ
21992015-11-19 Yao Qi <yao.qi@linaro.org>
2200
2201 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2202 (struct aarch64_operand): Move enum out.
2203
9caa3311
YQ
22042015-11-19 Yao Qi <yao.qi@linaro.org>
2205
2206 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2207 struct user_fpsimd_state *.
2208 (aarch64_store_fpregset): Likewise.
2209
6a69a054
YQ
22102015-11-19 Yao Qi <yao.qi@linaro.org>
2211
2212 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2213 struct user_pt_regs *.
2214 (aarch64_store_gregset): Likewise.
2215
1798301e
PA
22162015-11-18 Pedro Alves <palves@redhat.com>
2217
2218 * Makefile.in (all_object_files): Add $IPA_OBJS.
2219
ce7715e2
PA
22202015-11-17 Pedro Alves <palves@redhat.com>
2221
2222 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2223 GDB_SIGNAL_0 and gdb_signal_to_string.
2224
c0879059
PA
22252015-11-17 Pedro Alves <palves@redhat.com>
2226
2227 * win32-low.c (handle_output_debug_string): Remove parameter.
2228 (win32_kill): Remove our_status local and adjust call to
2229 handle_output_debug_string.
2230 (get_child_debug_event): Adjust call to
2231 handle_output_debug_string.
2232
1996e237
SM
22332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2234
2235 * linux-mips-low.c (mips_fill_gregset): Add cast.
2236 (mips_store_gregset): Likewise.
2237 (mips_fill_fpregset): Likewise.
2238 (mips_store_fpregset): Likewise.
2239
cbec665b
SM
22402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2241
2242 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2243 priv.
2244
eb3e3c67
SM
22452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2246
2247 * linux-mips-low.c (mips_linux_new_thread): Change type of
2248 watch_type to enum target_hw_bp_type.
2249
171de4b8
SM
22502015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2251
2252 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2253 Change return type to arm_hwbp_type.
2254
04248ead
SM
22552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2256
2257 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2258 (arm_store_gregset): Likewise.
2259 * linux-arm-low.c (arm_get_hwcap): Likewise.
2260 (arm_read_description): Likewise.
2261
04b3479c
SM
22622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2263
2264 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2265
2bc84e8a
SM
22662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2267
2268 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2269 (ppc_fill_vsxregset): Likewise.
2270 (ppc_store_vsxregset): Likewise.
2271 (ppc_fill_vrregset): Likewise.
2272 (ppc_store_vrregset): Likewise.
2273 (ppc_fill_evrregset): Likewise.
2274 (ppc_store_evrregset): Likewise.
2275
e6c5bb05
SM
22762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2277
2278 * linux-ppc-low.c (ppc_usrregs_info): Remove
2279 forward-declaration.
2280 (ppc_arch_setup): Move lower in file.
2281
7ea45d72
SM
22822015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2283
2284 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2285 (ps_pdwrite): Likewise.
2286
69291610
HW
22872015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2288
2289 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2290 to after assert checks.
2291
b42945fd
SM
22922015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2293
2294 * proc-service.c (ps_pdread): Add/adjust casts.
2295 (ps_pdwrite): Add/adjust casts.
2296
d6f85c84
SM
22972015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2298
2299 * server.c (handle_search_memory_1): Cast return value of
2300 memmem.
2301
f98cd059
SM
23022015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2303
2304 * server.c (write_qxfer_response): Change type of data to
2305 gdb_byte *.
2306
d2412fa5
PA
23072015-10-29 Pedro Alves <palves@redhat.com>
2308
2309 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2310
c17414a2
PA
23112015-10-29 Pedro Alves <palves@redhat.com>
2312
2313 * tracepoint.c (clear_installed_tracepoints): Add casts.
2314
e053fbc4
PA
23152015-10-29 Pedro Alves <palves@redhat.com>
2316
2317 * server.c (handle_v_cont, process_serial_event): Add enum
2318 gdb_signal casts to signal parsing code.
2319
add67df8
PA
23202015-10-29 Pedro Alves <palves@redhat.com>
2321
2322 * linux-low.h (NULL_REGSET): Define.
2323 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2324 * linux-arm-low.c (arm_regsets): Likewise.
2325 * linux-crisv32-low.c (cris_regsets): Likewise.
2326 * linux-m68k-low.c (m68k_regsets): Likewise.
2327 * linux-mips-low.c (mips_regsets): Likewise.
2328 * linux-nios2-low.c (nios2_regsets): Likewise.
2329 * linux-ppc-low.c (ppc_regsets): Likewise.
2330 * linux-s390-low.c (s390_regsets): Likewise.
2331 * linux-sh-low.c (sh_regsets): Likewise.
2332 * linux-sparc-low.c (sparc_regsets): Likewise.
2333 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2334 * linux-tile-low.c (tile_regsets): Likewise.
2335 * linux-x86-low.c (x86_regsets): Likewise.
2336 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2337
50bc912a
PA
23382015-10-29 Pedro Alves <palves@redhat.com>
2339
2340 * linux-low.h (NULL_REGSET): Define.
2341 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2342 * linux-arm-low.c (arm_regsets): Likewise.
2343 * linux-crisv32-low.c (cris_regsets): Likewise.
2344 * linux-m68k-low.c (m68k_regsets): Likewise.
2345 * linux-mips-low.c (mips_regsets): Likewise.
2346 * linux-nios2-low.c (nios2_regsets): Likewise.
2347 * linux-ppc-low.c (ppc_regsets): Likewise.
2348 * linux-s390-low.c (s390_regsets): Likewise.
2349 * linux-sh-low.c (sh_regsets): Likewise.
2350 * linux-sparc-low.c (sparc_regsets): Likewise.
2351 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2352 * linux-tile-low.c (tile_regsets): Likewise.
2353 * linux-x86-low.c (x86_regsets): Likewise.
2354 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2355
682b2546
DE
23562015-10-26 Doug Evans <dje@google.com>
2357
2358 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2359
963843d4
DE
23602015-10-26 Doug Evans <dje@google.com>
2361
2362 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2363
d41401ac
DE
23642015-10-26 Doug Evans <dje@google.com>
2365
2366 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2367 for debug_printf.
2368 (attach_thread, find_new_threads_callback): Ditto.
2369
3db28855
AT
23702015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2371
2372 * mem-break.h (set_breakpoint_data): Remove.
2373
fb78e89c
AT
23742015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2375
2376 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2377 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2378 (initialize_low): Remove set_breakpoint_data call.
2379 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2380 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2381 (initialize_low): Remove set_breakpoint_data call.
2382 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2383 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2384 (initialize_low): Remove set_breakpoint_data call.
2385
2e6ee069
AT
23862015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2387
2388 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2389 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2390 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2391 * target.h (target_breakpoint_kind_from_pc): New macro.
2392
1652a986
AT
23932015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2394
2395 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2396 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2397 the default breakpoint kind.
2398
abeead09
AT
23992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2400
2401 * linux-arm-low.c (arm_supports_z_point_type): Add software
2402 breakpoint support.
2403
b0b4b501
AT
24042015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2405
2406 * linux-arm-low.c: Refactor breakpoint definitions.
2407 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2408 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2409
8689682c
AT
24102015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2411
2412 * Makefile.in: Add arm.c/o.
2413 * configure.srv: Likewise.
2414 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2415 (arm_breakpoint_kind_from_pc): New function.
2416 (arm_sw_breakpoint_from_kind): Return proper kind.
2417 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2418
27165294
AT
24192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2420
2421 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2422 removal.
2423 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2424 (struct raw_breakpoint) <size>: Remove.
2425 (struct raw_breakpoint) <kind>: Add.
2426 (bp_size): New function.
2427 (bp_opcode): Likewise.
2428 (find_raw_breakpoint_at): Adjust for kind.
2429 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2430 (remove_memory_breakpoint): Adjust for kind call bp_size.
2431 (set_raw_breakpoint_at): Adjust for kind.
2432 (set_breakpoint): Likewise.
2433 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2434 (delete_raw_breakpoint): Adjust for kind.
2435 (delete_breakpoint): Likewise.
2436 (find_gdb_breakpoint): Likewise.
2437 (set_gdb_breakpoint_1): Likewise.
2438 (set_gdb_breakpoint): Likewise.
2439 (delete_gdb_breakpoint_1): Likewise.
2440 (delete_gdb_breakpoint): Likewise.
2441 (uninsert_raw_breakpoint): Likewise.
2442 (reinsert_raw_breakpoint): Likewise.
2443 (set_breakpoint_data): Remove.
2444 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2445 (check_mem_read): Adjust for kind call bp_size.
2446 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2447 (clone_one_breakpoint): Adjust for kind.
2448 * mem-break.h (set_gdb_breakpoint): Likewise.
2449 (delete_gdb_breakpoint): Likewise.
2450 * server.c (process_serial_event): Likewise.
2451
dd373349
AT
24522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2453
2454 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2455 (struct linux_target_ops) <breakpoint>: Remove.
2456 (struct linux_target_ops) <breakpoint_len>: Remove.
2457 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2458 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2459 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2460 (arm_sw_breakpoint_from_kind): New function.
2461 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2462 (struct linux_target_ops) <breakpoint>: Remove.
2463 (struct linux_target_ops) <breakpoint_len>: Remove.
2464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2466 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2467 (struct linux_target_ops) <breakpoint>: Remove.
2468 (struct linux_target_ops) <breakpoint_len>: Remove.
2469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2471 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2472 (struct linux_target_ops) <breakpoint>: Remove.
2473 (struct linux_target_ops) <breakpoint_len>: Remove.
2474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2476 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2477 and sw_breakpoint_from_kind to increment the pc.
2478 (linux_breakpoint_kind_from_pc): New function.
2479 (linux_sw_breakpoint_from_kind): New function.
2480 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2481 (initialize_low): Call breakpoint_kind_from_pc and
2482 sw_breakpoint_from_kind to replace breakpoint_data/len.
2483 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2484 New field.
2485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2486 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2487 (struct linux_target_ops) <breakpoint>: Remove.
2488 (struct linux_target_ops) <breakpoint_len>: Remove.
2489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2490 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2491 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2492 (struct linux_target_ops) <breakpoint>: Remove.
2493 (struct linux_target_ops) <breakpoint_len>: Remove.
2494 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2496 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2497 (struct linux_target_ops) <breakpoint>: Remove.
2498 (struct linux_target_ops) <breakpoint_len>: Remove.
2499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2501 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2502 (struct linux_target_ops) <breakpoint>: Remove.
2503 (struct linux_target_ops) <breakpoint_len>: Remove.
2504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2506 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2507 (struct linux_target_ops) <breakpoint>: Remove.
2508 (struct linux_target_ops) <breakpoint_len>: Remove.
2509 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2510 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2511 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2512 (struct linux_target_ops) <breakpoint>: Remove.
2513 (struct linux_target_ops) <breakpoint_len>: Remove.
2514 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2515 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2516 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2517 (struct linux_target_ops) <breakpoint>: Remove.
2518 (struct linux_target_ops) <breakpoint_len>: Remove.
2519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2520 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2521 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2522 (struct linux_target_ops) <breakpoint>: Remove.
2523 (struct linux_target_ops) <breakpoint_len>: Remove.
2524 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2525 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2526 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2527 (struct linux_target_ops) <breakpoint>: Remove.
2528 (struct linux_target_ops) <breakpoint_len>: Remove.
2529 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2530 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2531 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2532 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2533 (struct linux_target_ops) <breakpoint>: Remove.
2534 (struct linux_target_ops) <breakpoint_len>: Remove.
2535 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2536 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2537 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2538 (struct linux_target_ops) <breakpoint>: Remove.
2539 (struct linux_target_ops) <breakpoint_len>: Remove.
2540 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2541 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2542
4cd98a19
AT
25432015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2544
2545 * linux-cris-low.c (cris_get_pc): Remove void arg.
2546
774ee6d2
AR
25472015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2548
2549 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2550 variable name.
2551
833dcd29
AR
25522015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2553
2554 * inferiors.c (thread_pid_matches_callback): New function.
2555 (find_thread_process): New function.
2556 (remove_thread): Reset current_thread.
2557 (remove_process): Assert threads have been removed first.
2558
8d689ee5
YQ
25592015-10-15 Yao Qi <yao.qi@linaro.org>
2560
2561 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2562 if it is 3.
2563 (aarch64_remove_point): Likewise.
2564 * regcache.c (regcache_register_size): New function.
2565
1c2e1515
YQ
25662015-10-12 Yao Qi <yao.qi@linaro.org>
2567
2568 * linux-aarch64-low.c: Update all callers as emit_load_store
2569 is renamed to aarch64_emit_load_store.
2570
e1c587c3
YQ
25712015-10-12 Yao Qi <yao.qi@linaro.org>
2572
2573 * linux-aarch64-low.c: Update all callers of function renaming
2574 from emit_insn to aarch64_emit_insn.
2575
b6542f81
YQ
25762015-10-12 Yao Qi <yao.qi@linaro.org>
2577
2578 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2579 arch/aarch64-insn.h.
2580 (struct aarch64_memory_operand): Likewise.
2581 (ENCODE): Likewise.
2582 (emit_insn): Move to arch/aarch64-insn.c.
2583 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2584 (emit_load_store): Move to arch/aarch64-insn.c.
2585 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2586 (can_encode_int32): Remove.
2587
246994ce
YQ
25882015-10-12 Yao Qi <yao.qi@linaro.org>
2589
2590 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2591 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2592 (aarch64_relocate_instruction): Likewise.
2593 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2594 (struct aarch64_insn_visitor): Likewise.
2595
0badd99f
YQ
25962015-10-12 Yao Qi <yao.qi@linaro.org>
2597
2598 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2599 (struct aarch64_insn_visitor): New.
2600 (struct aarch64_insn_relocation_data): New.
2601 (aarch64_ftrace_insn_reloc_b): New function.
2602 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2603 (aarch64_ftrace_insn_reloc_cb): Likewise.
2604 (aarch64_ftrace_insn_reloc_tb): Likewise.
2605 (aarch64_ftrace_insn_reloc_adr): Likewise.
2606 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2607 (aarch64_ftrace_insn_reloc_others): Likewise.
2608 (visitor): New.
2609 (aarch64_relocate_instruction): Use visitor.
2610
dfaffe9d
YQ
26112015-10-12 Yao Qi <yao.qi@linaro.org>
2612
2613 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2614 int. Add argument buf.
2615 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2616 aarch64_relocate_instruction.
2617
70b439f0
YQ
26182015-10-12 Yao Qi <yao.qi@linaro.org>
2619
2620 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2621 argument insn. Remove local variable insn. Don't call
2622 target_read_uint32.
2623 (aarch64_install_fast_tracepoint_jump_pad): Call
2624 target_read_uint32.
2625
7781c06f
YQ
26262015-09-30 Yao Qi <yao.qi@linaro.org>
2627
2628 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2629 (emit_load_store_pair): Likewise.
2630
9a3c8263
SM
26312015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2632
2633 * dll.c (match_dll): Add cast(s).
2634 (unloaded_dll): Likewise.
2635 * linux-low.c (second_thread_of_pid_p): Likewise.
2636 (delete_lwp_callback): Likewise.
2637 (count_events_callback): Likewise.
2638 (select_event_lwp_callback): Likewise.
2639 (linux_set_resume_request): Likewise.
2640 * server.c (accumulate_file_name_length): Likewise.
2641 (emit_dll_description): Likewise.
2642 (handle_qxfer_threads_worker): Likewise.
2643 (visit_actioned_threads): Likewise.
2644 * thread-db.c (any_thread_of): Likewise.
2645 * tracepoint.c (same_process_p): Likewise.
2646 (match_blocktype): Likewise.
2647 (build_traceframe_info_xml): Likewise.
2648
224c3ddb
SM
26492015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2650
2651 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2652 assignment.
2653 (gdb_unparse_agent_expr): Likewise.
2654 * hostio.c (require_data): Likewise.
2655 (handle_pread): Likewise.
2656 * linux-low.c (disable_regset): Likewise.
2657 (fetch_register): Likewise.
2658 (store_register): Likewise.
2659 (get_dynamic): Likewise.
2660 (linux_qxfer_libraries_svr4): Likewise.
2661 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2662 (set_fast_tracepoint_jump): Likewise.
2663 (uninsert_fast_tracepoint_jumps_at): Likewise.
2664 (reinsert_fast_tracepoint_jumps_at): Likewise.
2665 (validate_inserted_breakpoint): Likewise.
2666 (clone_agent_expr): Likewise.
2667 * regcache.c (init_register_cache): Likewise.
2668 * remote-utils.c (putpkt_binary_1): Likewise.
2669 (decode_M_packet): Likewise.
2670 (decode_X_packet): Likewise.
2671 (look_up_one_symbol): Likewise.
2672 (relocate_instruction): Likewise.
2673 (monitor_output): Likewise.
2674 * server.c (handle_search_memory): Likewise.
2675 (handle_qxfer_exec_file): Likewise.
2676 (handle_qxfer_libraries): Likewise.
2677 (handle_qxfer): Likewise.
2678 (handle_query): Likewise.
2679 (handle_v_cont): Likewise.
2680 (handle_v_run): Likewise.
2681 (captured_main): Likewise.
2682 * target.c (write_inferior_memory): Likewise.
2683 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2684 * tracepoint.c (init_trace_buffer): Likewise.
2685 (add_tracepoint_action): Likewise.
2686 (add_traceframe): Likewise.
2687 (add_traceframe_block): Likewise.
2688 (cmd_qtdpsrc): Likewise.
2689 (cmd_qtdv): Likewise.
2690 (cmd_qtstatus): Likewise.
2691 (response_source): Likewise.
2692 (response_tsv): Likewise.
2693 (cmd_qtnotes): Likewise.
2694 (gdb_collect): Likewise.
2695 (initialize_tracepoint): Likewise.
2696
afbe19f8
PL
26972015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2698
2699 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2700 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2701 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2702 <NOP>: New.
2703 (enum aarch64_condition_codes): New enum.
2704 (w0): New static global.
2705 (fp): Likewise.
2706 (lr): Likewise.
2707 (struct aarch64_memory_operand) <type>: New
2708 MEMORY_OPERAND_POSTINDEX type.
2709 (postindex_memory_operand): New helper function.
2710 (emit_ret): New function.
2711 (emit_load_store_pair): New function, factored out of emit_stp
2712 with support for MEMORY_OPERAND_POSTINDEX.
2713 (emit_stp): Rewrite using emit_load_store_pair.
2714 (emit_ldp): New function.
2715 (emit_load_store): Likewise.
2716 (emit_ldr): Mention post-index instruction in comment.
2717 (emit_ldrh): New function.
2718 (emit_ldrb): New function.
2719 (emit_ldrsw): Mention post-index instruction in comment.
2720 (emit_str): Likewise.
2721 (emit_subs): New function.
2722 (emit_cmp): Likewise.
2723 (emit_and): Likewise.
2724 (emit_orr): Likewise.
2725 (emit_orn): Likewise.
2726 (emit_eor): Likewise.
2727 (emit_mvn): Likewise.
2728 (emit_lslv): Likewise.
2729 (emit_lsrv): Likewise.
2730 (emit_asrv): Likewise.
2731 (emit_mul): Likewise.
2732 (emit_sbfm): Likewise.
2733 (emit_sbfx): Likewise.
2734 (emit_ubfm): Likewise.
2735 (emit_ubfx): Likewise.
2736 (emit_csinc): Likewise.
2737 (emit_cset): Likewise.
2738 (emit_nop): Likewise.
2739 (emit_ops_insns): New helper function.
2740 (emit_pop): Likewise.
2741 (emit_push): Likewise.
2742 (aarch64_emit_prologue): New function.
2743 (aarch64_emit_epilogue): Likewise.
2744 (aarch64_emit_add): Likewise.
2745 (aarch64_emit_sub): Likewise.
2746 (aarch64_emit_mul): Likewise.
2747 (aarch64_emit_lsh): Likewise.
2748 (aarch64_emit_rsh_signed): Likewise.
2749 (aarch64_emit_rsh_unsigned): Likewise.
2750 (aarch64_emit_ext): Likewise.
2751 (aarch64_emit_log_not): Likewise.
2752 (aarch64_emit_bit_and): Likewise.
2753 (aarch64_emit_bit_or): Likewise.
2754 (aarch64_emit_bit_xor): Likewise.
2755 (aarch64_emit_bit_not): Likewise.
2756 (aarch64_emit_equal): Likewise.
2757 (aarch64_emit_less_signed): Likewise.
2758 (aarch64_emit_less_unsigned): Likewise.
2759 (aarch64_emit_ref): Likewise.
2760 (aarch64_emit_if_goto): Likewise.
2761 (aarch64_emit_goto): Likewise.
2762 (aarch64_write_goto_address): Likewise.
2763 (aarch64_emit_const): Likewise.
2764 (aarch64_emit_call): Likewise.
2765 (aarch64_emit_reg): Likewise.
2766 (aarch64_emit_pop): Likewise.
2767 (aarch64_emit_stack_flush): Likewise.
2768 (aarch64_emit_zero_ext): Likewise.
2769 (aarch64_emit_swap): Likewise.
2770 (aarch64_emit_stack_adjust): Likewise.
2771 (aarch64_emit_int_call_1): Likewise.
2772 (aarch64_emit_void_call_2): Likewise.
2773 (aarch64_emit_eq_goto): Likewise.
2774 (aarch64_emit_ne_goto): Likewise.
2775 (aarch64_emit_lt_goto): Likewise.
2776 (aarch64_emit_le_goto): Likewise.
2777 (aarch64_emit_gt_goto): Likewise.
2778 (aarch64_emit_ge_got): Likewise.
2779 (aarch64_emit_ops_impl): New static global variable.
2780 (aarch64_emit_ops): New target function, return
2781 &aarch64_emit_ops_impl.
2782 (struct linux_target_ops): Install it.
2783
bb903df0
PL
27842015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2785
2786 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2787 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2788 aarch64-ipa.o.
2789 * linux-aarch64-ipa.c: New file.
2790 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2791 and endian.h.
2792 (aarch64_get_thread_area): New target method.
2793 (extract_signed_bitfield): New helper function.
2794 (aarch64_decode_ldr_literal): New function.
2795 (enum aarch64_opcodes): New enum.
2796 (struct aarch64_register): New struct.
2797 (struct aarch64_operand): New struct.
2798 (x0): New static global.
2799 (x1): Likewise.
2800 (x2): Likewise.
2801 (x3): Likewise.
2802 (x4): Likewise.
2803 (w2): Likewise.
2804 (ip0): Likewise.
2805 (sp): Likewise.
2806 (xzr): Likewise.
2807 (aarch64_register): New helper function.
2808 (register_operand): Likewise.
2809 (immediate_operand): Likewise.
2810 (struct aarch64_memory_operand): New struct.
2811 (offset_memory_operand): New helper function.
2812 (preindex_memory_operand): Likewise.
2813 (enum aarch64_system_control_registers): New enum.
2814 (ENCODE): New macro.
2815 (emit_insn): New helper function.
2816 (emit_b): New function.
2817 (emit_bcond): Likewise.
2818 (emit_cb): Likewise.
2819 (emit_tb): Likewise.
2820 (emit_blr): Likewise.
2821 (emit_stp): Likewise.
2822 (emit_ldp_q_offset): Likewise.
2823 (emit_stp_q_offset): Likewise.
2824 (emit_load_store): Likewise.
2825 (emit_ldr): Likewise.
2826 (emit_ldrsw): Likewise.
2827 (emit_str): Likewise.
2828 (emit_ldaxr): Likewise.
2829 (emit_stxr): Likewise.
2830 (emit_stlr): Likewise.
2831 (emit_data_processing_reg): Likewise.
2832 (emit_data_processing): Likewise.
2833 (emit_add): Likewise.
2834 (emit_sub): Likewise.
2835 (emit_mov): Likewise.
2836 (emit_movk): Likewise.
2837 (emit_mov_addr): Likewise.
2838 (emit_mrs): Likewise.
2839 (emit_msr): Likewise.
2840 (emit_sevl): Likewise.
2841 (emit_wfe): Likewise.
2842 (append_insns): Likewise.
2843 (can_encode_int32_in): New helper function.
2844 (aarch64_relocate_instruction): New function.
2845 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2846 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2847 (struct linux_target_ops): Install aarch64_get_thread_area,
2848 aarch64_install_fast_tracepoint_jump_pad and
2849 aarch64_get_min_fast_tracepoint_insn_len.
2850
787749ea
PL
28512015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2852
2853 * Makefile.in (aarch64-insn.o): New rule.
2854 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2855
9812b2e6
YQ
28562015-09-21 Yao Qi <yao.qi@linaro.org>
2857
2858 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2859
18fe412b
YQ
28602015-09-21 Yao Qi <yao.qi@linaro.org>
2861
2862 * tracepoint.c (max_jump_pad_size): Remove.
2863
a0cc84cd
YQ
28642015-09-18 Yao Qi <yao.qi@linaro.org>
2865
2866 * linux-aarch64-low.c: Don't include sys/uio.h.
2867 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2868
d78908cf
WW
28692015-09-16 Wei-cheng Wang <cole945@gmail.com>
2870
2871 * tracepoint.c (eval_result_type): Change prototype.
2872 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2873
d57e0d50
PA
28742015-09-15 Pedro Alves <palves@redhat.com>
2875
2876 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2877 Check whether to report exec events instead of checking whether
2878 multiprocess is enabled.
2879
5a676acc
PA
28802015-09-15 Pedro Alves <palves@redhat.com>
2881
2882 PR remote/18965
2883 * remote-utils.c (prepare_resume_reply): Merge
2884 TARGET_WAITKIND_VFORK_DONE switch case with the
2885 TARGET_WAITKIND_FORKED case.
2886
7c5d0fad
YQ
28872015-09-15 Yao Qi <yao.qi@linaro.org>
2888
2889 * server.c (handle_query): Check string comparison using
2890 "else if" instead of "if".
2891
750ce8d1
YQ
28922015-09-15 Yao Qi <yao.qi@linaro.org>
2893
2894 * server.c (vCont_supported): New global variable.
2895 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2896 matches. Append ";vContSupported+" to own_buf.
2897 (handle_v_requests): Append ";s;S" to own_buf if target supports
2898 hardware single step or vCont_supported is false.
2899 (capture_main): Set vCont_supported to zero.
2900
70b90b91
YQ
29012015-09-15 Yao Qi <yao.qi@linaro.org>
2902
2903 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2904 it to ...
2905 (linux_supports_hardware_single_step): ... New function.
2906 (linux_target_ops): Update.
2907 * lynx-low.c (lynx_target_ops): Set field
2908 supports_hardware_single_step to target_can_do_hardware_single_step.
2909 * nto-low.c (nto_target_ops): Likewise.
2910 * spu-low.c (spu_target_ops): Likewise.
2911 * win32-low.c (win32_target_ops): Likewise.
2912 * target.c (target_can_do_hardware_single_step): New function.
2913 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2914 Remove. <supports_hardware_single_step>: New field.
2915 (target_supports_conditional_breakpoints): Remove.
2916 (target_supports_hardware_single_step): New macro.
2917 (target_can_do_hardware_single_step): Declare.
2918 * server.c (handle_query): Use target_supports_hardware_single_step
2919 instead of target_supports_conditional_breakpoints.
2920
ade90bde
YQ
29212015-09-15 Yao Qi <yao.qi@linaro.org>
2922
2923 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2924 function.
2925 (struct linux_target_ops the_low_target): Install
2926 aarch64_linux_siginfo_fixup.
2927
94585166
DB
29282015-09-11 Don Breazeal <donb@codesourcery.com>
2929 Luis Machado <lgustavo@codesourcery.com>
2930
2931 * linux-low.c (linux_mourn): Static declaration.
2932 (linux_arch_setup): Move in front of
2933 handle_extended_wait.
2934 (linux_arch_setup_thread): New function.
2935 (handle_extended_wait): Handle exec events. Call
2936 linux_arch_setup_thread. Make event_lwp argument a
2937 pointer-to-a-pointer.
2938 (check_zombie_leaders): Do not check stopped threads.
2939 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2940 (linux_low_filter_event): Add lwp and thread for exec'ing
2941 non-leader thread if leader thread has been deleted.
2942 Refactor code into linux_arch_setup_thread and call it.
2943 Pass child lwp pointer by reference to handle_extended_wait.
2944 (linux_wait_for_event_filtered): Update comment.
2945 (linux_wait_1): Prevent clobbering exec event status.
2946 (linux_supports_exec_events): New function.
2947 (linux_target_ops) <supports_exec_events>: Initialize new member.
2948 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2949 new member.
2950 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2951 * server.c (report_exec_events): New global variable.
2952 (handle_query): Handle qSupported query for exec-events feature.
2953 (captured_main): Initialize report_exec_events.
2954 * server.h (report_exec_events): Declare new global variable.
2955 * target.h (struct target_ops) <supports_exec_events>: New
2956 member.
2957 (target_supports_exec_events): New macro.
2958 * win32-low.c (win32_target_ops) <supports_exec_events>:
2959 Initialize new member.
2960
0568462b
MM
29612015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2962
2963 * linux-low.c (linux_low_enable_btrace): Remove.
2964 (linux_target_ops): Replace linux_low_enable_btrace with
2965 linux_enable_btrace.
2966
39edd165
YQ
29672015-09-03 Yao Qi <yao.qi@linaro.org>
2968
2969 * linux-aarch64-low.c (aarch64_insert_point): Call
2970 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2971 returns true.
2972
1db33b5a
UW
29732015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2974
2975 * linux-low.c (check_stopped_by_breakpoint): Use
2976 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2977
ab290430
PA
29782015-08-27 Pedro Alves <palves@redhat.com>
2979
2980 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2981
8d749320
SM
29822015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2983
6711b7f8
SM
2984 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2985 the XNEW-family equivalent.
8d749320
SM
2986 (compile_bytecodes): Likewise.
2987 * dll.c (loaded_dll): Likewise.
2988 * event-loop.c (append_callback_event): Likewise.
2989 (create_file_handler): Likewise.
2990 (create_file_event): Likewise.
2991 * hostio.c (handle_open): Likewise.
2992 * inferiors.c (add_thread): Likewise.
2993 (add_process): Likewise.
2994 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2995 * linux-arm-low.c (arm_new_process): Likewise.
2996 (arm_new_thread): Likewise.
2997 * linux-low.c (add_to_pid_list): Likewise.
2998 (linux_add_process): Likewise.
2999 (handle_extended_wait): Likewise.
3000 (add_lwp): Likewise.
3001 (enqueue_one_deferred_signal): Likewise.
3002 (enqueue_pending_signal): Likewise.
3003 (linux_resume_one_lwp_throw): Likewise.
3004 (linux_resume_one_thread): Likewise.
3005 (linux_read_memory): Likewise.
3006 (linux_write_memory): Likewise.
3007 * linux-mips-low.c (mips_linux_new_process): Likewise.
3008 (mips_linux_new_thread): Likewise.
3009 (mips_add_watchpoint): Likewise.
3010 * linux-x86-low.c (initialize_low_arch): Likewise.
3011 * lynx-low.c (lynx_add_process): Likewise.
3012 * mem-break.c (set_raw_breakpoint_at): Likewise.
3013 (set_breakpoint): Likewise.
3014 (add_condition_to_breakpoint): Likewise.
3015 (add_commands_to_breakpoint): Likewise.
3016 (clone_agent_expr): Likewise.
3017 (clone_one_breakpoint): Likewise.
3018 * regcache.c (new_register_cache): Likewise.
3019 * remote-utils.c (look_up_one_symbol): Likewise.
3020 * server.c (queue_stop_reply): Likewise.
3021 (start_inferior): Likewise.
3022 (queue_stop_reply_callback): Likewise.
3023 (handle_target_event): Likewise.
3024 * spu-low.c (fetch_ppc_memory): Likewise.
3025 (store_ppc_memory): Likewise.
3026 * target.c (set_target_ops): Likewise.
3027 * thread-db.c (thread_db_load_search): Likewise.
3028 (try_thread_db_load_1): Likewise.
3029 * tracepoint.c (add_tracepoint): Likewise.
3030 (add_tracepoint_action): Likewise.
3031 (create_trace_state_variable): Likewise.
3032 (cmd_qtdpsrc): Likewise.
3033 (cmd_qtro): Likewise.
3034 (add_while_stepping_state): Likewise.
3035 * win32-low.c (child_add_thread): Likewise.
3036 (get_image_name): Likewise.
3037
ed8b7b42
YQ
30382015-08-25 Yao Qi <yao.qi@linaro.org>
3039
3040 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3041
db3cb7cb
YQ
30422015-08-25 Yao Qi <yao.qi@linaro.org>
3043
3044 * Makefile.in (aarch64-linux.o): New rule.
3045 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3046 srv_tgtobj.
3047 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3048 (aarch64_init_debug_reg_state): Make it extern.
3049 (aarch64_linux_prepare_to_resume): Remove.
3050
f6011a1c
YQ
30512015-08-25 Yao Qi <yao.qi@linaro.org>
3052
3053 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3054 lwp_arch_private_info and ptid_of_lwp.
3055
88e2cf7e
YQ
30562015-08-25 Yao Qi <yao.qi@linaro.org>
3057
3058 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3059 Find proc_info by find_process_pid. All callers updated.
3060
5e35436e
YQ
30612015-08-25 Yao Qi <yao.qi@linaro.org>
3062
3063 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3064 Remove.
3065 (debug_reg_change_callback): Remove.
3066 (aarch64_notify_debug_reg_change): Remove.
3067
4a8a7965
YQ
30682015-08-25 Yao Qi <yao.qi@linaro.org>
3069
3070 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3071 Call current_lwp_ptid.
3072
32a271ee
YQ
30732015-08-25 Yao Qi <yao.qi@linaro.org>
3074
3075 * linux-aarch64-low.c (debug_reg_change_callback): Use
3076 debug_printf.
3077
0d51c8d7
YQ
30782015-08-25 Yao Qi <yao.qi@linaro.org>
3079
3080 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3081
31a43dd5
YQ
30822015-08-25 Yao Qi <yao.qi@linaro.org>
3083
3084 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3085
8ee52567
YQ
30862015-08-25 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3089 the code.
3090
ff3f0f45
YQ
30912015-08-25 Yao Qi <yao.qi@linaro.org>
3092
3093 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3094 Remove.
3095 (debug_reg_change_callback): Remove argument entry and add argument
3096 lwp. Remove local variable thread. Don't print thread id in the
3097 debugging output. Don't check whether pid of thread equals to pid.
3098 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3099 iterate_over_lwps instead find_inferior.
3100
3d40fbb5
PA
31012015-08-24 Pedro Alves <palves@redhat.com>
3102
3103 * inferiors.c (get_first_process): New function.
3104 * inferiors.h (get_first_process): New declaration.
3105 * remote-utils.c (read_ptid): Default to the first process in the
3106 list, instead of to the current thread's process.
3107
438e1e42
PA
31082015-08-24 Pedro Alves <palves@redhat.com>
3109
3110 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3111 * event-loop.c: Likewise.
3112 * remote-utils.c: Likewise.
3113 * tracepoint.c: Likewise.
3114
a8c6d4fc
PA
31152015-08-24 Pedro Alves <palves@redhat.com>
3116
3117 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3118 ptid_get_lwp.
3119
99b0bb12
PA
31202015-08-21 Pedro Alves <palves@redhat.com>
3121
3122 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3123 instead of literal 1.
3124
f8904751
PA
31252015-08-21 Pedro Alves <palves@redhat.com>
3126
3127 * tdesc.c (default_description): Explicitly zero-initialize.
3128
465a859e
PA
31292015-08-21 Pedro Alves <palves@redhat.com>
3130
3131 PR gdb/18749
3132 * inferiors.c (remove_thread): Discard any pending stop reply for
3133 this thread.
3134 * server.c (remove_all_on_match_pid): Rename to ...
3135 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3136 instead of a pid.
3137 (discard_queued_stop_replies): Change parameter to a ptid. Now
3138 extern.
3139 (handle_v_kill, kill_inferior_callback, captured_main)
3140 (process_serial_event): Adjust.
3141 * server.h (discard_queued_stop_replies): Declare.
3142
f0db101d
PA
31432015-08-21 Pedro Alves <palves@redhat.com>
3144
3145 * linux-low.c (wait_for_sigstop): Always switch to no thread
3146 selected if the previously current thread dies.
3147 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3148 process instead of the current thread's.
3149 * remote-utils.c (input_interrupt): Don't check if there's no
3150 current thread.
3151 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3152 current thread to the general thread fails, error out.
3153 (handle_qxfer_auxv, handle_qxfer_libraries)
3154 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3155 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3156 (handle_query): Check if there's a thread selected instead of
3157 checking whether there's any thread in the thread list.
3158 (handle_qxfer_threads, handle_qxfer_btrace)
3159 (handle_qxfer_btrace_conf): Don't error out early if there's no
3160 thread in the thread list.
3161 (handle_v_cont, myresume): Don't set the current thread to the
3162 continue thread.
3163 (process_serial_event) <Hg handling>: Also set thread_id if the
3164 previous general thread is still alive.
3165 (process_serial_event) <g/G handling>: If setting the current
3166 thread to the general thread fails, error out.
3167 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3168 thread's lwp instead of the current thread's.
3169 * target.c (set_desired_thread): If the desired thread was not
3170 found, leave the current thread pointing to NULL. Return an int
3171 (boolean) indicating success.
3172 * target.h (set_desired_thread): Change return type to int.
3173
40045d91
MF
31742015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3175
3176 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3177 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3178 #includes.
3179 (ps_get_thread_area): New function.
3180
45face3b
GB
31812015-08-19 Gary Benson <gbenson@redhat.com>
3182
3183 * hostio.c (handle_pread): Do not attempt to read more data
3184 than hostio_reply_with_data can fit in a packet.
3185
16d5f642
JB
31862015-08-18 Joel Brobecker <brobecker@adacore.com>
3187
3188 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3189
a738da3a
MF
31902015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3191
3192 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3193
33ebda9d
PA
31942015-08-06 Pedro Alves <palves@redhat.com>
3195
3196 * tracepoint.c (expr_eval_result): Now an int.
3197
a44892be
PA
31982015-08-06 Pedro Alves <palves@redhat.com>
3199
3200 * gdbthread.h (struct regcache): Forward declare.
3201 (struct thread_info) <regcache_data>: Now a struct regcache
3202 pointer.
3203 * inferiors.c (inferior_regcache_data)
3204 (set_inferior_regcache_data): Now work with struct regcache
3205 pointers.
3206 * inferiors.h (struct regcache): Forward declare.
3207 (inferior_regcache_data, set_inferior_regcache_data): Now work
3208 with struct regcache pointers.
3209 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3210 (free_register_cache_thread): Remove struct regcache pointer
3211 casts.
3212
608a1e46
PA
32132015-08-06 Pedro Alves <palves@redhat.com>
3214
3215 * server.c (captured_main): On error, print the exception message
3216 to stderr, and if run_once is set, throw a quit.
3217
f0ce0d3a
PA
32182015-08-06 Pedro Alves <palves@redhat.com>
3219
3220 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3221 the current thread.
3222
bf47e248
PA
32232015-08-06 Pedro Alves <palves@redhat.com>
3224
3225 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3226 reading beyond the passed in buffer length.
3227
b6b9ffcc
PL
32282015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3229
3230 * tracepoint.c (symbol_list) <required>: Remove.
3231
863d01bd
PA
32322015-08-06 Pedro Alves <palves@redhat.com>
3233
3234 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3235 count if stopping and suspending threads.
3236 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3237 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3238 (linux_detach): Complete an ongoing step-over.
3239 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3240 throughout.
3241 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3242 (linux_wait_1): If passing a signal to the inferior after
3243 finishing a step-over, unsuspend and re-resume all lwps. If we
3244 see a single-step event but the thread should be continuing, don't
3245 pass the trap to gdb.
3246 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3247 internal_error instead of gdb_assert.
3248 (enqueue_pending_signal): New function.
3249 (check_ptrace_stopped_lwp_gone): Add debug output.
3250 (start_step_over): Use internal_error instead of gdb_assert.
3251 (complete_ongoing_step_over): New function.
3252 (linux_resume_one_thread): Don't resume a suspended thread.
3253 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3254 it stepping.
3255
00db26fa
PA
32562015-08-06 Pedro Alves <palves@redhat.com>
3257
3258 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3259 (linux_thread_alive): Use lwp_is_marked_dead.
3260 (extended_event_reported): Delete.
3261 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3262 instead of extended_event_reported.
3263 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3264 as well.
3265 (lwp_is_marked_dead): New function.
3266 (lwp_running): Use lwp_is_marked_dead.
3267 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3268 comment.
3269
ad071a30
PA
32702015-08-06 Pedro Alves <palves@redhat.com>
3271
3272 * linux-low.c (linux_wait_1): Move fork event output out of the
3273 !report_to_gdb check. Pass event_child->waitstatus to
3274 target_waitstatus_to_string instead of ourstatus.
3275
524b57e6
YQ
32762015-08-04 Yao Qi <yao.qi@linaro.org>
3277
3278 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3279 if current_thread is 32 bit.
3280
6085d6f6
YQ
32812015-08-04 Yao Qi <yao.qi@linaro.org>
3282
3283 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3284 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3285 * server.c (extended_protocol): Remove "static".
3286 * server.h (extended_protocol): Declare it.
3287
8a7e4587
YQ
32882015-08-04 Yao Qi <yao.qi@linaro.org>
3289
3290 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3291 both aarch64 and aarch32.
3292 (aarch64_set_pc): Likewise.
3293
3b53ae99
YQ
32942015-08-04 Yao Qi <yao.qi@linaro.org>
3295
3296 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3297 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3298 arm-with-neon.xml to srv_xmlfiles.
3299 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3300 (is_64bit_tdesc): New function.
3301 (aarch64_linux_read_description): New function.
3302 (aarch64_arch_setup): Call aarch64_linux_read_description.
3303 (regs_info): Rename to regs_info_aarch64.
3304 (aarch64_regs_info): Return right regs_info.
3305 (initialize_low_arch): Call initialize_low_arch_aarch32.
3306
bd9e6534
YQ
33072015-08-04 Yao Qi <yao.qi@linaro.org>
3308
3309 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3310 * linux-aarch32-low.c: New file.
3311 * linux-aarch32-low.h: New file.
3312 * linux-arm-low.c (arm_fill_gregset): Move it to
3313 linux-aarch32-low.c.
3314 (arm_store_gregset): Likewise.
3315 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3316 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3317 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3318 (regs_info): Rename to regs_info_arm.
3319 (arm_regs_info): Return regs_info_aarch32 if
3320 have_ptrace_getregset is 1 and target description is
3321 arm_with_neon or arm_with_vfpv3.
3322 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3323 Call initialize_low_arch_aarch32 instead.
3324
ded48a5e
YQ
33252015-08-04 Yao Qi <yao.qi@linaro.org>
3326
3327 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3328 * linux-low.c: ... here.
3329 * linux-low.h (have_ptrace_getregset): Declare it.
3330
96e9210f
PA
33312015-08-04 Pedro Alves <palves@redhat.com>
3332
3333 * thread-db.c (struct thread_db): Use new typedefs.
3334 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3335 CHK calls.
3336 (disable_thread_event_reporting): Cast result of dlsym to
3337 destination function pointer type.
3338 (thread_db_mourn): Use td_ta_delete_ftype.
3339
af60a1ef
SL
33402015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3341
3342 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3343 arch variant.
3344 (CDX_BREAKPOINT): Define for R2.
3345 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3346 (the_low_target): Add comments.
3347
e8b41681
YQ
33482015-07-30 Yao Qi <yao.qi@linaro.org>
3349
3350 * linux-arm-low.c (arm_hwcap): Remove it.
3351 (arm_read_description): New local variable arm_hwcap. Don't
3352 set arm_hwcap to zero.
3353
89abb039
YQ
33542015-07-30 Yao Qi <yao.qi@linaro.org>
3355
3356 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3357 Use regcache->tdesc instead.
3358 (arm_store_wmmxregset): Likewise.
3359 (arm_fill_vfpregset): Likewise.
3360 (arm_store_vfpregset): Likewise.
3361
deca266c
YQ
33622015-07-30 Yao Qi <yao.qi@linaro.org>
3363
3364 * linux-arm-low.c: Include arch/arm.h.
3365 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3366 (arm_store_gregset): Likewise.
3367
aa58a496
SM
33682015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3369
3370 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3371 ptrace's 4th parameter.
3372
50904b25
YQ
33732015-07-27 Yao Qi <yao.qi@linaro.org>
3374
3375 * configure.srv (case aarch64*-*-linux*): Don't set
3376 srv_linux_usrregs.
3377
5826e159
PA
33782015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3379
3380 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3381 sys/ptrace.h.
3382 * linux-arm-low.c: Likewise.
3383 * linux-cris-low.c: Likewise.
3384 * linux-crisv32-low.c: Likewise.
3385 * linux-low.c: Likewise.
3386 * linux-m68k-low.c: Likewise.
3387 * linux-mips-low.c: Likewise.
3388 * linux-nios2-low.c: Likewise.
3389 * linux-s390-low.c: Likewise.
3390 * linux-sparc-low.c: Likewise.
3391 * linux-tic6x-low.c: Likewise.
3392 * linux-tile-low.c: Likewise.
3393 * linux-x86-low.c: Likewise.
3394
54019719
PA
33952015-07-24 Pedro Alves <palves@redhat.com>
3396
3397 * config.in: Regenerate.
3398 * configure: Regenerate.
3399
eb7aa561
PA
34002015-07-24 Pedro Alves <palves@redhat.com>
3401
3402 * acinclude.m4: Include ../ptrace.m4.
3403 * configure.ac: Call GDB_AC_PTRACE.
3404 * config.in, configure: Regenerate.
3405
55d7b841
YQ
34062015-07-24 Yao Qi <yao.qi@linaro.org>
3407
3408 * linux-low.c (linux_create_inferior): Remove setting to
3409 proc->priv->new_inferior.
3410 (linux_attach): Likewise.
3411 (linux_low_filter_event): Likewise.
3412 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3413
c06cbd92
YQ
34142015-07-24 Yao Qi <yao.qi@linaro.org>
3415
3416 * linux-low.c (linux_arch_setup): New function.
3417 (linux_low_filter_event): If proc->tdesc is NULL and
3418 proc->attached is true, call the_low_target.arch_setup.
3419 Otherwise, keep status pending, and return.
3420 (linux_resume_one_lwp_throw): Don't call get_pc if
3421 thread->while_stepping isn't NULL. Don't call
3422 get_thread_regcache if proc->tdesc is NULL.
3423 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3424 (linux_target_ops): Install arch_setup.
3425 * server.c (start_inferior): Call the_target->arch_setup.
3426 * target.h (struct target_ops) <arch_setup>: New field.
3427 (target_arch_setup): New marco.
3428 * lynx-low.c (lynx_target_ops): Update.
3429 * nto-low.c (nto_target_ops): Update.
3430 * spu-low.c (spu_target_ops): Update.
3431 * win32-low.c (win32_target_ops): Update.
3432
5ae3ebba
YQ
34332015-07-24 Yao Qi <yao.qi@linaro.org>
3434
3435 * linux-low.c (linux_add_process): Don't set
3436 proc->priv->new_inferior.
3437 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3438 (linux_attach): Likewise.
3439
eb97750b
YQ
34402015-07-24 Yao Qi <yao.qi@linaro.org>
3441
3442 * server.c (start_inferior): Code refactor.
3443
51aee833
YQ
34442015-07-24 Yao Qi <yao.qi@linaro.org>
3445
3446 * server.c (process_serial_event): Set general_thread.
3447
af1b22f3
YQ
34482015-07-21 Yao Qi <yao.qi@linaro.org>
3449
3450 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3451 aarch64_linux_get_debug_reg_capacity.
3452
554717a3
YQ
34532015-07-17 Yao Qi <yao.qi@linaro.org>
3454
3455 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3456 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3457 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3458 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3459 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3460 (AARCH64_HWP_ALIGNMENT): Likewise.
3461 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3462 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3463 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3464 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3465 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3466 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3467 (struct aarch64_debug_reg_state): Likewise.
3468 (struct arch_lwp_info): Likewise.
3469 (aarch64_align_watchpoint): Likewise.
3470 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3471 (aarch64_watchpoint_length): Likewise.
3472 (aarch64_point_encode_ctrl_reg): Likewise
3473 (aarch64_point_is_aligned): Likewise.
3474 (aarch64_align_watchpoint): Likewise.
3475 (aarch64_linux_set_debug_regs):
3476 (aarch64_dr_state_insert_one_point): Likewise.
3477 (aarch64_dr_state_remove_one_point): Likewise.
3478 (aarch64_handle_breakpoint): Likewise.
3479 (aarch64_handle_aligned_watchpoint): Likewise.
3480 (aarch64_handle_unaligned_watchpoint): Likewise.
3481 (aarch64_handle_watchpoint): Likewise.
3482
c67ca4de
YQ
34832015-07-17 Yao Qi <yao.qi@linaro.org>
3484
3485 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3486 and don't aarch64_get_debug_reg_state. All callers update.
3487 (aarch64_handle_aligned_watchpoint): Likewise.
3488 (aarch64_handle_unaligned_watchpoint): Likewise.
3489 (aarch64_handle_watchpoint): Likewise.
3490 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3491 (aarch64_remove_point): Likewise.
3492
25abf979
YQ
34932015-07-17 Yao Qi <yao.qi@linaro.org>
3494
3495 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3496 debug_printf.
3497 (aarch64_handle_unaligned_watchpoint): Likewise.
3498
db1ff28b
JK
34992015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3500
3501 Revert the previous 3 commits:
3502 Move gdb_regex* to common/
3503 Move linux_find_memory_regions_full & co.
3504 gdbserver build-id attribute generator
3505
700ca40f
JK
35062015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3507 Jan Kratochvil <jan.kratochvil@redhat.com>
3508
3509 gdbserver build-id attribute generator.
3510 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3511 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3512 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3513 (find_phdr): New.
3514 (get_dynamic): Use find_pdhr to traverse program headers.
3515 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3516 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3517 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3518 (get_hex_build_id): New.
3519 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3520 to reply XML document.
3521
9904185c
JK
35222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3523 Jan Kratochvil <jan.kratochvil@redhat.com>
3524
3525 * target.c: Include target/target-utils.h and fcntl.h.
3526 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3527 (target_fileio_read_stralloc): New functions.
3528
6e5b4429
JK
35292015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3530
3531 * Makefile.in (OBS): Add gdb_regex.o.
3532 (gdb_regex.o): New.
3533 * config.in: Rebuilt.
3534 * configure: Rebuilt.
3535
ddc98fbf
JK
35362015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3537 Jan Kratochvil <jan.kratochvil@redhat.com>
3538
3539 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3540 * Makefile.in (OBS): Add target-utils.o.
3541 (linux-maps.o, target-utils.o): New.
3542 * configure.srv (srv_linux_obj): Add linux-maps.o.
3543
e57bb7a0
PL
35442015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3545
3546 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3547 function, return 1.
3548 (the_low_target): Install it.
3549
586b02a9
PA
35502015-07-14 Pedro Alves <palves@redhat.com>
3551
3552 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3553 Instead, ignore ECHILD, and throw an error for other errnos.
3554
58c1b36c
PA
35552015-07-10 Pedro Alves <palves@redhat.com>
3556
3557 * event-loop.c (struct callback_event) <data>: Change type to
3558 gdb_client_data instance instead of gdb_client_data pointer.
3559 (append_callback_event): Adjust.
3560
421530db
PL
35612015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3562
3563 * linux-aarch64-low.c: Add comments for each linux_target_ops
3564 method. Remove comments already covered in target_ops and
3565 linux_target_ops definitions.
3566 (the_low_target): Add comments for each unimplemented method.
3567
c2d65f38
YQ
35682015-07-09 Yao Qi <yao.qi@linaro.org>
3569
3570 * linux-aarch64-low.c (aarch64_regmap): Remove.
3571 (aarch64_usrregs_info): Remove.
3572 (regs_info): Set field usrregs to NULL.
3573
b20a6524
MM
35742015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3575
3576 * linux-low.c: Include "rsp-low.h"
3577 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3578 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3579 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3580 (handle_btrace_enable_pt): New.
3581 (handle_btrace_general_set): Support "pt".
3582 (handle_btrace_conf_general_set): Support "pt:size".
3583
96c97461
PL
35842015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3585
3586 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3587 Z_PACKET_SW_BP.
3588
37d66942
PL
35892015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3590
3591 * linux-aarch64-low.c: Remove comment about endianness.
3592 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3593 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3594 memcmp.
3595
dc06243f
GB
35962015-06-24 Gary Benson <gbenson@redhat.com>
3597
3598 * linux-i386-ipa.c (stdint.h): Do not include.
3599 * lynx-i386-low.c (stdint.h): Likewise.
3600 * lynx-ppc-low.c (stdint.h): Likewise.
3601 * mem-break.c (stdint.h): Likewise.
3602 * thread-db.c (stdint.h): Likewise.
3603 * tracepoint.c (stdint.h): Likewise.
3604 * win32-low.c (stdint.h): Likewise.
3605
124e13d9
SM
36062015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3607
3608 * server.c (write_qxfer_response): Update call to
3609 remote_escape_output.
3610
909c2cda
JK
36112015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3612 Jan Kratochvil <jan.kratochvil@redhat.com>
3613
3614 Merge multiple hex conversions.
3615 * gdbreplay.c (tohex): Rename to 'fromhex'.
3616 (logchar): Use fromhex.
3617
24c05f46
JK
36182015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3619
3620 * server.c (handle_qxfer_libraries): Set `version' attribute for
3621 <library-list>.
3622
14d2069a
GB
36232015-06-10 Gary Benson <gbenson@redhat.com>
3624
3625 * target.h (struct target_ops) <multifs_open>: New field.
3626 <multifs_unlink>: Likewise.
3627 <multifs_readlink>: Likewise.
3628 * linux-low.c (nat/linux-namespaces.h): New include.
3629 (linux_target_ops): Initialize the_target->multifs_open,
3630 the_target->multifs_unlink and the_target->multifs_readlink.
3631 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3632 * hostio.c (hostio_fs_pid): New static variable.
3633 (hostio_handle_new_gdb_connection): New function.
3634 (handle_setfs): Likewise.
3635 (handle_open): Use the_target->multifs_open as appropriate.
3636 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3637 (handle_readlink): Use the_target->multifs_readlink as
3638 appropriate.
3639 (handle_vFile): Handle vFile:setfs packets.
3640 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3641 after target_handle_new_gdb_connection.
3642
4b8b5e72
GB
36432015-06-10 Gary Benson <gbenson@redhat.com>
3644
3645 * configure.ac (AC_CHECK_FUNCS): Add setns.
3646 * config.in: Regenerate.
3647 * configure: Likewise.
3648 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3649 (linux-namespaces.o): New rule.
3650 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3651
3ac2e371
GB
36522015-06-09 Gary Benson <gbenson@redhat.com>
3653
3654 * hostio.c (handle_open): Process mode argument with
3655 fileio_to_host_mode.
3656
ca9b78ce
YQ
36572015-06-01 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3660 * linux-x86-low.c: Likewise.
3661
bfacd19d
DB
36622015-05-28 Don Breazeal <donb@codesourcery.com>
3663
3664 * linux-low.c (handle_extended_wait): Initialize
3665 thread_info.last_resume_kind for new fork children.
3666
452003ef
PA
36672015-05-15 Pedro Alves <palves@redhat.com>
3668
3669 * target.h (target_handle_new_gdb_connection): Rewrite using if
3670 wrapped in do/while.
3671
1041a03c
JB
36722015-05-14 Joel Brobecker <brobecker@adacore.com>
3673
3674 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3675 * configure, config.in: Regenerate.
3676 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3677 Declare typedef.
3678
c269dbdb
DB
36792015-05-12 Don Breazeal <donb@codesourcery.com>
3680
3681 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3682 PTRACE_EVENT_VFORK_DONE.
3683 (linux_low_ptrace_options, extended_event_reported): Add vfork
3684 events.
3685 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3686 and "vforkdone" for RSP 'T' Stop Reply Packet.
3687 * server.h (report_vfork_events): Declare
3688 global variable.
3689
3a8a0396
DB
36902015-05-12 Don Breazeal <donb@codesourcery.com>
3691
3692 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3693 (the_low_target) <new_fork>: Initialize new member.
3694 * linux-arm-low.c (arm_new_fork): New function.
3695 (the_low_target) <new_fork>: Initialize new member.
3696 * linux-low.c (handle_extended_wait): Call new target function
3697 new_fork.
3698 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3699 * linux-mips-low.c (mips_add_watchpoint): New function
3700 extracted from mips_insert_point.
3701 (the_low_target) <new_fork>: Initialize new member.
3702 (mips_linux_new_fork): New function.
3703 (mips_insert_point): Call mips_add_watchpoint.
3704 * linux-x86-low.c (x86_linux_new_fork): New function.
3705 (the_low_target) <new_fork>: Initialize new member.
3706
de0d863e
DB
37072015-05-12 Don Breazeal <donb@codesourcery.com>
3708
3709 * linux-low.c (handle_extended_wait): Implement return value,
3710 rename argument 'event_child' to 'event_lwp', handle
3711 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3712 (linux_low_ptrace_options): New function.
3713 (linux_low_filter_event): Call linux_low_ptrace_options,
3714 use different argument fo linux_enable_event_reporting,
3715 use return value from handle_extended_wait.
3716 (extended_event_reported): New function.
3717 (linux_wait_1): Call extended_event_reported and set
3718 status to report fork events.
3719 (linux_write_memory): Add pid to debug message.
3720 (reset_lwp_ptrace_options_callback): New function.
3721 (linux_handle_new_gdb_connection): New function.
3722 (linux_target_ops): Initialize new structure member.
3723 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3724 * lynx-low.c: Initialize new structure member.
3725 * remote-utils.c (prepare_resume_reply): Implement stop reason
3726 "fork" for "T" stop message.
3727 * server.c (handle_query): Call handle_new_gdb_connection.
3728 * server.h (report_fork_events): Declare global flag.
3729 * target.h (struct target_ops) <handle_new_gdb_connection>:
3730 New member.
3731 (target_handle_new_gdb_connection): New macro.
3732 * win32-low.c: Initialize new structure member.
3733
ddcbc397
DB
37342015-05-12 Don Breazeal <donb@codesourcery.com>
3735
3736 * mem-break.c (APPEND_TO_LIST): Define macro.
3737 (clone_agent_expr): New function.
3738 (clone_one_breakpoint): New function.
3739 (clone_all_breakpoints): New function.
3740 * mem-break.h: Declare new functions.
3741
89245bc0
DB
37422015-05-12 Don Breazeal <donb@codesourcery.com>
3743
3744 * linux-low.c (linux_supports_fork_events): New function.
3745 (linux_supports_vfork_events): New function.
3746 (linux_target_ops): Initialize new structure members.
3747 (initialize_low): Call linux_check_ptrace_features.
3748 * lynx-low.c (lynx_target_ops): Initialize new structure
3749 members.
3750 * server.c (report_fork_events, report_vfork_events):
3751 New global flags.
3752 (handle_query): Add new features to qSupported packet and
3753 response.
3754 (captured_main): Initialize new global variables.
3755 * target.h (struct target_ops) <supports_fork_events>:
3756 New member.
3757 <supports_vfork_events>: New member.
3758 (target_supports_fork_events): New macro.
3759 (target_supports_vfork_events): New macro.
3760 * win32-low.c (win32_target_ops): Initialize new structure
3761 members.
3762
835205d0
GB
37632015-05-12 Gary Benson <gbenson@redhat.com>
3764
3765 * server.c (handle_qxfer_exec_file): Use current process
3766 if annex is empty.
3767
21e94bd9
SL
37682015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3769
3770 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3771 Remove HAVE_PTRACE_GETREGS conditionals.
3772 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3773 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3774
45614f15
YQ
37752015-05-08 Yao Qi <yao.qi@linaro.org>
3776
3777 * linux-low.c (linux_supports_conditional_breakpoints): New
3778 function.
3779 (linux_target_ops): Install new target method.
3780 * lynx-low.c (lynx_target_ops): Install NULL hook for
3781 supports_conditional_breakpoints.
3782 * nto-low.c (nto_target_ops): Likewise.
3783 * spu-low.c (spu_target_ops): Likewise.
3784 * win32-low.c (win32_target_ops): Likewise.
3785 * server.c (handle_query): Check
3786 target_supports_conditional_breakpoints.
3787 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3788 New field.
3789 (target_supports_conditional_breakpoints): New macro.
3790
80ad801e
PA
37912015-05-06 Pedro Alves <palves@redhat.com>
3792
3793 PR server/18081
3794 * server.c (start_inferior): If the process exits, mourn it.
3795
819843c7
GB
37962015-04-21 Gary Benson <gbenson@redhat.com>
3797
3798 * hostio.c (fileio_open_flags_to_host): Factored out to
3799 fileio_to_host_openflags in common/fileio.c. Single use
3800 updated.
3801
a2d5a9d7
MF
38022015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3803
3804 * linux-xtensa-low.c (xtensa_fill_gregset)
3805 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3806 XCHAL_HAVE_LOOP.
3807
deb44829
MF
38082015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3809
3810 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3811 (regs_info): Replace usrregs pointer with NULL.
3812
e57f1de3
GB
38132015-04-17 Gary Benson <gbenson@redhat.com>
3814
3815 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3816 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3817 * server.c (handle_qxfer_exec_file): New function.
3818 (qxfer_packets): Add exec-file entry.
3819 (handle_query): Report qXfer:exec-file:read as supported packet.
3820
62828379
RN
38212015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3822
3823 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3824
b88bb450
GB
38252015-04-09 Gary Benson <gbenson@redhat.com>
3826
3827 * hostio-errno.c (errno_to_fileio_error): Remove function.
3828 Update caller to use remote_fileio_to_fio_error.
3829
c8f4bfdd
YQ
38302015-04-09 Yao Qi <yao.qi@linaro.org>
3831
3832 * linux-low.c (linux_insert_point): Call
3833 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3834 (linux_remove_point): Call remove_memory_breakpoint if type is
3835 raw_bkpt_type_sw.
3836 * linux-x86-low.c (x86_insert_point): Don't call
3837 insert_memory_breakpoint.
3838 (x86_remove_point): Don't call remove_memory_breakpoint.
3839
41f98f02
PA
38402015-04-01 Pedro Alves <palves@redhat.com>
3841 Cleber Rosa <crosa@redhat.com>
3842
3843 * server.c (gdbserver_usage): Reorganize and extend the usage
3844 message.
3845
2bf6fb9d
PA
38462015-03-24 Pedro Alves <palves@redhat.com>
3847
3848 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3849 output. Also dump TRAP_TRACE.
3850 (linux_low_filter_event): In debug output, distinguish a
3851 resume_stop SIGSTOP from a delayed SIGSTOP.
3852
369f6daa
GB
38532015-03-24 Gary Benson <gbenson@redhat.com>
3854
3855 * linux-x86-low.c (x86_linux_new_thread): Moved to
3856 nat/x86-linux.c.
3857 (x86_linux_prepare_to_resume): Likewise.
3858
8e5d4070
GB
38592015-03-24 Gary Benson <gbenson@redhat.com>
3860
3861 * Makefile.in (x86-linux-dregs.o): New rule.
3862 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3863 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3864 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3865 (x86_linux_dr_get): Likewise.
3866 (x86_linux_dr_set): Likewise.
3867 (update_debug_registers_callback): Likewise.
3868 (x86_linux_dr_set_addr): Likewise.
3869 (x86_linux_dr_get_addr): Likewise.
3870 (x86_linux_dr_set_control): Likewise.
3871 (x86_linux_dr_get_control): Likewise.
3872 (x86_linux_dr_get_status): Likewise.
3873 (x86_linux_update_debug_registers): Likewise.
3874
2b95d440
GB
38752015-03-24 Gary Benson <gbenson@redhat.com>
3876
3877 * linux-x86-low.c (x86_linux_update_debug_registers):
3878 New function, factored out from...
3879 (x86_linux_prepare_to_resume): ...this.
3880
14b0bc68
GB
38812015-03-24 Gary Benson <gbenson@redhat.com>
3882
3883 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3884 (x86_linux_dr_set): Likewise.
3885 (update_debug_registers_callback): Likewise.
3886 (x86_linux_dr_set_addr): Likewise.
3887 (x86_linux_dr_get_addr): Likewise.
3888 (x86_linux_dr_set_control): Likewise.
3889 (x86_linux_dr_get_control): Likewise.
3890 (x86_linux_dr_get_status): Likewise.
3891 (x86_linux_prepare_to_resume): Likewise.
3892
5dfe6ca8
GB
38932015-03-24 Gary Benson <gbenson@redhat.com>
3894
3895 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3896 Use perror_with_name. Pass string through gettext.
3897 (x86_linux_dr_set): Likewise.
3898
d33472ad
GB
38992015-03-24 Gary Benson <gbenson@redhat.com>
3900
3901 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3902 (x86_linux_dr_set_addr): ...this.
3903 (x86_dr_low_get_addr): Rename to...
3904 (x86_linux_dr_get_addr): ...this.
3905 (x86_dr_low_set_control): Rename to...
3906 (x86_linux_dr_set_control): ...this.
3907 (x86_dr_low_get_control): Rename to...
3908 (x86_linux_dr_get_control): ...this.
3909 (x86_dr_low_get_status): Rename to...
3910 (x86_linux_dr_get_status): ...this.
3911 (x86_dr_low): Update with new function names.
3912
4b134ca1
GB
39132015-03-24 Gary Benson <gbenson@redhat.com>
3914
3915 * Makefile.in (x86-linux.o): New rule.
3916 * configure.srv: Add x86-linux.o to relevant targets.
3917 * linux-low.c (lwp_set_arch_private_info): New function.
3918 (lwp_arch_private_info): Likewise.
3919 * linux-x86-low.c: Include nat/x86-linux.h.
3920 (arch_lwp_info): Removed structure.
3921 (update_debug_registers_callback):
3922 Use lwp_set_debug_registers_changed.
3923 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3924 and lwp_set_debug_registers_changed.
3925 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3926
34c703da
GB
39272015-03-24 Gary Benson <gbenson@redhat.com>
3928
3929 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3930 * linux-arm-low.c (arm_new_thread): Likewise.
3931 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3932 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3933 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3934 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3935
cff068da
GB
39362015-03-24 Gary Benson <gbenson@redhat.com>
3937
3938 * linux-low.c (ptid_of_lwp): New function.
3939 (lwp_is_stopped): Likewise.
3940 (lwp_stop_reason): Likewise.
3941 * linux-x86-low.c (update_debug_registers_callback):
3942 Use lwp_is_stopped.
3943 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3944 lwp_stop_reason.
3945
b2f7c7e8
GB
39462015-03-24 Gary Benson <gbenson@redhat.com>
3947
3948 * linux-low.h (linux_stop_lwp): Remove declaration.
3949
6d4ee8c6
GB
39502015-03-24 Gary Benson <gbenson@redhat.com>
3951
3952 * linux-low.h: Include nat/linux-nat.h.
3953 * linux-low.c (iterate_over_lwps_args): New structure.
3954 (iterate_over_lwps_filter): New function.
3955 (iterate_over_lwps): Likewise.
3956 * linux-x86-low.c (update_debug_registers_callback):
3957 Update signature to what iterate_over_lwps expects.
3958 Remove PID check that iterate_over_lwps now performs.
3959 (x86_dr_low_set_addr): Use iterate_over_lwps.
3960 (x86_dr_low_set_control): Likewise.
3961
70a0bb6b
GB
39622015-03-24 Gary Benson <gbenson@redhat.com>
3963
3964 * linux-x86-low.c (x86_debug_reg_state): New function.
3965 (x86_linux_prepare_to_resume): Use the above.
3966
7b669087
GB
39672015-03-24 Gary Benson <gbenson@redhat.com>
3968
3969 * linux-low.c (current_lwp_ptid): New function.
3970 * linux-x86-low.c: Include nat/linux-nat.h.
3971 (x86_dr_low_get_addr): Use current_lwp_ptid.
3972 (x86_dr_low_get_control): Likewise.
3973 (x86_dr_low_get_status): Likewise.
3974
eef49a3d
PA
39752015-03-20 Pedro Alves <palves@redhat.com>
3976
3977 * tracepoint.c (cmd_qtstatus): Make "str" const.
3978
b2333d22
PA
39792015-03-20 Pedro Alves <palves@redhat.com>
3980
3981 * server.c (handle_general_set): Make "req_str" const.
3982
23f238d3
PA
39832015-03-19 Pedro Alves <palves@redhat.com>
3984
3985 * linux-low.c (linux_resume_one_lwp): Rename to ...
3986 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3987 instead call perror_with_name.
3988 (check_ptrace_stopped_lwp_gone): New function.
3989 (linux_resume_one_lwp): Reimplement as wrapper around
3990 linux_resume_one_lwp_throw that swallows errors if the LWP is
3991 gone.
3992
91baf43f
PA
39932015-03-19 Pedro Alves <palves@redhat.com>
3994
3995 * linux-low.c (count_events_callback, select_event_lwp_callback):
3996 No longer check whether the thread has resume_stop as last resume
3997 kind.
3998
8bf3b159
PA
39992015-03-19 Pedro Alves <palves@redhat.com>
4000
4001 * linux-low.c (count_events_callback, select_event_lwp_callback):
4002 Use the lwp's status_pending_p field, not the thread's.
4003
b90fc188
PA
40042015-03-19 Pedro Alves <palves@redhat.com>
4005
4006 * linux-low.c (select_event_lwp_callback): Update comments to
4007 no longer mention SIGTRAP.
4008
464b0089
GB
40092015-03-18 Gary Benson <gbenson@redhat.com>
4010
4011 * server.c (handle_query): Do not report vFile:fstat as supported.
4012
aa9e327f
GB
40132015-03-11 Gary Benson <gbenson@redhat.com>
4014
4015 * hostio.c (sys/types.h): New include.
4016 (sys/stat.h): Likewise.
4017 (common-remote-fileio.h): Likewise.
4018 (handle_fstat): New function.
4019 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4020
791c0056
GB
40212015-03-11 Gary Benson <gbenson@redhat.com>
4022
4023 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4024 struct stat.st_blocks and struct stat.st_blksize.
4025 * configure: Regenerate.
4026 * config.in: Likewise.
4027 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4028 (OBS): Add common-remote-fileio.o.
4029 (common-remote-fileio.o): New rule.
4030
9a9df970
PA
40312015-03-09 Pedro Alves <palves@redhat.com>
4032
4033 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4034 'struct sockaddr' pointer in 'accept' call.
4035
9eb1356e
PA
40362015-03-09 Pedro Alves <palves@redhat.com>
4037
4038 Revert:
4039 2015-03-07 Pedro Alves <palves@redhat.com>
4040 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4041 or <winsock2.h> here. Instead include "gdb_socket.h".
4042 (remote_open): Use union gdb_sockaddr_u.
4043 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4044 or <winsock2.h> here. Instead include "gdb_socket.h".
4045 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4046 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4047 or <sys/un.h>.
4048 (init_named_socket, gdb_agent_helper_thread): Use union
4049 gdb_sockaddr_u.
4050
aac331e4
PA
40512015-03-07 Pedro Alves <palves@redhat.com>
4052
4053 * configure.ac (build_warnings): Move
4054 -Wdeclaration-after-statement to the C-specific set.
4055 * configure: Regenerate.
4056
366c75fc
PA
40572015-03-07 Pedro Alves <palves@redhat.com>
4058
4059 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4060 or <winsock2.h> here. Instead include "gdb_socket.h".
4061 (remote_open): Use union gdb_sockaddr_u.
4062 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4063 or <winsock2.h> here. Instead include "gdb_socket.h".
4064 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4065 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4066 or <sys/un.h>.
4067 (init_named_socket, gdb_agent_helper_thread): Use union
4068 gdb_sockaddr_u.
4069
492d29ea
PA
40702015-03-07 Pedro Alves <palves@redhat.com>
4071
4072 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4073 instead.
4074
60a191ed
YQ
40752015-03-06 Yao Qi <yao.qi@linaro.org>
4076
4077 * linux-aarch64-low.c (aarch64_insert_point): Use
4078 show_debug_regs as a boolean.
4079 (aarch64_remove_point): Likewise.
4080
f5771b1d
PA
40812015-03-05 Pedro Alves <palves@redhat.com>
4082
4083 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4084 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4085 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4086 * nto-low.c (nto_target_ops): Likewise.
4087 * spu-low.c (spu_target_ops): Likewise.
4088 * win32-low.c (win32_target_ops): Likewise.
4089
3e572f71
PA
40902015-03-04 Pedro Alves <palves@redhat.com>
4091
72f4393d 4092 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4093 Decide whether a breakpoint triggered based on the SIGTRAP's
4094 siginfo.si_code.
72f4393d
L
4095 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4096 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4097 (linux_low_filter_event): Check for breakpoints before checking
4098 watchpoints.
4099 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4100 siginfo.si_code.
72f4393d
L
4101 (linux_stopped_by_sw_breakpoint)
4102 (linux_supports_stopped_by_sw_breakpoint)
4103 (linux_stopped_by_hw_breakpoint)
4104 (linux_supports_stopped_by_hw_breakpoint): New functions.
4105 (linux_target_ops): Install new target methods.
3e572f71 4106
1ec68e26
PA
41072015-03-04 Pedro Alves <palves@redhat.com>
4108
4109 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4110 * server.c (swbreak_feature, hwbreak_feature): New globals.
4111 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4112 (captured_main): Clear swbreak_feature and hwbreak_feature.
4113 * server.h (swbreak_feature, hwbreak_feature): Declare.
4114 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4115 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4116 supports_stopped_by_hw_breakpoint>: New fields.
4117 (target_supports_stopped_by_sw_breakpoint)
4118 (target_stopped_by_sw_breakpoint)
4119 (target_supports_stopped_by_hw_breakpoint)
4120 (target_stopped_by_hw_breakpoint): Declare.
4121
15c66dd6
PA
41222015-03-04 Pedro Alves <palves@redhat.com>
4123
4124 enum lwp_stop_reason -> enum target_stop_reason
4125 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4126 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4127 (linux_wait_1, stuck_in_jump_pad_callback)
4128 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4129 (linux_stopped_by_watchpoint):
4130 * linux-low.h (enum lwp_stop_reason): Delete.
4131 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4132 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4133
98fc70d6
YQ
41342015-03-04 Yao Qi <yao.qi@linaro.org>
4135
4136 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4137
dd2ac174
GB
41382015-03-03 Gary Benson <gbenson@redhat.com>
4139
4140 * hostio.c (handle_vFile): Fix prefix lengths.
4141
d68e53f4
MM
41422015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4143
4144 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4145 ptr_bits.
4146
bf2d68ab
AA
41472015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4148
4149 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4150 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4151 (clean): Add "rm -f" for above C files.
4152 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4153 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4154 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4155 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4156 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4157 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4158 (init_registers_s390x_vx_linux64)
4159 (init_registers_s390x_tevx_linux64)
4160 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4161 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4162 declarations.
4163 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4164 (s390_store_vxrs_high): New functions.
4165 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4166 NT_S390_VXRS_HIGH.
4167 (s390_arch_setup): Add logic for selecting one of the new target
4168 descriptions. Activate the new vector regsets if applicable.
4169 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4170 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4171 and init_registers_s390x_tevx_linux64.
4172
c966a859
PA
41732015-03-01 Pedro Alves <palves@redhat.com>
4174
4175 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4176 parameter.
4177
4180215b
PA
41782015-02-27 Pedro Alves <palves@redhat.com>
4179
4180 * linux-x86-low.c (u_debugreg_offset): New function.
4181 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4182
749bab01
PA
41832015-02-27 Pedro Alves <palves@redhat.com>
4184
4185 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4186 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4187 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4188 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4189 (ps_lsetfpregs, ps_getpid)
4190 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4191 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4192 (ps_lsetxregs, ps_plog): Declare.
4193
3c14e5a3
PA
41942015-02-27 Pedro Alves <palves@redhat.com>
4195
4196 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4197 IP_AGENT_EXPORT_FUNC.
4198 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4199 IP_AGENT_EXPORT_FUNC.
4200 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4201 (IP_AGENT_EXPORT): Delete.
4202 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4203 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4204 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4205 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4206 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4207 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4208 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4209 (traceframe_read_count, traceframe_write_count)
4210 (traceframes_created, trace_state_variables, get_raw_reg)
4211 (get_trace_state_variable_value, set_trace_state_variable_value)
4212 (ust_loaded, helper_thread_id, cmd_buf): Use
4213 IPA_SYM_EXPORTED_NAME.
4214 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4215 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4216 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4217 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4218 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4219 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4220 EXTERN_C_PUSH/EXTERN_C_POP.
4221 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4222 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4223 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4224 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4225 (traceframe_write_count, traceframe_read_count)
4226 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4227 (about_to_request_buffer_space, get_trace_state_variable_value)
4228 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4229 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4230 EXTERN_C_PUSH/EXTERN_C_POP.
4231 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4232 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4233 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4234 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4235 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4236 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4237 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4238 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4239 Define.
4240 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4241 (IP_AGENT_EXPORT_VAR_DECL): Define.
4242 (tracing): Declare.
4243 (gdb_agent_get_raw_reg): Declare.
4244
fe978cb0
PA
42452015-02-27 Tom Tromey <tromey@redhat.com>
4246 Pedro Alves <palves@redhat.com>
4247
4248 Rename symbols whose names are reserved C++ keywords throughout.
4249
3bc3d82a
PA
42502015-02-27 Pedro Alves <palves@redhat.com>
4251
4252 * Makefile.in (COMPILER): New, get it from autoconf.
4253 (CXX): Get from autoconf instead.
4254 (COMPILE.pre): Use COMPILER.
4255 (CC-LD): Rename to ...
4256 (CC_LD): ... this. Use COMPILER.
4257 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4258 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4259 * acinclude.m4: Include build-with-cxx.m4.
4260 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4261 Disable -Werror by default if building in C++ mode.
4262 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4263 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4264 the C++ compiler. Save/restore CXXFLAGS too.
4265 * configure: Regenerate.
4266
07697489
PA
42672015-02-27 Pedro Alves <palves@redhat.com>
4268
4269 * acinclude.m4: Include libiberty.m4.
4270 * configure.ac: Call libiberty_INIT.
4271 * config.in, configure: Regenerate.
4272
9beb7c4e
PA
42732015-02-26 Pedro Alves <palves@redhat.com>
4274
4275 * linux-low.c (linux_wait_1): When incrementing the PC past a
4276 program breakpoint always use the_low_target.breakpoint_len as
4277 increment, rather than the maximum between that and
4278 the_low_target.decr_pc_after_break.
4279
8090aef2
PA
42802015-02-23 Pedro Alves <palves@redhat.com>
4281
4282 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4283 thread was doing a step-over; always adjust the PC if
4284 we stepped over a permanent breakpoint.
4285 (linux_wait_1): If we stepped over breakpoint that was on top of a
4286 permanent breakpoint, manually advance the PC past it.
4287
bc9540e8
PA
42882015-02-23 Pedro Alves <palves@redhat.com>
4289
4290 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4291 modes.
4292 (x86_fill_gregset, x86_store_gregset): Use it when handling
4293 $orig_eax.
4294
2db9a427
PA
42952015-02-20 Pedro Alves <palves@redhat.com>
4296
4297 * thread-db.c: Include "nat/linux-procfs.h".
4298 (thread_db_init): Skip listing new threads if the kernel supports
4299 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4300
afa8d396
PA
43012015-02-20 Pedro Alves <palves@redhat.com>
4302
4303 * linux-low.c (status_pending_p_callback): Use ptid_match.
4304
c9587f88
AT
43052015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4306
4307 PR breakpoints/16812
4308 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4309 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4310 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4311
b05ec7a5
AT
43122015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4313
4314 PR breakpoints/15956
4315 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4316
d33501a5
MM
43172015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4318
4319 * linux-low.c (linux_low_btrace_conf): Print size.
4320 * server.c (handle_btrace_conf_general_set): New.
4321 (hanle_general_set): Call handle_btrace_conf_general_set.
4322 (handle_query): Report Qbtrace-conf:bts:size as supported.
4323
f4abbc16
MM
43242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4325
4326 * linux-low.c (linux_low_enable_btrace): Update parameters.
4327 (linux_low_btrace_conf): New.
4328 (linux_target_ops)<to_btrace_conf>: Initialize.
4329 * server.c (current_btrace_conf): New.
4330 (handle_btrace_enable): Rename to ...
4331 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4332 to target_enable_btrace. Update comment. Update users.
4333 (handle_qxfer_btrace_conf): New.
4334 (qxfer_packets): Add btrace-conf entry.
4335 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4336 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4337 (target_ops)<read_btrace_conf>: New.
4338 (target_enable_btrace): Update parameters.
4339 (target_read_btrace_conf): New.
4340
043c3577
MM
43412015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4342
4343 * server.c (handle_btrace_general_set): Remove call to
4344 target_supports_btrace.
4345 (supported_btrace_packets): New.
4346 (handle_query): Call supported_btrace_packets.
4347 * target.h: include btrace-common.h.
4348 (btrace_target_info): Removed.
4349 (supports_btrace, target_supports_btrace): Update parameters.
4350
734b0e4b
MM
43512015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4352
4353 * Makefile.in (SFILES): Add common/btrace-common.c.
4354 (OBS): Add common/btrace-common.o.
4355 (btrace-common.o): Add build rules.
4356 * linux-low: Include btrace-common.h.
4357 (linux_low_read_btrace): Use struct btrace_data. Call
4358 btrace_data_init and btrace_data_fini.
4359
d6c146e9
PA
43602015-02-06 Pedro Alves <palves@redhat.com>
4361
4362 * thread-db.c (find_new_threads_callback): Add debug output.
4363
20ba1ce6
PA
43642015-02-04 Pedro Alves <palves@redhat.com>
4365
4366 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4367 (resume_stopped_resumed_lwps): New function.
4368 (linux_wait_for_event_filtered): Use it.
4369
8cc73a39
SDJ
43702015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4371
4372 * Makefile.in (SFILES): Add linux-personality.c.
4373 (linux-personality.o): New rule.
4374 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4375 list of objects to be built.
4376 * linux-low.c: Include nat/linux-personality.h.
4377 (linux_create_inferior): Remove code to disable address space
4378 randomization (moved to ../nat/linux-personality.c). Create
4379 cleanup to disable address space randomization.
4380
fb23d554
SDJ
43812015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4382
4383 * Makefile.in (posix-strerror.o): New rule.
4384 (mingw-strerror.o): Likewise.
4385 * configure: Regenerated.
4386 * configure.ac: Source file ../common/common.host. Initialize new
4387 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4388
cdf43629
YQ
43892015-01-14 Yao Qi <yao@codesourcery.com>
4390
4391 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4392 (ppc-linux.o): New rule.
4393 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4394 * configure.ac: AC_CHECK_FUNCS(getauxval).
4395 * config.in: Re-generated.
4396 * configure: Re-generated.
4397 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4398 ppc64_64bit_inferior_p
4399
514c5338
YQ
44002015-01-14 Yao Qi <yao@codesourcery.com>
4401
4402 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4403 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4404 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4405 (PT_ORIG_R3, PT_TRAP): Likewise.
4406 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4407 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4408 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4409
3368c1e5
JB
44102015-01-10 Joel Brobecker <brobecker@adacore.com>
4411
4412 * i387-fp.c (i387_cache_to_xsave): In look over
4413 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4414 zmmh_low_space field by use of zmmh_high_space.
4415
582511be
PA
44162015-01-09 Pedro Alves <palves@redhat.com>
4417
4418 * linux-low.c (step_over_bkpt): Move higher up in the file.
4419 (handle_extended_wait): Don't store the stop_pc here.
4420 (get_stop_pc): Adjust comments and rename to ...
4421 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4422 stopped for a software breakpoint or hardware breakpoint.
4423 (thread_still_has_status_pending_p): New function.
4424 (status_pending_p_callback): Use
4425 thread_still_has_status_pending_p. If the event is no longer
4426 interesting, resume the LWP.
4427 (handle_tracepoints): Add assert.
4428 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4429 (wstatus_maybe_breakpoint): New function.
4430 (cancel_breakpoint): Delete function.
4431 (check_stopped_by_watchpoint): New function, factored out from
4432 linux_low_filter_event.
4433 (lp_status_maybe_breakpoint): Delete function.
4434 (linux_low_filter_event): Remove filter_ptid argument.
4435 Leave thread group exits pending here. Store the LWP's stop PC.
4436 Always leave events pending.
4437 (linux_wait_for_event_filtered): Pull all events out of the
4438 kernel, and leave them all pending.
4439 (count_events_callback, select_event_lwp_callback): Consider all
4440 events.
4441 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4442 (select_event_lwp): Only give preference to the stepping LWP in
4443 all-stop mode. Adjust comments.
4444 (ignore_event): New function.
4445 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4446 references to cancel_breakpoints. Adjust to renames. Also give
4447 equal priority to all LWPs that have had events in non-stop mode.
4448 If reporting a software breakpoint event, unadjust the LWP's PC.
4449 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4450 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4451 Adjust.
4452 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4453 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4454 (linux_stopped_by_watchpoint): Adjust.
4455 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4456 * linux-low.h (enum lwp_stop_reason): New.
4457 (struct lwp_info) <stop_pc>: Adjust comment.
4458 <stopped_by_watchpoint>: Delete field.
4459 <stop_reason>: New field.
4460 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4461 * mem-break.c (software_breakpoint_inserted_here)
4462 (hardware_breakpoint_inserted_here): New function.
4463 * mem-break.h (software_breakpoint_inserted_here)
4464 (hardware_breakpoint_inserted_here): Declare.
4465 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4466 (cancel_breakpoints): Delete.
4467 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4468 (upload_fast_traceframes): Remove references to
4469 cancel_breakpoints.
4470
a33e3959
PA
44712015-01-09 Pedro Alves <palves@redhat.com>
4472
4473 * thread-db.c (find_new_threads_callback): Ignore thread if the
4474 kernel thread ID is -1.
4475
8784d563
PA
44762015-01-09 Pedro Alves <palves@redhat.com>
4477
4478 * linux-low.c (linux_attach_fail_reason_string): Move to
4479 nat/linux-ptrace.c, and rename.
4480 (linux_attach_lwp): Update comment.
4481 (attach_proc_task_lwp_callback): New function.
4482 (linux_attach): Adjust to rename and use
4483 linux_proc_attach_tgid_threads.
4484 (linux_attach_fail_reason_string): Delete declaration.
4485
76f2b779
JB
44862015-01-01 Joel Brobecker <brobecker@adacore.com>
4487
4488 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4489 * server.c (gdbserver_version): Likewise.
4490
fafcc06a
SDJ
44912014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4492
4493 * remote-utils.c: Include ctype.h.
4494 (input_interrupt): Explicitly handle the case when the char
4495 received is the NUL byte. Improve the printing of non-ASCII
4496 characters.
4497
beed38b8
JB
44982014-12-16 Joel Brobecker <brobecker@adacore.com>
4499
4500 * linux-low.c (linux_low_filter_event): Update call to
4501 linux_enable_event_reporting following the addition of
4502 a new parameter to that function.
4503
bf330350
CU
45042014-12-16 Catalin Udma <catalin.udma@freescale.com>
4505
4506 PR server/17457
4507 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4508 (AARCH64_FPCR_REGNO): Likewise.
4509 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4510 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4511 (aarch64_store_fpregset): Likewise.
4512
5227d625
JB
45132014-12-15 Joel Brobecker <brobecker@adacore.com>
4514
4515 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4516 Remove FIXME comment about assumption about N.
4517
f93b65a0
JB
45182014-12-13 Joel Brobecker <brobecker@adacore.com>
4519
4520 * configure.ac: If large-file support is disabled in GDBserver,
4521 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4522 * configure: Regenerate.
4523
e5a9158d
AA
45242014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4525
4526 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4527 warning upon ENODATA from ptrace.
4528 * linux-s390-low.c (s390_store_tdb): New.
4529 (s390_regsets): Add regset for NT_S390_TDB.
4530
feea5f36
AA
45312014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4532
4533 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4534 without a fill_function.
4535 * linux-s390-low.c (s390_fill_last_break): Remove.
4536 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4537 (s390_arch_setup): Use regset's size instead of fill_function for
4538 loop end condition.
4539
098dbe61
AA
45402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4541
4542 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4543 the regset's store function when ptrace returned an error.
4544 * regcache.c (get_thread_regcache): Invalidate register cache
4545 before fetching inferior's registers.
4546
28eef672
AA
45472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4548
4549 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4550 while-loop as for-loop.
4551 (regsets_store_inferior_registers): Likewise.
4552
bdca27a2
YQ
45532014-11-28 Yao Qi <yao@codesourcery.com>
4554
4555 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4556 * config.in, configure: Re-generate.
4557 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4558 is defined.
4559
9c232dda
YQ
45602014-11-21 Yao Qi <yao@codesourcery.com>
4561
4562 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4563 (AC_CHECK_HEADERS): Remove malloc.h.
4564 * configure: Re-generated.
4565 * config.in: Re-generated.
4566 * server.h: Don't include alloca.h and malloc.h.
4567 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4568 Don't include malloc.h.
4569
43968415
JB
45702014-11-17 Joel Brobecker <brobecker@adacore.com>
4571
4572 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4573 corresponding ERRNO check in same block.
4574
40e91bc7
PA
45752014-11-12 Pedro Alves <palves@redhat.com>
4576
4577 * server.c (cont_thread): Update comment.
4578 (start_inferior, attach_inferior): No longer clear cont_thread.
4579 (handle_v_cont): No longer set cont_thread.
4580 (captured_main): Clear cont_thread each time a GDB connects.
4581
c2c118cf
PA
45822014-11-12 Pedro Alves <palves@redhat.com>
4583
4584 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4585 thread, and don't resume all threads if the Hc thread has exited.
4586
78708b7c
PA
45872014-11-12 Pedro Alves <palves@redhat.com>
4588
4589 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4590 the process group instead of to a specific LWP.
4591
a2abc7de
PA
45922014-10-15 Pedro Alves <palves@redhat.com>
4593
4594 PR server/17487
4595 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4596 parameter.
4597 (arm_set_thread_context): Delete.
4598 (the_low_target): Adjust.
4599 * win32-i386-low.c (debug_registers_changed)
4600 (debug_registers_used): Delete.
4601 (update_debug_registers_callback): New function.
4602 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4603 needing to update their debug registers.
4604 (win32_get_current_dr): New function.
4605 (x86_dr_low_get_addr, x86_dr_low_get_control)
4606 (x86_dr_low_get_status): Fetch the debug register from the thread
4607 record's context.
4608 (i386_initial_stuff): Adjust.
4609 (i386_get_thread_context): Remove current_event parameter. Don't
4610 clear debug_registers_changed nor copy DR values to
4611 debug_reg_state.
4612 (i386_set_thread_context): Delete.
4613 (i386_prepare_to_resume): New function.
4614 (i386_thread_added): Mark the thread as needing to update irs
4615 debug registers.
4616 (the_low_target): Remove i386_set_thread_context and install
4617 i386_prepare_to_resume.
4618 * win32-low.c (win32_get_thread_context): Adjust.
4619 (win32_set_thread_context): Use SetThreadContext
4620 directly.
4621 (win32_prepare_to_resume): New function.
4622 (win32_require_context): New function, factored out from ...
4623 (thread_rec): ... this.
4624 (continue_one_thread): Call win32_prepare_to_resume on each thread
4625 we're about to continue.
4626 (win32_resume): Call win32_prepare_to_resume on the event thread.
4627 * win32-low.h (struct win32_thread_info)
4628 <debug_registers_changed>: New field.
4629 (struct win32_target_ops): Change prototype of set_thread_context,
4630 delete set_thread_context and add prepare_to_resume.
4631 (win32_require_context): New declaration.
4632
a442d071
GB
46332014-10-08 Gary Benson <gbenson@redhat.com>
4634
4635 * server.h: Do not include common-exceptions.h.
4636
6f1947e8
GB
46372014-10-08 Gary Benson <gbenson@redhat.com>
4638
4639 * server.h: Do not include cleanups.h.
4640
63b434a4
JH
46412014-09-30 James Hogan <james.hogan@imgtec.com>
4642
4643 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4644 mips64-dsp-linux.c.
4645
c4d9ceb6
YQ
46462014-09-23 Yao Qi <yao@codesourcery.com>
4647
4648 * linux-low.c (lp_status_maybe_breakpoint): New function.
4649 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4650 (count_events_callback): Likewise.
4651 (select_event_lwp_callback): Likewise.
4652 (cancel_breakpoints_callback): Likewise.
4653
89a5711c
DB
46542014-09-19 Don Breazeal <donb@codesourcery.com>
4655
4656 * linux-low.c (handle_extended_wait): Call
4657 linux_ptrace_get_extended_event.
4658 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4659 linux_is_extended_waitstatus.
4660
bffc0964
JB
46612014-09-16 Joel Brobecker <brobecker@adacore.com>
4662
4663 * Makefile.in (CPPFLAGS): Define.
4664 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4665 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4666
0bfdf32f
GB
46672014-09-16 Gary Benson <gbenson@redhat.com>
4668
4669 * inferiors.h (current_inferior): Renamed as...
4670 (current_thread): New variable. All uses updated.
4671 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4672 (maybe_move_out_of_jump_pad): Likewise.
4673 (cancel_breakpoint): Likewise.
4674 (linux_low_filter_event): Likewise.
4675 (wait_for_sigstop): Likewise.
4676 (linux_resume_one_lwp): Likewise.
4677 (need_step_over_p): Likewise.
4678 (start_step_over): Likewise.
4679 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4680 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4681 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4682 and save_inferior as saved_thread.
4683 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4684 saved_thread.
4685 (regcache_invalidate_thread): Likewise.
4686 * remote-utils.c (prepare_resume_reply): Likewise.
4687 * thread-db.c (thread_db_get_tls_address): Likewise.
4688 (disable_thread_event_reporting): Likewise.
4689 (remove_thread_event_breakpoints): Likewise.
4690 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4691 as saved_thread.
4692 * target.h (set_desired_inferior): Renamed as...
4693 (set_desired_thread): New declaration. All uses updated.
4694 * server.c (myresume): Updated comment to reference thread instead
4695 of inferior.
4696 (handle_serial_event): Likewise.
4697 (handle_target_event): Likewise.
4698
361c8ade
GB
46992014-09-12 Tom Tromey <tromey@redhat.com>
4700 Gary Benson <gbenson@redhat.com>
4701
4702 * regcache.h: Include common-regcache.h.
4703 (regcache_read_pc): Don't declare.
4704 * regcache.c (get_thread_regcache_for_ptid): New function.
4705
bd9269f7
GB
47062014-09-11 Tom Tromey <tromey@redhat.com>
4707 Gary Benson <gbenson@redhat.com>
4708
4709 * symbol.c: New file.
4710 * Makefile.in (SFILES): Add symbol.c.
4711 (OBS): Add symbol.o.
4712
f8c1d06b
GB
47132014-09-11 Gary Benson <gbenson@redhat.com>
4714
4715 * target.c (target_stop_ptid, target_continue_ptid): New
4716 functions.
4717
721ec300
GB
47182014-09-11 Tom Tromey <tromey@redhat.com>
4719 Gary Benson <gbenson@redhat.com>
4720
4721 * target.h: Include target/target.h.
4722 * target.c (target_read_memory, target_read_uint32)
4723 (target_write_memory): New functions.
4724
c5e92cca
GB
47252014-09-11 Gary Benson <gbenson@redhat.com>
4726
4727 * server.h (debug_hw_points): Don't declare.
4728 * server.c (debug_hw_points): Don't define. Replace all uses
4729 with show_debug_regs.
4730 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4731 all uses with show_debug_regs.
4732
2e4bb98a
EBM
47332014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4734
4735 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4736 endianness into account.
4737 (ppc_supply_ptrace_register): Likewise.
4738
ac740bc7
JH
47392014-09-03 James Hogan <james.hogan@imgtec.com>
4740
4741 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4742 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4743
97ea6506
GB
47442014-09-03 Gary Benson <gbenson@redhat.com>
4745
4746 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4747 ALL_DEBUG_ADDRESS_REGISTERS.
4748
df7e5265
GB
47492014-09-02 Gary Benson <gbenson@redhat.com>
4750
4751 * i386-low.h: Renamed as...
4752 * x86-low.h: New file. All type, function and variable name
4753 prefixes changed from "i386_" to "x86_". All references updated.
4754 * i386-low.c: Renamed as...
4755 * x86-low.c: New file. All type, function and variable name
4756 prefixes changed from "i386_" to "x86_". All references updated.
4757
ed859da7
GB
47582014-09-02 Gary Benson <gbenson@redhat.com>
4759
4760 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4761 (x86_linux_new_thread): Likewise.
4762
860789c7
GB
47632014-08-29 Gary Benson <gbenson@redhat.com>
4764
4765 * server.h (setjmp.h): Do not include.
4766 (toplevel): Do not declare.
4767 (common-exceptions.h): Include.
4768 (cleanups.h): Likewise.
4769 * server.c (toplevel): Do not define.
4770 (exit_code): New static global.
4771 (detach_or_kill_for_exit_cleanup): New function.
4772 (main): New function. Original main renamed to...
4773 (captured_main): New function.
4774 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4775
ff55e1b5
GB
47762014-08-29 Gary Benson <gbenson@redhat.com>
4777
4778 * Makefile.in (SFILES): Add common/common-exceptions.c.
4779 (OBS): Add common-exceptions.o.
4780 (common-exceptions.o): New rule.
4781 * utils.c (prepare_to_throw_exception): New function.
4782
e9bcb658
GB
47832014-08-29 Gary Benson <gbenson@redhat.com>
4784
4785 * config.in: Regenerate.
4786 * configure: Likewise.
4787
e3180625
GB
47882014-08-29 Gary Benson <gbenson@redhat.com>
4789
4790 * Makefile.in (SFILES): Add common/cleanups.c.
4791 (OBS): cleanups.o.
4792 (cleanups.o): New rule.
4793
e3d6ba5d
GB
47942014-08-29 Gary Benson <gbenson@redhat.com>
4795
4796 * utils.c (internal_vwarning): New function.
4797
7096e886
GB
47982014-08-28 Gary Benson <gbenson@redhat.com>
4799
4800 * utils.h (fatal): Remove declaration.
4801 * utils.c (fatal): Remove function.
4802
14ce3192
GB
48032014-08-28 Gary Benson <gbenson@redhat.com>
4804
4805 * tracepoint.c (gdb_agent_init): Replace fatal with
4806 perror_with_name.
4807 (initialize_tracepoint): Likewise.
4808
50278d59
GB
48092014-08-28 Gary Benson <gbenson@redhat.com>
4810
4811 * remote-utils.c (remote_prepare): Replace fatal with error.
4812
aa96c426
GB
48132014-08-28 Gary Benson <gbenson@redhat.com>
4814
4815 * linux-low.c (linux_async): Replace fatal with warning.
4816 Tidy up and return.
4817 (linux_start_non_stop): Return -1 if linux_async failed.
4818
f7160e97
GB
48192014-08-28 Gary Benson <gbenson@redhat.com>
4820
4821 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4822 gdb_assert.
4823 (i386_dr_low_get_addr): Remove vague comment.
4824 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4825 gdb_assert.
4826
38e08fca
GB
48272014-08-28 Gary Benson <gbenson@redhat.com>
4828
4829 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4830 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4831 internal_error.
4832 (linux_resume_one_lwp): Likewise.
4833 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4834 gdb_assert.
4835 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4836 with internal_error.
4837 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4838 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4839 (find_register_by_name): Replace fatal with internal_error.
4840 (find_regno): Likewise.
4841 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4842 * thread-db.c (thread_db_create_event): Likewise.
4843 (thread_db_load_search): Likewise.
4844 (try_thread_db_load_1): Likewise.
4845 * tracepoint.c (get_jump_space_head): Replace fatal with
4846 internal_error.
4847 (claim_trampoline_space): Likewise.
4848 (have_fast_tracepoint_trampoline_buffer): Likewise.
4849 (cmd_qtstart): Likewise.
4850 (stop_tracing): Likewise.
4851 (fast_tracepoint_collecting): Likewise.
4852 (target_malloc): Likewise.
4853 (download_tracepoint): Likewise.
4854 (download_trace_state_variables): Replace check with gdb_assert.
4855 (upload_fast_traceframes): Replace fatal with internal_error.
4856
34abf635
GB
48572014-08-19 Tom Tromey <tromey@redhat.com>
4858 Gary Benson <gbenson@redhat.com>
4859
4860 * Makefile.in (SFILES): Add common/common-debug.c.
4861 (OBS): Add common-debug.o.
4862 (common-debug.o): New rule.
4863 * debug.h (debug_printf): Don't declare.
4864 * debug.c (debug_printf): Renamed and rewritten as...
4865 (debug_vprintf): New function.
4866
f6e94d78
GB
48672014-08-19 Gary Benson <gbenson@redhat.com>
4868
4869 * utils.h: Do not include print-utils.h.
4870
9239eeab
GB
48712014-08-19 Tom Tromey <tromey@redhat.com>
4872 Gary Benson <gbenson@redhat.com>
4873
4874 * server.h: Add static assertion.
4875 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4876
ef87c8bb
GB
48772014-08-19 Tom Tromey <tromey@redhat.com>
4878 Gary Benson <gbenson@redhat.com>
4879
4880 * Makefile.in (SFILES): Add common/errors.c.
4881 (OBS): Add errors.o.
4882 (IPA_OBS): Add errors-ipa.o.
4883 (errors.o): New rule.
4884 (errors-ipa.o): Likewise.
4885 * utils.h (perror_with_name, error, warning): Don't declare.
4886 * utils.c (warning): Renamed and rewritten as...
4887 (vwarning): New function.
4888 (error): Renamed and rewritten as...
4889 (verror): New function.
4890 (internal_error): Renamed and rewritten as...
4891 (internal_verror): New function.
4892
bb974a24
GB
48932014-08-07 Gary Benson <gbenson@redhat.com>
4894
4895 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4896 * configure: Regenerate.
4897 * config.in: Likewise.
4898 * server.h: Do not include errno.h.
4899 * event-loop.c: Likewise.
4900 * hostio-errno.c: Likewise.
4901 * linux-low.c: Likewise.
4902 * remote-utils.c: Likewise.
4903 * spu-low.c: Likewise.
4904 * utils.c: Likewise.
4905 * gdbreplay.c: Unconditionally include errno.h.
4906
6d3d12eb
GB
49072014-08-07 Gary Benson <gbenson@redhat.com>
4908
4909 * server.h: Do not include string.h.
4910 * event-loop.c: Likewise.
4911 * linux-low.c: Likewise.
4912 * regcache.c: Likewise.
4913 * remote-utils.c: Likewise.
4914 * spu-low.c: Likewise.
4915 * utils.c: Likewise.
4916
dccbb609
GB
49172014-08-07 Gary Benson <gbenson@redhat.com>
4918
4919 * server.h: Do not include gdb_assert.h.
4920
e76df0d0
GB
49212014-08-07 Gary Benson <gbenson@redhat.com>
4922
4923 * server.h: Do not include common-utils.h.
4924
4cb9c816
GB
49252014-08-07 Gary Benson <gbenson@redhat.com>
4926
4927 * server.h: Do not include ptid.h.
4928 * notif.h: Likewise.
4929
3995eeee
GB
49302014-08-07 Gary Benson <gbenson@redhat.com>
4931
4932 * server.h: Do not include gdb_locale.h.
4933
cb9f1a9b
GB
49342014-08-07 Gary Benson <gbenson@redhat.com>
4935
4936 * server.h: Do not include gdb/signals.h.
4937 * win32-low.c: Likewise.
4938
a5fceff8
GB
49392014-08-07 Gary Benson <gbenson@redhat.com>
4940
4941 * server.h: Do not include pathmax.h.
4942
b9391142
GB
49432014-08-07 Gary Benson <gbenson@redhat.com>
4944
4945 * server.h: Do not include libiberty.h.
4946 * linux-bfin-low.c: Likewise.
4947
0e443c87
GB
49482014-08-07 Gary Benson <gbenson@redhat.com>
4949
4950 * server.h: Do not include ansidecl.h.
4951
8ebb3f56
GB
49522014-08-07 Gary Benson <gbenson@redhat.com>
4953
4954 * linux-x86-low.c: Do not include stddef.h.
4955 * lynx-ppc-low.c: Likewise.
4956 * tracepoint.c: Likewise.
4957
8980bdf6
GB
49582014-08-07 Gary Benson <gbenson@redhat.com>
4959
4960 * server.h: Do not include stdarg.h.
4961 * nto-low.c: Likewise.
4962
d7096f71
GB
49632014-08-07 Gary Benson <gbenson@redhat.com>
4964
4965 * server.h: Do not include stdlib.h.
4966 * inferiors.c: Likewise.
4967 * linux-low.c: Likewise.
4968 * regcache.c: Likewise.
4969 * spu-low.c: Likewise.
4970 * tracepoint.c: Likewise.
4971 * utils.c: Likewise.
4972
d02f550d
GB
49732014-08-07 Gary Benson <gbenson@redhat.com>
4974
4975 * server.h: Do not include stdio.h.
4976 * linux-low.c: Likewise.
4977 * remote-utils.c: Likewise.
4978 * spu-low.c: Likewise.
4979 * utils.c: Likewise.
4980 * wincecompat.c: Likewise.
4981
87f6c4e3
GB
49822014-08-06 Gary Benson <gbenson@redhat.com>
4983
4984 * regcache.c (init_register_cache): Move conditionals inside if.
4985
7089dca4
GB
49862014-08-06 Gary Benson <gbenson@redhat.com>
4987
4988 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4989
462f517e
GB
49902014-07-31 Gary Benson <gbenson@redhat.com>
4991
4992 * ax.h: Do not include server.h.
4993 * gdbthread.h: Likewise.
4994 * lynx-low.h: Likewise.
4995 * notif.h: Likewise.
4996
976411d6
GB
49972014-07-30 Gary Benson <gbenson@redhat.com>
4998
4999 * server.h: Include common-defs.h.
5000 Do not include config.h or build-gnulib-gdbserver/config.h.
5001
d41f6d8e
GB
50022014-07-30 Gary Benson <gbenson@redhat.com>
5003
5004 * hostio-errno.c: Move server.h to top of includes list.
5005 * inferiors.c: Likewise.
5006 * linux-x86-low.c: Likewise.
5007 * notif.c: Include server.h.
5008
314c6a35
TT
50092014-07-24 Tom Tromey <tromey@redhat.com>
5010 Gary Benson <gbenson@redhat.com>
5011
5012 * server.h (CORE_ADDR): Now unsigned.
5013
69ff6be5
PA
50142014-07-16 Pedro Alves <palves@redhat.com>
5015
5016 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5017
ce9e3fe7
PA
50182014-07-15 Pedro Alves <palves@redhat.com>
5019
5020 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5021 copy.
5022
e76126e8
PA
50232014-07-11 Pedro Alves <palves@redhat.com>
5024
5025 * linux-low.c (kill_wait_lwp): New function, based on
5026 kill_one_lwp_callback, but use my_waitpid directly.
5027 (kill_one_lwp_callback, linux_kill): Use it.
5028
8e9db26e
PA
50292014-06-23 Pedro Alves <palves@redhat.com>
5030
5031 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5032 before setting DR0..DR3.
5033
698b3e08
GB
50342014-06-20 Gary Benson <gbenson@redhat.com>
5035
5036 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5037 * configure: Regenerated.
5038 * config.in: Likewise.
5039
125f8a3d
GB
50402014-06-20 Gary Benson <gbenson@redhat.com>
5041
5042 * Makefile.in (SFILES): Update locations for files moved
5043 from common to nat.
5044 (object file files): Reordered.
5045
42995dbd
GB
50462014-06-20 Gary Benson <gbenson@redhat.com>
5047
5048 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5049 (i386_dr_low_set_addr): Likewise.
5050 (i386_dr_low_get_addr): Likewise.
5051 (i386_dr_low_can_set_control): Likewise.
5052 (i386_dr_low_set_control): Likewise.
5053 (i386_dr_low_get_control): Likewise.
5054 (i386_dr_low_get_status): Likewise.
5055 (i386_get_debug_register_length): Likewise.
5056 * linux-x86-low.c (i386_dr_low_set_addr):
5057 Changed signature. Made static.
5058 (i386_dr_low_get_addr): Likewise.
5059 (i386_dr_low_set_control): Likewise.
5060 (i386_dr_low_get_control): Likewise.
5061 (i386_dr_low_get_status): Likewise.
5062 (i386_dr_low): New global variable.
5063 * win32-i386-low.c (i386_dr_low_set_addr):
5064 Changed signature. Made static.
5065 (i386_dr_low_get_addr): Likewise.
5066 (i386_dr_low_set_control): Likewise.
5067 (i386_dr_low_get_control): Likewise.
5068 (i386_dr_low_get_status): Likewise.
5069 (i386_dr_low): New global variable.
5070
e1d2394b
MS
50712014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5072
5073 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5074 * Makefile.in (AR, AR_FLAGS): Define.
5075 * configure: Regenerate.
5076
3a8ee006
GB
50772014-06-19 Gary Benson <gbenson@redhat.com>
5078
5079 * Makefile.in (i386-dregs.o): New rule.
5080 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5081 * i386-low.c (target.h): Remove include.
5082 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5083 (DR_CONTROL_SHIFT): Likewise.
5084 (DR_CONTROL_SIZE): Likewise.
5085 (DR_RW_EXECUTE): Likewise.
5086 (DR_RW_WRITE): Likewise.
5087 (DR_RW_READ): Likewise.
5088 (DR_RW_IORW): Likewise.
5089 (DR_LEN_1): Likewise.
5090 (DR_LEN_2): Likewise.
5091 (DR_LEN_4): Likewise.
5092 (DR_LEN_8): Likewise.
5093 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5094 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5095 (DR_ENABLE_SIZE): Likewise.
5096 (DR_LOCAL_SLOWDOWN): Likewise.
5097 (DR_GLOBAL_SLOWDOWN): Likewise.
5098 (DR_CONTROL_RESERVED): Likewise.
5099 (I386_DR_CONTROL_MASK): Likewise.
5100 (I386_DR_VACANT): Likewise.
5101 (I386_DR_LOCAL_ENABLE): Likewise.
5102 (I386_DR_GLOBAL_ENABLE): Likewise.
5103 (I386_DR_DISABLE): Likewise.
5104 (I386_DR_SET_RW_LEN): Likewise.
5105 (I386_DR_GET_RW_LEN): Likewise.
5106 (I386_DR_WATCH_HIT): Likewise.
5107 (i386_wp_op_t): Likewise.
5108 (i386_show_dr): Likewise.
5109 (i386_length_and_rw_bits): Likewise.
5110 (i386_insert_aligned_watchpoint): Likewise.
5111 (i386_remove_aligned_watchpoint): Likewise.
5112 (i386_handle_nonaligned_watchpoint): Likewise.
5113 i386_update_inferior_debug_regs(): Likewise.
5114 (i386_dr_insert_watchpoint): Likewise.
5115 (i386_dr_remove_watchpoint): Likewise.
5116 (i386_dr_region_ok_for_watchpoint): Likewise.
5117 (i386_dr_stopped_data_address): Likewise.
5118 (i386_dr_stopped_by_watchpoint): Likewise.
5119
8f26655c
GB
51202014-06-19 Gary Benson <gbenson@redhat.com>
5121
5122 * i386-low.c (i386_dr_show): Renamed to
5123 i386_show_dr and made static. All uses updated.
5124 (i386_dr_length_and_rw_bits): Renamed to
5125 i386_length_and_rw_bits and made static.
5126 All uses updated.
5127 (i386_dr_insert_aligned_watchpoint): Renamed to
5128 i386_insert_aligned_watchpoint and made static.
5129 All uses updated.
5130 (i386_dr_remove_aligned_watchpoint): Renamed to
5131 i386_remove_aligned_watchpoint and made static.
5132 All uses updated.
5133 (i386_dr_update_inferior_debug_regs): Renamed to
5134 i386_update_inferior_debug_regs and made static.
5135 All uses updated.
5136
b9228891
GB
51372014-06-18 Gary Benson <gbenson@redhat.com>
5138
5171def3
GB
5139 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5140 (i386_dr_low_can_set_control): Likewise.
5141 (i386_get_debug_register_length): Likewise.
5142 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5143 (i386_dr_low_can_set_control): Likewise.
5144 (i386_get_debug_register_length): Likewise.
5145
51462014-06-17 Gary Benson <gbenson@redhat.com>
5147
b9228891
GB
5148 * i386-low.h (i386-dregs.h): New include.
5149 (DR_FIRSTADDR): Now in i386-dregs.h.
5150 (DR_LASTADDR): Likewise.
5151 (DR_NADDR): Likewise.
5152 (DR_STATUS): Likewise.
5153 (DR_CONTROL): Likewise.
5154 (i386_debug_reg_state): Likewise.
5155 (i386_dr_insert_watchpoint): Likewise.
5156 (i386_dr_remove_watchpoint): Likewise.
5157 (i386_dr_region_ok_for_watchpoint): Likewise.
5158 (i386_dr_stopped_data_address): Likewise.
5159 (i386_dr_stopped_by_watchpoint): Likewise.
5160 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5161
4be83cc2
GB
51622014-06-18 Gary Benson <gbenson@redhat.com>
5163
5164 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5165 i386_dr_insert_watchpoint.
5166 (i386_low_remove_watchpoint): Renamed to
5167 i386_dr_remove_watchpoint.
5168 (i386_low_region_ok_for_watchpoint): Renamed to
5169 i386_dr_region_ok_for_watchpoint.
5170 (i386_low_stopped_data_address): Renamed to
5171 i386_dr_stopped_data_address.
5172 (i386_low_stopped_by_watchpoint): Renamed to
5173 i386_dr_stopped_by_watchpoint.
5174 * i386-low.c (i386_show_dr): Renamed to
5175 i386_dr_show and made nonstatic. All uses updated.
5176 (i386_length_and_rw_bits): Renamed to
5177 i386_dr_length_and_rw_bits and made nonstatic.
5178 All uses updated.
5179 (i386_insert_aligned_watchpoint): Renamed to
5180 i386_dr_insert_aligned_watchpoint and made nonstatic.
5181 All uses updated.
5182 (i386_remove_aligned_watchpoint): Renamed to
5183 i386_dr_remove_aligned_watchpoint and made nonstatic.
5184 All uses updated.
5185 (i386_update_inferior_debug_regs): Renamed to
5186 i386_dr_update_inferior_debug_regs and made nonstatic.
5187 All uses updated.
5188 (i386_low_insert_watchpoint): Renamed to
5189 i386_dr_insert_watchpoint. All uses updated.
5190 (i386_low_remove_watchpoint): Renamed to
5191 i386_dr_remove_watchpoint. All uses updated.
5192 (i386_low_region_ok_for_watchpoint): Renamed to
5193 i386_dr_region_ok_for_watchpoint. All uses updated.
5194 (i386_low_stopped_data_address): Renamed to
5195 i386_dr_stopped_data_address. All uses updated.
5196 (i386_low_stopped_by_watchpoint): Renamed to
5197 i386_dr_stopped_by_watchpoint. All uses updated.
5198
131aa0d4
GB
51992014-06-18 Gary Benson <gbenson@redhat.com>
5200
5201 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5202 (i386_dr_low_can_set_control): Likewise.
5203 (i386_insert_aligned_watchpoint): New check.
5204
d9305f7f
GB
52052014-06-18 Gary Benson <gbenson@redhat.com>
5206
5207 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5208 Renamed to state.
5209
e927c9fc
GB
52102014-06-18 Gary Benson <gbenson@redhat.com>
5211
5212 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5213 instead of fatal and error.
5214 (i386_handle_nonaligned_watchpoint): Likewise.
5215
1b6d4134
GB
52162014-06-18 Gary Benson <gbenson@redhat.com>
5217
5218 * i386-low.c (i386_get_debug_register_length): New macro.
5219 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5220 (i386_show_dr): Use debug_printf instead of fprintf. Use
5221 phex to format values.
5222
6e62758f
GB
52232014-06-18 Gary Benson <gbenson@redhat.com>
5224
5225 * i386-low.h: Comment changes.
5226 * i386-low.c: Likewise.
5227
fc6e2f03
GB
52282014-06-18 Gary Benson <gbenson@redhat.com>
5229
5230 * i386-low.c: Whitespace changes.
5231
f9d1eeed
TT
52322014-06-12 Tom Tromey <tromey@redhat.com>
5233
5234 * utils.c (freeargv): Remove.
5235
0b04e523
TT
52362014-06-12 Tom Tromey <tromey@redhat.com>
5237
5238 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5239 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5240 (parse_debug_format_options): Likewise.
5241 (gdbserver_usage): Likewise.
5242 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5243 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5244 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5245 against libiberty.
5246 ($(LIBGNU)): Depend on libiberty.
5247 (all-lib): Recurse into all subdirs.
5248 (install-only): Invoke "install" target in subdirs.
5249 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5250 targets.
5251 * configure: Rebuild.
5252 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5253 for vasprintf, vsnprintf, or gettimeofday.
5254 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5255 srv_tgtobj.
5256
270c9937
JB
52572014-06-05 Joel Brobecker <brobecker@adacore.com>
5258
5259 * development.sh: Delete.
5260 * Makefile.in (config.status): Adjust dependency on development.sh.
5261 * configure.ac: Adjust development.sh source call.
5262 * configure: Regenerate.
5263
0a261ed8
PA
52642014-06-02 Pedro Alves <palves@redhat.com>
5265
5266 * ax.c (gdb_free_agent_expr): New function.
5267 * ax.h (gdb_free_agent_expr): New declaration.
5268 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5269 list.
5270 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5271 static.
5272 (clear_breakpoint_conditions_and_commands): New function.
5273 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5274 (clear_breakpoint_conditions_and_commands): New declaration.
5275
e9dae05e
RR
52762014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5277
5278 * linux-aarch64-low.c (asm/ptrace.h): Include.
5279
5876f503
JK
52802014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5281
5282 Fix TLS access for -static -pthread.
5283 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5284 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5285 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5286
802e8e6d
PA
52872014-05-20 Pedro Alves <palves@redhat.com>
5288
5289 * linux-aarch64-low.c (aarch64_insert_point)
5290 (aarch64_remove_point): No longer check whether the type is
5291 supported here. Adjust to new interface.
5292 (the_low_target): Install aarch64_supports_z_point_type as
5293 supports_z_point_type method.
5294 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5295 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5296 instead of a Z packet char. Adjust.
5297 (arm_supports_z_point_type): New function.
5298 (arm_insert_point, arm_remove_point): Adjust to new interface.
5299 (the_low_target): Install arm_supports_z_point_type.
5300 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5301 (cris_insert_point, cris_remove_point): Adjust to new interface.
5302 Don't check whether the type is supported here.
5303 (the_low_target): Install cris_supports_z_point_type.
5304 * linux-low.c (linux_supports_z_point_type): New function.
5305 (linux_insert_point, linux_remove_point): Adjust to new interface.
5306 * linux-low.h (struct linux_target_ops) <insert_point,
5307 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5308 raw_breakpoint pointer parameter.
5309 <supports_z_point_type>: New method.
5310 * linux-mips-low.c (mips_supports_z_point_type): New function.
5311 (mips_insert_point, mips_remove_point): Adjust to new interface.
5312 Use mips_supports_z_point_type.
5313 (the_low_target): Install mips_supports_z_point_type.
5314 * linux-ppc-low.c (the_low_target): Install NULL as
5315 supports_z_point_type method.
5316 * linux-s390-low.c (the_low_target): Install NULL as
5317 supports_z_point_type method.
5318 * linux-sparc-low.c (the_low_target): Install NULL as
5319 supports_z_point_type method.
5320 * linux-x86-low.c (x86_supports_z_point_type): New function.
5321 (x86_insert_point): Adjust to new insert_point interface. Use
5322 insert_memory_breakpoint. Adjust to new
5323 i386_low_insert_watchpoint interface.
5324 (x86_remove_point): Adjust to remove_point interface. Use
5325 remove_memory_breakpoint. Adjust to new
5326 i386_low_remove_watchpoint interface.
5327 (the_low_target): Install x86_supports_z_point_type.
5328 * lynx-low.c (lynx_target_ops): Install NULL as
5329 supports_z_point_type callback.
5330 * nto-low.c (nto_supports_z_point_type): New.
5331 (nto_insert_point, nto_remove_point): Adjust to new interface.
5332 (nto_target_ops): Install nto_supports_z_point_type.
5333 * mem-break.c: Adjust intro comment.
5334 (struct raw_breakpoint) <raw_type, size>: New fields.
5335 <inserted>: Update comment.
5336 <shlib_disabled>: Delete field.
5337 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5338 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5339 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5340 (raw_bkpt_type_to_target_hw_bp_type): New function.
5341 (find_enabled_raw_code_breakpoint_at): New function.
5342 (find_raw_breakpoint_at): New type and size parameters. Use them.
5343 (insert_memory_breakpoint): New function, based off
5344 set_raw_breakpoint_at.
5345 (remove_memory_breakpoint): New function.
5346 (set_raw_breakpoint_at): Reimplement.
5347 (set_breakpoint): New, based on set_breakpoint_at.
5348 (set_breakpoint_at): Reimplement.
5349 (delete_raw_breakpoint): Go through the_target->remove_point
5350 instead of assuming memory breakpoints.
5351 (find_gdb_breakpoint_at): Delete.
5352 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5353 (find_gdb_breakpoint): New function.
5354 (set_gdb_breakpoint_at): Delete.
5355 (z_type_supported): New function.
5356 (set_gdb_breakpoint_1): New function, loosely based off
5357 set_gdb_breakpoint_at.
5358 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5359 (delete_gdb_breakpoint_at): Delete.
5360 (delete_gdb_breakpoint_1): New function, loosely based off
5361 delete_gdb_breakpoint_at.
5362 (delete_gdb_breakpoint): New function.
5363 (clear_gdb_breakpoint_conditions): Rename to ...
5364 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5365 breakpoint.
5366 (add_condition_to_breakpoint): Make static.
5367 (add_breakpoint_condition): Take a struct breakpoint pointer
5368 instead of an address. Adjust.
5369 (gdb_condition_true_at_breakpoint): Rename to ...
5370 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5371 z_type parameter.
5372 (gdb_condition_true_at_breakpoint): Reimplement.
5373 (add_breakpoint_commands): Take a struct breakpoint pointer
5374 instead of an address. Adjust.
5375 (gdb_no_commands_at_breakpoint): Rename to ...
5376 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5377 parameter. Return true if no breakpoint was found. Change debug
5378 output.
5379 (gdb_no_commands_at_breakpoint): Reimplement.
5380 (run_breakpoint_commands): Rename to ...
5381 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5382 and change return type to boolean.
5383 (run_breakpoint_commands): New function.
5384 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5385 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5386 breakpoint. Go through the_target->remove_point instead of
5387 assuming memory breakpoint.
5388 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5389 software and hardware breakpoints.
5390 (reinsert_raw_breakpoint): Go through the_target->insert_point
5391 instead of assuming memory breakpoint.
5392 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5393 software and hardware breakpoints.
5394 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5395 Check both software and hardware breakpoints.
5396 (validate_inserted_breakpoint): Assert the breakpoint is a
5397 software breakpoint. Set the inserted flag to -1 instead of
5398 setting shlib_disabled.
5399 (delete_disabled_breakpoints): Adjust.
5400 (validate_breakpoints): Only validate software breakpoints.
5401 Adjust to inserted flag change.
5402 (check_mem_read, check_mem_write): Skip breakpoint types other
5403 than software breakpoints. Adjust to inserted flag change.
5404 * mem-break.h (enum raw_bkpt_type): New enum.
5405 (raw_breakpoint, struct process_info): Forward declare.
5406 (Z_packet_to_target_hw_bp_type): Delete declaration.
5407 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5408 (set_gdb_breakpoint, delete_gdb_breakpoint)
5409 (clear_breakpoint_conditions): New declarations.
5410 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5411 (breakpoint_inserted_here): Update comment.
5412 (add_breakpoint_condition, add_breakpoint_commands): Replace
5413 address parameter with a breakpoint pointer parameter.
5414 (gdb_breakpoint_here): Update comment.
5415 (delete_gdb_breakpoint_at): Delete.
5416 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5417 * server.c (process_point_options): Take a struct breakpoint
5418 pointer instead of an address. Adjust.
5419 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5420 delete_gdb_breakpoint.
5421 * spu-low.c (spu_target_ops): Install NULL as
5422 supports_z_point_type method.
5423 * target.h: Include mem-break.h.
5424 (struct target_ops) <prepare_to_access_memory>: Update comment.
5425 <supports_z_point_type>: New field.
5426 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5427 instead of a char. Also take a raw breakpoint pointer.
5428 * win32-arm-low.c (the_low_target): Install NULL as
5429 supports_z_point_type.
5430 * win32-i386-low.c (i386_supports_z_point_type): New function.
5431 (i386_insert_point, i386_remove_point): Adjust to new interface.
5432 (the_low_target): Install i386_supports_z_point_type.
5433 * win32-low.c (win32_supports_z_point_type): New function.
5434 (win32_insert_point, win32_remove_point): Adjust to new interface.
5435 (win32_target_ops): Install win32_supports_z_point_type.
5436 * win32-low.h (struct win32_target_ops):
5437 <supports_z_point_type>: New method.
5438 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5439 instead of a char. Also take a raw breakpoint pointer.
5440
932539e3
PA
54412014-05-20 Pedro Alves <palves@redhat.com>
5442
5443 * mem-break.h: Include break-common.h.
5444 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5445 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5446 (Z_packet_to_target_hw_bp_type): New declaration.
5447 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5448 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5449 (Z_PACKET_ACCESS_WP): Delete macros.
5450 (Z_packet_to_hw_type): Delete function.
5451 * i386-low.h: Don't include break-common.h here.
5452 (Z_packet_to_hw_type): Delete declaration.
5453 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5454 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5455 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5456 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5457 * linux-aarch64-low.c: Don't include break-common.h here.
5458 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5459 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5460 (Z_packet_to_target_hw_bp_type): Delete function.
5461 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5462 function.
5463 (mips_insert_point, mips_remove_point): Use
5464 Z_packet_to_target_hw_bp_type.
5465
4ff0d3d8
PA
54662014-05-20 Pedro Alves <palves@redhat.com>
5467
5468 * linux-aarch64-low.c: Include break-common.h.
5469 (enum target_point_type): Delete.
5470 (Z_packet_to_point_type): Rename to ...
5471 (Z_packet_to_target_hw_bp_type): ... this, and return a
5472 target_hw_bp_type instead.
5473 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5474 instead of an enum target_point_type.
5475 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5476 breakpoint type.
5477 (aarch64_dr_state_insert_one_point)
5478 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5479 (aarch64_handle_aligned_watchpoint)
5480 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5481 Take an enum target_hw_bp_type instead of an enum
5482 target_point_type.
5483 (aarch64_supports_z_point_type): New function.
5484 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5485 use Z_packet_to_target_hw_bp_type.
5486
786dc519
JB
54872014-05-20 Joel Brobecker <brobecker@adacore.com>
5488
5489 * configure.ac: Only use -Werror by default when DEVELOPMENT
5490 is true.
5491 * configure: Regenerate.
5492
9e0aa64f
JK
54932014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5494
5495 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5496 * linux-x86-low.c (X86_64_USER_REGS): New.
5497 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5498
2b577b92
YQ
54992014-04-28 Yao Qi <yao@codesourcery.com>
5500
5501 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5502 name.
5503
94611da2
PA
55042014-04-25 Pedro Alves <palves@redhat.com>
5505
5506 PR server/16255
5507 * linux-low.c (linux_attach_fail_reason_string): New function.
5508 (linux_attach_lwp): Delete.
5509 (linux_attach_lwp_1): Rename to ...
5510 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5511 argument. Remove "initial" parameter. Return int instead of
5512 void. Don't error or warn here.
5513 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5514 failure to attach to the tgid. Call warning when failing to
5515 attach to an lwp.
5516 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5517 argument. Remove "initial" parameter. Return int instead of
5518 void. Don't error or warn here.
5519 (linux_attach_fail_reason_string): New declaration.
5520 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5521 interface change. Use linux_attach_fail_reason_string.
5522
01f9f808
MS
55232014-04-24 Michael Sturm <michael.sturm@mintel.com>
5524 Walfred Tedeschi <walfred.tedeschi@intel.com>
5525
5526 * Makefile.in: Added rules to handle new files
5527 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5528 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5529 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5530 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5531 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5532 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5533 x32-avx512-linux.o.
5534 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5535 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5536 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5537 i386/x32-avx512.xml.
5538 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5539 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5540 i386/x32-avx512-linux.xml.
5541 * i387-fp.c (num_avx512_k_registers): New constant for number
5542 of K registers.
5543 (num_avx512_zmmh_low_registers): New constant for number of
5544 lower ZMM registers (0-15).
5545 (num_avx512_zmmh_high_registers): New constant for number of
5546 higher ZMM registers (16-31).
5547 (num_avx512_ymmh_registers): New contant for number of higher
5548 YMM registers (ymm16-31 added by avx521 on x86_64).
5549 (num_avx512_xmm_registers): New constant for number of higher
5550 XMM registers (xmm16-31 added by AVX512 on x86_64).
5551 (struct i387_xsave): Add space for AVX512 registers.
5552 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5553 Add code to handle AVX512 registers.
5554 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5555 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5556 prototypei from generated file.
5557 (tdesc_amd64_avx512_linux): Likewise.
5558 (init_registers_x32_avx512_linux): Likewise.
5559 (tdesc_x32_avx512_linux): Likewise.
5560 (init_registers_i386_avx512_linux): Likewise.
5561 (tdesc_i386_avx512_linux): Likewise.
5562 (x86_64_regmap): Add AVX512 registers.
5563 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5564 mask.
5565 (initialize_low_arch): Add code to initialize AVX512 registers.
5566
51aa91f9
PA
55672014-04-23 Pedro Alves <palves@redhat.com>
5568
5569 * mem-break.c (find_gdb_breakpoint_at): Make static.
5570 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5571
a4165e94
PA
55722014-04-23 Pedro Alves <palves@redhat.com>
5573
5574 * i386-low.c: Don't include break-common.h here.
5575 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5576 prototype to take target_hw_bp_type as argument instead of a Z
5577 packet char.
5578 * i386-low.h: Include break-common.h here.
5579 (Z_packet_to_hw_type): Declare.
5580 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5581 prototypes.
5582 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5583 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5584 (x86_remove_point): Convert the packet number to a
5585 target_hw_bp_type before calling i386_low_remove_watchpoint.
5586 * win32-i386-low.c (i386_insert_point): Convert the packet number
5587 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5588 (i386_remove_point): Convert the packet number to a
5589 target_hw_bp_type before calling i386_low_remove_watchpoint.
5590
b8acf843
PA
55912014-04-23 Pedro Alves <palves@redhat.com>
5592
5593 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5594
d708bcd1
PA
55952014-04-10 Pedro Alves <palves@redhat.com>
5596
5597 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5598 Check if the condition or command is NULL before checking if the
5599 breakpoint is known. On success, return true.
5600 * mem-break.h (add_breakpoint_condition): Document return.
5601 (add_breakpoint_commands): Add describing comment.
5602 * server.c (skip_to_semicolon): New function.
5603 (process_point_options): Use it.
5604
2eec7d5b
PA
56052014-04-09 Pedro Alves <palves@redhat.com>
5606
5607 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5608 to lwpid_of.
5609
fa96cb38
PA
56102014-02-27 Pedro Alves <palves@redhat.com>
5611
5612 PR 12702
5613 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5614 macros.
5615 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5616 output.
5617 (last_thread_of_process_p): Take a PID argument instead of a
5618 thread pointer.
5619 (linux_wait_for_lwp): Delete.
5620 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5621 functions.
5622 (linux_low_filter_event): New function, party factored out from
5623 linux_wait_for_event.
5624 (linux_wait_for_event): Rename to ...
5625 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5626 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5627 sigsuspend. Check for zombie leaders.
5628 (linux_wait_for_event): Reimplement as wrapper around
5629 linux_wait_for_event_filtered.
5630 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5631 a normal or signal exit is seen, it's the whole process exiting.
5632 (wait_for_sigstop): No longer a for_each_inferior callback.
5633 Rewrite on top of linux_wait_for_event_filtered.
5634 (stop_all_lwps): Call wait_for_sigstop directly.
5635 * server.c (resume, handle_target_event): Handle
5636 TARGET_WAITKIND_NO_RESUMED.
5637
d763de10
JB
56382014-02-26 Joel Brobecker <brobecker@adacore.com>
5639
5640 * win32-low.c (psapi_get_dll_name,
5641 * win32_CreateToolhelp32Snapshot): Delete.
5642 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5643 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5644 Delete.
5645 (handle_load_dll): Add function description.
5646 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5647
850a0f76
JB
56482014-02-26 Joel Brobecker <brobecker@adacore.com>
5649
5650 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5651 Add comment.
5652 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5653 base address when calling win32_add_one_solib.
5654 (handle_load_dll): Delete local variable load_addr.
5655 Remove 0x1000 offset applied to DLL base address when calling
5656 win32_add_one_solib.
5657 (handle_unload_dll): Add comment.
5658
f25b3fc3
JB
56592014-02-26 Joel Brobecker <brobecker@adacore.com>
5660
5661 * win32-low.c (win32_add_all_dlls): Renames
5662 win32_ensure_ntdll_loaded. Rewrite function documentation.
5663 Adjust implementation to always load all DLLs.
5664 Add 0x1000 offset to DLL base address when calling
5665 win32_add_one_solib.
5666 (child_initialization_done): New static global.
5667 (do_initial_child_stuff): Set child_initialization_done to
5668 zero during child initialization, and 1 after. Replace call
5669 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5670 Add comment.
5671 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5672 (handle_unload_dll): Add function documentation.
5673 (get_child_debug_event): Ignore load and unload DLL events
5674 during child initialization.
5675
d86d4aaf
DE
56762014-02-20 Doug Evans <dje@google.com>
5677
3bc32da3 5678 Remove global all_lwps.
d86d4aaf
DE
5679 * inferiors.h (ptid_of): Move here from linux-low.h.
5680 (pid_of, lwpid_of): Ditto.
5681 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5682 parameter is a struct thread_info * now.
5683 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5684 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5685 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5686 directly.
5687 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5688 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5689 * linux-arm-low.c (update_registers_callback): Update, "entry"
5690 parameter is a struct thread_info * now.
5691 Fetch lwpid from current_inferior directly.
5692 (arm_insert_point): Pass &all_threads to find_inferior instead of
5693 &all_lwps.
5694 (arm_remove_point): Ditto.
5695 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5696 (arm_prepare_to_resume): Fetch pid from thread.
5697 (arm_read_description): Fetch lwpid from current_inferior directly.
5698 * linux-low.c (all_lwps): Delete.
5699 (delete_lwp): Delete call to remove_inferior.
5700 (handle_extended_wait): Fetch lwpid from thread.
5701 (add_lwp): Don't set lwp->entry.id. Remove call to
5702 add_inferior_to_list.
5703 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5704 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5705 (kill_one_lwp_callback): Ditto.
5706 (linux_kill): Don't dereference NULL pointer.
5707 Fetch ptid,lwpid from thread.
5708 (get_detach_signal): Fetch ptid from thread.
5709 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5710 Simplify call to regcache_invalidate_thread.
5711 (delete_lwp_callback): Update, "entry" parameter is a
5712 struct thread_info * now. Fetch pid from thread.
5713 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5714 (status_pending_p_callback): Update, "entry" parameter is a
5715 struct thread_info * now. Fetch ptid from thread.
5716 (find_lwp_pid): Update, "entry" parameter is a
5717 struct thread_info * now.
5718 (linux_wait_for_lwp): Fetch pid from thread.
5719 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5720 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5721 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5722 (dequeue_one_deferred_signal): Ditto.
5723 (cancel_breakpoint): Fetch ptid from current_inferior.
5724 (linux_wait_for_event): Pass &all_threads to find_inferior,
5725 not &all_lwps. Fetch ptid, lwpid from thread.
5726 (count_events_callback): Update, "entry" parameter is a
5727 struct thread_info * now.
5728 (select_singlestep_lwp_callback): Ditto.
5729 (select_event_lwp_callback): Ditto.
5730 (cancel_breakpoints_callback): Ditto.
5731 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5732 not &all_lwps.
5733 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5734 (unsuspend_one_lwp): Update, "entry" parameter is a
5735 struct thread_info * now.
5736 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5737 not &all_lwps.
5738 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5739 Fetch lwpid from thread, not lwp.
5740 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5741 Pass &all_threads to find_inferior, not &all_lwps.
5742 (send_sigstop): Fetch lwpid from thread, not lwp.
5743 (send_sigstop_callback): Update, "entry" parameter is a
5744 struct thread_info * now.
5745 (suspend_and_send_sigstop_callback): Ditto.
5746 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5747 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5748 struct thread_info * now.
5749 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5750 from thread, lwp.
5751 (lwp_running): Update, "entry" parameter is a
5752 struct thread_info * now.
5753 (stop_all_lwps): Fetch ptid from thread.
5754 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5755 (linux_resume_one_lwp): Fetch lwpid from thread.
5756 (linux_set_resume_request): Update, "entry" parameter is a
5757 struct thread_info * now. Fetch pid, lwpid from thread.
5758 (resume_status_pending_p): Update, "entry" parameter is a
5759 struct thread_info * now.
5760 (need_step_over_p): Ditto. Fetch lwpid from thread.
5761 (start_step_over): Fetch lwpid from thread.
5762 (linux_resume_one_thread): Update, "entry" parameter is a
5763 struct thread_info * now. Fetch lwpid from thread.
5764 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5765 (proceed_one_lwp): Update, "entry" parameter is a
5766 struct thread_info * now. Fetch lwpid from thread.
5767 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5768 struct thread_info * now.
5769 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5770 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5771 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5772 directly.
5773 (regsets_store_inferior_registers): Ditto.
5774 (fetch_register, store_register): Ditto.
5775 (linux_read_memory, linux_write_memory): Ditto.
5776 (linux_request_interrupt): Ditto.
5777 (linux_read_auxv): Ditto.
5778 (linux_xfer_siginfo): Ditto.
5779 (linux_qxfer_spu): Ditto.
5780 (linux_qxfer_libraries_svr4): Ditto.
5781 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5782 moved to inferiors.h.
5783 (get_lwp): Delete.
5784 (get_thread_lwp): Update.
5785 (struct lwp_info): Delete member "entry". Simplify comment for
5786 member "thread".
5787 (all_lwps): Delete.
5788 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5789 current_inferior directly.
5790 (update_watch_registers_callback): Update, "entry" parameter is a
5791 struct thread_info * now. Fetch pid from thread.
5792 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5793 (mips_insert_point): Fetch lwpid from current_inferior.
5794 Pass &all_threads to find_inferior, not &all_lwps.
5795 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5796 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5797 directly.
5798 (mips_stopped_data_address): Ditto.
5799 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5800 directly.
5801 * linux-tile-low.c (tile_arch_setup): Ditto.
5802 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5803 (update_debug_registers_callback): Update, "entry" parameter is a
5804 struct thread_info * now. Fetch pid from thread.
5805 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5806 Pass &all_threads to find_inferior, not &all_lwps.
5807 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5808 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5809 Pass &all_threads to find_inferior, not &all_lwps.
5810 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5811 (i386_dr_low_get_status): Ditto.
5812 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5813 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5814 (x86_linux_read_description): Ditto.
5815 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5816
3b8361aa
DE
58172014-02-20 Doug Evans <dje@google.com>
5818
5819 * inferiors.c (get_first_inferior): Fix buglet.
5820
f7667f0d
DE
58212014-02-19 Doug Evans <dje@google.com>
5822
5823 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5824 * inferiors.c (add_thread): Change result type to struct thread_info *.
5825 All callers updated.
5826 (add_lwp): Call add_thread here instead of in callers.
5827 All callers updated.
5828 * linux-low.h (get_lwp_thread): Rewrite.
5829 (struct lwp_info): New member "thread".
5830
b3312d80
DE
58312014-02-19 Doug Evans <dje@google.com>
5832
5833 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5834 All callers updated.
5835
ecc6f45c
DE
58362014-02-19 Doug Evans <dje@google.com>
5837
5838 * inferiors.c (add_thread): Fix whitespace.
5839
649ebbca
DE
58402014-02-19 Doug Evans <dje@google.com>
5841
5842 * dll.c (clear_dlls): Replace accessing list implemention details
5843 with API function.
5844 * gdbthread.h (get_first_thread): Declare.
5845 * inferiors.c (for_each_inferior_with_data): New function.
5846 (get_first_thread): New function.
5847 (find_thread_ptid): Simplify.
5848 (get_first_inferior): New function.
5849 (clear_list): Delete.
5850 (one_inferior_p): New function.
5851 (clear_inferior_list): New function.
5852 (clear_inferiors): Update.
5853 * inferiors.h (for_each_inferior_with_data): Declare.
5854 (clear_inferior_list): Declare.
5855 (one_inferior_p): Declare.
5856 (get_first_inferior): Declare.
5857 * linux-low.c (linux_wait_for_event): Replace accessing list
5858 implemention details with API function.
5859 * server.c (target_running): Ditto.
5860 (accumulate_file_name_length): New function.
5861 (emit_dll_description): New function.
5862 (handle_qxfer_libraries): Replace accessing list implemention
5863 details with API function.
5864 (handle_qxfer_threads_worker): New function.
5865 (handle_qxfer_threads_proper): Replace accessing list implemention
5866 details with API function.
5867 (handle_query): Ditto.
5868 (visit_actioned_threads_callback_ftype): New typedef.
5869 (visit_actioned_threads_data): New struct.
5870 (visit_actioned_threads): Rewrite to be find_inferior callback.
5871 (resume): Call find_inferior.
5872 (handle_status): Replace accessing list implemention
5873 details with API function.
5874 (process_serial_event): Replace accessing list implemention details
5875 with API function.
5876 * target.c (set_desired_inferior): Replace accessing list implemention
5877 details with API function.
5878 * tracepoint.c (same_process_p): New function.
5879 (gdb_agent_about_to_close): Replace accessing list implemention
5880 details with API function.
5881 * win32-low.c (child_delete_thread): Replace accessing list
5882 implemention details with API function.
5883 (match_dll_by_basename): New function.
5884 (dll_is_loaded_by_basename): New function.
5885 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5886 details call to dll_is_loaded_by_basename.
5887
80894984
DE
58882014-02-19 Doug Evans <dje@google.com>
5889
5890 * dll.h (struct dll_info): Add comment.
5891 * gdbthread.h (struct thread_info): Add comment.
5892 (current_ptid): Simplify.
5893 * inferiors.c (add_process): Update.
5894 (remove_process): Update.
5895 * inferiors.h (struct process_info): Rename member "head" to "entry".
5896 * linux-low.c (delete_lwp): Update.
5897 (add_lwp): Update.
5898 (last_thread_of_process_p): Update.
5899 (kill_one_lwp_callback, linux_kill): Update.
5900 (status_pending_p_callback): Update.
5901 (wait_for_sigstop): Update. Simplify read of ptid.
5902 (start_step_over): Update.
5903 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5904 (get_lwp_thread): Update.
5905 (struct lwp_info): Rename member "head" to "entry".
5906 * regcache.h (inferior_list_entry): Delete.
5907 * server.c (kill_inferior_callback): Update.
5908 (detach_or_kill_inferior_callback): Update.
5909 (print_started_pid): Update.
5910 (print_attached_pid): Update.
5911 (process_serial_event): Simplify read of ptid.
5912 * thread-db.c (thread_db_create_event): Update.
5913 (thread_db_get_tls_address): Update.
5914 * win32-low.c (current_inferior_ptid): Simplify.
5915
46917d26
TT
59162014-02-19 Tom Tromey <tromey@redhat.com>
5917
5918 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5919 argument.
5920 (target_supports_btrace): Update.
5921
0759a81e
YQ
59222014-02-14 Yao Qi <yao@codesourcery.com>
5923
5924 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5925 (rsp-low-ipa.o): New target.
5926
a7191e8b
TT
59272014-02-12 Tom Tromey <tromey@redhat.com>
5928
5929 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5930 convert_ascii_to_int.
5931 * regcache.c (registers_to_string): Likewise.
5932 * remote-utils.c (decode_M_packet): Likewise.
5933 * server.c (process_serial_event): Likewise.
5934
ff0e980e
TT
59352014-02-12 Tom Tromey <tromey@redhat.com>
5936
5937 * server.c (handle_query, handle_v_run): Use hex2bin, not
5938 unhexify.
5939 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5940
e9371aff
TT
59412014-02-12 Tom Tromey <tromey@redhat.com>
5942
5943 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5944 convert_int_to_ascii.
5945 * regcache.c (registers_to_string, collect_register_as_string):
5946 Likewise.
5947 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5948 Likewise.
5949 * server.c (process_serial_event): Likewise.
5950 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5951 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5952
971dc0b8
TT
59532014-02-12 Tom Tromey <tromey@redhat.com>
5954
5955 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5956 bin2hex, not hexify.
5957 * tracepoint.c (cmd_qtstatus): Likewise.
5958
0a822afb
TT
59592014-02-12 Tom Tromey <tromey@redhat.com>
5960
5961 * remote-utils.c (monitor_output): Pass explicit length to
5962 hexify.
5963
9c3d6531
TT
59642014-02-12 Tom Tromey <tromey@redhat.com>
5965
5966 * tracepoint.c: Include rsp-low.h.
5967 * server.c: Include rsp-low.h.
5968 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5969 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5970 declare.
5971 * remote-utils.c: Include rsp-low.h.
5972 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5973 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5974 (convert_int_to_ascii, convert_ascii_to_int): Move to
5975 common/rsp-low.c.
5976 * regcache.c: Include rsp-low.h.
5977 * ax.c: Include rsp-low.h.
5978 * Makefile.in (SFILES): Add common/rsp-low.c.
5979 (OBS): Add rsp-low.o.
5980 (rsp-low.o): New target.
5981
01fd3ea5
TT
59822014-02-12 Tom Tromey <tromey@redhat.com>
5983
5984 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5985 Include print-utils.h.
5986 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5987 (plongest, thirty_two, phex_nz): Remove.
5988 * Makefile.in (SFILES): Add common/print-utils.c.
5989 (OBS): Add print-utils.o.
5990 (print-utils-ipa.o): New target.
5991 (print-utils.o): New target.
5992 (IPA_OBJS): Add print-utils-ipa.o.
5993
e99dc820
TT
59942014-02-06 Tom Tromey <tromey@redhat.com>
5995
5996 * Makefile.in (SFILES): Fix indentation.
5997
ee1e2d4f
DE
59982014-02-05 Doug Evans <dje@google.com>
5999
6000 * linux-low.c (linux_wait_for_event): Improve comment.
6001 (linux_wait_1): Keep current_inferior in sync with event_child.
6002
f5a02773
DE
60032014-01-22 Doug Evans <dje@google.com>
6004
6005 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6006
87ce2a04
DE
60072014-01-22 Doug Evans <dje@google.com>
6008
6009 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6010 * configure: Regenerate.
6011 * config.in: Regenerate.
6012 * Makefile.in (SFILES): Add debug.c.
6013 (OBS): Add debug.o.
6014 * debug.c: New file.
6015 * debug.h: New file.
6016 * linux-aarch64-low.c (*): Update all debugging printfs to use
6017 debug_printf instead of fprintf.
6018 * linux-arm-low.c (*): Ditto.
6019 * linux-cris-low.c (*): Ditto.
6020 * linux-crisv32-low.c (*): Ditto.
6021 * linux-m32r-low.c (*): Ditto.
6022 * linux-sparc-low.c (*): Ditto.
6023 * linux-x86.c (*): Ditto.
6024 * linux-low.c (*): Ditto.
6025 (linux_wait_1): Add calls to debug_enter, debug_exit.
6026 (linux_wait): Remove redundant debugging printf.
6027 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6028 (linux_resume, unstop_all_lwps): Ditto.
6029 * mem-break.c (*): Update all debugging printfs to use
6030 debug_printf instead of fprintf.
6031 * remote-utils.c (*): Ditto.
6032 * thread-db.c (*): Ditto.
6033 * server.c #include <ctype.h>, "gdb_vecs.h".
6034 (debug_threads): Moved to debug.c.
6035 (*): Update all debugging printfs to use debug_printf instead of
6036 fprintf.
6037 (start_inferior): Replace call to fflush with call to debug_flush.
6038 (monitor_show_help): Mention set debug-format.
6039 (parse_debug_format_options): New function.
6040 (handle_monitor_command): Handle "monitor set debug-format".
6041 (gdbserver_usage): Mention --debug-format.
6042 (main): Parse --debug-format.
6043 * server.h (debug_threads): Declaration moved to debug.h.
6044 #include "debug.h".
6045 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6046 trace_debug_1 that uses debug_printf.
6047 (tracepoint_look_up_symbols): Update all debugging printfs to use
6048 debug_printf instead of fprintf.
6049
e671835b
BS
60502014-01-20 Baruch Siach <baruch@tkos.co.il>
6051
6052 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6053 sys/ptrace.h.
6054
b5737fa9
PA
60552014-01-17 Pedro Alves <palves@redhat.com>
6056
ea38d2a9 6057 PR build/16445
c7faa97a
PA
6058 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6059 defined after including gdb_proc_service.h.
b5737fa9 6060
40ed484e
DE
60612014-01-16 Doug Evans <dje@google.com>
6062
6063 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6064 (match_dll): Use it.
6065
969c39fb
MM
60662014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6067
6068 * target.h (target_ops) <read_btrace>: Change parameters and
6069 return type to allow error reporting.
6070 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6071 trace reading errors on.
6072 * linux-low.c (linux_low_read_btrace): Pass trace reading
6073 errors on.
6074 (linux_low_disable_btrace): New.
6075
ab7f45ba
DE
60762014-01-15 Doug Evans <dje@google.com>
6077
6078 * inferiors.c (thread_id_to_gdb_id): Delete.
6079 * inferiors.h (thread_id_to_gdb_id): Delete.
6080
66af0f44
EZ
60812014-01-13 Eli Zaretskii <eliz@gnu.org>
6082
6083 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6084 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6085 versions.
6086
9939e131
PA
60872014-01-08 Pedro Alves <palves@redhat.com>
6088
6089 * server.c (handle_status): Don't discard previous queued stop
6090 replies or thread's pending status here.
6091 (main) <disconnection>: Do it here instead.
6092
b7ea362b
PA
60932014-01-08 Pedro Alves <palves@redhat.com>
6094
6095 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6096 * server.c (visit_actioned_threads, handle_pending_status): New
6097 function.
6098 (handle_v_cont): Factor out parts to ...
6099 (resume): ... this new function. If in all-stop, and a thread
6100 being resumed has a pending status, report it without actually
6101 resuming.
6102 (myresume): Adjust to use the new 'resume' function.
6103 (clear_pending_status_callback, set_pending_status_callback)
6104 (find_status_pending_thread_callback): New functions.
6105 (handle_status): Handle the case of multiple threads having
6106 interesting statuses to report. Report threads' real last signal
6107 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6108 with an interesting thread to report the status for, instead of
6109 always reporting the status of the first thread.
6110
28498c42
JB
61112014-01-01 Joel Brobecker <brobecker@adacore.com>
6112
6113 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6114 * gdbreplay.c (gdbreplay_version): Likewise.
6115
f45c82da
YZ
61162013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6117
6118 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6119 iov.iov_len with the real length in use.
6120
379a5e2d
JB
61212013-12-13 Joel Brobecker <brobecker@adacore.com>
6122
6123 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6124 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6125 for all targets that use win32-low.c.
6126 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6127 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6128
4210d83e
PA
61292013-12-13 Pedro Alves <palves@redhat.com>
6130
6131 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6132 if equal to TARGET_WAITKIND_LOADED.
6133 * win32-low.c (cached_status): New static global.
6134 (win32_wait): Add declaration.
6135 (do_initial_child_stuff): Flush all initial pending debug events
6136 up to the initial breakpoint.
6137 (win32_wait): If CACHED_STATUS was set, return that instead
6138 of doing a real wait. Remove the code resuming the execution
6139 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6140 during the initial phase. Also remove the code changing
6141 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6142 TARGET_WAITKIND_STOPPED.
6143
e7f0d979
YQ
61442013-12-11 Yao Qi <yao@codesourcery.com>
6145
6146 * notif.c (handle_notif_ack): Return 0 if no notification
6147 matches.
6148
ebcf782c
DE
61492013-11-20 Doug Evans <dje@google.com>
6150
6151 * linux-low.c (linux_set_resume_request): Fix comment.
6152
20ad9378
DE
61532013-11-20 Doug Evans <dje@google.com>
6154
6155 * linux-low.c (resume_status_pending_p): Tweak comment.
6156
a196ebeb
WT
61572013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6158
6159 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6160 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6161 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6162 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6163 (srv_amd64_regobj): Add amd64-mpx.o.
6164 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6165 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6166 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6167 * i387-fp.c (num_pl_bnd_register) Added constant.
6168 (num_pl_bnd_cfg_registers) Added constant.
6169 (struct i387_xsave) Added reserved area and MPX fields.
6170 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6171 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6172 function.
6173 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6174 (init_registers_amd64_mpx_linux): Declare new function.
6175 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6176 (x86_64_regmap): Add MPX registers.
6177 (x86_linux_read_description): Add MPX case.
6178 (initialize_low_arch): Initialize MPX targets.
6179
0080a2f6
TT
61802013-11-18 Tom Tromey <tromey@redhat.com>
6181
6182 * configure: Rebuild.
6183 * configure.ac: Don't check for stdlib.h.
6184 * gdbreplay.c: Unconditionally include stdlib.h.
6185
2978b111
TT
61862013-11-18 Tom Tromey <tromey@redhat.com>
6187
6188 * config.in: Rebuild.
6189 * configure: Rebuild.
6190 * configure.ac: Don't use AC_HEADER_DIRENT.
6191
a3d08894
TT
61922013-11-18 Tom Tromey <tromey@redhat.com>
6193
6194 * server.h: Don't check HAVE_STRING_H.
6195 * gdbreplay.c: Don't check HAVE_STRING_H.
6196 * configure: Rebuild.
6197
0a5dd17d
TT
61982013-11-18 Tom Tromey <tromey@redhat.com>
6199
6200 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6201 LIBGNU.
6202
1bd2f0ba
TT
62032013-11-08 Tom Tromey <tromey@redhat.com>
6204
6205 * configure, config.in: Rebuild.
6206 * configure.ac: Remove unused configury.
6207
3266f10b
TT
62082013-11-08 Tom Tromey <tromey@redhat.com>
6209
6210 * acinclude.m4: Include common.m4, codeset.m4.
6211 * configure, config.in: Rebuild.
6212 * configure.ac: Use GDB_AC_COMMON.
6213
6682d959
AA
62142013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6215
6216 * linux-s390-low.c (HWCAP_S390_TE): New define.
6217 (s390_arch_setup): Consider the TE field in the HWCAP for
6218 determining 'have_regset_tdb'.
6219
fd0a4d76
SDJ
62202013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6221
6222 PR gdb/16014
6223 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6224 call to sizeof.
6225
1a3d890b
PA
62262013-10-02 Pedro Alves <palves@redhat.com>
6227
6228 * server.c (process_serial_event): Don't output "GDBserver
6229 exiting" if GDB is connected through stdio.
6230 * target.c (mywait): Likewise, be silent if GDB is connected
6231 through stdio.
6232
97ad4581
JB
62332013-10-01 Joel Brobecker <brobecker@adacore.com>
6234
6235 * lynx-low.c (lynx_add_threads_after_attach): New function.
6236 (lynx_attach): Remove call to add_thread. Add call to
6237 lynx_add_threads_after_attach instead.
6238
5b4e221c
MF
62392013-09-28 Mike Frysinger <vapier@gentoo.org>
6240
6241 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6242 * config.in, configure: Regenerated.
6243
ee47b2f8
YQ
62442013-09-18 Yao Qi <yao@codesourcery.com>
6245
6246 PR server/15959
6247 * server.c (start_inferior): Clear 'resume_info'.
6248
d6707650 62492013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6250
d6707650
JW
6251 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6252 for each register.
6253
9243dd0e 62542013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6255
9243dd0e
JW
6256 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6257 linux-tile-low.o to srv_tgtobj.
6258
c623a6ef
WN
62592013-09-16 Will Newton <will.newton@linaro.org>
6260
6261 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6262 out regs.
6263
fb71d39e
PA
62642013-09-06 Pedro Alves <palves@redhat.com>
6265
6266 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6267 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6268 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6269 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6270 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6271 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6272
8e7e9910
PA
62732013-09-06 Pedro Alves <palves@redhat.com>
6274
6275 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6276 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6277
7c3a12ca
PA
62782013-09-06 Pedro Alves <palves@redhat.com>
6279
6280 * linux-amd64-ipa.c: Include tracepoint.h.
6281 * linux-i386-ipa.c: Include tracepoint.h.
6282
8eb3d7b6
RW
62832013-09-06 Ricard Wanderlof <ricardw@axis.com>
6284
6285 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6286 (ps_get_thread_area): New function.
6287
eddddb9d
RW
62882013-09-06 Ricard Wanderlof <ricardw@axis.com>
6289
6290 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6291 (initialize_low_arch): Call init_registers_crisv32 rather than
6292 init_register_crisv32.
6293
533b0600
PA
62942013-09-05 Pedro Alves <palves@redhat.com>
6295
6296 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6297 to ...
6298 * hostio.h: ... this new file.
6299 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6300 win32-low.c: Include hostio.h.
6301
0ce3d3b5
PA
63022013-09-05 Pedro Alves <palves@redhat.com>
6303
6304 * server.h (gdb_client_data, handler_func, callback_handler_func)
6305 (delete_file_handler, add_file_handler, append_callback_event)
6306 (delete_callback_event, start_event_loop, initialize_event_loop):
6307 Move to event-loop.h and include it.
6308 * event-loop.h: New file.
6309
799cdc37
PA
63102013-09-05 Pedro Alves <palves@redhat.com>
6311
6312 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6313 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6314 (loaded_dll, unloaded_dll): Move to ...
6315 * dll.h: ... this new file.
6316 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6317
6a6bbd9d
PA
63182013-09-05 Pedro Alves <palves@redhat.com>
6319
6320 * server.h (current_process, get_thread_process, all_processes)
6321 (add_inferior_to_list, for_each_inferior, current_inferior)
6322 (remove_inferior, add_process, remove_process, find_process_pid)
6323 (have_started_inferiors_p, have_attached_inferiors_p)
6324 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6325 (clear_inferiors, find_inferior, find_inferior_id)
6326 (inferior_target_data, set_inferior_target_data)
6327 (inferior_regcache_data, set_inferior_regcache_data): Move to
6328 inferiors.h, and include it.
6329 * inferiors.h: New file.
6330
f699aaba
PA
63312013-09-05 Pedro Alves <palves@redhat.com>
6332
6333 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6334 Move ...
72f4393d 6335 * ax.h: ... here.
f699aaba 6336
c144c7a0
PA
63372013-09-05 Pedro Alves <palves@redhat.com>
6338
6339 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6340 tracepoint.h.
6341 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6342 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6343 (handle_tracepoint_general_set, handle_tracepoint_query)
6344 (tracepoint_finished_step, tracepoint_was_hit)
6345 (release_while_stepping_state_list, current_traceframe)
6346 (in_readonly_region, traceframe_read_mem)
6347 (fetch_traceframe_registers, traceframe_read_sdata)
6348 (traceframe_read_info, struct fast_tpoint_collect_status)
6349 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6350 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6351 (supply_fast_tracepoint_registers)
6352 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6353 (ipa_tdesc, claim_trampoline_space)
6354 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6355 (agent_mem_read, agent_get_trace_state_variable_value)
6356 (agent_set_trace_state_variable_value, agent_tsv_read)
6357 (agent_mem_read_string, get_raw_reg_func_addr)
6358 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6359 * tracepoint.h: ... this new file.
6360
ff42e6ab
PA
63612013-09-05 Pedro Alves <palves@redhat.com>
6362
6363 * server.h (perror_with_name, error, fatal, warning, paddress)
6364 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6365 include it.
6366 * utils.h: New file.
6367
541af0f4
PA
63682013-09-05 Pedro Alves <palves@redhat.com>
6369
6370 * server.h (remote_debug, noack_mode, transport_is_reliable)
6371 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6372 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6373 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6374 (write_enn, initialize_async_io, enable_async_io)
6375 (disable_async_io, check_remote_input_interrupt_request)
6376 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6377 (dead_thread_notify, prepare_resume_reply)
6378 (decode_address_to_semicolon, decode_address, decode_m_packet)
6379 (decode_M_packet, decode_X_packet, decode_xfer_write)
6380 (decode_search_memory_packet, unhexify, hexify)
6381 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6382 (look_up_one_symbol, relocate_instruction)
6383 (monitor_output): Move to remote-utils.h, and include it.
6384 * remote-utils.h: New file.
6385
eebdf26b
PA
63862013-09-05 Pedro Alves <palves@redhat.com>
6387
6388 * server.h (_): Delete.
6389
3aafd2ff
PA
63902013-09-02 Pedro Alves <palves@redhat.com>
6391
6392 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6393 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6394 allocated.
6395 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6396
cee83bcb
PM
63972013-09-02 Pierre Muller <muller@sourceware.org>
6398
6399 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6400 or WriteProcessMemory complete successfully and handle
6401 ERROR_PARTIAL_COPY error.
6402
9a13b2fa
PA
64032013-09-02 Pedro Alves <palves@redhat.com>
6404
6405 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6406 error instead of EIO.
6407
602e3198
JK
64082013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6409
6410 PR server/15604
6411 * linux-low.c: Include filestuff.h.
6412 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6413 * lynx-low.c: Include filestuff.h.
6414 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6415 * server.c: Include filestuff.h.
6416 (main): Call notice_open_fds.
6417 * spu-low.c: Include filestuff.h.
6418 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6419
96d7229d
LM
64202013-08-22 Luis Machado <lgustavo@codesourcery.com>
6421
6422 * Makefile.in: Explain why ../target and ../nat are not
6423 listed as include file search paths.
6424 (linux-waitpid.o): New object file rule.
6425 * configure.srv (srv_native_linux_obj): New variable.
6426 Replace all occurrences of linux native object files with
6427 $srv_native_linux_obj.
6428 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6429 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6430 (linux_enable_event_reporting): Remove declaration.
6431 (my_waitpid): Moved to common/linux-waitpid.c.
6432 (linux_wait_for_event): Pass ptid when calling
6433 linux_enable_event_reporting.
6434 (linux_supports_tracefork_flag): Remove.
6435 (linux_enable_event_reporting): Likewise.
6436 (linux_tracefork_grandchild): Remove.
6437 (STACK_SIZE): Moved to common/linux-ptrace.c.
6438 (linux_tracefork_child): Remove.
6439 (linux_test_for_tracefork): Remove.
6440 (linux_look_up_symbols): Call linux_supports_traceclone.
6441 (initialize_low): Remove call to linux_test_for_tracefork.
6442 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6443 common/linux-ptrace.h.
6444 (PTRACE_TYPE_ARG4): Likewise.
6445 Include linux-ptrace.h.
6446
32940073
PA
64472013-08-21 Pedro Alves <palves@redhat.com>
6448
6449 * config.in: Renegerate.
6450
33b60d58 64512013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6452
33b60d58
LM
6453 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6454 (SFILES): Remove $(srcdir)/common/target-common.c and
6455 add $(srcdir)/target/waitstatus.c.
6456 (OBS): Remove target-common.o and add waitstatus.o.
6457 (server_h): Remove $(srcdir)/../common/target-common.h and
6458 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6459 and $(srcdir)/../target/waitstatus.h.
6460 (target-common.o): Remove.
6461 (waitstatus.o): New target object file.
6462 * target.h: Do not include target-common.h and
6463 include target/resume.h, target/wait.h and
6464 target/waitstatus.h.
6465
b8e1b30e
LM
64662013-08-13 Luis Machado <lgustavo@codesourcery.com>
6467
6468 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6469 to PTRACE_TYPE_ARG3.
6470 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6471 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6472 PTRACE_TYPE_ARG4.
6473 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6474 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6475
7a60ad40
YQ
64762013-07-27 Jie Zhang <jie@codesourcery.com>
6477 Daniel Jacobowitz <dan@codesourcery.com>
6478 Yao Qi <yao@codesourcery.com>
6479
6480 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6481 (mips-linux-watch.o): New rule.
6482 (mips_linux_watch_h): New variable.
6483 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6484 srv_tgtobj.
6485 * linux-mips-low.c: Include mips-linux-watch.h.
6486 (struct arch_process_info, struct arch_lwp_info): New.
6487 (update_watch_registers_callback): New function.
6488 (mips_linux_new_process, mips_linux_new_thread) New functions.
6489 (mips_linux_prepare_to_resume, mips_insert_point): New
6490 functions.
6491 (mips_remove_point, mips_stopped_by_watchpoint): New
6492 functions.
6493 (rsp_bp_type_to_target_hw_bp_type): New function.
6494 (mips_stopped_data_address): New function.
6495 (the_low_target): Add watchpoint support functions.
6496
de6f69ad
YQ
64972013-07-27 Yao Qi <yao@codesourcery.com>
6498
6499 * i386-low.c: Include break-common.h.
6500 (enum target_hw_bp_type): Remove.
6501
3360c0bf
LM
65022013-07-24 Luis Machado <lgustavo@codesourcery.com>
6503
6504 * Makefile.in (SFILES): /common/target-common.c.
6505 (OBS): Add target-common.o.
6506 (server_h): Add $(srcdir)/../common/target-common.h.
6507 (target-common.o): New target.
6508 * server.c (queue_stop_reply_callback): Free
6509 status string after use.
6510 * target.c (target_waitstatus_to_string): Remove.
6511 * target.h: Include target-common.h.
6512 (resume_kind): Likewise.
6513 (target_waitkind): Likewise.
6514 (target_waitstatus): Likewise.
6515 (TARGET_WNOHANG): Likewise.
6516
bd885420
YQ
65172013-07-04 Yao Qi <yao@codesourcery.com>
6518
6519 * Makefile.in (host_alias): Use @host_noncanonical@.
6520 (target_alias): Use @target_noncanonical@.
6521 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6522 ACX_NONCANONICAL_HOST.
6523 * configure: Regenerated.
6524
6525 Revert:
6526 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6527
6528 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6529 * configure: Rebuild.
6530 * Makefile.in (version_host, version_target): Get from configure.
6531 (version.c): Use $(version_host) and $(version_target).
6532
17ef446e
PA
65332013-07-03 Pedro Alves <palves@redhat.com>
6534
6535 * Makefile.in (config.status): Depend on development.sh.
6536 * acinclude.m4: Include libmcheck.m4.
6537 * configure: Regenerate.
6538
7a9a7487
MG
65392013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6540
6541 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6542 attribute inside the parentheses.
6543 (winapi_DebugSetProcessKillOnExit): Ditto.
6544 (winapi_DebugBreakProcess): Ditto.
6545 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6546
49b64de6
MG
65472013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6548
6549 * notif.h (notif_event): Add a dummy member to avoid compiler
6550 errors.
6551
d5749ee7
PA
65522013-07-01 Pedro Alves <palves@redhat.com>
6553
6554 * hostio.c (HOSTIO_PATH_MAX): Define.
6555 (require_filename, handle_open, handle_unlink, handle_readlink):
6556 Use it.
6557
d8d2a3ee
PA
65582013-07-01 Pedro Alves <palves@redhat.com>
6559
6560 * server.h: Include "pathmax.h".
6561 * linux-low.c: Don't include sys/param.h.
6562 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6563 MAXPATHLEN.
6564 * win32-low.c: Don't include sys/param.h.
6565 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6566
bc7dea8d
PA
65672013-07-01 Pedro Alves <palves@redhat.com>
6568
6569 * event-loop.c: Don't check HAVE_UNISTD_H before including
6570 <unistd.h>.
6571 * gdbreplay.c: Likewise.
6572 * remote-utils.c: Likewise.
6573 * server.c: Likewise.
6574 * configure.ac: Don't check for unistd.h.
6575 * configure: Regenerate.
6576
d6c2da54
TT
65772013-06-28 Tom Tromey <tromey@redhat.com>
6578
6579 * Makefile.in (version.c): Use version.in, not
6580 common/version.in.
6581
257b6bec
MG
65822013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6583
6584 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6585 * configure: Rebuild.
6586 * Makefile.in (version_host, version_target): Get from configure.
6587 (version.c): Use $(version_host) and $(version_target).
6588
86ebe149
DK
65892013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6590
6591 Fix trace-status to output user name without trailing colon.
6592 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6593
f30aa5af
DK
65942013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6595
6596 Fix trace-status to output proper start-time and stop-time.
6597 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6598 output start time and stop time in hex as gdb expects.
6599
28a93511
YQ
66002013-06-26 Pedro Alves <pedro@codesourcery.com>
6601
6602 * tracepoint.c (build_traceframe_info_xml): Output trace state
6603 variables present in the trace buffer.
6604
01208463
TT
66052013-06-24 Tom Tromey <tromey@redhat.com>
6606
6607 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6608 create-version.sh.
6609 (version.o): Remove.
6610 * gdbreplay.c: Include version.h.
6611 (version, host_name): Don't declare.
6612 * server.h: Include version.h.
6613 (version, host_name): Don't declare.
6614
760256f9
PA
66152013-06-12 Pedro Alves <palves@redhat.com>
6616
6617 * linux-x86-low.c (linux_is_elf64): Delete global.
6618 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6619 with local linux_pid_exe_is_elf_64_file use.
6620
030031ee
PA
66212013-06-11 Pedro Alves <palves@redhat.com>
6622
6623 * linux-low.c (regset_disabled, disable_regset): New functions.
6624 (regsets_fetch_inferior_registers)
6625 (regsets_store_inferior_registers): Use them.
6626 (initialize_regsets_info); Don't allocate the disabled_regsets
6627 array here.
6628 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6629 comment.
6630
5da6eb0a
PA
66312013-06-11 Pedro Alves <palves@redhat.com>
6632
6633 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6634 xmalloc.
6635
7e5aaa09
PA
66362013-06-11 Pedro Alves <palves@redhat.com>
6637
6638 * linux-x86-low.c (initialize_low_arch): Call
6639 init_registers_x32_avx_linux.
6640
d878444c
JK
66412013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6642
6643 Fix compatibility with Android Bionic.
6644 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6645 it is not empty.
6646
3aee8918
PA
66472013-06-07 Pedro Alves <palves@redhat.com>
6648
5f2b57b5 6649 PR server/14823
3aee8918
PA
6650 * Makefile.in (OBS): Add tdesc.o.
6651 (IPA_OBJS): Add tdesc-ipa.o.
6652 (tdesc-ipa.o): New rule.
6653 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6654 interface.
6655 * linux-low.c (new_inferior): Delete.
6656 (disabled_regsets, num_regsets): Delete.
6657 (linux_add_process): Adjust to set the new per-process
6658 new_inferior flag.
6659 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6660 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6661 was a stop. When calling arch_setup, switch the current inferior
6662 to the thread that got an event.
6663 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6664 (regsets_fetch_inferior_registers)
6665 (regsets_store_inferior_registers): New regsets_info parameter.
6666 Adjust to use it.
6667 (linux_register_in_regsets): New regs_info parameter. Adjust to
6668 use it.
6669 (register_addr, fetch_register, store_register): New usrregs_info
6670 parameter. Adjust to use it.
6671 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6672 parameter regs_info. Adjust to use it.
6673 (linux_fetch_registers): Get the current inferior's regs_info, and
6674 adjust to use it.
6675 (linux_store_registers): Ditto.
6676 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6677 (initialize_low): Don't initialize the target_regsets here. Call
6678 initialize_low_arch.
6679 * linux-low.h (target_regsets): Delete declaration.
6680 (struct regsets_info): New.
6681 (struct usrregs_info): New.
6682 (struct regs_info): New.
6683 (struct process_info_private) <new_inferior>: New field.
6684 (struct linux_target_ops): Delete the num_regs, regmap, and
6685 regset_bitmap fields. New field regs_info.
6686 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6687 * i387-fp.c (num_xmm_registers): Delete.
6688 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6689 calls to new interface.
6690 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6691 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6692 Infer the number of xmm registers from the regcache's target
6693 description.
6694 * i387-fp.h (num_xmm_registers): Delete.
6695 * inferiors.c (add_thread): Don't install the thread's regcache
6696 here.
6697 * proc-service.c (gregset_info): Fetch the current inferior's
6698 regs_info. Adjust to use it.
6699 * regcache.c: Include tdesc.h.
6700 (register_bytes, reg_defs, num_registers)
6701 (gdbserver_expedite_regs): Delete.
6702 (get_thread_regcache): If the thread doesn't have a regcache yet,
6703 create one, instead of aborting gdbserver.
6704 (regcache_invalidate_one): Rename to ...
6705 (regcache_invalidate_thread): ... this.
6706 (regcache_invalidate_one): New.
6707 (regcache_invalidate): Only invalidate registers of the current
6708 process.
6709 (init_register_cache): Add target_desc parameter, and use it.
6710 (new_register_cache): Ditto. Assert the target description has a
6711 non zero registers_size.
6712 (regcache_cpy): Add assertions. Adjust.
6713 (realloc_register_cache, set_register_cache): Delete.
6714 (registers_to_string, registers_from_string): Adjust.
6715 (find_register_by_name, find_regno, find_register_by_number)
6716 (register_cache_size): Add target_desc parameter, and use it.
6717 (free_register_cache_thread, free_register_cache_thread_one)
6718 (regcache_release, register_cache_size): New.
6719 (register_size): Add target_desc parameter, and use it.
6720 (register_data, supply_register, supply_register_zeroed)
6721 (supply_regblock, supply_register_by_name, collect_register)
6722 (collect_register_as_string, collect_register_by_name): Adjust.
6723 * regcache.h (struct target_desc): Forward declare.
6724 (struct regcache) <tdesc>: New field.
6725 (init_register_cache, new_register_cache): Add target_desc
6726 parameter.
6727 (regcache_invalidate_thread): Declare.
6728 (regcache_invalidate_one): Delete declaration.
6729 (regcache_release): Declare.
6730 (find_register_by_number, register_cache_size, register_size)
6731 (find_regno): Add target_desc parameter.
6732 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6733 declarations.
6734 * remote-utils.c: Include tdesc.h.
6735 (outreg, prepare_resume_reply): Adjust.
6736 * server.c: Include tdesc.h.
6737 (gdbserver_xmltarget): Delete declaration.
6738 (get_features_xml, process_serial_event): Adjust.
6739 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6740 declare.
6741 (struct process_info) <tdesc>: New field.
6742 (ipa_tdesc): Declare.
6743 * tdesc.c: New file.
6744 * tdesc.h: New file.
6745 * tracepoint.c: Include tdesc.h.
6746 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6747 (get_context_regcache): Adjust to pass ipa_tdesc down.
6748 (do_action_at_tracepoint): Adjust to get the register cache size
6749 from the context regcache's description.
6750 (traceframe_walk_blocks): Adjust to get the register cache size
6751 from the current trace frame's description.
6752 (traceframe_get_pc): Adjust to get current trace frame's
6753 description and pass it down.
6754 (gdb_collect): Adjust to get the register cache size from the
6755 IPA's description.
6756 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6757 (gdbserver_xmltarget): Delete.
6758 (initialize_low_tracepoint): Set the ipa's target description.
6759 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6760 (initialize_low_tracepoint): Set the ipa's target description.
6761 * linux-x86-low.c: Include tdesc.h.
6762 [__x86_64__] (is_64bit_tdesc): New.
6763 (ps_get_thread_area, x86_get_thread_area): Use it.
6764 (i386_cannot_store_register): Rename to ...
6765 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6766 (i386_cannot_fetch_register): Rename to ...
6767 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6768 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6769 to new interface.
6770 (target_regsets): Rename to ...
6771 (x86_regsets): ... this.
6772 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6773 interface.
6774 (x86_siginfo_fixup): Use is_64bit_tdesc.
6775 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6776 (tdesc_x32_avx_linux, tdesc_x32_linux)
6777 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6778 Declare.
6779 (x86_linux_update_xmltarget): Delete.
6780 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6781 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6782 (AMD64_LINUX_USER64_CS): New.
6783 (x86_linux_read_description): New, based on
6784 x86_linux_update_xmltarget.
6785 (same_process_callback): New.
6786 (x86_arch_setup_process_callback): New.
6787 (x86_linux_update_xmltarget): New.
6788 (x86_regsets_info): New.
6789 (amd64_linux_regs_info): New.
6790 (i386_linux_usrregs_info): New.
6791 (i386_linux_regs_info): New.
6792 (x86_linux_regs_info): New.
6793 (x86_arch_setup): Reimplement.
6794 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6795 (x86_emit_ops): Ditto.
6796 (the_low_target): Adjust. Install x86_linux_regs_info,
6797 x86_cannot_fetch_register, and x86_cannot_store_register.
6798 (initialize_low_arch): New.
6799 * linux-ia64-low.c (tdesc_ia64): Declare.
6800 (ia64_fetch_register): Adjust.
6801 (ia64_usrregs_info, regs_info): New globals.
6802 (ia64_regs_info): New function.
6803 (the_low_target): Adjust.
6804 (initialize_low_arch): New function.
6805 * linux-sparc-low.c (tdesc_sparc64): Declare.
6806 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6807 Adjust.
6808 (sparc_arch_setup): New function.
6809 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6810 (the_low_target): Adjust.
6811 (initialize_low_arch): New function.
6812 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6813 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6814 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6815 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6816 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6817 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6818 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6819 (tdesc_powerpc_isa205_vsx64l): Declare.
6820 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6821 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6822 (ppc_set_pc, ppc_get_hwcap): Adjust.
6823 (ppc_usrregs_info): Forward declare.
6824 (!__powerpc64__) ppc_regmap_adjusted: New global.
6825 (ppc_arch_setup): Adjust to the current process'es target
6826 description.
6827 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6828 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6829 (ppc_store_evrregset): Adjust.
6830 (target_regsets): Rename to ...
6831 (ppc_regsets): ... this, and make static.
6832 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6833 (ppc_regs_info): New function.
6834 (the_low_target): Adjust.
6835 (initialize_low_arch): New function.
6836 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6837 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6838 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6839 (tdesc_s390x_linux64v2): Declare.
6840 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6841 (s390_fill_gregset, s390_store_last_break): Adjust.
6842 (target_regsets): Rename to ...
6843 (s390_regsets): ... this, and make static.
6844 (s390_get_pc, s390_set_pc): Adjust.
6845 (s390_get_hwcap): New target_desc parameter, and use it.
6846 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6847 (s390_arch_setup): Adjust to set the current process'es target
6848 description. Don't adjust the regmap.
6849 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6850 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6851 (regs_info_3264): New globals.
6852 (s390_regs_info): New function.
6853 (the_low_target): Adjust.
6854 (initialize_low_arch): New function.
6855 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6856 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6857 [__mips64] (init_registers_mips_linux)
6858 (init_registers_mips_dsp_linux): Delete defines.
6859 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6860 (have_dsp): New global.
6861 (mips_read_description): New, based on mips_arch_setup.
6862 (mips_arch_setup): Reimplement.
6863 (get_usrregs_info): New function.
6864 (mips_cannot_fetch_register, mips_cannot_store_register)
6865 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6866 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6867 (target_regsets): Rename to ...
6868 (mips_regsets): ... this, and make static.
6869 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6870 (dsp_regs_info, regs_info): New globals.
6871 (mips_regs_info): New function.
6872 (the_low_target): Adjust.
6873 (initialize_low_arch): New function.
6874 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6875 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6876 Declare.
6877 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6878 (arm_read_description): New, with bits factored from
6879 arm_arch_setup.
6880 (arm_arch_setup): Reimplement.
6881 (target_regsets): Rename to ...
6882 (arm_regsets): ... this, and make static.
6883 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6884 (arm_regs_info): New function.
6885 (the_low_target): Adjust.
6886 (initialize_low_arch): New function.
6887 * linux-m68k-low.c (tdesc_m68k): Declare.
6888 (target_regsets): Rename to ...
6889 (m68k_regsets): ... this, and make static.
6890 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6891 (m68k_regs_info): New function.
6892 (m68k_arch_setup): New function.
6893 (the_low_target): Adjust.
6894 (initialize_low_arch): New function.
6895 * linux-sh-low.c (tdesc_sharch): Declare.
6896 (target_regsets): Rename to ...
6897 (sh_regsets): ... this, and make static.
6898 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6899 (sh_regs_info, sh_arch_setup): New functions.
6900 (the_low_target): Adjust.
6901 (initialize_low_arch): New function.
6902 * linux-bfin-low.c (tdesc_bfin): Declare.
6903 (bfin_arch_setup): New function.
6904 (bfin_usrregs_info, regs_info): New globals.
6905 (bfin_regs_info): New function.
6906 (the_low_target): Adjust.
6907 (initialize_low_arch): New function.
6908 * linux-cris-low.c (tdesc_cris): Declare.
6909 (cris_arch_setup): New function.
6910 (cris_usrregs_info, regs_info): New globals.
6911 (cris_regs_info): New function.
6912 (the_low_target): Adjust.
6913 (initialize_low_arch): New function.
6914 * linux-cris-low.c (tdesc_crisv32): Declare.
6915 (cris_arch_setup): New function.
6916 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6917 (cris_regs_info): New function.
6918 (the_low_target): Adjust.
6919 (initialize_low_arch): New function.
6920 * linux-m32r-low.c (tdesc_m32r): Declare.
6921 (m32r_arch_setup): New function.
6922 (m32r_usrregs_info, regs_info): New globals.
6923 (m32r_regs_info): Adjust.
6924 (initialize_low_arch): New function.
6925 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6926 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6927 (tic6x_usrregs_info): Forward declare.
6928 (tic6x_read_description): New function, based on ...
6929 (tic6x_arch_setup): ... this. Reimplement.
6930 (target_regsets): Rename to ...
6931 (tic6x_regsets): ... this, and make static.
6932 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6933 (tic6x_regs_info): New function.
6934 (the_low_target): Adjust.
6935 (initialize_low_arch): New function.
6936 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6937 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6938 (target_regsets): Rename to ...
6939 (xtensa_regsets): ... this, and make static.
6940 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6941 globals.
6942 (xtensa_arch_setup, xtensa_regs_info): New functions.
6943 (the_low_target): Adjust.
6944 (initialize_low_arch): New function.
6945 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6946 (nios2_arch_setup): Set the current process'es tdesc.
6947 (target_regsets): Rename to ...
6948 (nios2_regsets): ... this.
6949 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6950 (nios2_regs_info): New function.
6951 (the_low_target): Adjust.
6952 (initialize_low_arch): New function.
a261b8f5
PA
6953 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6954 (aarch64_arch_setup): Set the current process'es tdesc.
6955 (target_regsets): Rename to ...
6956 (aarch64_regsets): ... this.
6957 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6958 (aarch64_regs_info): New function.
6959 (the_low_target): Adjust.
6960 (initialize_low_arch): New function.
3aee8918
PA
6961 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6962 globals.
6963 (target_regsets): Rename to ...
6964 (tile_regsets): ... this.
6965 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6966 (tile_regs_info): New function.
6967 (tile_arch_setup): Set the current process'es tdesc.
6968 (the_low_target): Adjust.
6969 (initialize_low_arch): New function.
6970 * spu-low.c (tdesc_spu): Declare.
6971 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6972 * win32-arm-low.c (tdesc_arm): Declare.
6973 (arm_arch_setup): New function.
6974 (the_low_target): Install arm_arch_setup instead of
6975 init_registers_arm.
6976 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6977 (init_windows_x86): Rename to ...
6978 (i386_arch_setup): ... this. Set `win32_tdesc'.
6979 (the_low_target): Adjust.
6980 * win32-low.c (win32_tdesc): New global.
6981 (child_add_thread): Don't create the thread cache here.
6982 (do_initial_child_stuff): Set the new process'es tdesc.
6983 * win32-low.h (struct target_desc): Forward declare.
6984 (win32_tdesc): Declare.
6985 * lynx-i386-low.c (tdesc_i386): Declare global.
6986 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6987 * lynx-low.c (lynx_tdesc): New global.
6988 (lynx_add_process): Set the new process'es tdesc.
6989 * lynx-low.h (struct target_desc): Forward declare.
6990 (lynx_tdesc): Declare global.
6991 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6992 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6993 * nto-low.c (nto_tdesc): New global.
6994 (do_attach): Set the new process'es tdesc.
6995 * nto-low.h (struct target_desc): Forward declare.
6996 (nto_tdesc): Declare.
6997 * nto-x86-low.c (tdesc_i386): Declare.
6998 (nto_x86_arch_setup): Set `nto_tdesc'.
6999
b1fbec62
GB
70002013-06-04 Gary Benson <gbenson@redhat.com>
7001
7002 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7003 to qSupported response when appropriate.
7004 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7005 with nonzero-length annex.
7006 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7007 arguments supplied in annex.
7008
d1ec4ce7
DE
70092013-05-31 Doug Evans <dje@google.com>
7010
ac44adcb 7011 PR server/15594
d1ec4ce7
DE
7012 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7013 64 bits in 64-cross-32 environment.
7014
9b25f2d3
PA
70152013-05-28 Pedro Alves <palves@redhat.com>
7016
7017 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7018 (aarch64-without-fpu.c): Delete rule.
7019 * configure.srv (aarch64*-*-linux*): Remove references to
7020 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7021 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7022 declaration.
7023
6740dc9c
PA
70242013-05-24 Pedro Alves <palves@redhat.com>
7025
7026 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7027 instead of strchr/decode_address. Error if the range isn't split
7028 with a ','. Don't assume there's be a ':' in the action.
7029
c2d6af84
PA
70302013-05-23 Yao Qi <yao@codesourcery.com>
7031 Pedro Alves <palves@redhat.com>
7032
7033 * linux-low.c (lwp_in_step_range): New function.
7034 (linux_wait_1): If the thread was range stepping and stopped
7035 outside the stepping range, report the stop to GDB. Otherwise,
7036 continue stepping. Add range stepping debug output.
7037 (linux_set_resume_request): Copy the step range from the resume
7038 request to the lwp.
7039 (linux_supports_range_stepping): New.
7040 (linux_target_ops) <supports_range_stepping>: Set to
7041 linux_supports_range_stepping.
7042 * linux-low.h (struct linux_target_ops)
7043 <supports_range_stepping>: New field.
7044 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7045 * linux-x86-low.c (x86_supports_range_stepping): New.
7046 (the_low_target) <supports_range_stepping>: Set to
7047 x86_supports_range_stepping.
7048 * server.c (handle_v_cont): Handle 'r' action.
7049 (handle_v_requests): Append ";r" if the target supports range
7050 stepping.
7051 * target.h (struct thread_resume) <step_range_start,
7052 step_range_end>: New fields.
7053 (struct target_ops) <supports_range_stepping>:
7054 New field.
7055 (target_supports_range_stepping): New macro.
7056
58794e1a
JB
70572013-05-17 Joel Brobecker <brobecker@adacore.com>
7058
7059 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7060 confusion in comment.
7061
d631c5a7
JB
70622013-05-17 Joel Brobecker <brobecker@adacore.com>
7063
7064 * lynx-low.c (struct process_info_private): New type.
7065 (lynx_add_process): New function.
7066 (lynx_create_inferior, lynx_attach): Replace calls to
7067 add_process by calls to lynx_add_process.
7068 (lynx_resume): If PTID is null, then try using
7069 current_process()->private->last_wait_event_ptid.
7070 Add comments.
7071 (lynx_clear_inferiors): Delete. The contents of that function
7072 has been inlined in lynx_mourn;
7073 (lynx_wait_1): Save the ptid in the process's private data.
7074 (lynx_mourn): Free the process' private data. Replace call
7075 to lynx_clear_inferiors by call to clear_inferiors.
7076
96f7a20f
YQ
70772013-05-17 Yao Qi <yao@codesourcery.com>
7078
7079 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7080 the right place.
7081
db0dfaa0
LM
70822013-05-16 Luis Machado <lgustavo@codesourcery.com>
7083
7084 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7085 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7086 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7087 PT_TEXT_END_ADDR guards. Update comments.
7088 (linux_target_op) <read_offsets>: Conditionally define to
7089 linux_read_offsets if the target is UCLIBC and if it defines
7090 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7091
68f5f838
SL
70922013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7093 Andrew Jenner <andrew@codesourcery.com>
7094
7095 * Makefile.in (SFILES): Add linux-nios2-low.c.
7096 (clean): Add action to delete nios2-linux.c.
7097 (nios2-linux.c): New rule.
7098 * configure.srv: Add nios2*-*-linux*.
7099 * linux-nios2-low.c: New.
7100
1ebff1fd
HAQ
71012013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7102
7103 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7104
f6150862
HZ
71052013-04-25 Hui Zhu <hui@codesourcery.com>
7106
7107 PR gdb/15186
f6150862
HZ
7108 * ax.c (ax_printf): Add fflush.
7109
614c279d
TT
71102013-04-22 Tom Tromey <tromey@redhat.com>
7111
7112 * Makefile.in (SFILES): Add filestuff.c.
7113 (OBS): Add filestuff.o.
7114 (filestuff.o): New target.
7115 * config.in, configure: Rebuild.
7116 * configure.ac: Check for fdwalk, pipe2.
7117
7d4e5717
PA
71182013-04-17 Pedro Alves <palves@redhat.com>
7119
7120 * configure.ac (USE_THREAD_DB): Delete variable.
7121 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7122 Don't AC_SUBST USE_THREAD_DB.
7123 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7124 * config.in, configure: Regenerate.
7125
d5c93e41
PA
71262013-04-16 Pedro Alves <palves@redhat.com>
7127
7128 * linux-low.h (struct lwp_info) <thread_known>: Move under
7129 the USE_THREAD_DB #ifdef.
7130
04f5fe89
PA
71312013-04-16 Pedro Alves <palves@redhat.com>
7132
7133 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7134 (linux-low.o): Delete rule.
7135 * linux-low.h: Always include "gdb_thread_db.h" instead of
7136 conditionally including thread_db.h.
7137 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7138 HAVE_THREAD_DB_H.
7139
480b27bf
JK
71402013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7141
7142 * Makefile.in (install-only): Fix make install regression.
7143
43662968
JK
71442013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7145
7146 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7147 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7148 installation.
7149 * gdbserver.1: Remove.
7150
3e74e146
PA
71512013-03-22 Pedro Alves <palves@redhat.com>
7152
7153 * linux-low.c (handle_extended_wait): Don't call
7154 linux_enable_event_reporting.
7155
a8347a2a
TT
71562013-03-15 Tony Theodore <tonyt@logyst.com>
7157
7158 PR build/9098:
7159 * Makefile.in (SHELL): Use @SHELL@.
7160
eeb56fa7
SDJ
71612013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7162
7163 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7164 compiler warning.
7165
4fa7e2ff
JB
71662013-03-13 Joel Brobecker <brobecker@adacore.com>
7167
7168 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7169 Remove extraneous NULL element.
7170
8ddb1965
YQ
71712013-03-13 Yao Qi <yao@codesourcery.com>
7172
7173 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7174 'V' block in trace frame.
7175
9accd112
MM
71762013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7177
7178 * target.h (struct target_ops): Add btrace ops.
7179 (target_supports_btrace): New macro.
7180 (target_enable_btrace): New macro.
7181 (target_disable_btrace): New macro.
7182 (target_read_btrace): New macro.
7183 * gdbthread.h (struct thread_info): Add btrace field.
7184 * server.c: Include btrace-common.h.
7185 (handle_btrace_general_set): New function.
7186 (handle_btrace_enable): New function.
7187 (handle_btrace_disable): New function.
7188 (handle_general_set): Call handle_btrace_general_set.
7189 (handle_qxfer_btrace): New function.
7190 (struct qxfer qxfer_packets[]): Add btrace entry.
7191 * inferiors.c (remove_thread): Disable btrace.
7192 * linux-low: Include linux-btrace.h.
7193 (linux_low_enable_btrace): New function.
7194 (linux_low_read_btrace): New function.
7195 (linux_target_ops): Add btrace ops.
7196 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7197 Add srv_linux_btrace=yes.
7198 (x86_64-*-linux*): Add linux-btrace.o.
7199 Add srv_linux_btrace=yes.
7200 * configure.ac: Define HAVE_LINUX_BTRACE.
7201 * config.in: Regenerated.
7202 * configure: Regenerated.
7203
5cc22e4c
MM
72042013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7205
7206 * server.c (handle_qxfer): Preserve error message if -3 is
7207 returned.
7208 (qxfer): Document the -3 return value.
7209
7c97f91e
MM
72102013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7211
7212 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7213 (linux_btrace_h): New variable.
7214 (linux-btrace.o): New rule.
7215
be9a119c 72162013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7217 Hafiz Abid Qadeer <abidh@codesourcery.com>
7218
7219 * tracepoint.c (trace_buffer_size): New global.
7220 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7221 (init_trace_buffer): Change to one-argument function. Allocate
7222 trace buffer memory.
7223 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7224 handle QTBuffer:size packet.
7225 (cmd_bigqtbuffer_size): New function.
7226 (initialize_tracepoint): Call init_trace_buffer with
7227 DEFAULT_TRACE_BUFFER_SIZE.
7228 * server.c (handle_query): Add QTBuffer:size in the
7229 supported packets.
7230
e64f7499
YQ
72312013-03-07 Yao Qi <yao@codesourcery.com>
7232
7233 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7234 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7235 of -1.
7236 (cmd_qtsp): Adjust condition. Do post increment.
7237 Set cur_action and cur_step_action back to 0.
7238
f0ae6fc3
PA
72392013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7240
7241 PR server/15236
7242 * linux-low.c (linux_write_memory): Return early success if LEN is
7243 zero.
7244
b5b0b0af
CV
72452013-03-05 Corinna Vinschen <vinschen@redhat.de>
7246
334ad4a8 7247 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7248
589bc927
TT
72492013-02-28 Tom Tromey <tromey@redhat.com>
7250
7251 * configure.ac: Invoke AC_SYS_LARGEFILE.
7252 * configure, config.in: Rebuild.
7253
dfe07582
CV
72542013-02-28 Corinna Vinschen <vinschen@redhat.com>
7255
7256 * win32-low.c: Throughout, fix format strings and casts of
7257 printf-like functions to avoid type related warnings on all
7258 platforms.
7259 (get_child_debug_event): Print dwDebugEventCode as hex since
7260 that's how it's usually documented.
7261
736cd585
YQ
72622013-02-28 Yao Qi <yao@codesourcery.com>
7263
7264 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7265 pulongest.
7266
e1f58301
JW
72672013-02-27 Jiong Wang <jiwang@tilera.com>
7268
7269 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7270 (reg-tilegx32.c): New rule.
7271 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7272 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7273 different register info initializer according to elf class.
7274 (init_registers_tilgx32): New function. The tilegx32 register info
7275 initializer.
7276 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7277 (tile_store_gregset): Likewise.
7278
d171ca78
YQ
72792013-02-27 Yao Qi <yao@codesourcery.com>
7280
7281 * server.c (process_point_options): Print debug message when
7282 debug_threads is true.
7283
282bbdf3
YQ
72842013-02-26 Yao Qi <yao@codesourcery.com>
7285
7286 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7287
aca22551
PA
72882013-02-19 Pedro Alves <palves@redhat.com>
7289 Kai Tietz <ktietz@redhat.com>
7290
7291 PR gdb/15161
7292
7293 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7294 instead of strtoul to extract address from packet.
7295 (process_serial_event) <'z'>: Likewise.
7296
4f3cee1c
YQ
72972013-02-18 Yao Qi <yao@codesourcery.com>
7298
7299 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7300
8e1d55a3
PA
73012013-02-14 Pedro Alves <palves@redhat.com>
7302
7303 Plug memory leak.
7304
7305 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7306 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7307
458820da
PA
73082013-02-14 Pedro Alves <palves@redhat.com>
7309
7310 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7311
baea0dae
PA
73122013-02-14 Pedro Alves <palves@redhat.com>
7313
7314 * tracepoint.c (save_string): Delete.
7315 (add_tracepoint_action): Use savestring instead of save_string.
7316
0b1afbb3
PA
73172013-02-12 Pedro Alves <palves@redhat.com>
7318
7319 * linux-xtensa-low.c: Ditto.
7320 * xtensa-xtregs.c: Ditto.
7321
8a4ac37e
PA
73222013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7323
7324 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7325 thread_db.
7326
148de6bb
MS
73272013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7328
7329 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7330 aarch64_num_wp_regs and aarch64_num_bp_regs to
7331 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7332
55fac6e0
MS
73332013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7334
7335 * linux-aarch64-low.c (ps_get_thread_area): Replace
7336 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7337
176eb98c
MS
73382013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7339 Marcus Shawcroft <marcus.shawcroft@arm.com>
7340 Nigel Stephens <nigel.stephens@arm.com>
7341 Yufeng Zhang <yufeng.zhang@arm.com>
7342
7343 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7344 (aarch64.c, aarch64-without-fpu.c): New targets.
7345 * configure.srv (aarch64*-*-linux*): New.
7346 * linux-aarch64-low.c: New file.
7347
56f7af9c
MS
73482013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7349
43aaf8b6 7350 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7351 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7352 (dequeue_one_deferred_signal, linux_resume_one_thread)
7353 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7354 (linux_tracefork_grandchild, linux_test_for_tracefork)
7355 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7356 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7357 where the argument is 0.
7358
60f662b0
YQ
73592013-01-25 Yao Qi <yao@codesourcery.com>
7360
7361 * event-loop.c: Include "queue.h".
7362 (gdb_event_p): New typedef.
7363 (struct gdb_event) <next_event>: Remove.
7364 (event_queue): Change to QUEUE(gdb_event_p).
7365 (async_queue_event): Remove.
7366 (gdb_event_xfree): New.
7367 (initialize_event_loop): New.
7368 (process_event): Use API from QUEUE.
7369 (wait_for_event): Likewise.
7370 * server.c (main): Call initialize_event_loop.
7371 * server.h (initialize_event_loop): Declare.
7372
5ae4861a
YQ
73732013-01-18 Yao Qi <yao@codesourcery.com>
7374
7375 * ax.h (struct eval_agent_expr_context): New.
7376 (gdb_eval_agent_expr): Update declaration.
7377 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7378 TFRAME. Add new argument CTX.
7379 * server.h (struct eval_agent_expr_context): Declare.
7380 (agent_mem_read, agent_tsv_read): Update declaration.
7381 (agent_mem_read_string): Likewise.
7382 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7383 (add_traceframe_block): Add new argument TPOINT.
7384 Increase TPOINT->traceframe_usage.
7385 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7386 eval_tracepoint_agent_expr.
7387 (condition_true_at_tracepoint): Likewise.
7388 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7389 (agent_mem_read_string, agent_tsv_read): Likewise.
7390
85e00e85
YQ
73912013-01-16 Yao Qi <yao@codesourcery.com>
7392
7393 * linux-low.c (linux_resume_one_lwp): Don't check
7394 'lwp->bp_reinsert != 0'.
7395
4039cf45
JB
73962013-01-07 Joel Brobecker <brobecker@adacore.com>
7397 Pedro Alves <palves@redhat.com>
7398
7399 * lynx-low.c (ptrace_request_to_str): Define a temporary
7400 macro and use it to simplify this function's implementation.
7401
9044dee2
JB
74022013-01-07 Joel Brobecker <brobecker@adacore.com>
7403
7404 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7405 sets errno.
7406
e6352c8f
JB
74072013-01-07 Joel Brobecker <brobecker@adacore.com>
7408
7409 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7410
50681a27
JB
74112013-01-07 Joel Brobecker <brobecker@adacore.com>
7412
7413 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7414
3f6e77ef
JB
74152013-01-07 Joel Brobecker <brobecker@adacore.com>
7416
7417 * lynx-low.c (lynx_resume): Use the resume_info parameter
7418 to determine the ptid for the lynx_ptrace call, unless
7419 it is equal to minus_one_ptid, in which case we use the
7420 ptid of the current_inferior.
7421 (lynx_wait_1): After having received a thread create/exit
7422 event, resume the inferior's execution using the signaling
7423 thread's ptid, rather than the old ptid.
7424
7fda33ae
JB
74252013-01-07 Joel Brobecker <brobecker@adacore.com>
7426
7427 * lynx-low.c (lynx_resume): Delete variable ret.
7428
b9786c74
JB
74292013-01-01 Joel Brobecker <brobecker@adacore.com>
7430
7431 * gdbreplay.c (gdbreplay_version): Update copyright year.
7432 * server.c (gdbserver_version): Likewise.
7433
8b93d60f
JB
74342012-12-17 Joel Brobecker <brobecker@adacore.com>
7435
7436 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7437 new thread.
7438
037335a7
JB
74392012-12-17 Joel Brobecker <brobecker@adacore.com>
7440
7441 * lynx-low.c (ptrace_request_to_str): Add handling for
7442 PTRACE_GETTRACESIG.
7443
52d4cbd8
JB
74442012-12-17 Joel Brobecker <brobecker@adacore.com>
7445
7446 * lynx-low.c (lynx_attach): Delete variable new_process.
7447
ab8f6ca9
JB
74482012-12-17 Joel Brobecker <brobecker@adacore.com>
7449
7450 * lynx-low.c (lynx_create_inferior): Delete variable
7451 new_process.
7452
78cbc024
JB
74532012-12-17 Joel Brobecker <brobecker@adacore.com>
7454
7455 * lynx-low.c (ptrace_request_to_str): Do not handle
7456 PTRACE_GETTHREADLIST if this macro does not exist.
7457
14a00470
YQ
74582012-12-15 Yao Qi <yao@codesourcery.com>
7459
7460 * Makefile.in (OBS): Add notif.o.
7461 * notif.c, notif.h: New.
7462 * server.c: Include "notif.h".
7463 (struct vstop_notif) <next>: Remove.
7464 <base>: New field.
7465 (queue_stop_reply): Update.
7466 (push_event, send_next_stop_reply): Remove.
7467 (discard_queued_stop_replies): Update.
7468 (notif_stop): New variable.
7469 (handle_v_stopped): Remove.
7470 (handle_v_requests): Don't call handle_v_stopped. Call
7471 handle_ack_notif instead.
7472 (queue_stop_reply_callback): Call notif_event_enque instead
7473 of queue_stop_reply.
7474 (handle_status): Don't call send_next_stop_reply, call
7475 notif_write_event instead.
7476 (kill_inferior_callback): Likewise.
7477 (detach_or_kill_inferior_callback): Likewise.
7478 (main): Call initialize_notif.
7479 (process_serial_event): Call QUEUE_is_empty.
7480 (handle_target_event): Call notif_push instead of push event.
7481 * server.h (push_event): Remove declaration.
7482
61c125b9
TT
74832012-12-10 Tom Tromey <tromey@redhat.com>
7484
7485 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7486 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7487 macros.
7488 (.c.o): Rewrite.
7489 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7490 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7491 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7492 (amd64-linux-ipa.o, ax.o): Rewrite.
7493 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7494 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7495 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7496 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7497 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7498 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7499 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7500 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7501 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7502 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7503 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7504 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7505 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7506 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7507 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7508 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7509 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7510 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7511 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7512 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7513 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7514 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7515 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7516 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7517 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7518 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7519 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7520 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7521 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7522 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7523 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7524 (reg-tilegx.o): Remove.
7525 (all_object_files): New macro.
7526 Include .deps files.
7527 * aclocal.m4, configure: Rebuild.
7528 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7529 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7530 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7531
e90e9ad9
TT
75322012-12-05 Tom Tromey <tromey@redhat.com>
7533
7534 PR gdb/14917:
7535 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7536
02d403bf 75372012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7538
7539 * configure.ac: Check for linux/perf_event.h.
7540 * config.in: Regenerated.
7541 * configure: Regenerated.
7542
0270a750
PA
75432012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7544
7545 * hostio.c (handle_readlink): Decrease buffer size
7546 parameter passed to readlink by one byte.
7547
8c29b58e
YQ
75482012-11-26 Yao Qi <yao@codesourcery.com>
7549
7550 * configure.ac (build_warnings): Append '-Wempty-body'.
7551 * configure: Regenerated.
7552 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7553 body.
7554
8bdce1ff
PM
75552012-11-15 Pierre Muller <muller@sourceware.org>
7556
7557 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7558 * config.in: Regenerate.
7559 * configure: Regenerate.
7560 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7561 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7562 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7563 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7564 header.
7565 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7566 instead of <sys/wait.h> header.
7567 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7568
02d403bf 75692012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7570
7571 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7572 (various make rules): Remove -DGDBSERVER
7573
fbd5db48
YQ
75742012-11-09 Yao Qi <yao@codesourcery.com>
7575
7576 * spu-low.c (current_ptid): Move it to ..
7577 * gdbthread.h: ... here. New.
7578 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7579 * server.c (myresume, process_serial_event): Likewise.
7580 * thread-db.c (thread_db_find_new_threads): Likewise.
7581 * tracepoint.c (run_inferior_command): Likewise.
7582
b3dc46ff
AB
75832012-10-01 Andrew Burgess <aburgess@broadcom.com>
7584
7585 * server.c (handle_search_memory_1): Include access length in
7586 warning message.
7587
07c04788
HPN
75882012-09-05 Michael Brandt <michael.brandt@axis.com>
7589
7590 * linux-crisv32-low.c: Fix compile errors.
7591
918d227b
YQ
75922012-09-04 Yao Qi <yao@codesourcery.com>
7593
7594 * tracepoint.c (cmd_qtsv): Adjust debug message.
7595 Don't check CUR_TPOINT.
7596
18c1b81a
YQ
75972012-08-28 Yao Qi <yao@codesourcery.com>
7598
7599 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7600 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7601 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7602 Remove declarations of xmalloc, xreallloc, xstrdup and
7603 freeargv.
7604 * Makefile.in (libiberty_h): New.
7605 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7606 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7607
dc82f37b
YQ
76082012-08-23 Yao Qi <yao@codesourcery.com>
7609
7610 * server.h: Remove declaration of 'xsnprintf'.
7611
406b1477
KS
76122012-08-22 Keith Seitz <keiths@redhat.com>
7613
7614 * server.h: Include build-gnulib-gbserver/config.h.
7615 * gdbreplay.c: Likewise.
7616
e6712ff1
DE
76172012-08-08 Doug Evans <dje@google.com>
7618
7619 * Makefile.in (SFILES): Add gdb_vecs.c.
7620 (OBS): Add gdb_vecs.o.
7621 (gdb_vecs_h, host_defs_h): New variables.
7622 (thread-db.o): Add $(gdb_vecs_h) dependency.
7623 (gdb_vecs.o): New rule.
7624 * thread-db.c: #include "gdb_vecs.h".
7625 (thread_db_load_search): Use a vector to iterate over path elements.
7626 Handle text appearing after "$pdir".
7627
7628 * configure.ac: Add check for strstr.
7629 * config.in: Regenerate.
7630 * configure: Regenerate.
7631
7c3270ae
UW
76322012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7633
7634 * hostio.c (handle_pread): If pread fails, fall back to attempting
7635 lseek/read.
7636 (handle_pwrite): Likewise for pwrite.
7637
b62e2b27
UW
76382012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7639
7640 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7641 between unsupported TYPE and unimplementable ADDR/LEN combination.
7642 (arm_insert_point): Act on new return value.
7643
78a99e91
PA
76442012-07-31 Pedro Alves <palves@redhat.com>
7645
7646 * server.c (process_point_options): Only skip tokens if we find
7647 one that is unrecognized. Don't treat 'X' specially while
7648 skipping unrecognized tokens.
7649
fcf303ab
UW
76502012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7651
7652 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7653 to 4-byte-align HW breakpoint addresses for Thumb.
7654
7255706c
YQ
76552012-07-27 Yao Qi <yao@codesourcery.com>
7656
7657 PR remote/14161.
7658
7659 * server.h: Declare gdb_agent_about_to_close.
7660 * target.c (kill_inferior): Include "agent.h".
7661 New. Send command 'kill'.
7662 * target.h (kill_inferior): Removed macro.
7663 * tracepoint.c (gdb_agent_about_to_close): New.
7664 (gdb_agent_helper_thread): Handle command 'close'.
7665 Wait endlessly until the inferior stops.
7666 Install gdb_agent_remove_socket to atexit hook.
7667 (agent_socket_name): New static variable.
7668 (gdb_agent_socket_init): Replace local variable 'name' with
7669 'agent_socket_name'.
7670 (gdb_agent_remove_socket): New.
7671
5a3f286f
YQ
76722012-07-27 Yao Qi <yao@codesourcery.com>
7673
7674 * server.c (process_point_options): Stop at 'X' when parsing.
7675
961bd387
ME
76762012-07-19 Michael Eager <eager@eagercon.com>
7677
a261b8f5 7678 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7679 to hw_execute.
7680 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7681 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7682 hardware breakpoint.
7683
aa7c7447
JK
76842012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7685
7686 * gdbserver/linux-low.c (initialize_low): Call
7687 linux_ptrace_init_warnings.
7688
7f216e7c
DE
76892012-07-02 Doug Evans <dje@google.com>
7690
7691 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7692 pointer to int.
7693
d3ce09f5
SS
76942012-07-02 Stan Shebs <stan@codesourcery.com>
7695
7696 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7697 (ax.o): Add it to build rule.
7698 (ax-ipa.o): Ditto.
7699 (OBS): Add format.o.
7700 (IPA_OBS): Add format.o.
7701 * server.c (handle_query): Claim support for breakpoint commands.
7702 (process_point_options): Add command case.
7703 (process_serial_event): Leave running if there are printfs in
7704 effect.
7705 * mem-break.h (any_persistent_commands): Declare.
7706 (add_breakpoint_commands): Declare.
7707 (gdb_no_commands_at_breakpoint): Declare.
7708 (run_breakpoint_commands): Declare.
7709 * mem-break.c (struct point_command_list): New struct.
7710 (struct breakpoint): New field command_list.
7711 (any_persistent_commands): New function.
7712 (add_commands_to_breakpoint): New function.
7713 (add_breakpoint_commands): New function.
7714 (gdb_no_commands_at_breakpoint): New function.
7715 (run_breakpoint_commands): New function.
7716 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7717 locally.
7718 * ax.c: Include format.h.
7719 (ax_printf): New function.
7720 (gdb_eval_agent_expr): Add printf opcode.
7721
2f8f6aed
YQ
77222012-06-13 Yao Qi <yao@codesourcery.com>
7723
7724 * server.c (start_inferior): Remove duplicated writes to fields
7725 'last_resume_kind' and 'last_status' of 'current_inferior'.
7726
0c9070b3
YQ
77272012-06-12 Yao Qi <yao@codesourcery.com>
7728 Pedro Alves <palves@redhat.com>
7729
7730 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7731 comment.
7732 * server.c (handle_v_cont): Extend comment.
7733
c52daf70
YQ
77342012-06-11 Yao Qi <yao@codesourcery.com>
7735
7736 * linux-low.c (linux_attach): Add 'static'.
7737
d38bbb0a
YQ
77382012-06-06 Yao Qi <yao@codesourcery.com>
7739
7740 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7741
89dc0afd
JK
77422012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7743
7744 Fix gcc -flto compilation warning.
7745 * server.c (main): Make variable multi_mode and attach volatile.
7746
75f62ce7
TJB
77472012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7748
7749 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7750 if the platform doesn't know about it.
7751
65f479b6
PA
77522012-05-30 Jeff Kenton <jkenton@tilera.com>
7753
7754 * Makefile.in (SFILES): Add linux-tile-low.c.
7755 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7756 * configure.srv: Handle tilegx-*-linux*.
7757 * linux-tile-low.c: New file.
7758
0c5bf5a9
JK
77592012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7760
7761 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7762
a493e3e2
PA
77632012-05-24 Pedro Alves <palves@redhat.com>
7764
7765 PR gdb/7205
7766
43aaf8b6 7767 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7768
2ea28649
PA
77692012-05-24 Pedro Alves <palves@redhat.com>
7770
7771 PR gdb/7205
7772
7773 Replace target_signal with gdb_signal throughout.
7774
8d409d16
MR
77752012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7776
7777 * linux-low.c (linux_store_registers): Avoid the copying sequence
7778 when no data has been retrieved by ptrace.
7779
23512c01
MGD
77802012-05-22 Will Deacon <will.deacon@arm.com>
7781
7782 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7783 Include asm/ptrace.h.
7784 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7785 already defined.
7786
4934b29e
MR
77872012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7788
7789 * linux-low.c (linux_store_registers): Don't re-retrieve data
7790 with ptrace that has already been obtained from /proc. Always
7791 copy any data retrieved with ptrace to the buffer supplied.
7792
bde24c0a
PA
77932012-05-11 Yao Qi <yao@codesourcery.com>
7794 Pedro Alves <palves@redhat.com>
7795
7796 * linux-low.c (enum stopping_threads_kind): New.
7797 (stopping_threads): Change type to `enum stopping_threads_kind'.
7798 (handle_extended_wait): If stopping and suspending threads, leave
7799 the new_lwp suspended too.
7800 (linux_wait_for_event): Adjust.
7801 (stop_all_lwps): Set `stopping_threads' to
7802 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7803 whether we're suspending threads or just stopping them. Assert no
7804 recursion happens.
7805
623b6bdf
YQ
78062012-04-29 Yao Qi <yao@codesourcery.com>
7807
7808 * server.h: Move some code to ...
7809 * gdbthread.h: ... here. New.
7810 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7811 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7812 (nto-low.o, win32-low.o): Likewise.
7813 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7814 * regcache.c, remote-utils.c, server.c: Likewise.
7815 * target.c, tracepoint.c, win32-low.c: Likewise.
7816
f15f9948
TJB
78172012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7818
7819 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7820 (PTRACE_ARG4_TYPE): Likewise.
7821 (PTRACE_XFER_TYPE): Likewise.
7822 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7823 ptrace to PTRACE_ARG3_TYPE.
7824 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7825 (PTRACE_ARG4_TYPE): Likewise.
7826 (PTRACE_XFER_TYPE): Likewise.
7827 (linux_detach_one_lwp): Cast fourth argument of
7828 ptrace to long then PTRACE_ARG4_TYPE.
7829 (regsets_fetch_inferior_registers): Cast third argument of
7830 ptrace to long then PTRACE_ARG3_TYPE.
7831 (regsets_store_inferior_registers): Likewise.
7832
38ea300a
PA
78332012-04-20 Pedro Alves <palves@redhat.com>
7834
7835 * configure: Regenerate.
7836
c971b7fa
PA
78372012-04-19 Pedro Alves <palves@redhat.com>
7838
43aaf8b6 7839 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7840 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7841 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7842 (all, install-only, uninstall, clean-info, all-lib, clean): No
7843 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7844 (maintainer-clean realclean distclean): Use subdir_do.
7845 (subdir_do): New.
7846 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7847 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7848 * acinclude.m4: Include acx_configure_dir.m4.
7849 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7850 calls. Call AC_PROG_RANLIB. Configure gnulib using
7851 ACX_CONFIGURE_DIR.
7852 (GNULIB): New.
7853 (GNULIB_STDINT_H): Adjust.
7854 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7855 * gdbreplay.c: Include build-gnulib/config.h.
7856 * server.h: Likewise.
7857 * aclocal.m4: Regenerate.
7858 * config.in: Regenerate.
7859 * configure: Regenerate.
c971b7fa 7860
809277f8
PA
78612012-04-19 Pedro Alves <palves@redhat.com>
7862
7863 * Makefile.in (LIBGNU, INCGNU): Adjust.
7864 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7865 (all, install-only, uninstall, clean-info, all-lib, clean)
7866 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7867 * configure.ac: Adjust AC_OUTPUT output.
7868 * aclocal.m4: Regenerate.
7869 * configure: Regenerate.
7870
fd9bb8b8
PA
78712012-04-19 Pedro Alves <palves@redhat.com>
7872
7873 * Makefile.in (generated_files): New.
7874 (server_h): Remove the explicit dependency on config.h, and depend
7875 on $generated_files.
7876
1c298c66
PA
78772012-04-19 Pedro Alves <palves@redhat.com>
7878
7879 * Makefile.in (INCGNU): Add -Ignulib.
7880
57c4b50b
PA
78812012-04-19 Pedro Alves <palves@redhat.com>
7882
7883 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7884 (INCGNU): ... this, and spell out -I here.
7885 (GNULIB_LIB): Rename to ...
7886 (LIBGNU): ... this.
7887 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7888
1030e047
PA
78892012-04-19 Pedro Alves <palves@redhat.com>
7890
7891 * config.in: Regenerate.
7892
447d4319
PA
78932012-04-19 Pedro Alves <palves@redhat.com>
7894
7895 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7896 * server.h (memmem): Remove declaration.
7897 * config.in: Regenerate.
7898 * configure: Regenerate.
7899
aad9eab9
YQ
79002012-04-19 Yao Qi <yao@codesourcery.com>
7901
7902 * Makefile.in (SFILES): Add common/vec.c.
7903 (OBS): Add vec.o.
7904 (vec.o): New rule.
7905
3e10640f
YQ
79062012-04-19 Yao Qi <yao@codesourcery.com>
7907
7908 * remote-utils.c (prepare_resume_reply): Replace with macro
7909 target_core_of_thread.
7910 * server.c (handle_qxfer_threads_proper): Likewise.
7911 * target.h (traget_core_of_thread): New macro.
7912
71622373
PA
79132012-04-18 Pedro Alves <palves@redhat.com>
7914
7915 * aclocal.m4: Regenerate.
7916 * configure: Regenerate.
7917
80d26939
YQ
79182012-04-16 Yao Qi <yao@codesourcery.com>
7919
7920 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7921 duplicated on address.
7922
42476b70
YQ
79232012-04-16 Yao Qi <yao@codesourcery.com>
7924
7925 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7926 (struct tracepoint_action_ops) <send>: New field.
7927 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7928 (agent_expr_send, x_tracepoint_action_send): New.
7929 (l_tracepoint_action_send): New.
7930 (cmd_qtdp): Download and install tracepoint
7931 according to `use_agent'.
7932 (run_inferior_command): Add one more parameter `len'.
7933 Update callers.
7934 (tracepoint_send_agent): New.
7935 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7936
7bc83639
YQ
79372012-04-16 Yao Qi <yao@codesourcery.com>
7938
7939 * tracepoint.c (download_tracepoints): Moved to ...
7940 (cmd_qtstart): ... here.
7941
5f18041e
YQ
79422012-04-14 Yao Qi <yao@codesourcery.com>
7943
7944 * tracepoint.c: Include inttypes.h.
7945 (struct collect_memory_action): Use sized types.
7946 (struct tracepoint): Likewise.
7947 (cmd_qtdp, stop_tracing): Update print specifiers.
7948 (cmd_qtp, response_tracepoint): Likewise.
7949 (collect_data_at_tracepoint): Likewise.
7950 (collect_data_at_step): Likewise.
7951
55a8c076
YQ
79522012-04-14 Yao Qi <yao@codesourcery.com>
7953
7954 Import gnulib module inttypes.
7955 * aclocal.m4, config.in, configure: Regenerated.
7956
dc750257
YQ
79572012-04-14 Yao Qi <yao@codesourcery.com>
7958
7959 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7960 Makefile and config.status at last.
7961
0ab5faf9
YQ
79622012-04-13 Yao Qi <yao@codesourcery.com>
7963
7964 * tracepoint.c: Include stdint.h unconditionally.
7965
18f5fd81
TJB
79662012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7967
7968 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7969 on BFD_HAVE_SYS_PROCFS_TYPE.
7970 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7971 * configure: Regenerate.
7972 * config.in: Likewise.
7973
4d47af5c
L
79742012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7975
7976 * Makefile.in (clean): Also remove x32.c x32-linux.c
7977 x32-avx.c x32-avx-linux.c.
7978 (x32.o): New target.
7979 (x32.c): Likewise.
7980 (x32-linux.o): Likewise.
7981 (x32-linux.c): Likewise.
7982 (x32-avx.o): Likewise.
7983 (x32-avx.c): Likewise.
7984 (x32-avx-linux.o): Likewise.
7985 (x32-avx-linux.c): Likewise.
7986
7987 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7988 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7989 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7990 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7991 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7992 i386/x32-avx-linux.xml.
7993
7994 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7995 (init_registers_x32_avx_linux): Likwise.
7996 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7997 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7998
ecedbe58
PA
79992012-04-13 Pedro Alves <palves@redhat.com>
8000
8001 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8002 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8003 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8004 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8005 the sub-make.
8006
c92b5177
L
80072012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8008
8009 * linux-x86-low.c (compat_x32_clock_t): New.
8010 (compat_x32_siginfo_t): Likewise.
8011 (compat_x32_siginfo_from_siginfo): Likewise.
8012 (siginfo_from_compat_x32_siginfo): Likewise.
8013 (linux_is_elf64): Likewise.
8014 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8015 and siginfo_from_compat_x32_siginfo for x32.
8016 (x86_arch_setup): Set linux_is_elf64.
8017
214d508e
L
80182012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8019
8020 PR gdb/13969
8021 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8022 e_machine field.
8023 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8024 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8025 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8026 compatible with process.
8027
c9a1864a
YQ
80282012-04-12 Yao Qi <yao@codesourcery.com>
8029
8030 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8031 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8032 (install-only, install-info, clean): Handle sub dir gnulib.
8033 (all-lib, am--refresh): New targets.
8034 (memmem.o): Remove target.
8035 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8036 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8037 (AC_REPLACE_FUNCS): Remove memmem.
8038 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8039 (AC_OUTPUT): Generate Makefile in gnulib/.
8040 * aclocal.m4, config.in, configure: Regenerated.
8041
367ba2c2
MR
80422012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8043
8044 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8045
9d236627
PA
80462012-04-05 Pedro Alves <palves@redhat.com>
8047
8048 -Werror=strict-aliasing
8049
8050 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8051 pointer.
8052
111217b3
PA
80532012-04-04 Pedro Alves <palves@redhat.com>
8054
8055 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8056 (sparc_store_gregset_from_stack, sparc_store_gregset)
8057 (sparc_breakpoint_at): Fix formatting.
8058
8365dcf5
TJB
80592012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8060
8061 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8062 are available.
8063 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8064 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8065 * config.in: Regenerate.
8066 * configure: Likewise.
8067
689cc2ae
PA
80682012-03-29 Pedro Alves <palves@redhat.com>
8069
8070 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8071 Correct ptrace arguments.
8072
c14dfd32
PA
80732012-03-28 Pedro Alves <palves@redhat.com>
8074
8075 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8076 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8077 (IA64_FR1_REGNUM): New defines.
8078 (ia64_fetch_register): New.
8079 (the_low_target): Install it.
8080 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8081 field.
8082 * linux-low.c (linux_fetch_registers): Try the
8083 the_low_target.fetch_register hook first.
8084
8085 * linux-arm-low.c (the_low_target): Adjust.
8086 * linux-bfin-low.c (the_low_target): Adjust.
8087 * linux-cris-low.c (the_low_target): Adjust.
8088 * linux-crisv32-low.c (the_low_target): Adjust.
8089 * linux-m32r-low.c (the_low_target): Adjust.
8090 * linux-m68k-low.c (the_low_target): Adjust.
8091 * linux-mips-low.c (the_low_target): Adjust.
8092 * linux-ppc-low.c (the_low_target): Adjust.
8093 * linux-s390-low.c (the_low_target): Adjust.
8094 * linux-sh-low.c (the_low_target): Adjust.
8095 * linux-sparc-low.c (the_low_target): Adjust.
8096 * linux-tic6x-low.c (the_low_target): Adjust.
8097 * linux-x86-low.c (the_low_target): Adjust.
8098 * linux-xtensa-low.c (the_low_target): Adjust.
8099
63c88e13
PA
81002012-03-26 Pedro Alves <palves@redhat.com>
8101
8102 * server.c (handle_qxfer_libraries): Don't bail early if
8103 the_target->qxfer_libraries_svr4 is not NULL.
8104
fb723180
PA
81052012-03-26 Pedro Alves <palves@redhat.com>
8106
8107 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8108
0afae3cf
PA
81092012-03-23 Pedro Alves <palves@redhat.com>
8110
8111 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8112 "library-list-svr4" element's start tag when the the DSO list is
8113 empty.
8114
485f1ee4
PA
81152012-03-23 Pedro Alves <palves@redhat.com>
8116
8117 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8118 a variable whose type size is the same as the inferior's pointer
8119 size.
8120
a5362b9a
TS
81212012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8122
8123 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8124 struct siginfo.
8125 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8126 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8127 * linux-low.h: Include <signal.h>.
8128 (struct siginfo): Remove forward declaration.
8129 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8130 struct siginfo.
8131
d226c142
MF
81322012-03-21 Mike Frysinger <vapier@gentoo.org>
8133
8134 * .gitignore: Ignore more files.
8135
122f36ef
PA
81362012-03-19 Pedro Alves <palves@redhat.com>
8137 Jan Kratochvil <jan.kratochvil@redhat.com>
8138
8139 * server.c (cont_thread, general_thread): Add describing comments.
8140 (start_inferior): Clear `cont_thread'.
8141 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8142 of a process.
8143
fc3e5175
YQ
81442012-03-15 Yao Qi <yao@codesourcery.com>
8145
8146 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8147 handling to ...
8148 (cmd_qtdp): ... here.
8149
8d0d92cd
YQ
81502012-03-15 Yao Qi <yao@codesourcery.com>
8151
8152 * tracepoint.c (struct tracepoint_action_ops): New.
8153 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8154 (m_tracepoint_action_download): New.
8155 (r_tracepoint_action_download): New.
8156 (x_tracepoint_action_download): New.
8157 (l_tracepoint_action_download): New.
8158 (add_tracepoint_action): Install `action->ops' according type.
8159 (download_tracepoint_1): Move code `download' function pointer
8160 of various tracepoint_action_ops.
8161
87b0bb13
JK
81622012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8163
8164 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8165 linux_ptrace_attach_warnings.
8166
5f572dec
JK
81672012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8168
8169 * Makefile.in (linux-ptrace.o): New.
8170 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8171 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8172 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8173 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8174 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8175 of these targets.
8176 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8177
f4647387
YQ
81782012-03-08 Yao Qi <yao@codesourcery.com>
8179 Pedro Alves <palves@redhat.com>
8180
8181 Fix PR server/13392.
8182 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8183 offset of JMP insn.
8184 * tracepoint.c (remove_tracepoint): New.
8185 (cmd_qtdp): Call remove_tracepoint when failed to install.
8186
9b224c5e
PA
81872012-03-07 Pedro Alves <palves@redhat.com>
8188
8189 * linux-low.c (get_detach_signal): New.
8190 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8191 Pass on pending signals to PTRACE_DETACH. Check the result of the
8192 ptrace call.
8193 * server.c (program_signals, program_signals_p): New.
8194 (handle_general_set): Handle QProgramSignals.
8195 * server.h (program_signals, program_signals_p): Declare.
8196
e237a7e2
JK
81972012-03-05 Pedro Alves <palves@redhat.com>
8198 Jan Kratochvil <jan.kratochvil@redhat.com>
8199
8200 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8201 New comment why.
8202
5808517f
YQ
82032012-03-03 Yao Qi <yao@codesourcery.com>
8204
8205 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8206 agent_look_up_symbols.
8207
58b4daa5
YQ
82082012-03-03 Yao Qi <yao@codesourcery.com>
8209
8210 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8211 (linux-x86-low.o): Likewise.
8212 * server.h: Remove in_process_agent_loaded.
8213 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8214 common/agent.c.
8215 Update callers.
8216
8ffcbaaf
YQ
82172012-03-03 Yao Qi <yao@codesourcery.com>
8218
8219 * tracepoint.c (gdb_agent_capability): New global.
8220 (in_process_agent_loaded_ust): Renamed to
8221 `in_process_agent_supports_ust'.
8222 Update callers.
8223 (in_process_agent_supports_ust): Call agent_capability_check.
8224 (clear_installed_tracepoints): Assert that agent supports
8225 agent.
8226
d1feda86
YQ
82272012-03-03 Yao Qi <yao@codesourcery.com>
8228
8229 * linux-low.c (linux_supports_agent): New.
8230 (linux_target_ops): Initialize field `supports_agent' with
8231 linux_supports_agent.
8232 * target.h (struct target_ops) <supports_agent>: New.
8233 (target_supports_agent): New macro.
8234 * server.c (handle_general_set): Handle packet 'QAgent'.
8235 (handle_query): Send `QAgent+'.
8236 * Makefile.in (server.o): Depends on agent.h.
8237
2fa291ac
YQ
82382012-03-03 Yao Qi <yao@codesourcery.com>
8239
8240 * Makefile.in (OBS): Add agent.o.
8241 Add new rule for agent.o.
8242 Track dependence of tracepoint.c on agent.h.
8243 * tracepoint.c (run_inferior_command_1):
8244 (run_inferior_command): Call agent_run_command.
8245 (gdb_ust_connect_sync_socket): Deleted. Move it to
8246 common/agent.c.
8247 (resume_thread, stop_thread): Likewise.
8248 (gdb_ust_socket_init): Renamed to ...
8249 (gdb_agent_socket_init): ... New.
8250 (gdb_ust_thread): Renamed to ...
8251 (gdb_agent_helper_thread): ... New.
8252 (gdb_ust_init): Move some code to ...
8253 (gdb_agent_init): ... here. New.
8254 [HAVE_UST]: Call gdb_ust_init.
8255 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8256 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8257 * config.in, configure: Regenerated.
8258
05044653
PA
82592012-03-02 Pedro Alves <palves@redhat.com>
8260
8261 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8262 * linux-low.c (struct simple_pid_list): New.
8263 (stopped_pids): New a struct simple_pid_list pointer.
8264 (add_to_pid_list, pull_pid_from_list): New.
8265 (handle_extended_wait): Don't assume the first signal new children
8266 report is SIGSTOP. Adjust call to pull_pid_from_list.
8267 (linux_wait_for_lwp): Adjust.
8268
8d00225b
YQ
82692012-03-02 Yao Qi <yao@codesourcery.com>
8270
8271 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8272 debug log.
8273
19560ba5
YQ
82742012-03-02 Yao Qi <yao@codesourcery.com>
8275
8276 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8277 `stop_pc' and `tpoint'. Update caller.
8278
1faeff08
MR
82792012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8280
8281 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8282 * linux-low.c (use_linux_regsets): New macro.
8283 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8284 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8285 (linux_register_in_regsets): New function.
8286 (usr_fetch_inferior_registers): Skip registers covered by
8287 regsets.
8288 (usr_store_inferior_registers): Likewise.
8289 (usr_fetch_inferior_registers): New macro.
8290 (usr_store_inferior_registers): Likewise.
8291 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8292 (linux_store_registers): Likewise.
8293 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8294 prototype.
8295 (init_registers_mips64_dsp_linux): Likewise.
8296 (init_registers_mips_linux): New macro.
8297 (init_registers_mips_dsp_linux): Likewise.
8298 (mips_dsp_num_regs): Likewise.
8299 (DSP_BASE, DSP_CONTROL): New fallback macros.
8300 (mips_base_regs): New macro.
8301 (mips_regmap): Use it. Fix the size.
8302 (mips_dsp_regmap): New variable.
8303 (mips_dsp_regset_bitmap): Likewise.
8304 (mips_arch_setup): New function.
8305 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8306 than mips_regmap.
8307 (mips_cannot_store_register): Likewise.
8308 (the_low_target): Update .arch_setup, .num_regs and .regmap
8309 initializers. Add .regset_bitmap initializer.
8310 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8311 initializer.
8312 * linux-bfin-low.c (the_low_target): Likewise.
8313 * linux-cris-low.c (the_low_target): Likewise.
8314 * linux-crisv32-low.c (the_low_target): Likewise.
8315 * linux-ia64-low.c (the_low_target): Likewise.
8316 * linux-m32r-low.c (the_low_target): Likewise.
8317 * linux-m68k-low.c (the_low_target): Likewise.
8318 * linux-ppc-low.c (the_low_target): Likewise.
8319 * linux-s390-low.c (the_low_target): Likewise.
8320 * linux-sh-low.c (the_low_target): Likewise.
8321 * linux-sparc-low.c (the_low_target): Likewise.
8322 * linux-tic6x-low.c (the_low_target): Likewise.
8323 * linux-x86-low.c (the_low_target): Likewise.
8324 * linux-xtensa-low.c (the_low_target): Likewise.
8325 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8326 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8327 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8328 srv_xmlfiles.
8329 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8330 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8331
c03e6ccc
YQ
83322012-02-29 Yao Qi <yao@codesourcery.com>
8333 Pedro Alves <palves@redhat.com>
8334
8335 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8336 `step_over_finished' is true.
8337
644cebc9
PA
83382012-02-27 Pedro Alves <palves@redhat.com>
8339
8340 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8341 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8342
c14d7ab2
PA
83432012-02-27 Pedro Alves <palves@redhat.com>
8344
8345 PR server/9684
8346 * linux-low.c (pid_is_stopped): New.
8347 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8348
412c89dd
LM
83492012-02-25 Luis Machado <lgustavo@codesourcery.com>
8350
8351 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8352 of conditions.
8353
b745defe
MR
83542012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8355
8356 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8357
9f3a5c85
LM
83582012-02-24 Luis Machado <lgustavo@codesourcery>
8359
8360 * server.c (handle_query): Advertise support for target-side
8361 breakpoint condition evaluation.
8362 (process_point_options): New function.
8363 (process_serial_event): When inserting a breakpoint, check for
8364 a target-side condition that should be evaluated.
8365
8366 * mem-break.c: Include regcache.h and ax.h.
8367 (point_cond_list_t): New data structure.
8368 (breakpoint) <cond_list>: New field.
8369 (find_gdb_breakpoint_at): Make non-static.
8370 (delete_gdb_breakpoint_at): Clear any target-side
8371 conditions.
8372 (clear_gdb_breakpoint_conditions): New function.
8373 (add_condition_to_breakpoint): Likewise.
8374 (add_breakpoint_condition): Likewise.
8375 (gdb_condition_true_at_breakpoint): Likewise.
8376 (gdb_breakpoint_here): Return result directly instead
8377 of going through a local variable.
8378
8379 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8380 (clear_gdb_breakpoint_conditions): Likewise.
8381 (add_breakpoint_condition): Likewise.
8382 (gdb_condition_true_at_breakpoint): Likewise.
8383
8384 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8385 (need_step_over_p): Take target-side breakpoint condition into
8386 consideration.
8387
5e1dc496
LM
83882012-02-24 Luis Machado <lgustavo@codesourcery>
8389
8390 * server.h: Include tracepoint.h.
8391 (agent_mem_read, agent_get_trace_state_variable_value,
8392 agent_set_trace_state_variable_value,
8393 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8394 get_set_tsv_func_addr): New prototypes.
8395
8396 * ax.h: New include file.
8397 * ax.c: New source file.
8398
8399 * tracepoint.c: Include ax.h.
8400 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8401 agent_expr, eval_result_type): Move to ax.h.
8402 (parse_agent_expr): Rename to ...
8403 (gdb_parse_agent_expr): ... this, make it non-static and move
8404 to ax.h.
8405 (unparse_agent_expr) Rename to ...
8406 (gdb_unparse_agent_expr): ... this, make it non-static and move
8407 to ax.h.
8408 (eval_agent_expr): Rename to ...
8409 (eval_tracepoint_agent_expr): ... this.
8410 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8411 forward declarations.
8412 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8413 (agent_get_trace_state_variable_value): New function.
8414 (agent_set_trace_state_variable_value): New function.
8415 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8416 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8417 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8418 (condition_true_at_tracepoint): Likewise.
8419 (parse_agent_expr): Rename to ...
8420 (gdb_parse_agent_expr): ... this and move to ax.c.
8421 (unparse_agent_expr): Rename to ...
8422 (gdb_unparse_agent_expr): ... this and move to ax.c.
8423 (gdb_agent_op_name): Move to ax.c.
8424 (eval_agent_expr): Rename to ...
8425 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8426 and move to ax.c.
8427 (eval_tracepoint_agent_expr): New function.
8428 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8429 non-static.
5e1dc496
LM
8430 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8431 ax.c.
8432 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8433 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8434 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8435 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8436 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8437 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8438 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8439 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8440 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8441 (compile_bytecodes): Remove forward declaration.
8442 (is_goto_target): Move to ax.c.
8443 (compile_bytecodes): Move to ax.c and call
8444 agent_get_trace_state_variable_value (...) and
8445 agent_set_trace_state_variable_value (...).
8446
8447 * Makefile.in: Update ax.c and IPA dependencies.
8448
277e4e52
PA
84492012-02-24 Pedro Alves <palves@redhat.com>
8450
8451 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8452 (cmd_bigqtbuffer_circular): ... this. Only handle
8453 'QTBuffer:circular:'.
8454 (handle_tracepoint_general_set): Adjust.
8455
bf4c19f7
YQ
84562012-02-16 Yao Qi <yao@codesourcery.com>
8457
8458 * inferiors.c: Move code to ...
8459 * dll.c: .... here. New.
8460 * server.h: Declare clear_dlls.
8461 * Makefile.in (SFILES): Add dll.c.
8462 (OBS): Add dll.o
8463 (dll.o): New rule.
8464
d73f2619
YQ
84652012-02-11 Yao Qi <yao@codesourcery.com>
8466
8467 * server.c: (handle_monitor_command): Add a new parameter
8468 `own_buf'.
8469 (handle_query): Update caller.
8470
f8255c2a
JB
84712012-02-09 Joel Brobecker <brobecker@adacore.com>
8472
8473 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8474 * configure, config.in: Regenerate.
8475 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8476 is not defined.
8477
da84f473
PA
84782012-02-02 Pedro Alves <palves@redhat.com>
8479
8480 Try SIGKILL first, then PTRACE_KILL.
8481 * linux-low.c (linux_kill_one_lwp): New.
8482 (linux_kill_one_lwp): Rename to ...
8483 (kill_one_lwp_callback): ... this. Use the new
8484 linux_kill_one_lwp.
8485
e886a173
PA
84862012-02-02 Pedro Alves <palves@redhat.com>
8487
8488 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8489 inferior.
8490
be07f1a2
PA
84912012-01-27 Pedro Alves <palves@redhat.com>
8492
8493 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8494 (elf_64_file_p): Make static.
8495 (linux_pid_exe_is_elf_64_file): New.
8496 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8497 Delete declarations.
8498 (linux_pid_exe_is_elf_64_file): Declare.
8499 * linux-x86-low.c (x86_arch_setup): Use
8500 linux_pid_exe_is_elf_64_file.
8501
d8301ad1
JK
85022012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8503
8504 * linux-low.c (linux_wait_for_event_1): Rename to ...
8505 (linux_wait_for_event): ... here and merge it with former
8506 linux_wait_for_event - new variable wait_ptid, use it.
8507 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8508
01b17894
PA
85092012-01-23 Pedro Alves <palves@redhat.com>
8510
8511 * server.c (main): Avoid yet another case of infinite loop while
8512 detaching/killing after a longjmp.
8513
e825046f
JK
85142012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8515
8516 Code cleanup.
8517 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8518
b9e7b9c3
UW
85192012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8520
8521 * hostio.c (handle_readlink): New function.
8522 (handle_vFile): Call it to handle "vFile:readlink" packets.
8523
901f9912
UW
85242012-01-20 Pedro Alves <palves@redhat.com>
8525 Ulrich Weigand <ulrich.weigand@linaro.org>
8526
8527 * server.c (handle_v_requests): Only support vAttach and vRun to
8528 start multiple processes when in extended protocol mode.
8529
fc1ab1a0
PA
85302012-01-17 Pedro Alves <palves@redhat.com>
8531
8532 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8533 memalign plus mprotect to allocate the scratch buffer.
8534
7d5d4e98
PA
85352012-01-13 Pedro Alves <palves@redhat.com>
8536
8537 * server.c (attach_inferior): Clear `cont_thread'.
8538
f128d5e9
PA
85392012-01-13 Pedro Alves <palves@redhat.com>
8540
8541 * server.c (main): Avoid infinite loop while detaching/killing
8542 after a longjmp.
8543
06db92f0
DE
85442012-01-09 Doug Evans <dje@google.com>
8545
8546 * server.c (start_inferior): Set last_ptid in --wrapper case.
8547
32d92999
YQ
85482012-01-06 Yao Qi <yao@codesourcery.com>
8549
8550 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8551 defined.
8552 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8553
5e0a92a9
YQ
85542012-01-04 Yao Qi <yao@codesourcery.com>
8555
8556 * tracepoint.c (cmd_qtdp): Print debug message
8557 for static tracepoint.
8558
ae639e8c
YQ
85592012-01-04 Yao Qi <yao@codesourcery.com>
8560
8561 * tracepoint.c (trace_vdebug): Differentiate debug message
8562 between gdbserver and IPA.
8563
f72429c5
YQ
85642012-01-03 Yao Qi <yao@codesourcery.com>
8565
8566 * tracepoint.c (tracepoint_was_hit): Don't collect for
8567 static tracepoint.
8568
12c3e59c
JB
85692012-01-02 Joel Brobecker <brobecker@adacore.com>
8570
8571 * terminal.h: Reformat copyright header.
8572
67827812
JB
85732012-01-02 Joel Brobecker <brobecker@adacore.com>
8574
8575 * server.c (gdbserver_version): Update copyright year.
8576 * gdbreplay.c (gdbreplay_version): Likewise.
8577
3e52c33d
JK
85782011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8579
8580 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8581
8582 Revert:
8583 2011-12-18 Hui Zhu <teawater@gmail.com>
8584 * linux-low.c (linux_create_inferior): Save return value to ret.
8585
66f1260e
HZ
85862011-12-18 Hui Zhu <teawater@gmail.com>
8587
8588 * linux-low.c (linux_create_inferior): Save return value to ret.
8589
e77616d7
DE
85902011-12-16 Doug Evans <dje@google.com>
8591
e7b06c57
DE
8592 * linux-low.c (linux_create_inferior): If stdio connection,
8593 redirect stdin from /dev/null, stdout to stderr.
8594 * remote-utils.c (remote_is_stdio): New static global.
8595 (remote_connection_is_stdio): New function.
8596 (remote_prepare): Handle stdio connection.
8597 (remote_open): Ditto.
8598 (remote_close): Don't close stdin for stdio connections.
8599 (read_prim,write_prim): New functions. Replace all calls to
8600 read/write to these.
8601 * server.c (main): Watch for "-" argument. Move call to
8602 remote_prepare before start_inferior.
8603 * server.h (STDIO_CONNECTION_NAME): New macro.
8604 (remote_connection_is_stdio): Declare.
8605
e77616d7
DE
8606 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8607 in debugging output.
8608
82067193
YQ
86092011-12-15 Yao Qi <yao@codesourcery.com>
8610
8611 * tracepoint.c: Include sys/syscall.h.
8612 (gdb_ust_thread): Remove preprocessor conditional.
8613
82bfbe7e
PA
86142011-12-14 Pedro Alves <pedro@codesourcery.com>
8615
8616 * linux-low.c (linux_detach_one_lwp): Call
8617 the_low_target.prepare_to_resume before detaching.
8618
712c6575
YQ
86192011-12-14 Yao Qi <yao@codesourcery.com>
8620
8621 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8622 of write.
8623
d54d1edf
YQ
86242011-12-14 Yao Qi <yao@codesourcery.com>
8625
8626 * i386-low.c (i386_low_stopped_data_address): Initialize local
8627 variable `control'.
8628
6210a125
PA
86292011-12-13 Pedro Alves <pedro@codesourcery.com>
8630
8631 PR remote/13492
8632
8633 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8634 DR_CONTROL unless necessary. Extend comments.
8635 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8636 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8637
2ece8244
YQ
86382011-12-13 Yao Qi <yao@codesourcery.com>
8639
8640 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8641 macros.
8642 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8643
784867a5
JK
86442011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8645
8646 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8647 Print new debug message for such case.
8648
6bf36717
JK
86492011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8650
8651 Fix overlapping memcpy.
8652 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8653 the read_inferior_memory transfer.
8654 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8655 write_inferior_memory transfer.
8656 (set_fast_tracepoint_jump): New variable buf. Use it for the
8657 read_inferior_memory and write_inferior_memory transfers.
8658 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8659 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8660 Use it for the write_inferior_memory transfer.
8661 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8662 buffers.
8663
50275556
MR
86642011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8665
8666 * linux-low.c (fetch_register, store_register): Make code
8667 consistent, fix formatting.
8668
7325beb4
MR
86692011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8670
8671 * linux-low.c (usr_store_inferior_registers): Factor out code
8672 to handle individual registers into...
8673 (store_register): ... this new function.
8674
c642a434
UW
86752011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8676
8677 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8678 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8679 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8680 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8681 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8682 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8683 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8684 (srv_xmlfiles): Add new XML files.
8685
8686 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8687 and <sys/uio.h>.
8688 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8689 (init_registers_s390_linux32v1): Add prototype.
8690 (init_registers_s390_linux32v2): Likewise.
8691 (init_registers_s390_linux64v1): Likewise.
8692 (init_registers_s390_linux64v2): Likewise.
8693 (init_registers_s390x_linux64v1): Likewise.
8694 (init_registers_s390x_linux64v2): Likewise.
8695 (s390_num_regs): Increment to 52.
8696 (s390_regmap): Add orig_r2 register.
8697 (s390_num_regs_3264): Increment to 68.
8698 (s390_regmap_3264): Add orig_r2 register.
8699 (s390_collect_ptrace_register): Handle orig_r2 register.
8700 (s390_supply_ptrace_register): Likewise.
8701 (s390_fill_last_break): New function.
8702 (s390_store_last_break): Likewise.
8703 (s390_fill_system_call): New function.
8704 (s390_store_system_call): Likewise.
8705 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8706 register sets.
8707 (s390_check_regset): New function.
8708 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8709 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8710 Update target_regsets for available register sets.
8711
2268b414
JK
87122011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8713 Jan Kratochvil <jan.kratochvil@redhat.com>
8714
8715 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8716 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8717 New.
8718 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8719 * linux-low.h (struct process_info_private): New member r_debug.
8720 * server.c (handle_qxfer_libraries): Call
8721 the_target->qxfer_libraries_svr4.
8722 (handle_qxfer_libraries_svr4): New function.
8723 (qxfer_packets): New entry "libraries-svr4".
8724 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8725 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8726 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8727 PACKET_qXfer_libraries_svr4.
8728
d6db1fab
UW
87292011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8730
8731 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8732 PSW address/mask between 8-byte and 16-byte formats.
8733 (s390_supply_ptrace_register): Likewise.
8734 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8735 basic addressing mode bit.
8736
242f5f1c
SS
87372011-11-24 Stan Shebs <stan@codesourcery.com>
8738
8739 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8740
f196051f
SS
87412011-11-17 Stan Shebs <stan@codesourcery.com>
8742
8743 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8744 (tracing_start_time): New global.
8745 (tracing_stop_time): New global.
8746 (tracing_user_name): New global.
8747 (tracing_notes): New global.
8748 (tracing_stop_note): New global.
8749 (cmd_qtstart): Set traceframe_usage, start_time.
8750 (stop_tracing): Set stop_time.
8751 (cmd_qtstatus): Report additional status.
8752 (cmd_qtp): New function.
8753 (handle_tracepoint_query): Call it.
8754 (cmd_qtnotes): New function.
8755 (handle_tracepoint_general_set): Call it.
8756 (get_timestamp): Rename from tsv_get_timestamp.
8757
405f8e94
SS
87582011-11-14 Stan Shebs <stan@codesourcery.com>
8759 Kwok Cheung Yeung <kcy@codesourcery.com>
8760
8761 * linux-x86-low.c (small_jump_insn): New.
8762 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8763 trampoline and error message, build a trampoline and issue a small
8764 jump instruction to it.
8765 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8766 trampoline and error message.
8767 (x86_get_min_fast_tracepoint_insn_len): New.
8768 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8769 * linux-low.h (struct linux_target_ops): Add arguments to
8770 install_fast_tracepoint_jump_pad operation, add new operation.
8771 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8772 arguments.
8773 (linux_get_min_fast_tracepoint_insn_len): New function.
8774 (linux_target_op): Add new operation.
8775 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8776 (gdb_trampoline_buffer_end): Ditto.
8777 (gdb_trampoline_buffer_error): Ditto.
8778 (struct ipa_sym_addresses): Add fields for new IPA variables.
8779 (symbol_list): Add entries for new IPA variables.
8780 (struct tracepoint): Add fields to hold the address range of the
8781 trampoline used by the tracepoint.
8782 (trampoline_buffer_head): New static variable.
8783 (trampoline_buffer_tail): Ditto.
8784 (claim_trampoline_space): New function.
8785 (have_fast_tracepoint_trampoline_buffer): New function.
8786 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8787 structure.
8788 (install_fast_tracepoint): Ditto, also add error buffer argument.
8789 (cmd_qtminftpilen): New function.
8790 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8791 (fast_tracepoint_from_trampoline_address): New function.
8792 (fast_tracepoint_collecting): Handle trampoline as part of jump
8793 pad space.
8794 (set_trampoline_buffer_space): New function.
8795 (initialize_tracepoint): Initialize new IPA variables.
8796 * target.h (struct target_ops): Add arguments to
8797 install_fast_tracepoint_jump_pad operation, add new
8798 get_min_fast_tracepoint_insn_len operation.
8799 (target_get_min_fast_tracepoint_insn_len): New.
8800 (install_fast_tracepoint_jump_pad): Add arguments.
8801 * server.h (IPA_BUFSIZ): Define.
8802 * linux-i386-ipa.c: Include extra header files.
8803 (initialize_fast_tracepoint_trampoline_buffer): New function.
8804 (initialize_low_tracepoint): Call it.
8805 * server.h (set_trampoline_buffer_space): Declare.
8806 (claim_trampoline_space): Ditto.
8807 (have_fast_tracepoint_trampoline_buffer): Ditto.
8808
1e4d1764
YQ
88092011-11-14 Yao Qi <yao@codesourcery.com>
8810
8811 * server.c (handle_query): Handle InstallInTrace for qSupported.
8812 * tracepoint.c (add_tracepoint): Sort list.
8813 (install_tracepoint, download_tracepoint): New.
8814 (cmd_qtdp): Call them to install and download tracepoints.
8815 (sort_tracepoints): Removed.
8816 (cmd_qtstart): Update.
8817
5c73ff4e
YQ
88182011-11-14 Yao Qi <yao@codesourcery.com>
8819
8820 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8821 * mem-break.h: Declare.
8822 * tracepoint.c (cmd_qtstart): Move some code to ...
8823 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8824 New.
8825 (download_tracepoints): Move some code to ...
8826 (download_tracepoint_1): ... here. New.
8827
86a30030
YQ
88282011-11-08 Yao Qi <yao@codesourcery.com>
8829
8830 * remote-utils.c (relocate_instruction): A comment fix.
8831
8d26e50c
JB
88322011-11-07 Joel Brobecker <brobecker@adacore.com>
8833
8834 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8835 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8836 dr_status_mirror and dr_control_mirror from debug_reg_state.
8837 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8838 (i386_initial_stuff): Remove use of deleted globals.
8839 (i386_get_thread_context, i386_set_thread_context,
8840 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8841 from debug_reg_state.
8842
a59306a3
YQ
88432011-11-05 Yao Qi <yao@codesourcery.com>
8844
8845 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8846 address as TPOINT's.
8847
3065dfb6
SS
88482011-11-02 Stan Shebs <stan@codesourcery.com>
8849
8850 * tracepoint.c (agent_mem_read_string): New function.
8851 (eval_agent_expr): Call it for tracenz.
8852 * server.c (handle_query): Report support for tracenz.
8853
fd0d8c7c
YQ
88542011-11-02 Yao Qi <yao@codesourcery.com>
8855
8856 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8857
609086b1
YQ
88582011-11-02 Yao Qi <yao@codesourcery.com>
8859
8860 * target.h: Fix a typo in comment.
8861
b9fd1791
PA
88622011-10-31 Pedro Alves <pedro@codesourcery.com>
8863
8864 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8865 clobber the breakpoints' shadows with fast tracepoint jumps.
8866 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8867 * target.c (write_inferior_memory): Also pass MYADDR down to
8868 check_mem_write.
8869
03583c20
UW
88702011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8871
8872 * configure.ac: Check support for personality routine.
8873 * configure: Regenerate.
8874 * config.in: Likewise.
8875 * linux-low.c: Include <sys/personality.h>.
8876 Define ADDR_NO_RANDOMIZE if necessary.
8877 (linux_create_inferior): Disable address space randomization when
8878 forking inferior, if requested.
8879 (linux_supports_disable_randomization): New function.
8880 (linux_target_ops): Install it.
8881 * server.h (disable_randomization): Declare.
8882 * server.c (disable_randomization): New global variable.
8883 (handle_general_set): Handle QDisableRandomization.
8884 (handle_query): Likewise for qSupported.
8885 (main): Support --disable-randomization and --no-disable-randomization
8886 command line arguments.
8887 * target.h (struct target_ops): Add supports_disable_randomization.
8888 (target_supports_disable_randomization): New macro.
8889
723b724b
MF
88902011-09-29 Mike Frysinger <vapier@gentoo.org>
8891
8892 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8893 ifdef check.
8894 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8895 [!PT_GETDSBT] (target_loadmap): New definition.
8896 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8897 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8898 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8899 and PT_GETDSBT to LINUX_LOADMAP.
8900 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8901 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8902
55329a5c 89032011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8904
8905 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8906 (arm_linux_hwbp_cap): New static variable.
8907 (arm_linux_get_hwbp_cap): Replace by ...
8908 (arm_linux_init_hwbp_cap): ... this new function.
8909 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8910 (arm_linux_get_hw_watchpoint_count): Likewise.
8911 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8912 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8913 (arm_prepare_to_resume): Use perror_with_name instead of error.
8914
55329a5c 89152011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8916
8917 * linux-arm-low.c: Include <signal.h>.
8918 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8919 (struct arm_linux_hwbp_cap): New data type.
8920 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8921 (struct arm_linux_hw_breakpoint): New data type.
8922 (MAX_BPTS, MAX_WPTS): Define.
8923 (struct arch_process_info, struct arch_lwp_info): New data types.
8924 (arm_linux_get_hwbp_cap): New function.
8925 (arm_linux_get_hw_breakpoint_count): Likewise.
8926 (arm_linux_get_hw_watchpoint_count): Likewise.
8927 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8928 (arm_hwbp_control_initialize): Likewise.
8929 (arm_hwbp_control_is_enabled): Likewise.
8930 (arm_hwbp_control_is_initialized): Likewise.
8931 (arm_hwbp_control_disable): Likewise.
8932 (arm_linux_hw_breakpoint_equal): Likewise.
8933 (arm_linux_hw_point_initialize): Likewise.
8934 (struct update_registers_data): New data structure.
8935 (update_registers_callback: New function.
8936 (arm_insert_point): Likewise.
8937 (arm_remove_point): Likewise.
8938 (arm_stopped_by_watchpoint): Likewise.
8939 (arm_stopped_data_address): Likewise.
8940 (arm_new_process): Likewise.
8941 (arm_new_thread): Likewise.
8942 (arm_prepare_to_resume): Likewise.
8943 (the_low_target): Register arm_insert_point, arm_remove_point,
8944 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8945 arm_new_thread, and arm_prepare_to_resume.
8946
6b9801d4
SS
89472011-09-15 Stan Shebs <stan@codesourcery.com>
8948
8949 * server.h (struct emit_ops): Add compare-goto fields.
8950 * tracepoint.c (gdb_agent_op_sizes): New table.
8951 (emit_eq_goto): New function.
8952 (emit_ne_goto): New function.
8953 (emit_lt_goto): New function.
8954 (emit_le_goto): New function.
8955 (emit_gt_goto): New function.
8956 (emit_ge_goto): New function.
8957 (is_goto_target): New function.
8958 (compile_bytecodes): Recognize special cases of compare-goto
8959 combinations and call specialized emitters for them.
8960 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8961 (amd64_emit_ne_goto): New function.
8962 (amd64_emit_lt_goto): New function.
8963 (amd64_emit_le_goto): New function.
8964 (amd64_emit_gt_goto): New function.
8965 (amd64_emit_ge_goto): New function.
8966 (amd64_emit_ops): Add the new functions.
8967 (i386_emit_eq_goto): New function.
8968 (i386_emit_ne_goto): New function.
8969 (i386_emit_lt_goto): New function.
8970 (i386_emit_le_goto): New function.
8971 (i386_emit_gt_goto): New function.
8972 (i386_emit_ge_goto): New function.
8973 (i386_emit_ops): Add the new functions.
8974
bf15cbda
SS
89752011-09-08 Stan Shebs <stan@codesourcery.com>
8976
8977 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8978 (i386_emit_epilogue): Restore %ebx.
8979
943ca1dd
JZ
89802011-08-31 Jie Zhang <jzhang918@gmail.com>
8981
8982 * server.c (step_thread): Remove definition.
8983 (process_serial_event): Don't handle Hs.
8984 * server.h (step_thread): Remove declaration.
8985 * target.c (set_desired_inferior): Remove use of step_thread.
8986
e3deef73
LM
89872011-08-24 Luis Machado <lgustavo@codesourcery.com>
8988
8989 * linux-low.c: Include linux-procfs.h.
8990 (linux_attach_lwp_1): Update comments.
8991 (linux_attach): Scan for existing threads when attaching to a
8992 process that is the tgid.
8993 * Makefile.in: Update dependencies.
8994
13da1c97
LM
89952011-08-24 Luis Machado <lgustavo@codesourcery.com>
8996
8997 * configure.srv: Add linux-procfs.o dependencies.
8998
881127c9
YQ
89992011-08-14 Yao Qi <yao@codesourcery.com>
9000
9001 * target.h (struct target_ops): Fix indent.
9002 * win32-low.c (win32_target_ops): Fix comment.
9003
58dbd541
YQ
90042011-08-14 Andrew Jenner <andrew@codesourcery.com>
9005 Yao Qi <yao@codesourcery.com>
9006
9007 * Makefile.in (clean): Remove tic6x-*.c files.
9008 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9009 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9010 (tic6x-c64xp-linux.c): Likewise.
9011 * configure.srv: Add support for tic6x-*-uclinux.
9012 * linux-tic6x-low.c: New.
9013 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9014
78d85199
YQ
90152011-08-14 Andrew Stubbs <ams@codesourcery.com>
9016 Yao Qi <yao@codesourcery.com>
9017
9018 * target.h (struct target_ops): Add read_loadmap.
9019 * linux-low.c (struct target_loadseg): New type.
9020 (struct target_loadmap): New type.
9021 (linux_read_loadmap): New function.
9022 (linux_target_ops): Add linux_read_loadmap.
9023 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9024 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9025 to NULL.
78d85199 9026
a959a88d
EZ
90272011-08-05 Eli Zaretskii <eliz@gnu.org>
9028
9029 * win32-low.c: Include <stdint.h>.
9030
1ced966e
PA
90312011-07-22 Pedro Alves <pedro@codesourcery.com>
9032
9033 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9034 to the inferior here.
9035 (i386_remove_aligned_watchpoint): Ditto.
9036 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9037 fit part of the watchpoint in the debug registers.
9038 (i386_update_inferior_debug_regs): New.
9039 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9040 registers, and only update the inferior on success.
9041 (i386_low_remove_watchpoint): Ditto.
9042
d26e3629
KY
90432011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9044
9045 * linux-low.c (compare_ints, unique, list_threads, show_process,
9046 linux_core_of_thread): Delete.
9047 (linux_target_ops): Change linux_core_of_thread to
9048 linux_common_core_of_thread.
9049 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9050 * utils.c (malloc_failure): Change type of argument.
9051 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9052 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9053 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9054 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9055 (IPA_OBJS): Add common-utils-ipa.o.
9056 (ptid_h, linux_osdata_h): New macros.
9057 (server_h): Add common/common-utils.h, common/xml-utils.h,
9058 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9059 common/ptid.h.
9060 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9061 ptid.o, buffer.o): New rules.
9062 (linux-low.o): Add common/linux-osdata.h as a dependency.
9063 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9064 * configure.ac: Add AC_HEADER_DIRENT check.
9065 * config.in: Regenerate.
9066 * configure: Regenerate.
9067 * remote-utils.c (xml_escape_text): Delete.
9068 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9069 buffer_xml_printf): Move to common/buffer.c.
9070 * server.c (main): Remove call to initialize_inferiors.
9071 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9072 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9073 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9074 internal_error, gdb_assert, gdb_assert_fail): Delete.
9075 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9076 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9077 common/buffer.h.
9078 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9079 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9080 initialize_inferiors): Delete.
9081
2275a1a7
PA
90822011-07-20 Pedro Alves <pedro@codesourcery.com>
9083
9084 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9085 symbol error.
9086
0a5b1e09
PA
90872011-05-31 Pedro Alves <pedro@codesourcery.com>
9088
9089 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9090 assertion.
9091 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9092
6938fd34
YQ
90932011-05-26 Yao Qi <yao@codesourcery.com>
9094
9095 * Makefile.in (thread-db.o): Track dependence to
9096 common/gdb_thread_db.h.
9097 * thread-db.c: include gdb_thread_db.h from right place.
9098
b481f9e0
TT
90992011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9100
9101 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9102 __FILE__ and __LINE__ to internal_error.
9103
98a5dd13
DE
91042011-05-13 Doug Evans <dje@google.com>
9105
9106 * thread-db.c (try_thread_db_load_from_sdir): New function.
9107 (try_thread_db_load_from_dir): New function.
9108 (thread_db_load_search): Handle $sdir, ignore $pdir.
9109 Remove trying of system directories if search of
9110 libthread-db-search-path fails, that is now done via $sdir.
9111
d248b706
KY
91122011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9113
9114 * server.c (handle_query): Add EnableDisableTracepoints to the list
9115 of supported features.
43aaf8b6 9116 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9117 tracepoints.
43aaf8b6
PA
9118 (cmd_qtenable_disable): New.
9119 (cmd_qtstart): Install tracepoints even if disabled.
9120 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9121 receiving a QTEnable or QTDisable packet.
9122 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9123 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9124 tracepoints.
9125 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9126
84e578fb
DE
91272011-05-10 Doug Evans <dje@google.com>
9128
9129 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9130
71f55dd8
DE
91312011-05-04 Doug Evans <dje@google.com>
9132
9133 * linux-low.c (linux_join): Skip process lookup.
9134 * spu-low.c (spu_join): Ditto.
9135 * server.c (join_inferiors_callback): Delete.
9136 (process_serial_event): For 'D' packet (detach) call join_inferior
9137 directly.
9138
4d393d60
JM
91392011-05-04 Joseph Myers <joseph@codesourcery.com>
9140
9141 * README: Don't mention xscale*-*-linux*.
9142 * configure.srv (xscale*-*-linux*): Don't handle target.
9143
b00ad6ff
NF
91442011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9145
9146 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9147 casting pointers.
9148 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9149 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9150 (i386_emit_void_call_2): Likewise.
9151
af96c192
YQ
91522011-04-26 Yao Qi <yao@codesourcery.com>
9153
43aaf8b6
PA
9154 * linux-low.c: Move common macros to linux-ptrace.h.
9155 Include linux-ptrace.h.
af96c192
YQ
9156 * Makefile.in (linux_ptrace_h): New.
9157 (linux-low.o): Depends on linux-ptrace.h.
9158
03f2bd59
JK
91592011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9160
9161 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9162 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9163 (remote_prepare): New function with most of the TCP code from ...
9164 (remote_open): ... here. Detect PORT here unconditionally. Move also
9165 setting transport_is_reliable.
9166 * server.c (run_once): New variable.
9167 (gdbserver_usage): Document it.
9168 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9169 the first run if RUN_ONCE.
9170 * server.h (run_once, remote_prepare): New declarations.
9171
7a9dd1b2
TT
91722011-04-19 Tom Tromey <tromey@redhat.com>
9173
9174 * win32-low.c (handle_load_dll): Remove duplicate "the".
9175
81239425
PM
91762011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9177
9178 Remove support for old Cygwin 1.5 versions.
9179 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9180 function to avoid warning.
9181 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9182 warning.
9183
9e0627f1
PM
91842011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9185
9186 * gdbserver/server.h (Macro _): Define it if not available.
9187
588eebee
MS
91882011-03-14 Michael Snyder <msnyder@vmware.com>
9189
348af9f7 9190 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9191
43f70d4c
JB
91922011-03-10 Joel Brobecker <brobecker@adacore.com>
9193
9194 * Makefile.in (maintainer-clean realclean distclean): Remove
9195 "make ... subdir_do" command.
9196
348af9f7
MS
91972011-03-10 Michael Snyder <msnyder@vmware.com>
9198
9199 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9200
9201 * server.c (handle_v_run): Free alloced buffer on early return.
9202
e637a4f5
YQ
92032011-03-09 Yao Qi <yao@codesourcery.com>
9204
9205 Revert:
9206 2011-03-04 Yao Qi <yao@codesourcery.com>
9207
9208 * Makefile.in: Remove GNU make feature --directory.
9209
9210 2011-03-05 Yao Qi <yao@codesourcery.com>
9211
9212 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9213 (subdir_do): New make target. Copied from gdb/Makefile.
9214 (maintainer-clean, realclean, distclean, clean): Call corresponding
9215 make targets in common/Makefile.
9216
9217 2011-02-11 Yao Qi <yao@codesourcery.com>
9218
9219 * configure.ac: Call AC_PROG_RANLIB.
9220 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9221 * configure: Regenerate.
9222
e6edda56
JK
92232011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9224
9225 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9226
e5141119
JB
92272011-03-06 Yao Qi <yao@codesourcery.com>
9228
9229 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9230
64794aa4
JB
92312011-03-05 Yao Qi <yao@codesourcery.com>
9232
9233 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9234 (subdir_do): New make target. Copied from gdb/Makefile.
9235 (maintainer-clean, realclean, distclean, clean): Call corresponding
9236 make targets in common/Makefile.
9237
7a762829
YQ
92382011-03-04 Yao Qi <yao@codesourcery.com>
9239
9240 * Makefile.in: Remove GNU make feature --directory.
9241
348af9f7
MS
92422011-03-04 Michael Snyder <msnyder@vmware.com>
9243
9244 * server.c (queue_stop_reply): Call xmalloc not malloc.
9245
92462011-03-02 Michael Snyder <msnyder@vmware.com>
9247
9248 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9249
9f72fee2
MS
92502011-02-28 Michael Snyder <msnyder@vmware.com>
9251
588eebee
MS
9252 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9253 (cmd_qtframe): Ditto.
9254 (cmd_qtbuffer): Ditto.
9255 (cmd_bigqtbuffer): Ditto.
9256
9f72fee2
MS
9257 * utils.c (decimal2str): Initialize 'width' to nine, then
9258 don't mess with it.
9259
8040bd49
UW
92602011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9261
9262 * hostio.c (require_data): Free *data, not data.
9263
7e52cbd0
JK
92642011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9265
9266 * hostio.c (require_data): Use free, not xfree.
9267
9130f83e
MS
92682011-02-27 Michael Snyder <msnyder@vmware.com>
9269
4b812f4e
MS
9270 * server.c (handle_query): Discard unused value.
9271
9130f83e
MS
9272 * hostio.c (require_data): Free malloc memory before returning
9273 error.
9274
69d37113
MS
92752011-02-26 Michael Snyder <msnyder@vmware.com>
9276
9277 * linux-low.c (list_threads): Call closedir for dirent.
9278
35f5825a
MS
92792011-02-27 Michael Snyder <msnyder@vmware.com>
9280
2a589cef
MS
9281 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9282 a case statement falls through.
9283
0adea5f7
MS
9284 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9285
35f5825a
MS
9286 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9287 in comparison.
9288
238f1c74
MS
92892011-02-26 Michael Snyder <msnyder@vmware.com>
9290
9291 * utils.c (decimal2str): Eliminate dead code and dead param.
9292 (pulongest): Drop dead param from call to decimal2str.
9293 (plongest): Ditto.
9294
633ff500
JB
92952011-02-24 Joel Brobecker <brobecker@adacore.com>
9296
9297 Revert the following patch (not approved yet):
9298 2011-02-21 Hui Zhu <teawater@gmail.com>
9299 * tracepoint.c (tp_printf): New function.
9300 (eval_agent_expr): Handle gdb_agent_op_printf.
9301
f9c6ff72
HZ
93022011-02-21 Hui Zhu <teawater@gmail.com>
9303
9304 * tracepoint.c (tp_printf): New function.
9305 (eval_agent_expr): Handle gdb_agent_op_printf.
9306
94d5e490
TT
93072011-02-18 Tom Tromey <tromey@redhat.com>
9308
9309 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9310 (tracepoint.o): Likewise.
9311 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9312 (gdb_agent_op_names): Likewise.
9313
c7f96d2b
TT
93142011-02-18 Tom Tromey <tromey@redhat.com>
9315
9316 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9317 gdb_agent_op_rot>: New constants.
9318 (gdb_agent_op_names): Add pick and roll.
9319 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9320 cases.
9321
0feedb2c
JK
93222011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9323
9324 * aclocal.m4: Regenerated with aclocal-1.11.1.
9325
b3b9301e
PA
93262011-02-14 Pedro Alves <pedro@codesourcery.com>
9327
9328 * server.c (handle_qxfer_traceframe_info): New.
9329 (qxfer_packets): Register "traceframe-info".
9330 (handle_query): Report support for qXfer:traceframe-info:read+.
9331 * tracepoint.c (match_blocktype): New.
9332 (traceframe_find_block_type): Rename to ...
9333 (traceframe_walk_blocks): ... this. Add callback filter argument,
9334 and use it.
9335 (traceframe_find_block_type): New, reimplemented on top of
9336 traceframe_walk_blocks.
9337 (build_traceframe_info_xml): New.
9338 (traceframe_read_info): New.
9339 * server.h (traceframe_read_info): Declare.
9340
4f3e6fb7
YQ
93412011-02-11 Yao Qi <yao@codesourcery.com>
9342
9343 * configure.ac: Call AC_PROG_RANLIB.
9344 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9345 * configure: Regenerate.
9346
764880b7
PA
93472011-02-07 Pedro Alves <pedro@codesourcery.com>
9348
9349 * server.c (gdb_read_memory): Change return semantics to allow
9350 partial transfers.
9351 (handle_search_memory_1): Adjust.
9352 (process_serial_event) <'m' packet>: Handle partial transfers.
9353 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9354
1c79eb8a
PA
93552011-01-28 Pedro Alves <pedro@codesourcery.com>
9356
9357 * regcache.c (init_register_cache): Initialize
9358 regcache->register_status.
9359 (free_register_cache): Release regcache->register_status.
9360 (regcache_cpy): Copy register_status.
9361 (registers_to_string): Print 'x's for unavailable registers.
9362 (supply_register): Mark the register's status valid or
9363 unavailable, depending on whether a buffer was passed in or not.
9364 (supply_register_zeroed): New.
9365 (supply_regblock): Mark the registers' status valid or
9366 unavailable, depending on whether a buffer was passed in or not.
9367 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9368 (struct regcache): New `register_status' field.
9369 (supply_register_zeroed): Declare.
9370 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9371 supply_register_zeroed, rather than passing a NULL buffer to
9372 supply_register.
9373 * tracepoint.c (fetch_traceframe_registers): Update comment.
9374
85724a0e
PA
93752011-01-28 Pedro Alves <pedro@codesourcery.com>
9376
9377 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9378 buffer explicit.
9379
d08aafef
PA
93802011-01-25 Pedro Alves <pedro@codesourcery.com>
9381
9382 * server.h (decode_xfer_write): Change prototype.
9383 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9384 and don't extract the annex here.
9385 * server.c (decode_xfer_read): Remove `annex' parameter,
9386 and don't extract the annex here.
9387 (decode_xfer): New.
9388 (struct qxfer): New.
9389 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9390 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9391 (handle_qxfer_statictrace): New functions, abstracted out from
9392 handle_query, and made to use the struct qxfer interface.
9393 (handle_threads_qxfer_proper): Rename to ...
9394 (handle_qxfer_threads_proper): ... this.
9395 (handle_threads_qxfer): Rename to ...
9396 (handle_qxfer_threads): ... this. Adjust.
9397 (qxfer_packets): New array.
9398 (handle_qxfer): New function.
9399 (handle_query): Use handle_qxfer.
9400
493e2a69
MS
94012011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9402
9403 * gdbreplay.c: Shorten lines of >= 80 columns.
9404 * linux-low.c: Ditto.
9405 * linux-ppc-low.c: Ditto.
9406 * linux-s390-low.c: Ditto.
9407 * linux-sparc-low.c: Ditto.
9408 * linux-x86-low.c: Ditto.
9409 * linux-xtensa-low.c: Ditto.
9410 * mem-break.c: Ditto.
9411 * nto-low.c: Ditto.
9412 * regcache.h: Ditto.
9413 * remote-utils.c: Ditto.
9414 * server.c: Ditto.
9415 * server.h: Ditto.
9416 * thread-db.c: Ditto.
9417 * tracepoint.c: Ditto.
9418 * utils.c: Ditto.
9419 * win32-low.h: Ditto.
9420
44944448
JB
94212011-01-05 Joel Brobecker <brobecker@adacore.com>
9422
9423 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9424 update.
9425
71ce852c
JB
94262011-01-01 Joel Brobecker <brobecker@adacore.com>
9427
9428 * server.c (gdbserver_version): Update copyright year in version
9429 output.
9430 * gdbreplay.c (gdbreplay_version): Ditto.
9431
eb826dc6
MF
94322010-12-29 Jie Zhang <jie.zhang@analog.com>
9433
9434 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9435 * linux-bfin-low.c: New file.
9436 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9437 PT_DATA_ADDR for BFIN targets.
9438 * Makefile.in (SFILES): Add linux-bfin-low.c.
9439 (clean): Remove reg-bfin.c.
9440 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9441 * README: Mention supported Blackfin targets.
9442
39ab222a
MF
94432010-12-23 Mike Frysinger <vapier@gentoo.org>
9444
9445 * .gitignore: New file.
9446
a1f2ce7d
MF
94472010-11-16 Mike Frysinger <vapier@gentoo.org>
9448
9449 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9450
f474844c
JZ
94512010-10-22 Jie Zhang <jie@codesourcery.com>
9452
9453 * Makefile.in: Add FLAGS_TO_PASS variable.
9454 (install): Remove dependency of install-only and recursively
9455 invoke make for install-only.
9456
f1048712
DE
94572010-10-04 Doug Evans <dje@google.com>
9458
9459 * Makefile.in (uninstall): Use $(DESTDIR).
9460
b53a1623
PA
94612010-09-24 Pedro Alves <pedro@codesourcery.com>
9462
e6ee044d
PA
9463 PR gdb/11842
9464
b53a1623
PA
9465 * linux-x86-low.c (compat_siginfo_from_siginfo)
9466 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9467 si_code is < 0. Check for si_code == SI_TIMER before checking for
9468 si_code < 0.
9469
fa1bd1e4
JB
94702010-09-13 Joel Brobecker <brobecker@adacore.com>
9471
9472 * lynx-i386-low.c: New file.
9473 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9474
47fac8f8
JB
94752010-09-13 Joel Brobecker <brobecker@adacore.com>
9476
9477 * lynx-low.c (ptrace_request_to_str): Remove handling for
9478 request values that have been removed in LynxOS 5.x.
9479
1adfc54d
JB
94802010-09-13 Joel Brobecker <brobecker@adacore.com>
9481
9482 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9483 <ptrace.h>
9484
c2a66c29
NS
94852010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9486
9487 * configure.ac: Add --enable-inprocess-agent option.
9488 * configure: Rebuilt.
9489
32fcada3
YQ
94902010-09-06 Yao Qi <yao@codesourcery.com>
9491
9492 * linux-low.c (linux_kill): Remove unused variable.
9493 (linux_stabilize_threads): Likewise.
9494 * server.c (start_inferior): Likewise.
9495 (queue_stop_reply_callback): Likewise.
9496 * tracepoint.c (do_action_at_tracepoint): Likewise.
9497
0cccb683
YQ
94982010-09-06 Yao Qi <yao@codesourcery.com>
9499
9500 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9501 on return.
9502
423ec54c
JK
95032010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9504
9505 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9506
12ac6819
PA
95072010-09-06 Pedro Alves <pedro@codesourcery.com>
9508
9509 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9510 "$(IPA_DEPFILES)".
9511
8ed54b31
JB
95122010-09-01 Joel Brobecker <brobecker@adacore.com>
9513
9514 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9515 gdbserver/lynx-ppc-low.c: New files.
9516 * Makefile.in (lynx_low_h): New variable.
9517 (lynx-low.o, lynx-ppc-low.o): New rules.
9518 * configure.ac: On LynxOS, link with -lnetinet.
9519 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9520 * configure: regenerate.
9521
bb0116a4
JB
95222010-09-01 Joel Brobecker <brobecker@adacore.com>
9523
9524 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9525 * configure.ac: Add check for vasprintf and vsnprintf.
9526 * configure, config.in: Regenerate.
9527 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9528
a778ab81 95292010-09-01 Joel Brobecker <brobecker@adacore.com>
9530
9531 * gdbreplay.c: Move include of alloca.h up, next to include of
9532 malloc.h.
9533 * server.h: Add include of malloc.h.
9534 * mem-break.c: Remove include of malloc.h.
9535 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9536
8b034a19 95372010-09-01 Joel Brobecker <brobecker@adacore.com>
9538
9539 * Makefile.in (memmem.o): Build with -Wno-error.
9540
95412010-09-01 Joel Brobecker <brobecker@adacore.com>
9542
9543 * utils.c (xsnprintf): Make non-static.
9544 * server.h: Add xsnprintf declaration.
9545 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9546 replace calls to snprintf by calls to xsnprintf throughout.
9547
95482010-09-01 Joel Brobecker <brobecker@adacore.com>
9549
9550 * configure.ac: Add configure check for alloca.
9551 * configure, config.in: Regenerate.
9552 * server.h: Include alloca.h if it exists.
9553 * gdbreplay.c: Include alloca.h if it exists.
9554
1a981360
PA
95552010-08-28 Pedro Alves <pedro@codesourcery.com>
9556
9557 * linux-low.c (__SIGRTMIN): Define if not already defined.
9558 (linux_create_inferior): Check for __ANDROID__ rather than
9559 __SIGRTMIN.
9560 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9561 are already deferred.
9562 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9563 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9564 stopped and already has a pending signal to report.
9565 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9566 a pending signal to report or is moving out of a jump pad.
9567 (linux_init_signals): Check for __ANDROID__ rather than
9568 __SIGRTMIN.
9569
b4d51a55
PA
95702010-08-28 Pedro Alves <pedro@codesourcery.com>
9571
9572 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9573 debug_threads check. Avoid a linear search when not doing debug
9574 output.
9575
ec48365d
PA
95762010-08-27 Pedro Alves <pedro@codesourcery.com>
9577
9578 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9579 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9580 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9581 (process_event): Change local fd's type to gdb_fildes_t.
9582 (create_file_handler): Adjust prototype.
9583 (delete_file_handler): Adjust prototype.
9584 (handle_file_event): Adjust prototype. Use pfildes.
9585 (create_file_event): Adjsut prototype.
9586 * remote-utils.c (remote_desc, listen_desc): Change type to
9587 gdb_fildes_t.
9588 * server.h: New gdb_fildes_t typedef.
9589 [USE_WIN32API]: Include winsock2.h.
9590 (delete_file_handler, add_file_handler): Adjust prototypes.
9591 (pfildes): Declare.
9592 * utils.c (pfildes): New.
9593
854d88f0
PA
95942010-08-27 Pedro Alves <pedro@codesourcery.com>
9595
9596 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9597 * configure: Regenerate.
9598
0146f85b
PA
95992010-08-27 Pedro Alves <pedro@codesourcery.com>
9600
9601 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9602 (linux_done_accessing_memory): ... this.
9603 (linux_target_ops): Adjust.
9604 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9605 * nto-low.c (nto_target_ops): Adjust comment.
9606 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9607 * spu-low.c (spu_target_ops): Adjust comment.
9608 * target.h (target_ops): Rename unprepare_to_access_memory field
9609 to done_accessing_memory.
9610 (unprepare_to_access_memory): Rename to ...
9611 (done_accessing_memory): ... this.
9612
90d74c30
PA
96132010-08-26 Pedro Alves <pedro@codesourcery.com>
9614
9615 * linux-low.c (linux_prepare_to_access_memory): New.
9616 (linux_unprepare_to_access_memory): New.
9617 (linux_target_ops): Install them.
9618 * server.c (read_memory): Rename to ...
9619 (gdb_read_memory): ... this. Use
9620 prepare_to_access_memory/prepare_to_access_memory.
9621 (write_memory): Rename to ...
9622 (gdb_write_memory): ... this. Use
9623 prepare_to_access_memory/prepare_to_access_memory.
9624 (handle_search_memory_1): Adjust.
9625 (process_serial_event): Adjust.
9626 * target.h (struct target_ops): New fields
9627 prepare_to_access_memory and unprepare_to_access_memory.
9628 (prepare_to_access_memory, unprepare_to_access_memory): New.
9629 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9630 prepare_to_access_memory/prepare_to_access_memory.
9631 * nto-low.c (nto_target_ops): Adjust.
9632 * spu-low.c (spu_target_ops): Adjust.
9633 * win32-low.c (win32_target_ops): Adjust.
9634
fd467969
PA
96352010-08-26 Pedro Alves <pedro@codesourcery.com>
9636
9637 * Makefile.in (WARN_CFLAGS): Get it from configure.
9638 (WERROR_CFLAGS): New.
9639 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9640 * configure.ac: Introduce --enable-werror, which adds -Werror to
9641 the compiler command line. Enabled by default. Disable with
9642 --disable-werror. Add -Wdeclaration-after-statement
9643 Wpointer-arith and -Wformat-nonliteral to warning flags.
9644 * configure: Regenerate.
9645
331e2f5f
PA
96462010-08-26 Pedro Alves <pedro@codesourcery.com>
9647
9648 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9649
e581f2b4
PA
96502010-08-26 Pedro Alves <pedro@codesourcery.com>
9651
9652 * gdbreplay.c (remote_error): New.
9653 (gdbchar): New.
9654 (expect): Use gdbchar. Check for error reading from GDB.
9655 Clarify sync error output.
9656 (play): Check for errors writing to GDB.
9657 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9658 * remote-utils.c (getpkt): Check for errors writing to the remote
9659 descriptor.
9660
3c11dd79
PA
96612010-08-25 Pedro Alves <pedro@codesourcery.com>
9662
9663 * linux-low.c (linux_wait_1): Move non-debugging code out of
9664 `debug_threads' control.
9665
d20a8ad9
PA
96662010-08-25 Pedro Alves <pedro@codesourcery.com>
9667
9668 * linux-low.c (linux_wait_1): Don't set last_status here.
9669 * server.c (push_event, queue_stop_reply_callback): Assert we're
9670 not pushing a TARGET_WAITKIND_IGNORE event.
9671 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9672 (myresume, handle_target_event): Set the thread's last_resume_kind
9673 and last_status from the target returned status.
9674
964e4306
PA
96752010-08-25 Pedro Alves <pedro@codesourcery.com>
9676
9677 PR threads/10729
9678
9679 * linux-x86-low.c (update_debug_registers_callback): New.
9680 (i386_dr_low_set_addr): Use it.
9681 (i386_dr_low_get_addr): New.
9682 (i386_dr_low_set_control): Use update_debug_registers_callback.
9683 (i386_dr_low_get_control): New.
9684 (i386_dr_low_get_status): Adjust.
9685 * linux-low.c (linux_stop_lwp): New.
9686 * linux-low.h (linux_stop_lwp): Declare.
9687
9688 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9689 argument instead of a i386_debug_reg_state.
9690 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9691 a i386_debug_reg_state.
9692 (i386_insert_aligned_watchpoint): Adjust.
9693 (i386_remove_aligned_watchpoint): Adjust.
9694 (i386_low_stopped_data_address): Read the debug registers from the
9695 inferior instead of from the mirrors.
9696 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9697 (i386_dr_low_get_addr): Declare.
9698 (i386_dr_low_get_control): Declare.
9699 (i386_dr_low_get_status): Change prototype.
9700
9701 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9702 (i386_dr_low_get_addr): New.
9703 (i386_dr_low_get_control): New.
9704 (i386_dr_low_get_status): Adjust prototype. Return
9705 dr_status_mirror.
9706 (i386_initial_stuff): Clear dr_status_mirror and
9707 dr_control_mirror.
9708 (i386_get_thread_context): Adjust.
9709 (i386_set_thread_context): Adjust.
9710 (i386_thread_added): Adjust.
9711
5f21a75b
PA
97122010-08-24 Pedro Alves <pedro@codesourcery.com>
9713
9714 * linux-low.h (linux_thread_area): Delete declaration.
9715
3e4c1235
TS
97162010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9717
9718 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9719 after its termination.
9720
1971b033
PA
97212010-08-09 Pedro Alves <pedro@codesourcery.com>
9722
9723 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9724 (gdb_wants_all_stopped): Delete.
9725 (linux_wait_1): Don't call them.
9726 * server.c (handle_v_cont): Tag all threads as want-stopped.
9727 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9728 stopped as "client-wants-stopped".
9729
310444ac
PA
97302010-07-31 Pedro Alves <pedro@codesourcery.com>
9731
9732 * Makefile.in (signals_h): New.
9733 (server_h): Depend on it.
9734 (server.o): Don't depend on $(signals_def).
9735 (signals.o): Depend on $(signals_def).
9736
a19cae16
JK
97372010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9738
9739 * Makefile.in (signals_def): New.
9740 (server_h): Append include/gdb/signals.h and signals_def.
9741 (server.o): Append signals_def.
9742
30d50328
JK
97432010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9744
9745 * server.c (handle_target_event): Use target_signal_to_host for
9746 resume_info.sig initialization.
9747 * target.h (struct thread_resume) <sig>: New comment.
9748
5c3216e2
OS
97492010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9750
c6f46ca0
OS
9751 * server.c (handle_query): strcpy() the returned string from paddress()
9752 instead of sprintf().
5c3216e2
OS
9753 * utils.c (paddress): Return phex_nz().
9754
6bd31874
JB
97552010-07-07 Joel Brobecker <brobecker@adacore.com>
9756
9757 * server.c (handle_v_cont): Call mourn_inferior if process
9758 just exited.
9759 (myresume): Likewise.
9760
0fb4aa4b
PA
97612010-07-01 Pedro Alves <pedro@codesourcery.com>
9762
9763 Static tracepoints, and integration with UST.
9764
9765 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9766 * mem-break.c (uninsert_all_breakpoints)
9767 (reinsert_all_breakpoints): New.
9768 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9769 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9770 (gdb_agent_ust_loaded, helper_thread_id)
9771 (gdb_agent_helper_thread_id): New macros.
9772 (struct ipa_sym_addresses): Add addr_ust_loaded,
9773 addr_helper_thread_id, addr_cmd_buf.
9774 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9775 (in_process_agent_loaded_ust): New.
9776 (write_e_ust_not_loaded): New.
9777 (maybe_write_ipa_ust_not_loaded): New.
9778 (struct collect_static_trace_data_action): New.
9779 (enum tracepoint_type) <static_tracepoint>: New.
9780 (struct tracepoint) <handle>: Mention static tracepoints.
9781 (struct static_tracepoint_ctx): New.
9782 (CMD_BUF_SIZE): New.
9783 (add_tracepoint_action): Handle static tracepoint actions.
9784 (unprobe_marker_at): New.
9785 (clear_installed_tracepoints): Handle static tracepoints.
9786 (cmd_qtdp): Handle static tracepoints.
9787 (probe_marker_at): New.
9788 (cmd_qtstart): Handle static tracepoints.
9789 (response_tracepoint): Handle static tracepoints.
9790 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9791 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9792 (get_context_regcache): Handle static tracepoints.
9793 (do_action_at_tracepoint): Handle static tracepoint actions.
9794 (traceframe_find_block_type): Handle static trace data blocks.
9795 (traceframe_read_sdata): New.
9796 (download_tracepoints): Download static tracepoint actions.
9797 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9798 (GDB_PROBE_NAME): New.
9799 (ust_ops): New.
9800 (GET_UST_SYM): New.
9801 (USTF): New.
9802 (dlsym_ust): New.
9803 (ust_marker_to_static_tracepoint): New.
9804 (gdb_probe): New.
9805 (collect_ust_data_at_tracepoint): New.
9806 (gdb_ust_probe): New.
9807 (UNIX_PATH_MAX, SOCK_DIR): New.
9808 (gdb_ust_connect_sync_socket): New.
9809 (resume_thread, stop_thread): New.
9810 (run_inferior_command): New.
9811 (init_named_socket): New.
9812 (gdb_ust_socket_init): New.
9813 (cstr_to_hexstr): New.
9814 (next_st): New.
9815 (first_marker, next_marker): New.
9816 (response_ust_marker): New.
9817 (cmd_qtfstm, cmd_qtsstm): New.
9818 (unprobe_marker_at, probe_marker_at): New.
9819 (cmd_qtstmat, gdb_ust_thread): New.
9820 (gdb_ust_init): New.
9821 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9822 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9823 (ST_REGENTRY): New.
9824 (x86_64_st_collect_regmap): New.
9825 (X86_64_NUM_ST_COLLECT_GREGS): New.
9826 (AMD64_RIP_REGNUM): New.
9827 (supply_static_tracepoint_registers): New.
9828 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9829 (ST_REGENTRY): New.
9830 (i386_st_collect_regmap): New.
9831 (i386_NUM_ST_COLLECT_GREGS): New.
9832 (supply_static_tracepoint_registers): New.
9833 * server.c (handle_query): Handle qXfer:statictrace:read.
9834 <qSupported>: Report support for StaticTracepoints, and
9835 qXfer:statictrace:read features.
9836 * server.h (traceframe_read_sdata)
9837 (supply_static_tracepoint_registers): Declare.
9838 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9839 (unpack_varlen_hex): Include in IPA build.
9840 * Makefile.in (ustlibs, ustinc): New.
9841 (IPA_OBJS): Add remote-utils-ipa.o.
9842 ($(IPA_LIB)): Link -ldl and -lpthread.
9843 (UST_CFLAGS): New.
9844 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9845 * config.in, configure: Regenerate.
9846
9e4344e5
PA
98472010-06-20 Ian Lance Taylor <iant@google.com>
9848 Pedro Alves <pedro@codesourcery.com>
9849
9850 * linux-x86-low.c (always_true): Delete.
9851 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9852 trying to fool the compiler with always_true.
9853
c6beb2cb
PA
98542010-06-20 Pedro Alves <pedro@codesourcery.com>
9855
9856 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9857 conditions in gdbserver.
9858
d2ed6730
UW
98592010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9860
9861 * spu-low.c (spu_read_memory): Wrap around local store limit.
9862 (spu_write_memory): Likewise.
9863
4e29fb54
PA
98642010-06-15 Pedro Alves <pedro@codesourcery.com>
9865
9866 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9867 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9868 LONGEST uses.
9869 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9870 uses.
9871 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9872 uses with LONGEST uses.
9873
6a271cae
PA
98742010-06-14 Stan Shebs <stan@codesourcery.com>
9875 Pedro Alves <pedro@codesourcery.com>
9876
9877 Bytecode compiler.
9878
9879 * linux-x86-low.c: Include limits.h.
9880 (add_insns): New.
9881 (always_true): New.
9882 (EMIT_ASM): New.
9883 (EMIT_ASM32): New.
9884 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9885 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9886 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9887 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9888 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9889 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9890 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9891 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9892 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9893 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9894 (amd64_emit_void_call_2): New.
9895 (amd64_emit_ops): New.
9896 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9897 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9898 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9899 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9900 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9901 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9902 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9903 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9904 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9905 (i386_emit_stack_adjust, i386_emit_int_call_1)
9906 (i386_emit_void_call_2): New.
9907 (i386_emit_ops): New.
9908 (x86_emit_ops): New.
9909 (the_low_target): Install x86_emit_ops.
9910 * server.h (struct emit_ops): New.
9911 (get_raw_reg_func_addr): Declare.
9912 (current_insn_ptr, emit_error): Declare.
9913 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9914 (set_trace_state_variable_value): New defines.
9915 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9916 addr_get_trace_state_variable_value and
9917 addr_set_trace_state_variable_value.
9918 (symbol_list): New fields for get_raw_reg,
9919 get_trace_state_variable_value and set_trace_state_variable_value.
9920 (condfn): New typedef.
9921 (struct tracepoint): New field `compiled_cond'.
9922 (do_action_at_tracepoint): Clear compiled_cond.
9923 (get_trace_state_variable_value, set_trace_state_variable_value):
9924 Export in the IPA.
9925 (condition_true_at_tracepoint): If there's a compiled condition,
9926 run that.
9927 (current_insn_ptr, emit_error): New globals.
9928 (struct bytecode_address): New.
9929 (get_raw_reg_func_addr): New.
9930 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9931 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9932 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9933 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9934 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9935 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9936 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9937 (compile_tracepoint_condition, compile_bytecodes): New.
9938 * target.h (emit_ops): Forward declare.
9939 (struct target_ops): New field emit_ops.
9940 (target_emit_ops): New.
9941 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9942 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9943 * linux-low.c (linux_emit_ops): New.
9944 (linux_target_ops): Install it.
9945 * linux-low.h (struct linux_target_ops): New field emit_ops.
9946
92b72907
UW
99472010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9948
9949 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9950 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9951
fa593d66
PA
99522010-06-01 Pedro Alves <pedro@codesourcery.com>
9953 Stan Shebs <stan@codesourcery.com>
9954
9955 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9956 (all): Depend on $(extra_libraries).
9957 (install-only): Install the IPA.
9958 (IPA_OBJS, IPA_LIB): New.
9959 (clean): Remove the IPA lib.
9960 (IPAGENT_CFLAGS): New.
9961 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9962 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9963 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9964 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9965 * configure.ac: Check for atomic builtins support in the compiler.
9966 (IPA_DEPFILES, extra_libraries): Define.
9967 * configure.srv (ipa_obj): Add description.
9968 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9969 (i[34567]86-*-linux*): Set ipa_obj.
9970 (x86_64-*-linux*): Set ipa_obj.
9971 * linux-low.c (stabilizing_threads): New.
9972 (supports_fast_tracepoints): New.
9973 (linux_detach): Stabilize threads before detaching.
9974 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9975 the lwp is either not stabilizing, or is moving out of a jump pad.
9976 (linux_fast_tracepoint_collecting): New.
9977 (maybe_move_out_of_jump_pad): New.
9978 (enqueue_one_deferred_signal): New.
9979 (dequeue_one_deferred_signal): New.
9980 (linux_wait_for_event_1): If moving out of a jump pad, defer
9981 pending signals to later.
9982 (linux_stabilize_threads): New.
9983 (linux_wait_1): Check if threads need moving out of jump pads, and
9984 do it if so.
9985 (stuck_in_jump_pad_callback): New.
9986 (move_out_of_jump_pad_callback): New.
9987 (lwp_running): New.
9988 (linux_resume_one_lwp): Handle moving out of jump pads.
9989 (linux_set_resume_request): Dequeue deferred signals.
9990 (need_step_over_p): Also step over fast tracepoint jumps.
9991 (start_step_over): Also uninsert fast tracepoint jumps.
9992 (finish_step_over): Also reinsert fast tracepoint jumps.
9993 (linux_install_fast_tracepoint_jump): New.
9994 (linux_target_ops): Install linux_stabilize_threads and
9995 linux_install_fast_tracepoint_jump_pad.
9996 * linux-low.h (linux_target_ops) <get_thread_area,
9997 install_fast_tracepoint_jump_pad>: New fields.
9998 (struct lwp_info) <collecting_fast_tracepoint,
9999 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10000 (linux_get_thread_area): Declare.
10001 * linux-x86-low.c (jump_insn): New.
10002 (x86_get_thread_area): New.
10003 (append_insns): New.
10004 (push_opcode): New.
10005 (amd64_install_fast_tracepoint_jump_pad): New.
10006 (i386_install_fast_tracepoint_jump_pad): New.
10007 (x86_install_fast_tracepoint_jump_pad): New.
10008 (the_low_target): Install x86_get_thread_area and
10009 x86_install_fast_tracepoint_jump_pad.
10010 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10011 (struct fast_tracepoint_jump): New.
10012 (fast_tracepoint_jump_insn): New.
10013 (fast_tracepoint_jump_shadow): New.
10014 (find_fast_tracepoint_jump_at): New.
10015 (fast_tracepoint_jump_here): New.
10016 (delete_fast_tracepoint_jump): New.
10017 (set_fast_tracepoint_jump): New.
10018 (uninsert_fast_tracepoint_jumps_at): New.
10019 (reinsert_fast_tracepoint_jumps_at): New.
10020 (set_breakpoint_at): Use write_inferior_memory.
10021 (uninsert_raw_breakpoint): Use write_inferior_memory.
10022 (check_mem_read): Mask out fast tracepoint jumps.
10023 (check_mem_write): Mask out fast tracepoint jumps.
10024 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10025 (set_fast_tracepoint_jump): Declare.
10026 (delete_fast_tracepoint_jump)
10027 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10028 (reinsert_fast_tracepoint_jumps_at): Declare.
10029 * regcache.c: Don't compile many functions when building the
10030 in-process agent library.
10031 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10032 the register buffer in the heap.
10033 (free_register_cache): If the register buffer isn't owned by the
10034 regcache, don't free it.
10035 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10036 pre-existing register caches.
10037 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10038 type.
10039 (convert_ascii_to_int): : Constify `from' parameter type.
10040 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10041 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10042 the needed buffer in-place.
10043 (relocate_instruction): New.
10044 * server.c (handle_query) <qSymbols>: If the target supports
10045 tracepoints, give it a chance of looking up symbols. Report
10046 support for fast tracepoints.
10047 (handle_status): Stabilize threads.
10048 (process_serial_event): Adjust.
10049 * server.h (struct fast_tracepoint_jump): Forward declare.
10050 (struct process_info) <fast_tracepoint_jumps>: New field.
10051 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10052 (decode_X_packet, decode_M_packet): Adjust.
10053 (relocate_instruction): Declare.
10054 (in_process_agent_loaded): Declare.
10055 (tracepoint_look_up_symbols): Declare.
10056 (struct fast_tpoint_collect_status): Declare.
10057 (fast_tracepoint_collecting): Declare.
10058 (force_unlock_trace_buffer): Declare.
10059 (handle_tracepoint_bkpts): Declare.
10060 (initialize_low_tracepoint)
10061 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10062 * target.h (struct target_ops) <stabilize_threads,
10063 install_fast_tracepoint_jump_pad>: New fields.
10064 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10065 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10066 [HAVE_STDINT_H]: Include stdint.h.
10067 (trace_debug_1): Rename to ...
10068 (trace_vdebug): ... this.
10069 (trace_debug): Rename to ...
10070 (trace_debug_1): ... this. Add `level' parameter.
10071 (trace_debug): New.
10072 (ATTR_USED, ATTR_NOINLINE): New.
10073 (IP_AGENT_EXPORT): New.
10074 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10075 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10076 (about_to_request_buffer_space, trace_buffer_is_full)
10077 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10078 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10079 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10080 (traceframe_write_count, traceframes_created)
10081 (trace_state_variables)
10082 New renaming defines.
10083 (struct ipa_sym_addresses): New.
10084 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10085 (symbol_list): New.
10086 (ipa_sym_addrs): New.
10087 (all_tracepoint_symbols_looked_up): New.
10088 (in_process_agent_loaded): New.
10089 (write_e_ipa_not_loaded): New.
10090 (maybe_write_ipa_not_loaded): New.
10091 (tracepoint_look_up_symbols): New.
10092 (debug_threads) [IN_PROCESS_AGENT]: New.
10093 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10094 (UNKNOWN_SIDE_EFFECTS): New.
10095 (stop_tracing): New.
10096 (flush_trace_buffer): New.
10097 (stop_tracing_bkpt): New.
10098 (flush_trace_buffer_bkpt): New.
10099 (read_inferior_integer): New.
10100 (read_inferior_uinteger): New.
10101 (read_inferior_data_pointer): New.
10102 (write_inferior_data_pointer): New.
10103 (write_inferior_integer): New.
10104 (write_inferior_uinteger): New.
10105 (struct collect_static_trace_data_action): Delete.
10106 (enum tracepoint_type): New.
10107 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10108 <actions_str, step_actions, step_actions_str>: Only include in
10109 GDBserver.
fa593d66
PA
10110 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10111 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10112 (tracepoints): Use IP_AGENT_EXPORT.
10113 (last_tracepoint): Don't include in the IPA.
10114 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10115 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10116 (alloced_trace_state_variables): New.
10117 (trace_state_variables): Use IP_AGENT_EXPORT.
10118 (traceframe_t): Delete unused variable.
10119 (circular_trace_buffer): Don't include in the IPA.
10120 (trace_buffer_start): Delete.
10121 (struct trace_buffer_control): New.
10122 (trace_buffer_free): Delete.
10123 (struct ipa_trace_buffer_control): New.
10124 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10125 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10126 New.
10127 (trace_buffer_ctrl): New.
10128 (TRACE_BUFFER_CTRL_CURR): New.
10129 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10130 Reimplement as macros.
10131 (trace_buffer_wrap): Delete.
10132 (traceframe_write_count, traceframe_read_count)
10133 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10134 (struct tracepoint_hit_ctx) <type>: New field.
10135 (struct fast_tracepoint_ctx): New.
10136 (memory_barrier): New.
10137 (cmpxchg): New.
10138 (record_tracepoint_error): Update atomically in the IPA.
10139 (clear_inferior_trace_buffer): New.
10140 (about_to_request_buffer_space): New.
10141 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10142 updating the same buffer.
10143 (add_tracepoint): Default the tracepoint's type to trap
10144 tracepoint, and orig_size to -1.
10145 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10146 internal variables.
10147 (create_trace_state_variable): New parameter `gdb'. Handle it.
10148 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10149 (cmd_qtdp): Handle fast tracepoints.
10150 (cmd_qtdv): Adjust.
10151 (max_jump_pad_size): New.
10152 (gdb_jump_pad_head): New.
10153 (get_jump_space_head): New.
10154 (claim_jump_space): New.
10155 (sort_tracepoints): New.
10156 (MAX_JUMP_SIZE): New.
10157 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10158 IPA.
10159 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10160 support. Upload fast traceframes, and delete internal IPA
10161 breakpoints.
10162 (stop_tracing_handler): New.
10163 (flush_trace_buffer_handler): New.
10164 (cmd_qtstop): Upload fast tracepoints.
10165 (response_tracepoint): Handle fast tracepoints.
10166 (tracepoint_finished_step): Upload fast traceframes. Set the
10167 tracepoint hit context's tracepoint type.
10168 (handle_tracepoint_bkpts): New.
10169 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10170 type. Add comment about fast tracepoints.
10171 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10172 non-existing action_str field.
10173 (get_context_regcache): Handle fast tracepoints.
10174 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10175 to the regcache.
10176 (fast_tracepoint_from_jump_pad_address): New.
10177 (fast_tracepoint_from_ipa_tpoint_address): New.
10178 (collecting_t): New.
10179 (force_unlock_trace_buffer): New.
10180 (fast_tracepoint_collecting): New.
10181 (collecting): New.
10182 (gdb_collect): New.
10183 (write_inferior_data_ptr): New.
10184 (target_tp_heap): New.
10185 (target_malloc): New.
10186 (download_agent_expr): New.
10187 (UALIGN): New.
10188 (download_tracepoints): New.
10189 (download_trace_state_variables): New.
10190 (upload_fast_traceframes): New.
10191 (IPA_FIRST_TRACEFRAME): New.
10192 (IPA_NEXT_TRACEFRAME_1): New.
10193 (IPA_NEXT_TRACEFRAME): New.
10194 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10195 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10196 (gdb_jump_pad_buffer_end): New.
10197 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10198 (initialize_tracepoint): Adjust.
10199 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10200 buffer. Initialize the low module.
10201 * utils.c (PREFIX, TOOLNAME): New.
10202 (malloc_failure): Use PREFIX.
10203 (error): In the IPA, an error causes an exit.
10204 (fatal, warning): Use PREFIX.
10205 (internal_error): Use TOOLNAME.
10206 (NUMCELLS): Increase to 10.
10207 * configure, config.in: Regenerate.
10208
d149dd1d
PA
102092010-06-01 Pedro Alves <pedro@codesourcery.com>
10210
10211 * server.c (handle_query) <qSupported>: Do two passes over the
10212 qSupported string to avoid nesting strtok.
10213
f6528abd
JK
102142010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10215
10216 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10217 (CDEPS): New.
10218 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10219 -Wl,--dynamic-list.
10220 * configure: Regenerate.
10221 * proc-service.list: New.
10222
ca2a87a0
JK
102232010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10224
10225 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10226 New comment.
10227
363a6e9f
OS
102282010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10229
10230 * gdbreplay.c (remote_open): Check error return from socket() call by
10231 its equality to -1 not by it being negative.
10232 * remote-utils.c (remote_open): Likewise.
10233
d23b6cb1
PA
102342010-05-23 Pedro Alves <pedro@codesourcery.com>
10235
10236 * config.h: Regenerate.
10237
28d3cf85
MK
102382010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10239
10240 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10241 doesn't provide PTRACE_GET_THREAD_AREA.
10242
fea36a59
MK
102432010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10244
10245 * linux-m68k-low.c: Include <asm/ptrace.h>
10246 (ps_get_thread_area): Implement.
10247
24b066ba
DE
102482010-05-03 Doug Evans <dje@google.com>
10249
10250 * event-loop.c (struct callback_event): New struct.
10251 (callback_list): New global.
10252 (append_callback_event, delete_callback_event): New functions.
10253 (process_callback): New function.
10254 (start_event_loop): Call it.
10255 * remote-utils.c (NOT_SCHEDULED): Define.
10256 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10257 moved out of readchar.
10258 (readchar): Rewrite. Call reschedule before returning.
10259 (reset_readchar): New function.
10260 (remote_close): Call it.
10261 (process_remaining, reschedule): New functions.
10262 * server.h (callback_handler_func): New typedef.
10263 (append_callback_event, delete_callback_event): Declare.
10264
9836d6ea
PA
102652010-05-03 Pedro Alves <pedro@codesourcery.com>
10266
10267 * proc-service.c (ps_pglobal_lookup): Use
10268 thread_db_look_up_one_symbol.
10269 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10270 parameter. Use it instead of all_symbols_looked_up.
10271 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10272 field.
10273 (all_symbols_looked_up): Don't declare.
10274 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10275 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10276 field.
10277 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10278 Set all_symbols_looked_up here.
10279 (thread_db_look_up_one_symbol): New.
10280 (thread_db_get_tls_address): Adjust.
10281 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10282 thread_db object on the heap, and tentatively set it in the
10283 process structure.
10284 (thread_db_init): Don't set all_symbols_looked_up here.
10285 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10286
7984d532
PA
102872010-05-03 Pedro Alves <pedro@codesourcery.com>
10288
10289 * linux-low.c (linux_kill, linux_detach): Adjust.
10290 (status_pending_p_callback): Remove redundant statement. Check
10291 for !TARGET_WAITIKIND_IGNORE, instead of
10292 TARGET_WAITKIND_STOPPED.
10293 (handle_tracepoints): Make sure LWP is locked. Adjust.
10294 (linux_wait_for_event_1): Adjust.
10295 (linux_cancel_breakpoints): New.
10296 (unsuspend_one_lwp): New.
10297 (unsuspend_all_lwps): New.
10298 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10299 (send_sigstop_callback): Change return type to int, add new
10300 `except' parameter and handle it.
10301 (suspend_and_send_sigstop_callback): New.
10302 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10303 pass them down. If SUSPEND, also increment the lwp's suspend
10304 count.
10305 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10306 (need_step_over_p): Don't consider suspended LWPs.
10307 (start_step_over): Adjust.
10308 (proceed_one_lwp): Change return type to int, add new `except'
10309 parameter and handle it.
10310 (unsuspend_and_proceed_one_lwp): New.
10311 (proceed_all_lwps): Use find_inferior instead of
10312 for_each_inferior.
10313 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10314 also decrement the suspend count of LWPs. Pass `except' down,
10315 instead of hacking its suspend count.
10316 (linux_pause_all): Add `freeze' parameter. Adjust.
10317 (linux_unpause_all): New.
10318 (linux_target_ops): Install linux_unpause_all.
10319 * server.c (handle_status): Adjust.
10320 * target.h (struct target_ops): New fields `unpause_all' and
10321 `cancel_breakpoints'. Add new parameter to `pause_all'.
10322 (pause_all): Add new `freeze' parameter.
10323 (unpause_all): New.
10324 (cancel_breakpoints): New.
10325 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10326 cancel breakpoints.
10327 (cmd_qtstart): Pause threads.
10328 (stop_tracing): Pause threads, and cancel breakpoints.
10329 * win32-low.c (win32_target_ops): Adjust.
10330
e471f25b
PA
103312010-05-03 Pedro Alves <pedro@codesourcery.com>
10332
10333 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10334 the inferior right away from here...
10335 (linux_wait_1): ... to here, and adjust to check the thread's
10336 last_resume_kind instead of the lwp's step or stop_expected flags.
10337
1915ef4f
PA
103382010-05-02 Pedro Alves <pedro@codesourcery.com>
10339
10340 * README: Use consistent `GDB' and `GDBserver' spellings.
10341
f9e39928
PA
103422010-05-02 Pedro Alves <pedro@codesourcery.com>
10343
10344 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10345 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10346 (linux_detach_one_lwp): Assume the lwp is stopped.
10347 (any_thread_of): Delete.
10348 (linux_detach): Stop all lwps here. Don't blindly delete all
10349 breakpoints.
10350 (delete_lwp_callback): New.
10351 (linux_mourn): Delete all lwps of the process that is gone.
10352 (linux_wait_1): Don't delete the last lwp of the process here.
10353 * mem-break.h (mark_breakpoints_out): Declare.
10354 * mem-break.c (mark_breakpoints_out): New.
10355 (free_all_breakpoints): Use it.
10356 * server.c (handle_target_event): If the process is gone, mark
10357 breakpoints out.
10358 * thread-db.c (struct thread_db) <create_bp>: New field.
10359 (thread_db_enable_reporting): Fix prototype. Store a thread event
10360 breakpoint reference in the thread_db struct.
10361 (thread_db_load_search): Clear the thread_db object.
10362 (try_thread_db_load_1): Ditto.
10363 (switch_to_process): New.
10364 (disable_thread_event_reporting): Use it.
10365 (remove_thread_event_breakpoints): New.
10366 (thread_db_detach, thread_db_mourn): Use it.
10367
1e7fc18c
PA
103682010-05-01 Pedro Alves <pedro@codesourcery.com>
10369
10370 * linux-low.c (linux_enable_event_reporting): New.
10371 (linux_wait_for_event_1, handle_extended_wait): Use it.
10372
02fc4de7
PA
103732010-04-30 Pedro Alves <pedro@codesourcery.com>
10374
10375 * linux-low.c (linux_kill_one_lwp, linux_kill)
10376 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10377 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10378 SIGSTOP even if the LWP is stopped.
10379 (send_sigstop_callback): New.
10380 (stop_all_lwps): Use send_sigstop_callback instead.
10381 (linux_resume_one_thread): Adjust.
10382 (proceed_one_lwp): Still proceed an LWP that the client has
10383 requested to stop, if we haven't reported it as stopped yet. Make
10384 sure that LWPs the client want stopped, have a pending SIGSTOP.
10385
bc3b5632
DE
103862010-04-26 Doug Evans <dje@google.com>
10387
ae1ada35
DE
10388 * server.c (handle_general_set): Make static.
10389
bc3b5632
DE
10390 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10391 Print received char after testing for error/eof instead of before.
10392 (input_interrupt): Tweak comment.
10393
65730243
DE
103942010-04-23 Doug Evans <dje@google.com>
10395
10396 * server.c (start_inferior): Print inferior argv if --debug.
10397
a8ae7dc0
AR
103982010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10399
10400 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10401 * nto-x86-low.c: Include server.h
10402
1c07cc19
PM
104032010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10404
10405 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10406 be consistent with other sources of this directory.
10407 (init_registers_amd64): Correct name of source file of this function
10408 in the comment.
10409
e0a61e09
PM
104102010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10411
10412 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10413 64-bit executables.
10414
54709339
PM
104152010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10416
10417 * win32-i386-low.c: Add 64-bit support.
10418 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10419 (init_registers_amd64): Declare.
10420 (mappings): Add 64-bit version of array.
10421 (init_windows_x86): New function.
10422 (the_low_target): Change init_arch field to init_windows_x86.
10423
e8f0053d
PM
104242010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10425
10426 * win32-low.c: Adapt to support also 64-bit architecture.
10427 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10428 (get_image_name): Use SIZE_T type for local variable `done'.
10429 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10430 (toolhelp_get_dll_name): Idem.
10431 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10432 Use uintptr_t typecast to avoid warning.
10433 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10434 (handle_exception): Use phex_nz to avoid warning.
10435 (win32_wait): Remove unused local variable `process'.
10436
c481e77e
PM
104372010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10438
10439 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10440 `amd64-avx.o'.
10441
12ea4b69
PM
104422010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10443
10444 * configure.ac: Use `ws2_32' library for srv_mingw.
10445 * configure: Regenerate.
10446 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10447 * remote-utils.c: Likewise.
10448
f6d1620c
L
104492010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10450
10451 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10452 if __x86_64__ is defined.
10453
8e642873
PM
104542010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10455
10456 * configure: Regenerate.
10457
711e434b
PM
104582010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10459
10460 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10461 * target.h (target_ops): New get_tib_address field.
10462 * win32-low.h (win32_thread_info): Add thread_local_base field.
10463 * win32-low.c (child_add_thread): Add tlb argument.
10464 Set thread_local_base field to TLB.
10465 (get_child_debug_event): Adapt to child_add_thread change.
10466 (win32_get_tib_address): New function.
10467 (win32_target_ops): Set get_tib_address field to
10468 win32_get_tib_address.
10469 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10470
505106cd
PA
104712010-04-12 Pedro Alves <pedro@codesourcery.com>
10472
505106cd
PA
10473 * linux-low.c (linux_mourn): Also remove the process.
10474 * server.c (handle_target_event): Don't remove the process here.
10475 * nto-low.c (nto_mourn): New.
10476 (nto_target_ops): Install it.
10477 * spu-low.c (spu_mourn): New.
10478 (spu_target_ops): Install it.
10479 * win32-low.c (win32_mourn): New.
10480 (win32_target_ops): Install it.
10481
e8470a06
PA
104822010-04-12 Pedro Alves <pedro@codesourcery.com>
10483
10484 * server.h (buffer_xml_printf): Remove redundant `;'.
10485
45ba0d02
PA
104862010-04-12 Pedro Alves <pedro@codesourcery.com>
10487
10488 * regcache.c (set_register_cache): Invalidate regcaches before
10489 changing the register cache layout.
10490 (regcache_invalidate_one): Allow a NULL regcache.
10491 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10492 regcaches before changing the register cache layout or the target
10493 regsets.
10494
59e04013
L
104952010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10496
10497 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10498 variable warning on Linux/x86-64.
10499
8336d594
PA
105002010-04-11 Pedro Alves <pedro@codesourcery.com>
10501
10502 GDBserver disconnected tracing support.
10503
10504 * linux-low.c (linux_remove_process): Delete.
10505 (add_lwp): Don't set last_resume_kind here.
10506 (linux_kill): Use `mourn'.
10507 (linux_detach): Use `thread_db_detach', and `mourn'.
10508 (linux_mourn): New.
10509 (linux_attach_lwp_1): Adjust comment.
10510 (linux_attach): last_resume_kind moved the thread_info; adjust.
10511 (status_pending_p_callback): Adjust.
10512 (linux_wait_for_event_1): Adjust.
10513 (count_events_callback, select_singlestep_lwp_callback)
10514 (select_event_lwp_callback, cancel_breakpoints_callback)
10515 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10516 (proceed_one_lwp): Adjust.
10517 (linux_async): Add debug output.
10518 (linux_thread_stopped): New.
10519 (linux_pause_all): New.
10520 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10521 linux_pause_all.
10522 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10523 (thread_db_free): Delete declaration.
10524 (thread_db_detach, thread_db_mourn): Declare.
10525 * thread-db.c (thread_db_init): Use thread_db_mourn.
10526 (thread_db_free): Delete, split in two.
10527 (disable_thread_event_reporting): New.
10528 (thread_db_detach): New.
10529 (thread_db_mourn): New.
10530
10531 * server.h (struct thread_info) <last_resume_kind>: New field.
10532 <attached>: Add comment.
10533 <gdb_detached>: New field.
10534 (handler_func): Change return type to int.
10535 (handle_serial_event, handle_target_event): Ditto.
10536 (gdb_connected): Declare.
10537 (tracing): Delete.
10538 (disconnected_tracing): Declare.
10539 (stop_tracing): Declare.
10540
10541 * server.c (handle_query) <qSupported>: Report support for
10542 disconnected tracing.
10543 (queue_stop_reply_callback): Account for running threads.
10544 (gdb_wants_thread_stopped): New.
10545 (gdb_wants_all_threads_stopped): New.
10546 (gdb_reattached_process): New.
10547 (handle_status): Clear the `gdb_detached' flag of all processes.
10548 In all-stop, stop all threads.
10549 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10550 (process_serial_event): If the remote connection breaks, or if an
10551 exit was forced with "monitor exit", force an event loop exit.
10552 Handle disconnected tracing on detach.
10553 (handle_serial_event): Adjust.
10554 (handle_target_event): If GDB isn't connected, forward events back
10555 to the inferior, unless the last process exited, in which case,
10556 exit gdbserver. Adjust interface.
10557
10558 * remote-utils.c (remote_open): Don't block in accept. Instead
10559 register an event loop source on the listen socket file
10560 descriptor. Refactor bits into ...
10561 (listen_desc): ... this new global.
10562 (gdb_connected): ... this new function.
10563 (enable_async_notification): ... this new function.
10564 (handle_accept_event): ... this new function.
10565 (remote_close): Clear remote_desc.
10566
10567 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10568
10569 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10570 New fields.
10571 (mourn_inferior): Define.
10572 (target_process_qsupported): Avoid the dangling else problem.
10573 (thread_stopped): Define.
10574 (pause_all): Define.
10575 (target_waitstatus_to_string): Declare.
10576 * target.c (target_waitstatus_to_string): New.
10577
10578 * tracepoint.c (tracing): Make extern.
10579 (disconnected_tracing): New.
10580 (stop_tracing): Make extern. Handle tracing stops due to GDB
10581 disconnecting.
10582 (cmd_qtdisconnected): New.
10583 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10584 (handle_tracepoint_general_set): Handle QTDisconnected.
10585
10586 * event-loop.c (event_handler_func): Change return type to int.
10587 (process_event): Bail out if the event handler wants the event
10588 loop to stop.
10589 (handle_file_event): Ditto.
10590 (start_event_loop): Bail out if the event handler wants the event
10591 loop to stop.
10592
10593 * nto-low.c (nto_target_ops): Adjust.
10594 * spu-low.c (spu_wait): Don't remove the process here.
10595 (spu_target_ops): Adjust.
10596 * win32-low.c (win32_wait): Don't remove the process here.
10597 (win32_target_ops): Adjust.
10598
5d267c4c
PA
105992010-04-11 Pedro Alves <pedro@codesourcery.com>
10600
10601 * regcache.c (realloc_register_cache): Invalidate inferior's
10602 regcache before recreating it.
10603
623ccd72
PA
106042010-04-09 Pedro Alves <pedro@codesourcery.com>
10605
10606 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10607
219f2f23
PA
106082010-04-09 Stan Shebs <stan@codesourcery.com>
10609 Pedro Alves <pedro@codesourcery.com>
10610
10611 * server.h (LONGEST): New.
10612 (struct thread_info) <while_stepping>: New field.
10613 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10614 Declare.
10615 (initialize_tracepoint, handle_tracepoint_general_set)
10616 (handle_tracepoint_query, tracepoint_finished_step)
10617 (tracepoint_was_hit, release_while_stepping_state_list):
10618 (current_traceframe): Declare.
10619 * server.c (handle_general_set): Handle tracepoint packets.
10620 (read_memory): New.
10621 (write_memory): New.
10622 (handle_search_memory_1): Use read_memory.
10623 (handle_query): Report support for conditional tracepoints, trace
10624 state variables, and tracepoint sources. Handle tracepoint
10625 queries.
10626 (main): Initialize the tracepoints module.
10627 (process_serial_event): Handle traceframe reads/writes.
10628
10629 * linux-low.c (handle_tracepoints): New.
10630 (linux_wait_1): Call it.
10631 (linux_resume_one_lwp): Handle while-stepping.
10632 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10633 (linux_target_ops): Install them.
10634 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10635 New field.
10636 * linux-x86-low.c (x86_supports_tracepoints): New.
10637 (the_low_target). Install it.
10638
10639 * mem-break.h (delete_breakpoint): Declare.
10640 * mem-break.c (delete_breakpoint): Make external.
10641
10642 * target.h (struct target_ops): Add `supports_tracepoints',
10643 `read_pc', and `write_pc' fields.
10644 (target_supports_tracepoints): Define.
10645 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10646 (phex_nz): New.
10647
10648 * regcache.h (struct regcache) <registers_owned>: New field.
10649 (init_register_cache, regcache_cpy): Declare.
10650 (regcache_read_pc, regcache_write_pc): Declare.
10651 (register_cache_size): Declare.
10652 (supply_regblock): Declare.
10653 * regcache.c (init_register_cache): New.
10654 (new_register_cache): Use it.
10655 (regcache_cpy): New.
10656 (register_cache_size): New.
10657 (supply_regblock): New.
10658 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10659
219f2f23
PA
10660 * tracepoint.c: New.
10661
10662 * Makefile.in (OBS): Add tracepoint.o.
10663 (tracepoint.o): New rule.
10664
3a13a53b
L
106652010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10666
10667 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10668 (i386-mmx.o): New.
10669 (i386-mmx.c): Likewise.
10670 (i386-mmx-linux.o): Likewise.
10671 (i386-mmx-linux.c): Likewise.
10672
10673 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10674 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10675 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10676 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10677
10678 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10679 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10680 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10681
1570b33e
L
106822010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10683
10684 * Makefile.in (clean): Updated.
10685 (i386-avx.o): New.
10686 (i386-avx.c): Likewise.
10687 (i386-avx-linux.o): Likewise.
10688 (i386-avx-linux.c): Likewise.
10689 (amd64-avx.o): Likewise.
10690 (amd64-avx.c): Likewise.
10691 (amd64-avx-linux.o): Likewise.
10692 (amd64-avx-linux.c): Likewise.
10693
10694 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10695 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10696 (srv_amd64_regobj): Add amd64-avx.o.
10697 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10698 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10699 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10700 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10701 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10702 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10703 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10704
10705 * i387-fp.c: Include "i386-xstate.h".
10706 (i387_xsave): New.
10707 (i387_cache_to_xsave): Likewise.
10708 (i387_xsave_to_cache): Likewise.
10709 (x86_xcr0): Likewise.
10710
10711 * i387-fp.h (i387_cache_to_xsave): Likewise.
10712 (i387_xsave_to_cache): Likewise.
10713 (x86_xcr0): Likewise.
10714
10715 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10716 * linux-crisv32-low.c (target_regsets): Likewise.
10717 * linux-m68k-low.c (target_regsets): Likewise.
10718 * linux-mips-low.c (target_regsets): Likewise.
10719 * linux-ppc-low.c (target_regsets): Likewise.
10720 * linux-s390-low.c (target_regsets): Likewise.
10721 * linux-sh-low.c (target_regsets): Likewise.
10722 * linux-sparc-low.c (target_regsets): Likewise.
10723 * linux-xtensa-low.c (target_regsets): Likewise.
10724
10725 * linux-low.c: Include <sys/uio.h>.
10726 (regsets_fetch_inferior_registers): Support nt_type.
10727 (regsets_store_inferior_registers): Likewise.
10728 (linux_process_qsupported): New.
10729 (linux_target_ops): Add linux_process_qsupported.
10730
10731 * linux-low.h (regset_info): Add nt_type.
10732 (linux_target_ops): Add process_qsupported.
10733
10734 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10735 and <sys/uio.h>.
10736 (init_registers_i386_avx_linux): New.
10737 (init_registers_amd64_avx_linux): Likewise.
10738 (xmltarget_i386_linux_no_xml): Likewise.
10739 (xmltarget_amd64_linux_no_xml): Likewise.
10740 (PTRACE_GETREGSET): Likewise.
10741 (PTRACE_SETREGSET): Likewise.
10742 (x86_fill_xstateregset): Likewise.
10743 (x86_store_xstateregset): Likewise.
10744 (use_xml): Likewise.
10745 (x86_linux_update_xmltarget): Likewise.
10746 (x86_linux_process_qsupported): Likewise.
10747 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10748 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10749 init_registers_i386_linux here. Call
10750 x86_linux_update_xmltarget.
10751 (the_low_target): Add x86_linux_process_qsupported.
10752
10753 * server.c (handle_query): Call target_process_qsupported.
10754
10755 * target.h (target_ops): Add process_qsupported.
10756 (target_process_qsupported): New.
10757
fc7238bb
PA
107582010-04-03 Pedro Alves <pedro@codesourcery.com>
10759
10760 * inferiors.c (add_thread): Set last_status kind to
10761 TARGET_WAITKIND_IGNORE.
10762 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10763 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10764 (linux_wait_1): Move `thread' local definition to block that uses
10765 it. Don't NULL initialize `event_child'.
10766 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10767 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10768 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10769
bdabb078
PA
107702010-04-01 Pedro Alves <pedro@codesourcery.com>
10771
10772 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10773 an extended waitstatus, or by a watchpoint.
10774 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10775 thread was stepping or has been stopped by a watchpoint.
10776
d3bbe7a0
PA
107772010-04-01 Pedro Alves <pedro@codesourcery.com>
10778
10779 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10780 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10781 of another, then delete the previous, and validate all
10782 breakpoints.
10783 (validate_inserted_breakpoint): New.
10784 (delete_disabled_breakpoints): New.
10785 (validate_breakpoints): New.
10786 (check_mem_read): Validate breakpoints before trusting their
10787 shadow. Delete disabled breakpoints.
10788 (check_mem_write): Validate breakpoints before trusting they
10789 should be inserted. Delete disabled breakpoints.
10790 * mem-break.h (validate_breakpoints):
10791 * server.c (handle_query): Validate breakpoints when we see a
10792 qSymbol query.
10793
8b07ae33
PA
107942010-04-01 Pedro Alves <pedro@codesourcery.com>
10795
10796 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10797 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10798 if we could tell there's a GDB breakpoint at stop_pc.
10799 (need_step_over_p): Don't do a step over if we find a GDB
10800 breakpoint at the resume PC.
10801
10802 * mem-break.c (struct raw_breakpoint): New.
10803 (enum bkpt_type): New type `gdb_breakpoint'.
10804 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10805 fields. New field `raw'.
10806 (find_raw_breakpoint_at): New.
10807 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10808 breakpoint instead.
10809 (set_breakpoint_at): Adjust.
10810 (delete_raw_breakpoint): New.
10811 (release_breakpoint): New.
10812 (delete_breakpoint): Rename to...
10813 (delete_breakpoint_1): ... this. Add proc parameter. Use
10814 release_breakpoint. Return ENOENT.
10815 (delete_breakpoint): Reimplement.
10816 (find_breakpoint_at): Delete.
10817 (find_gdb_breakpoint_at): New.
10818 (delete_breakpoint_at): Delete.
10819 (set_gdb_breakpoint_at): New.
10820 (delete_gdb_breakpoint_at): New.
10821 (gdb_breakpoint_here): New.
10822 (set_reinsert_breakpoint): Use release_breakpoint.
10823 (uninsert_breakpoint): Rename to ...
10824 (uninsert_raw_breakpoint): ... this.
10825 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10826 (reinsert_raw_breakpoint): Change parameter type to
10827 raw_breakpoint.
10828 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10829 instead.
10830 (check_breakpoints): Adjust. Use release_breakpoint.
10831 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10832 (breakpoint_inserted_here): Ditto.
10833 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10834 Don't trust the breakpoint's shadow if it is not inserted.
10835 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10836 (delete_all_breakpoints): Adjust.
10837 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10838 use delete_breakpoint_1.
10839
10840 * mem-break.h (breakpoints_supported): Delete declaration.
10841 (set_gdb_breakpoint_at): Declare.
10842 (gdb_breakpoint_here): Declare.
10843 (delete_breakpoint_at): Delete.
10844 (delete_gdb_breakpoint_at): Declare.
10845
10846 * server.h (struct raw_breakpoint): Forward declare.
10847 (struct process_info): New field `raw_breakpoints'.
10848
10849 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10850 breakpoints.
10851
6bf5e0ba
PA
108522010-03-24 Pedro Alves <pedro@codesourcery.com>
10853
10854 * linux-low.c (status_pending_p_callback): Fix comment.
10855 (linux_wait_for_event_1): Move most of the internal breakpoint
10856 handling from here...
10857 (linux_wait_1): ... to here.
10858 (count_events_callback): New.
10859 (select_singlestep_lwp_callback): New.
10860 (select_event_lwp_callback): New.
10861 (cancel_breakpoints_callback): New.
10862 (select_event_lwp): New.
10863 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10864 priority to all LWPs that have had events that should be reported
10865 to the client. Cancel breakpoints when about to reporting the
10866 event to the client, not while stopping lwps. No longer cancel
10867 finished single-steps here.
10868 (cancel_finished_single_step): Delete.
10869 (cancel_finished_single_steps): Delete.
10870
414a389f
PA
108712010-03-24 Pedro Alves <pedro@codesourcery.com>
10872
10873 * mem-break.c (enum bkpt_type): New.
10874 (struct breakpoint): New field `type'.
10875 (set_breakpoint_at): Change return type to struct breakpoint
10876 pointer. Set type to `other_breakpoint' by default.
10877 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10878 in the breakpoint list.
10879 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10880 (reinsert_breakpoint): Rename to ...
10881 (reinsert_raw_breakpoint): ... this.
10882 (reinsert_breakpoints_at): Adjust.
10883 * mem-break.h (struct breakpoint): Declare.
10884 (set_breakpoint_at): Change return type to struct breakpoint
10885 pointer.
10886
2280c721
PA
108872010-03-24 Pedro Alves <pedro@codesourcery.com>
10888
10889 * server.c (handle_query): Assign, not compare.
10890
d50171e4
PA
108912010-03-24 Pedro Alves <pedro@codesourcery.com>
10892
10893 Teach linux gdbserver to step-over-breakpoints.
10894
10895 * linux-low.c (can_hardware_single_step): New.
10896 (supports_breakpoints): New.
10897 (handle_extended_wait): If stopping threads, read the stop pc of
10898 the new cloned LWP.
10899 (get_pc): New.
10900 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10901 low target doesn't support retrieving the PC.
10902 (add_lwp): Set last_resume_kind to resume_continue.
10903 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10904 (linux_attach): Don't clear stop_expected. Set the lwp's
10905 last_resume_kind to resume_stop.
10906 (linux_detach_one_lwp): Don't check for removed breakpoints.
10907 (check_removed_breakpoint): Delete.
10908 (status_pending_p): Rename to ...
10909 (status_pending_p_callback): ... this. Don't check for removed
10910 breakpoints. Don't consider threads that are stopped from GDB's
10911 perspective.
10912 (linux_wait_for_lwp): Always read the stop_pc here.
10913 (cancel_breakpoint): New.
10914 (step_over_bkpt): New global.
10915 (linux_wait_for_event_1): Implement stepping over breakpoints.
10916 (gdb_wants_lwp_stopped): New.
10917 (gdb_wants_all_stopped): New.
10918 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10919 single-step traps here. Store the thread's last reported target
10920 wait status.
10921 (send_sigstop): Don't clear stop_expected. Always set it,
10922 instead.
10923 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10924 (cancel_finished_single_step): New.
10925 (cancel_finished_single_steps): New.
10926 (wait_for_sigstop): Don't cancel finished single-step traps here.
10927 (linux_resume_one_lwp): Don't check for removed breakpoints.
10928 Don't set `step' on non-hardware step archs.
10929 (linux_set_resume_request): Ignore resume_stop requests if already
10930 stopping or stopped. Set the lwp's last_resume_kind.
10931 (resume_status_pending_p): Don't check for removed breakpoints.
10932 (need_step_over_p): New.
10933 (start_step_over): New.
10934 (finish_step_over): New.
10935 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10936 requests. Clear the thread's last reported target waitstatus.
10937 Don't use the `suspended' flag. Don't consider pending breakpoints.
10938 (linux_resume): Start a step-over if necessary.
10939 (proceed_one_lwp): New.
10940 (proceed_all_lwps): New.
10941 (unstop_all_lwps): New.
10942 * linux-low.h (struct lwp_info): Rewrite comment for the
10943 `suspended' flag. Add the `stop_pc' field. Delete the
10944 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10945 Add `'last_resume_kind' and `need_step_over' fields.
10946 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10947 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10948 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10949 (set_raw_breakpoint_at): New.
10950 (set_breakpoint_at): Rewrite to use it.
10951 (reinsert_breakpoint_handler): Delete.
10952 (set_reinsert_breakpoint): New.
10953 (reinsert_breakpoint_by_bp): Delete.
10954 (delete_reinsert_breakpoints): New.
10955 (uninsert_breakpoint): Rewrite.
10956 (uninsert_breakpoints_at): New.
10957 (reinsert_breakpoint): Rewrite.
10958 (reinsert_breakpoints_at): New.
10959 (check_breakpoints): Rewrite.
10960 (breakpoint_here): New.
10961 (breakpoint_inserted_here): New.
10962 (check_mem_read): Adjust.
10963 * mem-break.h (breakpoints_supported, breakpoint_here)
10964 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10965 (reinsert_breakpoint_by_bp): Delete declaration.
10966 (delete_reinsert_breakpoints): Declare.
10967 (reinsert_breakpoint): Delete declaration.
10968 (reinsert_breakpoints_at): Declare.
10969 (uninsert_breakpoint): Delete declaration.
10970 (uninsert_breakpoints_at): Declare.
10971 (check_breakpoints): Adjust prototype.
10972 * server.h: Adjust include order.
10973 (struct thread_info): Declare here. Add a `last_status' field.
10974
30ba68cb
MS
109752010-03-23 Michael Snyder <msnyder@vmware.com>
10976
10977 * server.c (crc32): New function.
10978 (handle_query): Add handling for 'qCRC:' request.
10979
b9a881c2
PA
109802010-03-23 Pedro Alves <pedro@codesourcery.com>
10981
10982 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10983 lwp had been stopped by a watchpoint.
10984
e92d13d5
PA
109852010-03-16 Pedro Alves <pedro@codesourcery.com>
10986
10987 * server.h (internal_error): Declare.
10988 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10989 * utils.c (internal_error): New function.
10990
64daa791
AS
109912010-03-15 Andreas Schwab <schwab@redhat.com>
10992
10993 * configure.srv: Fix typo setting srv_regobj.
10994
f52cd8cd
PA
109952010-03-15 Pedro Alves <pedro@codesourcery.com>
10996
10997 * linux-low.c (fetch_register): Avoid passing a non string literal
10998 format to `error'.
10999 (usr_store_inferior_registers): Ditto.
11000
93ae6fdc
PA
110012010-03-14 Pedro Alves <pedro@codesourcery.com>
11002
11003 * linux-low.c (linux_write_memory): Bail out early if peeking
11004 memory failed.
11005
c3adc08c
PA
110062010-03-14 Pedro Alves <pedro@codesourcery.com>
11007
11008 * linux-low.h (struct lwp_info): New fields
11009 `stopped_by_watchpoint' and `stopped_data_address'.
11010 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11011 here, and cache them in the lwp object.
11012 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11013 directly.
11014 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11015 field.
11016 (linux_stopped_by_watchpoint): Rewrite.
11017 (linux_stopped_data_address): Rewrite.
11018
bce522a2
PA
110192010-03-06 Simo Melenius <simo.melenius@iki.fi>
11020
11021 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11022 switching the current inferior, not before.
11023
90884b2b
L
110242010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11025
11026 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11027 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11028 i386-linux.c and amd64-linux.c.
11029 (reg-i386.o): Removed.
11030 (reg-i386.c): Likewise.
11031 (reg-i386-linux.o): Likewise.
11032 (reg-i386-linux.c): Likewise.
11033 (reg-x86-64.o): Likewise.
11034 (reg-x86-64.c): Likewise.
11035 (reg-x86-64-linux.o): Likewise.
11036 (reg-x86-64-linux.c): Likewise.
11037 (i386.o): New.
11038 (i386.c): Likewise.
11039 (i386-linux.o): Likewise.
11040 (i386-linux.c): Likewise.
11041 (amd64.o): Likewise.
11042 (amd64.c): Likewise.
11043 (amd64-linux.o): Likewise.
11044 (amd64-linux.c): Likewise.
11045
11046 * configure.srv (srv_i386_regobj): New.
11047 (srv_i386_linux_regobj): Likewise.
11048 (srv_amd64_regobj): Likewise.
11049 (srv_amd64_linux_regobj): Likewise.
11050 (srv_i386_32bit_xmlfiles): Likewise.
11051 (srv_i386_64bit_xmlfiles): Likewise.
11052 (srv_i386_xmlfiles): Likewise.
11053 (srv_amd64_xmlfiles): Likewise.
11054 (srv_i386_linux_xmlfiles): Likewise.
11055 (srv_amd64_linux_xmlfiles): Likewise.
11056 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11057 srv_xmlfiles to $srv_i386_xmlfiles.
11058 (i[34567]86-*-mingw32ce*): Likewise.
11059 (i[34567]86-*-mingw*): Likewise.
11060 (i[34567]86-*-nto*): Likewise.
11061 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11062 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11063 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11064 (x86_64-*-linux*): Likewise.
11065
11066 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11067 (init_registers_amd64_linux): New.
11068 (x86_arch_setup): Replace init_registers_x86_64_linux with
11069 init_registers_amd64_linux.
11070
193f13e6
MK
110712010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11072
11073 * configure.ac: Check for libdl. If it is not available link against
11074 static libthread_db.
11075 * configure: Regenerate.
11076
85d721b8
PA
110772010-02-22 Pedro Alves <pedro@codesourcery.com>
11078
11079 PR9605
11080
11081 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11082 handing a read watchpoint.
11083 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11084
6076632b
DE
110852010-02-12 Doug Evans <dje@google.com>
11086
11087 * linux-low.c (linux_supports_tracefork_flag): Document.
11088 (linux_look_up_symbols): Add comment.
11089
3327ccf7
L
110902010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11091
11092 * regcache.c (supply_register): Clear regcache if buf is NULL.
11093
0718675c 110942010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11095 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11096
11097 * inferiors.c (find_inferior): Add function documentation.
11098 (unloaded_dll): Handle the case where the unloaded dll has not
11099 been previously registered in the dll list.
11100
177321bd
DJ
111012010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11102
11103 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11104 (thumb2_breakpoint): New.
11105 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11106
2b009048
DJ
111072010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11108
11109 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11110 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11111 breakpoints.
11112
3be029c7
PA
111132010-01-21 Pedro Alves <pedro@codesourcery.com>
11114
11115 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11116
18f5de3b
JK
111172010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11118
11119 * linux-s390-low.c (s390_collect_ptrace_register)
11120 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11121
3743bb4f
DE
111222010-01-21 Doug Evans <dje@google.com>
11123
14ce3065
DE
11124 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11125 (PTRACE_ARG4_TYPE): New macro.
11126 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11127 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11128 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11129 (usr_store_inferior_registers): Ditto.
11130 (linux_read_memory, linux_write_memory): Ditto.
11131 (linux_test_for_tracefork): Ditto.
11132
3743bb4f
DE
11133 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11134 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11135
8b315be5
PA
111362010-01-21 Pedro Alves <pedro@codesourcery.com>
11137
11138 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11139 target.
11140
85492558
PA
111412010-01-21 Pedro Alves <pedro@codesourcery.com>
11142
11143 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11144 prototype to take a regcache. Adjust.
11145
442ea881
PA
111462010-01-20 Pedro Alves <pedro@codesourcery.com>
11147
11148 * regcache.h (struct thread_info): Forward declare.
11149 (struct regcache): New.
11150 (new_register_cache): Adjust prototype.
11151 (get_thread_regcache): Declare.
11152 (free_register_cache): Adjust prototype.
11153 (registers_to_string, registers_from_string): Ditto.
11154 (supply_register, supply_register_by_name, collect_register)
11155 (collect_register_as_string, collect_register_by_name): Ditto.
11156 * regcache.c (struct inferior_regcache_data): Delete.
11157 (get_regcache): Rename to ...
11158 (get_thread_regcache): ... this. Adjust. Switch inferior before
11159 fetching registers.
11160 (regcache_invalidate_one): Adjust.
11161 (regcache_invalidate): Fix prototype.
11162 (new_register_cache): Return the new register cache.
11163 (free_register_cache): Change prototype.
11164 (realloc_register_cache): Adjust.
11165 (registers_to_string): Change prototype to take a regcache. Adjust.
11166 (registers_from_string): Ditto.
11167 (register_data): Ditto.
11168 (supply_register): Ditto.
11169 (supply_register_by_name): Ditto.
11170 (collect_register): Ditto.
11171 (collect_register_as_string): Ditto.
11172 (collect_register_by_name): Ditto.
11173 * server.c (process_serial_event): Adjust.
11174 * linux-low.h (regset_fill_func, regset_store_func): Change
11175 prototype.
11176 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11177 Change prototype.
11178 * linux-low.c (get_stop_pc): Adjust.
11179 (check_removed_breakpoint): Adjust.
11180 (linux_wait_for_event): Adjust.
11181 (linux_resume_one_lwp): Adjust.
11182 (fetch_register): Add regcache parameter. Adjust.
11183 (usr_store_inferior_registers): Ditto.
11184 (regsets_fetch_inferior_registers): Ditto.
11185 (regsets_store_inferior_registers): Ditto.
11186 (linux_fetch_registers, linux_store_registers): Ditto.
11187 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11188 regcache. Adjust.
43aaf8b6
PA
11189 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11190 Ditto.
442ea881
PA
11191 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11192 prototype to take a regcache.
11193 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11194 * remote-utils.c (convert_ascii_to_int, outreg)
11195 (prepare_resume_reply): Change prototype to take a regcache.
11196 Adjust.
11197 * target.h (struct target_ops) <fetch_registers, store_registers>:
11198 Change prototype to take a regcache.
11199 (fetch_inferior_registers, store_inferior_registers): Change
11200 prototype to take a regcache. Adjust.
11201 * proc-service.c (ps_lgetregs): Adjust.
11202 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11203 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11204 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11205 take a regcache. Adjust.
11206 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11207 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11208 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11209 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11210 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11211 (cris_cannot_fetch_register):
11212 (cris_breakpoint_at): Change prototype to take a regcache.
11213 Adjust.
11214 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11215 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11216 to take a regcache. Adjust.
11217 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11218 Adjust.
11219 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11220 take a regcache. Adjust.
11221 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11222 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11223 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11224 * linux-mips-low.c (mips_get_pc):
11225 (mips_set_pc): Change prototype to take a regcache. Adjust.
11226 (mips_reinsert_addr): Adjust.
11227 (mips_collect_register): Change prototype to take a regcache.
11228 Adjust.
11229 (mips_supply_register):
11230 (mips_collect_register_32bit, mips_supply_register_32bit)
11231 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11232 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11233 * linux-ppc-low.c (ppc_supply_ptrace_register)
11234 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11235 (parse_spufs_run): Adjust.
11236 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11237 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11238 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11239 take a regcache. Adjust.
11240 * linux-s390-low.c (s390_collect_ptrace_register)
11241 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11242 (s390_set_pc): Change prototype to take a regcache. Adjust.
11243 (s390_arch_setup): Adjust.
11244 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11245 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11246 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11247 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11248 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11249 regcache. Adjust.
11250 (sparc_breakpoint_at): Adjust.
11251 * linux-xtensa-low.c (xtensa_fill_gregset):
11252 (xtensa_store_gregset):
11253 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11254 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11255 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11256 prototype to take a regcache. Adjust.
11257 * win32-arm-low.c (arm_fetch_inferior_register)
11258 (arm_store_inferior_register): Change prototype to take a
11259 regcache. Adjust.
11260 * win32-i386-low.c (i386_fetch_inferior_register)
11261 (i386_store_inferior_register): Change prototype to take a
11262 regcache. Adjust.
11263 * win32-low.c (child_fetch_inferior_registers)
11264 (child_store_inferior_registers): Change prototype to take a
11265 regcache. Adjust.
11266 (win32_wait): Adjust.
11267 (win32_fetch_inferior_registers): Change prototype to take a
11268 regcache. Adjust.
11269 (win32_store_inferior_registers): Adjust.
11270 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11271 store_inferior_register>: Change prototype to take a regcache.
11272
60c3d7b0
DE
112732010-01-20 Doug Evans <dje@google.com>
11274
11275 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11276 #ifdef.
11277 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11278 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11279
dc146f7c
VP
112802010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11281
11282 * linux-low.c (linux_core_of_thread): New.
11283 (compare_ints, show_process, list_threads): New.
11284 (linux_qxfer_osdata): Report threads and cores.
11285 (linux_target_op): Register linux_core_of_thread.
11286 * remote-utils.c (prepare_resume_reply): Report the core.
11287 (buffer_xml_printf): Support %d specifier.
11288 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11289 New.
11290 (handle_query): Handle qXfer:threads. Announce availability
11291 thereof.
11292 * target.h (struct target_ops): New field core_of_thread.
11293
7803799a
UW
112942010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11295
11296 * Makefile.in (clean): Remove new generated files.
11297 (reg-s390.o, reg-s390.c): Remove rules.
11298 (reg-s390x.o, reg-s390x.c): Likewise.
11299 (s390-linux32.o, s390-linux32.c): Add rules.
11300 (s390-linux64.o, s390-linux64.c): Likewise.
11301 (s390x-linux64.o, s390x-linux64.c): Likewise.
11302 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11303 * linux-s390-low.c: Include <elf.h>.
11304 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11305 (init_registers_s390): Remove prototype.
11306 (init_registers_s390x): Likewise.
11307 (init_registers_s390_linux32): Add prototype.
11308 (init_registers_s390_linux64): Likewise.
11309 (init_registers_s390x_linux64): Likewise.
11310 (s390_num_regs_3264): New define.
11311 (s390_regmap_3264): New global variable.
11312 (s390_cannot_fetch_register): Remove obsolete check.
11313 (s390_cannot_store_register): Likewise.
11314 (s390_collect_ptrace_register): Handle upper/lower register halves.
11315 (s390_supply_ptrace_register): Likewise.
11316 (s390_fill_gregset): Update to register number changes.
11317 (s390_get_hwcap): New routine.
11318 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11319 Install appropriate regmap and register set.
11320
6e7ffa39
JB
113212010-01-01 Joel Brobecker <brobecker@adacore.com>
11322
11323 * server.c (gdbserver_version): Update copyright year to 2010.
11324 * gdbreplay.c (gdbreplay_version): Likewise.
11325
957f3f49
DE
113262009-12-28 Doug Evans <dje@google.com>
11327
11328 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11329 elf/external.h. Include <elf.h> instead but only if necessary.
11330
ca5c370d
PA
113312009-12-28 Pedro Alves <pedro@codesourcery.com>
11332
11333 * linux-low.c (linux_remove_process): Remove `detaching'
11334 parameter. Don't release/detach from thread_db here.
11335 (linux_kill): Release/detach from thread_db here, ...
11336 (linux_detach): ... and here, before actually detaching.
11337 (linux_wait_1): ... and here, when a process exits.
11338 * thread-db.c (any_thread_of): New.
11339 (thread_db_free): Switch the current inferior to a thread of the
11340 passed in process.
11341
4ee62156
DE
113422009-12-21 Doug Evans <dje@google.com>
11343
d90e6a88
DE
11344 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11345
c5f62d5f
DE
11346 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11347 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11348 warning ifndef __NR_tkill. Move setting of errno there too.
11349 Delete unnecessary resetting of errno after syscall.
11350 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11351
10e86dd7
DE
11352 * configure.ac: Check for dladdr.
11353 * config.in: Regenerate.
11354 * configure: Regenerate.
11355 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11356 (try_thread_db_load): Update.
11357
4ee62156
DE
11358 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11359
00f515da
DE
113602009-12-18 Doug Evans <dje@google.com>
11361
e9464885
DE
11362 * event-loop.c: Include unistd.h if it exists.
11363
07d4f67e
DE
11364 * linux-low.c (my_waitpid): Move definition away from being in
11365 between linux_tracefork_child/linux_test_for_tracefork.
11366
00f515da
DE
11367 * gdb_proc_service.h (psaddr_t): Fix type.
11368 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11369 signature to match glibc.
11370
1de1badb
DE
113712009-12-16 Doug Evans <dje@google.com>
11372
11373 * linux-low.c (linux_read_memory): Fix argument to read.
11374
aeeb81d1
PA
113752009-11-26 Pedro Alves <pedro@codesourcery.com>
11376
11377 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11378 events, don't leave current_inferior pointing at null.
11379
10357975
PA
113802009-11-26 Pedro Alves <pedro@codesourcery.com>
11381
11382 * win32-low.c (LOG): Delete.
11383 (OUTMSG): Output to stderr.
11384 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11385 on compile time LOG macro.
11386 (win32_wait): Fix debug output.
11387
cf6e3471
PA
113882009-11-26 Pedro Alves <pedro@codesourcery.com>
11389
11390 * win32-low.c (win32_add_one_solib): If the dll name is
11391 "ntdll.dll", prepend the system directory to the dll path.
11392
0c85e18e
MK
113932009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11394
11395 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11396
9ac544ce 113972009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11398 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11399
11400 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11401 * configure.ac: Check for __mcoldfire__ and set
11402 gdb_cv_m68k_is_coldfire.
11403 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11404 reg-cf.o and reg-m68k.o.
11405 * configure: Regenerated.
11406
fd7dd3e6
PA
114072009-11-16 Pedro Alves <pedro@codesourcery.com>
11408
11409 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11410 Pass it to thread_db_free.
11411 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11412 proper `detaching' argument to linux_remove_process.
11413 * linux-low.h (thread_db_free): Add `detaching' parameter.
11414 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11415 to thread_db_free.
11416 (thread_db_free): Add `detaching' parameter. Only
11417 call td_ta_clear_event if detaching from process.
11418
75aa492e
MK
114192009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11420
11421 * thread-db.c (thread_db_free): Fix typo.
11422
21e1bee4
PP
114232009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11424
11425 PR gdb/10838
11426 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11427
8838b45e
NS
114282009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11429
11430 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11431 with an i686 compiler.
11432 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11433 needed.
11434 * configure: Rebuilt.
11435
8a35fb51
SL
114362009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11437
11438 PR gdb/10783
11439
11440 * server.c (handle_search_memory_1): Correct read_addr initialization
11441 in loop for searching subsequent chunks.
11442
96f15937
PP
114432009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11444
11445 * configure.ac: New --with-libthread-db option.
11446 * thread-db.c: Allow direct dependence on libthread_db.
11447 (thread_db_free): Adjust.
11448 * config.in: Regenerate.
11449 * configure: Likewise.
889bf7c5 11450
5f7d1694
PP
114512009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11452
11453 PR gdb/10757
11454 * thread-db.c (attach_thread): New function.
11455 (maybe_attach_thread): Return success/failure.
11456 (find_new_threads_callback): Adjust.
889bf7c5
PA
11457 (thread_db_find_new_threads): Loop until no new threads.
11458
88e3b899
PA
114592009-10-13 Pedro Alves <pedro@codesourcery.com>
11460
11461 * proc-service.c (ps_lgetregs): Formatting.
11462
cdbfd419
PP
114632009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11464
11465 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11466 * configure.ac: Adjust.
11467 * linux-low.h (struct process_info_private): Move members to struct
11468 thread_db.
11469 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11470 * linux-low.c (linux_remove_process): Adjust.
11471 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11472 * server.c (handle_query): Move code ...
11473 (handle_monitor_command): ... here. New function.
11474 * target.h (struct target_ops): New member.
11475 * thread-db.c (struct thread_db): New.
11476 (libthread_db_search_path): New variable.
11477 (thread_db_create_event, thread_db_enable_reporting)
11478 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11479 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11480 (try_thread_db_load_1, dladdr_to_soname): New functions.
11481 (try_thread_db_load, thread_db_load_search): New functions.
11482 (thread_db_init): Search for libthread_db.
11483 (thread_db_free): New function.
11484 (thread_db_handle_monitor_command): Likewise.
11485 * config.in: Regenerate.
11486 * configure: Regenerate.
889bf7c5 11487
4168d2d6
UW
114882009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11489
11490 * spu-low.c (spu_kill): Wait for inferior to terminate.
11491 Call clear_inferiors.
11492 (spu_detach): Call clear_inferiors.
11493
81ecdfbb
RW
114942009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11495
11496 * aclocal.m4: Regenerate.
11497 * config.in: Likewise.
11498 * configure: Likewise.
11499
0b9ff2c0
UW
115002009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11501
11502 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11503 (parse_spufs_run): New function.
11504 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11505 (ppc_breakpoint_at): Handle SPU breakpoints.
11506
efcbbd14
UW
115072009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11508
11509 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11510 (SPUFS_MAGIC): Define.
11511 (spu_enumerate_spu_ids): New function.
11512 (linux_qxfer_spu): New function.
11513 (linux_target_ops): Install linux_qxfer_spu.
11514
f4d9bade
UW
115152009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11516
11517 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11518 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11519 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11520 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11521 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11522 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11523 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11524 (init_registers_powerpc_cell32l): Add prototype.
11525 (init_registers_powerpc_cell64l): Likewise.
11526 (ppc_arch_setup): Detect Cell/B.E. architecture.
11527
96e946ca
RW
115282009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11529
11530 * Makefile.in (datarootdir): New variable.
11531
58d6951d
DJ
115322009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11533
11534 * linux-low.c (linux_write_memory): Update debugging output.
11535 * Makefile.in (clean): Add new descriptions.
11536 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11537 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11538 * configure.srv: Add new files for arm*-*-linux*.
11539 * linux-arm-low.c: Add new declarations.
11540 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11541 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11542 (HWCAP_VFPv3D16): New.
11543 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11544 instead of __IWMMXT__.
11545 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11546 (arm_arch_setup): New.
11547 (target_regsets): Remove #ifdef. Add VFP regset.
11548 (the_low_target): Use arm_arch_setup.
11549
12b42a12
DJ
115502009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11551
11552 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11553 the main thread again.
11554
ac8c974e
AR
115552009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11556
11557 Adding Neutrino gdbserver.
11558 * configure: Regenerated.
11559 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11560 * configure.srv (i[34567]86-*-nto*): New target.
11561 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11562 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11563 (nto_comctrl) [__QNX__]: New function.
11564 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11565
4424e0c3 115662009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11567
11568 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11569 srv_tgtobj.
11570
912cf4ba
PA
115712009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11572 Pedro Alves <pedro@codesourcery.com>
11573
11574 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11575 don't support CONTEXT_EXTENDED_REGISTERS.
11576 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11577 (the_low_target): Install them.
11578 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11579 failing with ERROR_PIPE_NOT_CONNECTED.
11580
aa5ca48f
DE
115812009-06-30 Doug Evans <dje@google.com>
11582 Pierre Muller <muller@ics.u-strasbg.fr>
11583
11584 Add h/w watchpoint support to x86-linux, win32-i386.
11585 * Makefile.in (SFILES): Add i386-low.c
11586 (i386_low_h): Define.
11587 (i386-low.o): Add dependencies.
11588 (linux-x86-low.o): Add i386-low.h dependency.
11589 (win32-i386-low.o): Ditto.
11590 * i386-low.c: New file.
11591 * i386-low.h: New file.
11592 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11593 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11594 * linux-low.c (linux_add_process): Initialize arch_private.
11595 (linux_remove_process): Free arch_private.
11596 (add_lwp): Initialize arch_private.
11597 (delete_lwp): Free arch_private.
11598 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11599 provided.
11600 * linux-low.h (process_info_private): New member arch_private.
11601 (lwp_info): New member arch_private.
11602 (linux_target_ops): New members new_process, new_thread,
11603 prepare_to_resume.
11604 (ptid_of): New macro.
11605 * linux-x86-low.c: Include stddef.h, i386-low.h.
11606 (arch_process_info): New struct.
11607 (arch_lwp_info): New struct.
11608 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11609 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11610 (i386_dr_low_get_status): New function.
11611 (x86_insert_point, x86_remove_point): New functions.
11612 (x86_stopped_by_watchpoint): New function.
11613 (x86_stopped_data_address): New function.
11614 (x86_linux_new_process, x86_linux_new_thread): New functions.
11615 (x86_linux_prepare_to_resume): New function.
11616 (the_low_target): Add entries for insert_point, remove_point,
11617 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11618 prepare_to_resume.
11619 * server.c (debug_hw_points): New global.
11620 (monitor_show_help): Document set debug-hw-points.
11621 (handle_query): Process "set debug-hw-points".
11622 * server.h (debug_hw_points): Declare.
11623 (paddress): Declare.
11624 * utils.c (NUMCELLS, CELLSIZE): New macros.
11625 (get_sell, xsnprintf, paddress): New functions.
11626 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11627 remove_point, stopped_by_watchpoint, stopped_data_address.
11628 * win32-i386-low.c: Include i386-low.h.
11629 (debug_reg_state): Replaces dr.
11630 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11631 (i386_dr_low_get_status): New function.
11632 (i386_insert_point, i386_remove_point): New functions.
11633 (i386_stopped_by_watchpoint): New function.
11634 (i386_stopped_data_address): New function.
11635 (i386_initial_stuff): Update.
11636 (get_thread_context,set_thread_context,i386_thread_added): Update.
11637 (the_low_target): Add entries for insert_point,
11638 remove_point, stopped_by_watchpoint, stopped_data_address.
11639 * win32-low.c (win32_insert_watchpoint): New function.
11640 (win32_remove_watchpoint): New function.
11641 (win32_stopped_by_watchpoint): New function.
11642 (win32_stopped_data_address): New function.
11643 (win32_target_ops): Add entries for insert_watchpoint,
11644 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11645 * win32-low.h (win32_target_ops): New members insert_point,
11646 remove_point, stopped_by_watchpoint, stopped_data_address.
11647
d993e290
PA
116482009-06-25 Pedro Alves <pedro@codesourcery.com>
11649
11650 * server.c (process_serial_event): Re-return unsupported, not
11651 error, if the type isn't recognized. Re-allow supporting only
11652 insert or remove packets. Also call require_running for
11653 breakpoints. Add missing break statement to default case. Tidy.
11654 * target.h (struct target_ops): Rename insert_watchpoint to
11655 insert_point, and remove_watchpoint to remove_point.
11656
11657 * linux-low.h (struct linux_target_ops): Likewise.
11658 * linux-low.c (linux_insert_watchpoint): Rename to ...
11659 (linux_insert_point): ... this. Adjust.
11660 (linux_remove_watchpoint): Rename to ...
11661 (linux_remove_point): ... this. Adjust.
11662 (linux_target_ops): Adjust.
11663 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11664 (cris_insert_point): ... this.
11665 (cris_remove_watchpoint): Rename to ...
11666 (cris_remove_point): ... this.
11667 (the_low_target): Adjust.
11668
0f54c268
PM
116692009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11670
11671 * server.c (handle_v_kill): Pass signal_pid to
11672 kill_inferior if multi_process is zero.
11673
c6314022
AR
116742009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11675
11676 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11677 * target.h (target_ops): Comment for *_watchpoint to make it clear
11678 the functions can get types '0' and '1'.
11679
4463ce24
AR
116802009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11681
11682 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11683 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11684 * regcache.c (get_regcache): Likewise.
11685 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11686 * win32-low.c (child_fetch_inferior_registers): Remove check for
11687 regno 0.
11688
cf8fd78b
PA
116892009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11690 Pedro Alves <pedro@codesourcery.com>
11691
11692 * target.h (struct target_ops) <supports_multi_process>: New
11693 callback.
11694 (target_supports_multi_process): New.
11695 * server.c (handle_query): Even if GDB reports support, only
11696 enable multi-process if the target also supports it. Report
11697 multi-process support only if the target backend supports it.
11698 * linux-low.c (linux_supports_multi_process): New function.
11699 (linux_target_ops): Install it as target_supports_multi_process
11700 callback.
11701
47c0c975
DE
117022009-05-24 Doug Evans <dje@google.com>
11703
e09875d4
DE
11704 Global renaming of find_thread_pid to find_thread_ptid.
11705 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11706 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11707 All callers updated.
11708
e27d73f6
DE
11709 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11710 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11711 directly.
11712
47c0c975
DE
11713 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11714 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11715 (linux_resume_one_lwp): Ditto.
11716
2acc282a
DE
117172009-05-23 Doug Evans <dje@google.com>
11718
11719 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11720 from struct inferior_list_entry * to struct lwp_info *.
11721 All callers updated.
11722
9f1036c1
DE
117232009-05-13 Doug Evans <dje@google.com>
11724
11725 * linux-x86-low.c: Don't include assert.h.
11726 (x86_siginfo_fixup): Use fatal, not assert.
11727 (x86_arch_setup): Fix comment.
11728
d0722149
DE
117292009-05-12 Doug Evans <dje@google.com>
11730
11731 Biarch support for i386/amd64 gdbserver.
11732 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11733 Add linux-x86-low.c.
11734 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11735 (linux-x86-low.o): Add.
11736 * linux-x86-64-low.c: Delete.
11737 * linux-i386-low.c: Delete.
11738 * linux-x86-low.c: New file.
11739 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11740 linux-x86-low.o.
11741 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11742 linux-x86-low.o.
11743 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11744 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11745 (linux_child_pid_to_exec_file): New function.
11746 (elf_64_header_p, elf_64_file_p): New functions.
11747 (siginfo_fixup): New function.
11748 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11749 give target a chance to convert layout.
11750 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11751 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11752
fdeb2a12
DE
117532009-05-07 Doug Evans <dje@google.com>
11754
11755 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11756 (regsets_store_inferior_registers): Ditto.
11757
a6dbe5df
PA
117582009-05-06 Pedro Alves <pedro@codesourcery.com>
11759
11760 PR server/10048
11761
11762 * linux-low.c (must_set_ptrace_flags): Delete.
11763 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11764 of the global.
11765 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11766 `lwp->must_set_ptrace_flags' instead.
ba42693b 11767 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11768 (linux_wait_1): ... not here.
11769
5091eb23
DE
117702009-04-30 Doug Evans <dje@google.com>
11771
9f767825
DE
11772 * inferiors.c (started_inferior_callback): New function.
11773 (attached_inferior_callback): New function.
11774 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11775 * server.c (print_started_pid, print_attached_pid): New functions.
11776 (detach_or_kill_for_exit): New function.
11777 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11778 * server.h (have_started_inferiors_p): Declare.
11779 (have_attached_inferiors_p): Declare.
11780
5091eb23
DE
11781 * inferiors.c (remove_process): Fix memory leak, free process.
11782 * linux-low.c (linux_remove_process): New function.
11783 (linux_kill): Call it instead of remove_process.
11784 (linux_detach, linux_wait_1): Ditto.
11785
155c8968
PA
117862009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11787
11788 * configure.srv: Add x86 Windows CE target.
11789
7fe519cb
UW
117902009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11791
11792 * inferiors.c (get_thread_process): Make global.
11793 * server.h (get_thread_process): Add prototype.
11794 * thread-db.c (find_one_thread): Use get_thread_process
11795 instead of current_process.
11796 (thread_db_get_tls_address): Do not crash if called when
11797 thread layer is not yet initialized.
11798
5472f405
UW
117992009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11800
11801 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11802 * spu-low.c (current_tid): Rename to ...
11803 (current_ptid): ... this.
11804 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11805 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11806 ptid_get_lwp (current_ptid) instead of current_tid.
11807 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11808 instead of current_tid. Use find_process_pid to verify pid
11809 argument is valid. Pass proper argument to remove_process.
11810 (spu_thread_alive): Compare current_ptid instead of current_tid.
11811 (spu_resume): Likewise.
11812
55ac2b99
PA
118132009-04-02 Pedro Alves <pedro@codesourcery.com>
11814
11815 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11816 variable.
11817
95954743
PA
118182009-04-01 Pedro Alves <pedro@codesourcery.com>
11819
11820 Implement the multiprocess extensions, and add linux multiprocess
11821 support.
11822
11823 * server.h (ULONGEST): Declare.
11824 (struct ptid, ptid_t): New.
11825 (minus_one_ptid, null_ptid): Declare.
11826 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11827 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11828 (struct inferior_list_entry): Change `id' type from unsigned from
11829 to ptid_t.
11830 (struct sym_cache, struct breakpoint, struct
11831 process_info_private): Forward declare.
11832 (struct process_info): Declare.
11833 (current_process): Declare.
11834 (all_processes): Declare.
11835 (initialize_inferiors): Declare.
11836 (add_thread): Adjust to use ptid_t.
11837 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11838 (add_process, remove_process, find_thread_pid): Declare.
11839 (find_inferior_id): Adjust to use ptid_t.
11840 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11841 (multi_process): Declare.
11842 (push_event): Adjust to use ptid_t.
11843 (read_ptid, write_ptid): Declare.
11844 (prepare_resume_reply): Adjust to use ptid_t.
11845 (clear_symbol_cache): Declare.
11846 * inferiors.c (all_processes): New.
11847 (null_ptid, minus_one_ptid): New.
11848 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11849 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11850 (add_thread): Change unsigned long to ptid. Remove gdb_id
11851 parameter. Adjust.
11852 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11853 (gdb_id_to_thread): Rename to ...
11854 (find_thread_pid): ... this. Change unsigned long to ptid.
11855 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11856 (loaded_dll, pull_pid_from_list): Adjust.
11857 (add_process, remove_process, find_process_pid)
11858 (get_thread_process, current_process, initialize_inferiors): New.
11859 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11860 (struct target_waitstatus) <related_pid>: Ditto.
11861 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11862 return type to int.
11863 (struct target_ops) <join>: Add `pid' argument.
11864 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11865 (struct target_ops) <wait>: Add `ptid' field. Change return type
11866 to ptid.
11867 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11868 (mywait): Add `ptid' argument. Change return type to ptid_t.
11869 (target_pid_to_str): Declare.
11870 * target.c (set_desired_inferior): Adjust to use ptids.
11871 (mywait): Add new `ptid' argument. Adjust.
11872 (target_pid_to_str): New.
11873 * mem-break.h (free_all_breakpoints): Declare.
11874 * mem-break.c (breakpoints): Delelete.
11875 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11876 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11877 to use per-process breakpoint list.
11878 (free_all_breakpoints): New.
11879 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11880 (symbol_cache, all_symbols_looked_up): Delete.
11881 (hexchars): New.
11882 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11883 read_ptid): New.
11884 (prepare_resume_reply): Change ptid argument's type from unsigned
11885 long to ptid_t. Adjust. Implement W;process and X;process.
11886 (free_sym_cache, clear_symbol_cache): New.
11887 (look_up_one_symbol): Adjust to per-process symbol cache. *
11888 * server.c (cont_thread, general_thread, step_thread): Change type
11889 to ptid_t.
11890 (attached): Delete.
11891 (multi_process): New.
11892 (last_ptid): Change type to ptid_t.
11893 (struct vstop_notif) <ptid>: Change type to ptid_t.
11894 (queue_stop_reply, push_event): Change `ptid' argument's type to
11895 ptid_t.
11896 (discard_queued_stop_replies): Add `pid' argument.
11897 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11898 changes. Don't reference the `attached' global.
11899 (attach_inferior): Adjust to mywait interface changes.
11900 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11901 features. Handle and report "multiprocess+". Handle
11902 "qAttached:PID".
11903 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11904 changes.
11905 (handle_v_kill): New.
11906 (handle_v_stopped): Adjust to use target_pid_to_str.
11907 (handle_v_requests): Allow multiple attaches and runs when
11908 multiprocess extensions are in effect. Handle "vKill".
11909 (myresume): Adjust to use ptids.
11910 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11911 (handle_status): Adjust to discard_queued_stop_replies interface
11912 change.
11913 (first_thread_of, kill_inferior_callback)
11914 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11915 (main): Call initialize_inferiors. Adjust to use ptids, killing
11916 and detaching from all inferiors. Handle multiprocess packet
11917 variants.
11918 * linux-low.h: Include gdb_proc_service.h.
11919 (struct process_info_private): New.
11920 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11921 <lwpid_of>: Use ptid_get_lwp.
11922 (get_lwp_thread): Adjust.
11923 (struct lwp_info): Add `dead' member.
11924 (find_lwp_pid): Declare.
11925 * linux-low.c (thread_db_active): Delete.
11926 (new_inferior): Adjust comment.
11927 (inferior_pid): Delete.
11928 (linux_add_process): New.
11929 (handle_extended_wait): Adjust.
11930 (add_lwp): Change unsigned long to ptid.
11931 (linux_create_inferior): Add process to processes table. Adjust
11932 to use ptids. Don't set new_inferior here.
11933 (linux_attach_lwp): Rename to ...
11934 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11935 it. Adjust to use ptids.
11936 (linux_attach_lwp): New.
11937 (linux_attach): Add process to processes table. Don't set
11938 new_inferior here.
11939 (struct counter): New.
11940 (second_thread_of_pid_p, last_thread_of_process_p): New.
11941 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11942 multiple processes.
11943 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11944 processes. Remove process from process table.
11945 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11946 to multiple processes.
11947 (any_thread_of): New.
11948 (linux_detach): Add `pid' argument, and handle it. Remove process
11949 from processes table.
11950 (linux_join): Add `pid' argument. Handle it.
11951 (linux_thread_alive): Change unsighed long argument to ptid_t.
11952 Consider dead lwps as not being alive.
11953 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11954 threads we're not interested in.
11955 (same_lwp, find_lwp_pid): New.
11956 (linux_wait_for_lwp): Change `pid' argument's type from int to
11957 ptid_t. Adjust.
11958 (linux_wait_for_event): Rename to ...
11959 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11960 from int to ptid_t. Adjust.
11961 (linux_wait_for_event): New.
11962 (linux_wait_1): Add `ptid' argument. Change return type to
11963 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11964 that exit from the process table.
11965 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11966 Adjust.
11967 (mark_lwp_dead): New.
11968 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11969 stopping all threads, mark its main lwp as dead.
11970 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11971 ptids.
11972 (fetch_register, usr_store_inferior_registers)
11973 (regsets_fetch_inferior_registers)
11974 (regsets_store_inferior_registers, linux_read_memory)
11975 (linux_write_memory): Inline `inferior_pid'.
11976 (linux_look_up_symbols): Adjust to use per-process
11977 `thread_db_active'.
11978 (linux_request_interrupt): Adjust to use ptids.
11979 (linux_read_auxv): Inline `inferior_pid'.
11980 (initialize_low): Don't reference thread_db_active.
11981 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11982 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11983 (ps_getpid): Return the pid of the current inferior.
11984 * thread-db.c (proc_handle, thread_agent): Delete.
11985 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11986 per-process data.
11987 (find_one_thread): Change argument type to ptid_t. Adjust to
11988 per-process data.
11989 (maybe_attach_thread): Adjust to per-process data and ptids.
11990 (thread_db_find_new_threads): Ditto.
11991 (thread_db_init): Ditto.
11992 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11993 processes table. Adjust to use ptids.
11994 (spu_kill, spu_detach): Adjust interface. Remove process from
11995 processes table.
11996 (spu_join, spu_thread_alive): Adjust interface.
11997 (spu_wait): Adjust interface. Remove process from processes
11998 table. Adjust to use ptids.
11999 * win32-low.c (current_inferior_tid): Delete.
12000 (current_inferior_ptid): New.
12001 (debug_event_ptid): New.
12002 (thread_rec): Take a ptid. Adjust.
12003 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12004 (child_delete_thread): Ditto.
12005 (do_initial_child_stuff): Add `attached' argument. Add process to
12006 processes table.
12007 (child_fetch_inferior_registers, child_store_inferior_registers):
12008 Adjust.
12009 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12010 (win32_attach): Pass 1 to do_initial_child_stuff.
12011 (win32_kill): Adjust interface. Remove process from processes
12012 table.
12013 (win32_detach): Ditto.
12014 (win32_join): Adjust interface.
12015 (win32_thread_alive): Take a ptid.
12016 (win32_resume): Adjust to use ptids.
12017 (get_child_debug_event): Ditto.
12018 (win32_wait): Adjust interface. Remove exiting process from
12019 processes table.
12020
bd99dc85
PA
120212009-04-01 Pedro Alves <pedro@codesourcery.com>
12022
12023 Non-stop mode support.
12024
12025 * server.h (non_stop): Declare.
12026 (gdb_client_data, handler_func): Declare.
12027 (delete_file_handler, add_file_handler, start_event_loop):
12028 Declare.
12029 (handle_serial_event, handle_target_event, push_event)
12030 (putpkt_notif): Declare.
12031 * target.h (enum resume_kind): New.
12032 (struct thread_resume): Replace `step' field by `kind' field.
12033 (TARGET_WNOHANG): Define.
12034 (struct target_ops) <wait>: Add `options' argument.
12035 <supports_non_stop, async, start_non_stop>: New fields.
12036 (target_supports_non_stop, target_async): New.
12037 (start_non_stop): Declare.
12038 (mywait): Add `options' argument.
12039 * target.c (mywait): Add `options' argument. Print child exit
12040 notifications here.
12041 (start_non_stop): New.
12042 * server.c (non_stop, own_buf, mem_buf): New globals.
12043 (struct vstop_notif): New.
12044 (notif_queue): New global.
12045 (queue_stop_reply, push_event, discard_queued_stop_replies)
12046 (send_next_stop_reply): New.
12047 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12048 interface changes.
12049 (attach_inferior): In non-stop mode, don't wait for the target
12050 here.
12051 (handle_general_set): Handle QNonStop.
12052 (handle_query): When handling qC, return the current general
12053 thread, instead of the first thread of the list.
12054 (handle_query): If the backend supports non-stop mode, include
12055 QNonStop+ in the qSupported query response.
12056 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12057 and non-stop mode.
12058 (handle_v_attach, handle_v_run): Handle non-stop mode.
12059 (handle_v_stopped): New.
12060 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12061 (myresume): Adjust to use resume_kind. Handle non-stop.
12062 (queue_stop_reply_callback): New.
12063 (handle_status): Handle non-stop mode.
12064 (main): Clear non_stop flag on reconnection. Use the event-loop.
12065 Refactor serial protocol handling from here ...
12066 (process_serial_event): ... to this new function. When GDB
12067 selects any thread, select one here. In non-stop mode, wait until
12068 GDB acks all pending events before exiting.
12069 (handle_serial_event, handle_target_event): New.
12070 * remote-utils.c (remote_open): Install remote_desc in the event
12071 loop.
12072 (remote_close): Remove remote_desc from the event loop.
12073 (putpkt_binary): Rename to...
12074 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12075 (putpkt_binary): New as wrapper around putpkt_binary_1.
12076 (putpkt_notif): New.
12077 (prepare_resume_reply): In non-stop mode, don't change the
12078 general_thread.
12079 * event-loop.c: New.
12080 * Makefile.in (OBJ): Add event-loop.o.
12081 (event-loop.o): New rule.
12082
12083 * linux-low.h (pid_of): Moved here.
12084 (lwpid_of): New.
12085 (get_lwp_thread): Use lwpid_of.
12086 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12087 * linux-low.c (pid_of): Delete.
12088 (inferior_pid): Use lwpid_of.
12089 (linux_event_pipe): New.
12090 (target_is_async_p): New.
12091 (delete_lwp): New.
12092 (handle_extended_wait): Use lwpid_of.
12093 (add_lwp): Don't set lwpid field.
12094 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12095 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12096 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12097 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12098 first. Adjust to linux_wait_for_event interface changes. Use
12099 lwpid_of.
12100 (linux_detach): Don't delete the main lwp here.
12101 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12102 (status_pending_p): Don't consider explicitly suspended lwps.
12103 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12104 pointer. Add OPTIONS argument. Change return type to int. Use
12105 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12106 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12107 pointer. Add status pointer argument. Return a pid instead of a
12108 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12109 changes. In non-stop mode, don't switch to a random thread.
12110 (linux_wait): Rename to...
12111 (linux_wait_1): ... this. Add target_options argument, and handle
12112 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12113 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12114 clean exit and signal exit code. Don't stop all threads in
12115 non-stop mode. In all-stop mode, only stop all threads when
12116 reporting a stop to GDB. Handle explicit thread stop requests.
12117 (async_file_flush, async_file_mark): New.
12118 (linux_wait): New.
12119 (send_sigstop): Use lwpid_of.
12120 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12121 interface changes. In non-stop mode, don't switch to a random
12122 thread.
12123 (linux_resume_one_lwp): Use lwpid_of.
12124 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12125 (linux_resume_one_thread): ... this. Handle resume_stop. In
12126 non-stop mode, don't look for pending flag in all threads.
12127 (resume_status_pending_p): Don't consider explicitly suspended
12128 threads.
12129 (my_waitpid): Reimplement. Emulate __WALL.
12130 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12131 Use lwpid_of.
12132 (sigchld_handler, linux_supports_non_stop, linux_async)
12133 (linux_start_non_stop): New.
12134 (linux_target_ops): Register linux_supports_non_stop, linux_async
12135 and linux_start_non_stop.
12136 (initialize_low): Install SIGCHLD handler.
12137 * thread-db.c (thread_db_create_event, find_one_thread)
12138 (thread_db_get_tls_address): Use lwpid_of.
12139 * win32-low.c (win32_detach): Adjust to use resume_kind.
12140 (win32_wait): Add `options' argument.
12141 * spu-low.c (spu_resume): Adjust to use resume_kind.
12142 (spu_wait): Add `options' argument.
12143
5b1c542e
PA
121442009-04-01 Pedro Alves <pedro@codesourcery.com>
12145
12146 Decouple target code from remote protocol.
12147
12148 * target.h (enum target_waitkind): New.
12149 (struct target_waitstatus): New.
12150 (struct target_ops) <wait>: Return an unsigned long. Take a
12151 target_waitstatus pointer instead of a char pointer.
12152 (mywait): Likewise.
12153 * target.c (mywait): Change prototype to return an unsigned long.
12154 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12155 * server.h (thread_from_wait, old_thread_from_wait): Delete
12156 declarations.
12157 (prepare_resume_reply): Change prototype to take a
12158 target_waitstatus.
12159 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12160 (last_status, last_ptid): New.
12161 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12162 pid instead of a signal.
12163 (attach_inferior): Remove "status" and "signal" parameters.
12164 Adjust.
12165 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12166 not as an address.
12167 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12168 (handle_v_requests, myresume): Remove "status" and "signal"
12169 parameters. Adjust.
12170 (handle_status): New.
12171 (main): Delete local `status'. Adjust.
12172 * remote-utils.c: Include target.h.
12173 (prepare_resume_reply): Change prototype to take a
12174 target_waitstatus. Adjust.
12175
12176 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12177 interface.
12178 * spu-low.c (spu_wait): Adjust.
12179 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12180 Delete.
12181 (win32_wait): Adjust.
12182
2bd7c093
PA
121832009-04-01 Pedro Alves <pedro@codesourcery.com>
12184
12185 * target.h (struct thread_resume): Delete leave_stopped member.
12186 (struct target_ops): Add a `n' argument to the `resume' callback.
12187 * server.c (start_inferior): Adjust.
12188 (handle_v_cont, myresume): Adjust.
12189 * linux-low.c (check_removed_breakpoint): Adjust to resume
12190 interface change, and to removed leave_stopped field.
12191 (resume_ptr): Delete.
12192 (struct thread_resume_array): New.
12193 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12194 resume interface change.
12195 (linux_continue_one_thread, linux_queue_one_thread)
12196 (resume_status_pending_p): Check if the resume field is NULL
12197 instead of checking the leave_stopped member.
12198 (linux_resume): Adjust to the target resume interface change.
12199 * spu-low.c (spu_resume): Adjust to the target resume interface
12200 change.
12201 * win32-low.c (win32_detach, win32_resume): Ditto.
12202
c35fafde
PA
122032009-04-01 Pedro Alves <pedro@codesourcery.com>
12204
12205 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12206 flag.
12207 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12208 pending.
12209 (linux_continue_one_thread): Only preserve the stepping flag if
12210 there's a pending breakpoint.
12211
0a59d50b
PA
122122009-03-31 Pedro Alves <pedro@codesourcery.com>
12213
12214 * server.c (main): After the inferior having exited, call
12215 remote_close before exiting gdbserver.
12216
f04c6d38
TJB
122172009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12218
12219 Fix size of FPSCR in Power 7 processors.
12220 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12221 (PPC_FEATURE_HAS_DFP): New #define.
12222 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12223 size of the FPSCR.
12224
78e5cee6
PA
122252009-03-23 Pedro Alves <pedro@codesourcery.com>
12226
12227 * server.c (handle_query) Whitespace and formatting.
12228
1b3f6016
PA
122292009-03-22 Pedro Alves <pedro@codesourcery.com>
12230
12231 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12232 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12233 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12234 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12235 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12236 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12237 Makefile.in, configure.ac: Fix whitespace throughout.
12238 * configure: Regenerate.
12239
a07b2135
PA
122402009-03-22 Pedro Alves <pedro@codesourcery.com>
12241
12242 * inferiors.c (find_inferior): Make it safe for the callback
12243 function to delete the currently iterated inferior.
12244
67cc2626
PA
122452009-03-22 Pedro Alves <pedro@codesourcery.com>
12246
12247 * Makefile.in (linuw_low_h): Move higher.
12248 (thread-db.o): Depend on $(linux_low_h).
12249
54a0b537
PA
122502009-03-17 Pedro Alves <pedro@codesourcery.com>
12251
12252 Rename "process" to "lwp" throughout.
12253
12254 * linux-low.c (all_processes): Rename to...
12255 (all_lwps): ... this.
12256 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12257 (add_process): Rename to ...
12258 (add_lwp): ... this. Adjust.
12259 (linux_create_inferior): Adjust.
12260 (linux_attach_lwp): Adjust.
12261 (linux_attach): Adjust.
12262 (linux_kill_one_process): Rename to ...
12263 (linux_kill_one_lwp): ... this. Adjust.
12264 (linux_kill): Adjust.
12265 (linux_detach_one_process): Rename to ...
12266 (linux_detach_one_lwp): ... this. Adjust.
12267 (linux_detach): Adjust.
12268 (check_removed_breakpoint): Adjust.
12269 (status_pending_p): Adjust.
12270 (linux_wait_for_process): Rename to ...
12271 (linux_wait_for_lwp): ... this. Adjust.
12272 (linux_wait_for_event): Adjust.
12273 (send_sigstop): Adjust.
12274 (wait_for_sigstop): Adjust.
12275 (stop_all_processes): Rename to ...
12276 (stop_all_lwps): ... this.
12277 (linux_resume_one_process): Rename to ...
12278 (linux_resume_one_lwp): ... this. Adjust.
12279 (linux_set_resume_request, linux_continue_one_thread)
12280 (linux_queue_one_thread, resume_status_pending_p)
12281 (usr_store_inferior_registers, regsets_store_inferior_registers)
12282 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12283 Adjust.
12284 * linux-low.h (get_process): Rename to ...
12285 (get_lwp): ... this. Adjust.
12286 (get_thread_process): Rename to ...
12287 (get_thread_lwp): ... this. Adjust.
12288 (get_process_thread): Rename to ...
12289 (get_lwp_thread): ... this. Adjust.
12290 (struct process_info): Rename to ...
12291 (struct lwp_info): ... this.
12292 (all_processes): Rename to ...
12293 (all_lwps): ... this.
12294 * proc-service.c (ps_lgetregs): Adjust.
12295 * thread-db.c (thread_db_create_event, find_one_thread)
12296 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12297
0b16c5cf
PA
122982009-03-14 Pedro Alves <pedro@codesourcery.com>
12299
12300 * server.c (handle_query): Handle "qAttached".
12301
32de4b9d
NS
123022009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12303
12304 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12305 GPLv3, update license URL.
12306
2aecd87f
DE
123072009-03-01 Doug Evans <dje@google.com>
12308
93efd302 12309 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12310 (server_h): Add gdb_signals.h.
12311 (signals.o): Update.
12312 * server.h (target_signal_from_host,target_signal_to_host_p)
12313 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12314
86b1f9c5
PM
123152009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12316
12317 * remote-utils.c (getpkt): Also generate remote-debug
12318 information if noack_mode is set.
12319
4aa995e1
PA
123202009-02-06 Pedro Alves <pedro@codesourcery.com>
12321
12322 * server.c (handle_query): Report qXfer:siginfo:read and
12323 qXfer:siginfo:write as supported and handle them.
12324 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12325 * linux-low.c (linux_xfer_siginfo): New.
12326 (linux_target_ops): Set it.
12327
62709adf
PA
123282009-01-26 Pedro Alves <pedro@codesourcery.com>
12329
12330 * server.c (gdbserver_usage): Mention --remote-debug.
12331 (main): Accept '--remote-debug' switch.
12332
aef93bd7
DE
123332009-01-18 Doug Evans <dje@google.com>
12334
12335 * regcache.c (new_register_cache): No need to check result of xcalloc.
12336 * server.c (handle_search_memory): Back out calls to xmalloc,
12337 result is checked and error is returned to user upon failure.
12338 (handle_query): Ditto. Add more checks for result of malloc.
12339 (handle_v_cont): Check result of malloc, report error back to
12340 user upon failure.
12341 (handle_v_run): Ditto. Call freeargv.
12342 * server.h (freeargv): Declare.
12343 * utils.c (freeargv): New fn.
12344
54363045
DE
123452009-01-15 Doug Evans <dje@google.com>
12346
f626972c
DE
12347 * gdbreplay.c (perror_with_name): Make arg const char *.
12348 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12349 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12350 * utils.c (perror_with_name): Make arg const char *.
54363045 12351
18aae699
PA
123522009-01-14 Pedro Alves <pedro@codesourcery.com>
12353
12354 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12355 when handling a EXIT_PROCESS_DEBUG_EVENT.
12356
ff703abe
JB
123572009-01-06 Joel Brobecker <brobecker@adacore.com>
12358
12359 * gdbreplay.c (gdbreplay_version): Update copyright year.
12360 * server.c (gdbserver_version): Likewise.
12361
f21cc1a2 123622009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12363
12364 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12365 (handle_extended_wait): Improve comment.
0e21c1ec 12366
bca929d3
DE
123672008-12-13 Doug Evans <dje@google.com>
12368
12369 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12370 * server.h (ATTR_MALLOC): New macro.
12371 (xmalloc,xcalloc,xstrdup): Declare.
12372 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12373 * inferiors.c: Ditto.
12374 * linux-low.c: Ditto.
12375 * mem-break.c: Ditto.
12376 * regcache.c: Ditto.
12377 * remote-utils.c: Ditto.
12378 * server.c: Ditto.
12379 * target.c: Ditto.
12380 * win32-low.c: Ditto.
12381
97438e3f
DE
123822008-12-12 Doug Evans <dje@google.com>
12383
896c7fbb
DE
12384 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12385 in debugging printf.
12386
97438e3f
DE
12387 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12388
e3b886f8
DE
123892008-12-09 Doug Evans <dje@google.com>
12390
12391 * linux-low.h (struct process_info): Delete member tid, unused.
12392 * thread-db.c (find_one_thread): Update.
12393 (maybe_attach_thread): Update.
12394
07e059b5
VP
123952008-12-02 Pedro Alves <pedro@codesourcery.com>
12396
889bf7c5
PA
12397 * target.h (struct target_ops): Add qxfer_osdata member.
12398 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12399 and dirent.h.
12400 (linux_qxfer_osdata): New functions.
12401 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12402 callback.
12403 * server.c (handle_query): Handle "qXfer:osdata:read:".
12404 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12405 (buffer_xml_printf): New functions.
12406 * server.h (struct buffer): New.
12407 (buffer_grow_str, buffer_grow_str0): New macros.
12408 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12409 (buffer_xml_printf): Declare.
07e059b5 12410
4cab47ab
DE
124112008-11-24 Doug Evans <dje@google.com>
12412
12413 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12414
f142445f
DJ
124152008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12416
12417 * server.c (handle_v_run): Always use the supplied argument list.
12418
d0107bb6 124192008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12420
d0107bb6
BW
12421 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12422 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12423
2c4ad781
TJB
124242008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12425
12426 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12427 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12428 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12429 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12430 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12431 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12432 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12433 XML target descriptions.
12434 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12435 when inferior is running on an ISA 2.05 or later processor. Add
12436 special case to return offset for full 64-bit slot of FPSCR when
12437 in 32-bits.
12438
dfb64f85
DJ
124392008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12440
12441 * Makefile.in (SFILES, clean): Added sparc64 files.
12442 (reg-sparc64.o, reg-sparc64.c): New.
12443 * configure.srv (sparc*-*-linux*): New configuration.
12444 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12445 syscall arguments for SPARC.
12446 (regsets_store_inferior_registers): Likewise.
12447 * linux-sparc-low.c: New file.
12448
66b6e1dd
DE
124492008-10-21 Doug Evans <dje@google.com>
12450
12451 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12452 (READLINE_DIR,READLINE_DEP): Delete.
12453 (INTERNAL_CFLAGS): Update.
12454 (LINTFLAGS): Update.
12455
9b710a42
PA
124562008-10-10 Pedro Alves <pedro@codesourcery.com>
12457
12458 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12459 whole argv from the last run, not just argv[0].
12460
5822d809
PA
124612008-09-08 Pedro Alves <pedro@codesourcery.com>
12462
12463 * regcache.c (new_register_cache): Return NULL if the register
12464 cache size isn't known yet.
12465 (free_register_cache): Avoid dereferencing a NULL regcache.
12466
74aac56f
DJ
124672008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12468
12469 * configure.srv: Merge MIPS and MIPS64.
12470
400b20f5
MR
124712008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12472
12473 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12474
677c5bb1
LM
124752008-08-18 Luis Machado <luisgpm@br.ibm.com>
12476
12477 * Makefile.in: Add required vsx dependencies.
12478
12479 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12480 Declare init_registers_powerpc_vsx32l.
12481 Declare init_registers_powerpc_vsx64l.
12482 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12483 (ppc_arch_setup): Check for VSX in hwcap.
12484 (ppc_fill_vsxregset): New function.
12485 (ppc_store_vsxregset): New function.
12486 Add new VSX entry in regset_info target_regsets.
12487
12488 * configure.srv: Add new VSX dependencies.
12489
a6f3e723
SL
124902008-08-12 Pedro Alves <pedro@codesourcery.com>
12491
12492 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12493 (remote_open): Set or clear transport_is_reliable.
12494 (putpkt_binary): Don't expect acks in noack mode.
12495 (getpkt): Don't send ack/nac in noack mode.
12496 * server.c (handle_general_set): Handle QStartNoAckMode.
12497 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12498 qSupported.
12499 (main): Reset noack_mode on every connection.
12500 * server.h (noack_mode): Declare.
12501
a417dc56
RW
125022008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12503
12504 * Makefile.in (GDBREPLAY_OBS): New variable.
12505 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12506
3221518c
UW
125072008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12508 Daniel Jacobowitz <dan@codesourcery.com>
12509
12510 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12511 (usr_store_inferior_registers): Likewise.
12512 (regsets_store_inferior_registers): Likewise.
12513
ec56be1b
PA
125142008-07-31 Rolf Jansen <rj@surtec.com>
12515 Pedro Alves <pedro@codesourcery.com>
12516
12517 * configure.ac: Check for memmem declaration.
12518 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12519 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12520 (disable_packet_qfThreadInfo): Unconditionally compile.
12521 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12522 * configure, config.in: Regenerate.
12523
2fe5e3ff
DE
125242008-07-28 Doug Kwan <dougkwan@google.com>
12525
12526 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12527 (linux_write_memory): Remove declaration of errno.
12528
836acd6d
UW
125292008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12530
12531 * linux-low.c (handle_extended_wait): Do not use "status"
12532 variable uninitialized.
12533
aeba519e
PA
125342008-07-07 Pedro Alves <pedro@codesourcery.com>
12535
12536 * server.c (handle_v_attach): Inhibit reporting dll changes.
12537
db42f210
PA
125382008-06-27 Pedro Alves <pedro@codesourcery.com>
12539
12540 * remote-utils.c (prepare_resume_reply): If requested, don't
12541 output "thread:TID" in the T stop reply.
12542
12543 * server.c (disable_packet_vCont, disable_packet_Tthread)
12544 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12545 (handle_query): If requested, disable support for qC, qfThreadInfo
12546 and qsThreadInfo.
12547 (handle_v_requests): If requested, disable support for vCont.
12548 (gdbserver_show_disableable): New.
12549 (main): Handle --disable-packet and --disable-packet=LIST.
12550
12551 * server.h (disable_packet_vCont, disable_packet_Tthread)
12552 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12553
8e4c5421
CD
125542008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12555
12556 * server.c (gdbserver_usage): Mention --version.
12557
6e23a804
DJ
125582008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12559
12560 * Makefile.in (gdbreplay.o): New rule.
12561
90aa6a40
JM
125622008-06-06 Joseph Myers <joseph@codesourcery.com>
12563
12564 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12565 message, not gdbserver.
12566
c16158bc 125672008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12568 Nathan Sidwell <nathan@codesourcery.com>
12569 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12570
12571 * acinclude.m4: Include ../../config/acx.m4.
12572 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12573 * configure, config.in: Regenerate.
12574 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12575 * server.c (gdbserver_version): Print PKGVERSION.
12576 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12577 (main): Adjust gdbserver_usage calls.
12578 * gdbreplay.c (version, host_name): Add declarations.
12579 (gdbreplay_version, gdbreplay_usage): New.
12580 (main): Accept --version and --help options.
12581
aeb75bf5
DJ
125822008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12583
12584 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12585 (arm_breakpoint_at): Handle Thumb.
12586 (the_low_target): Add comment.
12587
76b233dd
UW
125882008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12589
12590 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12591
08388c79
DE
125922008-05-09 Doug Evans <dje@google.com>
12593
a3c83fae
DE
12594 * server.h (decode_search_memory_packet): Declare.
12595 * remote-utils.c (decode_search_memory_packet): New fn.
12596 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12597 (handle_search_memory): New fn.
12598 (handle_query): Process qSearch:memory packets.
12599
bb9c3d36
UW
126002008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12601
12602 * regcache.c (registers_length): Remove.
12603 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12604 full register packet.
12605 * regcache.h (registers_length): Remove prototype.
12606 * server.h (PBUFSIZ): Define to 16384.
12607
7284e1be
UW
126082008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12609
12610 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12611 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12612 powerpc-64l.o, and powerpc-altivec64l.o.
12613 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12614 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12615 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12616 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12617 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12618 to srv_xmlfiles.
12619
12620 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12621 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12622 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12623 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12624 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12625 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12626 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12627 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12628 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12629 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12630 (clean): Update.
12631
12632 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12633 (init_registers_powerpc_32l): ... this new prototype.
12634 (init_registers_powerpc_32): Remove, replace by ...
12635 (init_registers_powerpc_altivec32l): ... this new prototype.
12636 (init_registers_powerpc_e500): Remove, replace by ...
12637 (init_registers_powerpc_e500l): ... this new prototype.
12638 (init_registers_ppc64): Remove, replace by ...
12639 (init_registers_powerpc_64l): ... this new prototype.
12640 (init_registers_powerpc_64): Remove, replace by ...
12641 (init_registers_powerpc_altivec64l): ... this new prototype.
12642 (ppc_num_regs): Set to 73.
12643 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12644 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12645 (ppc_cannot_store_register): Handle orig_r3 and trap.
12646 (ppc_arch_setup): Update init_registers_... calls.
12647 (ppc_fill_gregset): Handle orig_r3 and trap.
12648
12649 * inferiors.c (clear_inferiors): Reset current_inferior.
12650
fdc59709
PB
126512008-04-23 Paolo Bonzini <bonzini@gnu.org>
12652
889bf7c5
PA
12653 * acinclude.m4: Add override.m4.
12654 * configure: Regenerate.
fdc59709 12655
c9b2f845
UW
126562008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12657
12658 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12659 initial call to init_register_ppc64.
12660
550512b8
UW
126612008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12662
43aaf8b6
PA
12663 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12664 single powerpc*-*-linux* case.
550512b8
UW
12665 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12666
b6430ec3
UW
126672008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12668
12669 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12670 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12671 from reg_xmlfiles.
12672 * linux-ppc-low.c: Include <elf.h>.
12673 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12674 (ppc_hwcap): New global variable.
12675 (ppc_regmap): Remove __SPE__ #ifdef sections.
12676 (ppc_regmap_e500): New global variable.
12677 (ppc_cannot_store_register): Update __SPE__ special case.
12678 (ppc_get_hwcap): New function.
12679 (ppc_arch_setup): Use it to determine whether inferior supports
12680 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12681 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12682 Do not access registers if target does not support AltiVec.
12683 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12684 Do not access registers if target does not support SPE.
12685 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12686
52fa2412
UW
126872008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12688
12689 * linux-low.c (disabled_regsets, num_regsets): New.
12690 (use_regsets_p): Delete.
12691 (linux_wait_for_process): Clear disabled_regsets.
12692 (regsets_fetch_inferior_registers): Check and set it.
12693 (regsets_store_inferior_registers): Likewise.
12694 (linux_fetch_registers, linux_store_registers): Do not use
12695 use_regsets_p.
12696 (initialize_low): Allocate disabled_regsets.
12697
e28b3332
DJ
126982008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12699
12700 * Makefile.in (LIBOBJS): New.
12701 (OBS): Use LIBOBJS.
12702 (memmem.o): New rule.
12703 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12704 * configure: Regenerated.
12705
4536995d
UW
127062008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12707
12708 * server.c (handle_query): Never return "unsupported" for
12709 qXfer:features:read queries.
12710
221c031f
UW
127112008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12712
12713 * server.c (get_features_xml): Fix inverted condition.
12714 (handle_query): Always support qXfer:feature:read.
12715
ccd213ac
DJ
127162008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12717
12718 * server.c (wrapper_argv): New.
12719 (start_inferior): Handle wrapper_argv. If set, expect an extra
12720 trap.
12721 (gdbserver_usage): Document --wrapper.
12722 (main): Parse --wrapper.
12723
6fe305f7
UW
127242008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12725
12726 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12727 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12728 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12729 (ppc_set_pc): Likewise.
12730 (ppc_arch_setup): New function.
12731 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12732 of collect_register.
889bf7c5 12733 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12734
5b0a002e
UW
127352008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12736
12737 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12738 instead of linux-ppc64-low.o.
12739 * linux-ppc64-low.c: Remove file.
12740 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12741 (linux-ppc64-low.o): Remove rule.
12742
12743 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12744 (init_registers_powerpc_64): Likewise.
12745 (ppc_regmap): Conditionally define depending on __powerpc64__.
12746 (ppc_cannot_store_register): Do not special-case "fpscr" when
12747 compiled on __powerpc64__.
12748 (ppc_collect_ptrace_register): New function.
12749 (ppc_supply_ptrace_register): New function.
12750 (ppc_breakpoint): Change type to "unsigned int".
12751 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12752 (the_low_target): Conditionally provide initializers for the
889bf7c5 12753 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12754 collect_ptrace_register and supply_ptrace_register members.
12755
9b4b61c8
UW
127562008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12757
12758 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12759 * server.c (gdbserver_xmltarget): Define.
12760 (get_features_xml): Use it to replace "target.xml" and arch_string.
12761
12762 * configure.srv: Remove srv_xmltarget. Add XML files that were
12763 mentioned there to srv_xmlfiles instead. Remove conditional tests
12764 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12765 srv_xmlfiles and srv_regobj to include all possible choices.
12766 * configure.ac (srv_xmltarget): Remove.
12767 (srv_xmlfiles): Do not add "target.xml".
12768 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12769 checks for supplementary target information.
12770 * configure: Regenerate.
12771 * Makefile.in (XML_TARGET): Remove.
12772 (target.xml): Remove rule.
12773 (clean): Do not clean up target.xml.
12774 (.PRECIOUS): Do not mention target.xml.
12775
12776 * target.h (struct target_ops): Remove arch_string member.
12777 * linux-low.c (linux_arch_string): Remove.
12778 (linux_target_ops): Remove arch_string initializer.
12779 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12780 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12781 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12782 * spu-low.c (spu_arch_string): Remove.
12783 (spu_target_ops): Remove arch_string initializer.
12784 * win32-low.c (win32_arch_string): Remove.
12785 (win32_target_ops): Remove arch_string initializer.
12786 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12787 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12788 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12789
ee1a7ae4
UW
127902008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12791
12792 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12793 by collect_ptrace_register and supply_ptrace_register hooks.
12794 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12795 instead of checking for the_low_target.left_pad_xfer.
12796 (usr_store_inferior_registers): Use collect_ptrace_register callback
12797 instead of checking for the_low_target.left_pad_xfer.
12798
12799 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12800 (s390_supply_ptrace_register): Likewise.
12801 (s390_fill_gregset): Call s390_collect_ptrace_register.
12802 (the_low_target): Update.
12803
12804 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12805 (ppc_supply_ptrace_register): Likewise.
12806 (the_low_target): Update.
12807
12808 * linux-i386-low.c (the_low_target): Update.
12809 * linux-x86-64-low.c (the_low_target): Update.
12810
d61ddec4
UW
128112008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12812
12813 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12814 reg-s390.o and reg-s390x.o.
12815
12816 * linux-low.c (new_inferior): New global variable.
12817 (linux_create_inferior, linux_attach): Set it.
12818 (linux_wait_for_process): Call the_low_target.arch_setup after the
12819 target has stopped for the first time.
12820 (initialize_low): Do not call the_low_target.arch_setup.
12821
12822 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12823 (s390_set_pc): Likewise.
12824 (s390_arch_setup): New function.
12825 (the_low_target): Use s390_arch_setup as arch_setup routine.
12826
12827 * regcache.c (realloc_register_cache): New function.
12828 (set_register_cache): Call it for each existing regcache.
12829
d05b4ac3
UW
128302008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12831
12832 * server.h (init_registers): Remove prototype.
12833
12834 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12835 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12836 instead of init_registers ().
12837 * linux-arm-low.c (init_registers_arm): Add prototype.
12838 (init_registers_arm_with_iwmmxt): Likewise.
12839 (the_low_target): Add initializer for arch_setup field.
12840 * linux-cris-low.c (init_registers_cris): Add prototype.
12841 (the_low_target): Add initializer for arch_setup field.
12842 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12843 (the_low_target): Add initializer for arch_setup field.
12844 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12845 (the_low_target): Add initializer for arch_setup field.
12846 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12847 (the_low_target): Add initializer for arch_setup field.
12848 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12849 (the_low_target): Add initializer for arch_setup field.
12850 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12851 (the_low_target): Add initializer for arch_setup field.
12852 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12853 (init_registers_mips64_linux): Likewise.
12854 (the_low_target): Add initializer for arch_setup field.
12855 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12856 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12857 (the_low_target): Add initializer for arch_setup field.
12858 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12859 (init_registers_powerpc_64): Likewise.
12860 (the_low_target): Add initializer for arch_setup field.
12861 * linux-s390-low.c (init_registers_s390): Add prototype.
12862 (init_registers_s390x): Likewise.
12863 (the_low_target): Add initializer for arch_setup field.
12864 * linux-sh-low.c (init_registers_sh): Add prototype.
12865 (the_low_target): Add initializer for arch_setup field.
12866 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12867 (the_low_target): Add initializer for arch_setup field.
12868 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12869 (the_low_target): Add initializer for arch_setup field.
12870
12871 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12872 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12873 instead of init_registers ().
12874 * win32-arm-low.c (init_registers_arm): Add prototype.
12875 (the_low_target): Add initializer for arch_setup field.
12876 * win32-i386-low.c (init_registers_i386): Add prototype.
12877 (the_low_target): Add initializer for arch_setup field.
12878
12879 * spu-low.c (init_registers_spu): Add prototype.
12880 (initialize_low): Call initialie_registers_spu () instead of
12881 initialize_registers ().
12882
fd96d250
PA
128832008-02-19 Pedro Alves <pedro@codesourcery.com>
12884
12885 * server.c (handle_v_requests): When handling the vRun and vAttach
12886 packets, if already debugging a process, don't kill it. Return an
12887 error instead.
12888
d41b6bb4
DJ
128892008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12890
12891 * server.c (handle_query): Correct length check.
12892
5ac588cf
PA
128932008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12894
12895 * win32-low.c (do_initial_child_stuff): Add process handle
12896 parameter. Set current_process_handle and current_process_id from the
12897 parameters. Clear globals.
12898 (win32_create_inferior): Don't set current_process_handle and
12899 current_process_id here. Instead pass them on the call to
12900 do_initial_child_stuff.
12901 (win32_attach): Likewise.
12902 (win32_clear_inferiors): New.
12903 (win32_kill): Don't close the current process handle or the
12904 current thread handle here. Instead call win32_clear_inferiors.
12905 (win32_detach): Don't open a new handle to the process. Call
12906 win32_clear_inferiors.
12907 (win32_join): Don't rely on current_process_handle; open a new
12908 handle using the process id.
12909 (win32_wait): Call win32_clear_inferiors when the inferior process
12910 has exited.
12911
ecd7ecbc
DJ
129122008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12913
12914 * server.c (monitor_show_help): Add "exit".
12915
1525d545
MG
129162008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12917
ecd7ecbc 12918 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12919 (clean): Add reg-xtensa.c.
12920 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12921 * configure.srv (xtensa*-*-linux*) New target.
12922 * linux-xtensa-low.c: New.
12923 * xtensa-xtregs.c: New.
1525d545 12924
59a016f0
PA
129252008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12926
12927 * hostio.c: Don't include errno.h.
12928 (errno_to_fileio_errno): Move to hostio-errno.
12929 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12930 error number outputting to the target->hostio_last_error callback.
12931 (hostio_packet_error): Use FILEIO_EINVAL directly.
12932 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12933 calls to hostio_error.
12934 * hostio-errno.c: New.
12935 * server.h (hostio_last_error_from_errno): Declare.
12936 * target.h (target_ops): Add hostio_last_error member.
12937 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12938 as hostio_last_error handler.
889bf7c5 12939 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12940 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12941 (wince_hostio_last_error): New functions.
12942 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12943 as hostio_last_error handler.
12944 (win32_target_ops) [!_WIN32_WCE]: Register
12945 hostio_last_error_from_errno as hostio_last_error handler.
12946 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12947 (hostio-errno.o): New rule.
12948 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12949 * configure.srv (srv_hostio_err_objs): New variable. Default to
12950 hostio-errno.o.
12951 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12952 * configure: Regenerate.
12953
2d717e4f
DJ
129542008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12955
12956 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12957 (linux_kill, linux_detach): Clean up the process list.
12958 * remote-utils.c (remote_open): Improve port number parsing.
12959 (putpkt_binary, input_interrupt): Only send interrupts if the target
12960 is running.
12961 * server.c (extended_protocol): Make static.
12962 (attached): Define earlier.
12963 (exit_requested, response_needed, program_argv): New variables.
12964 (target_running): New.
12965 (start_inferior): Clear attached here.
12966 (attach_inferior): Set attached here.
12967 (require_running): Define.
12968 (handle_query): Use require_running and target_running. Implement
12969 "monitor exit".
12970 (handle_v_attach, handle_v_run): New.
12971 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12972 (gdbserver_usage): Update.
12973 (main): Redo argument parsing. Handle --debug and --multi. Handle
12974 --attach along with other options or after the port. Save
12975 program_argv. Support no initial program. Resynchronize
12976 communication with GDB after an error. Handle "monitor exit".
12977 Use require_running and target_running. Always allow the extended
12978 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12979 restart in extended mode.
12980 * README: Refer to the GDB manual. Update --attach usage.
12981
7407e2de
AS
129822007-12-20 Andreas Schwab <schwab@suse.de>
12983
12984 * linux-low.c (STACK_SIZE): Define.
12985 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12986 (linux_test_for_tracefork): Likewise.
12987
b65d95c5
DJ
129882007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12989
12990 * linux-low.c (linux_wait_for_event): Update messages. Do not
12991 reinsert auto-delete breakpoints.
12992 * mem-break.c (struct breakpoint): Change return type of handler to
12993 int.
12994 (set_breakpoint_at): Update handler type.
12995 (reinsert_breakpoint_handler): Return 1 instead of calling
12996 delete_breakpoint.
12997 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12998 setting a new one.
12999 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13000 * mem-break.h (set_breakpoint_at): Update handler type.
13001 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13002 * win32-low.c (auto_delete_breakpoint): New.
13003 (get_child_debug_event): Use it.
13004
4e799345
DJ
130052007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13006
13007 * configure.ac: Check for pread and pwrite.
13008 * hostio.c (handle_pread): Fall back to lseek and read.
13009 (handle_pwrite): Fall back to lseek and write.
13010 * config.in, configure: Regenerated.
13011
27524b67
DJ
130122007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13013
13014 * server.c (myresume): Add own_buf argument.
13015 (main): Update calls.
13016
a20d5e98
DJ
130172007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13018
13019 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13020 * remote-utils.c (remote_open): Do not call disable_async_io.
13021 (block_async_io): Delete.
13022 (unblock_async_io): Make static.
13023 (initialize_async_io): New.
13024 * server.c (handle_v_cont): Handle async I/O here.
13025 (myresume): Likewise. Move other common resume tasks here...
13026 (main): ... from here. Call initialize_async_io. Disable async
13027 I/O before the main loop.
13028 * server.h (initialize_async_io): Declare.
13029 (block_async_io, unblock_async_io): Delete prototypes.
13030 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13031
b79d787e
DJ
130322007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13033
13034 * remote-utils.c (readchar): Allow binary data in received messages.
13035
d97903b2
PA
130362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13037
13038 * win32-low.c (attaching): New global.
13039 (win32_create_inferior): Clear the `attaching' global.
13040 (win32_attach): Set the `attaching' global.
13041 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13042 attaching. Only set a breakpoint at the entry point if not
13043 attaching.
13044
311de423
PA
130452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13046
13047 * server.c (main): Don't report dll events on the initial
13048 connection on attaches.
13049
6c2d16d2
PA
130502007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13051
13052 * server.c (main): Relax numerical bases supported for the pid of
13053 the --attach command line argument.
13054
5ca906e6
PA
130552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13056
13057 * win32-low.c (win32_attach): Call OpenProcess before
13058 DebugActiveProcess, not after. Add last error output to error
13059 call.
13060
9c6c8194
PA
130612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13062
13063 * win32-low.c (win32_get_thread_context)
13064 (win32_set_thread_context): New functions.
13065 (thread_rec): Use win32_get_thread_context.
13066 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13067 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13068 field.
13069
4d5d1aaa
PA
130702007-12-03 Leo Zayas
13071 Pedro Alves <pedro_alves@portugalmail.pt>
13072
13073 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13074 global variables.
13075 (child_add_thread): Minor cleanup.
13076 (child_continue): Resume artificially suspended threads before
13077 calling ContinueDebugEvent.
13078 (suspend_one_thread): New.
13079 (fake_breakpoint_event): New.
13080 (get_child_debug_event): Change return type to int. Check here if
13081 gdb sent an interrupt request. If a soft interrupt was requested,
13082 fake a breakpoint event. Return 0 if there is no event to handle,
13083 and 1 otherwise.
13084 (win32_wait): Don't check here if gdb sent an interrupt request.
13085 Ensure there is a valid event to handle.
13086 (win32_request_interrupt): Add soft interruption method as last
13087 resort.
13088
c436e841
PA
130892007-12-03 Leo Zayas
13090 Pedro Alves <pedro_alves@portugalmail.pt>
13091
13092 * win32-low.h (win32_thread_info): Add descriptions to the
13093 structure members. Replace `suspend_count' counter by a
13094 `suspended' flag.
13095 * win32-low.c (thread_rec): Update condition of when to get the
13096 context from the inferior. Rely on ContextFlags being set if it
13097 has already been retrieved. Only suspend the inferior thread if
13098 we haven't already. Warn if that fails.
13099 (continue_one_thread): s/suspend_count/suspended/. Only call
13100 ResumeThread once. Warn if that fails.
13101
e7b5fa67
PA
131022007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13103
13104 * win32-low.c (win32_wait): Don't read from the inferior when it
13105 has already exited.
13106
a385171d
PA
131072007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13108
13109 * Makefile.in (win32_low_h): New variable.
13110 (win32-low.o): Add dependency on $(win32_low_h).
13111 (win32-arm-low.o, win32-i386-low.o): New rules.
13112
f80c84b3
DJ
131132007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13114
13115 * hostio.c: Correct copyright year.
13116
a6b151f1
DJ
131172007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13118
13119 * Makefile.in (OBS): Add hostio.o.
13120 (hostio.o): New rule.
13121 * server.h (handle_vFile): Declare.
13122 * hostio.c: New file.
13123 * server.c (handle_v_requests): Take packet_len and new_packet_len
13124 for binary packets. Call handle_vFile.
13125 (main): Update call to handle_v_requests.
13126
f9387fc3
DJ
131272007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13128
13129 * linux-low.c: Include <sched.h>.
13130
51c2684e
DJ
131312007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13132
13133 * linux-low.c (linux_tracefork_grandchild): New.
13134 (linux_tracefork_child): Use clone.
13135 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13136
75f83163
JB
131372007-10-31 Joel Brobecker <brobecker@adacore.com>
13138
13139 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13140
da5898ce
DJ
131412007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13142
13143 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13144
24a09b5f
DJ
131452007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13146
13147 * inferiors.c (change_inferior_id): Delete.
13148 (add_pid_to_list, pull_pid_from_list): New.
13149 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13150 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13151 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13152 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13153 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13154 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13155 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13156 (using_threads): Always set to 1.
13157 (handle_extended_wait): New.
13158 (add_process): Do not set TID.
13159 (linux_create_inferior): Set must_set_ptrace_flags.
13160 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13161 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13162 (linux_thread_alive): Rename TID argument to LWPID.
13163 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13164 (linux_wait_for_event): Do not use TID or check using_threads. Update
13165 call to dead_thread_notify. Call handle_extended_wait.
13166 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13167 (send_sigstop): Delete sigstop_sent.
13168 (wait_for_sigstop): Avoid TID.
13169 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13170 (linux_test_for_tracefork): New.
13171 (linux_lookup_signals): Use thread_db_active and
13172 linux_supports_tracefork_flag.
13173 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13174 * linux-low.h (get_process_thread): Avoid TID.
13175 (struct process_ifo): Move thread_known and tid to the end. Remove
13176 sigstop_sent.
13177 (linux_attach_lwp, thread_db_init): Update prototypes.
13178 * server.h (change_inferior_id): Delete prototype.
13179 (add_pid_to_list, pull_pid_from_list): New prototypes.
13180 * thread-db.c (thread_db_use_events): New.
13181 (find_first_thread): Rename to...
13182 (find_one_thread): ...this. Update callers and messages. Do not
13183 call fatal. Check thread_db_use_events. Do not call
13184 change_inferior_id or new_thread_notify.
13185 (maybe_attach_thread): Update. Do not call new_thread_notify.
13186 (thread_db_init): Set thread_db_use_events. Check use_events.
13187 * utils.c (fatal, warning): Correct message prefix.
13188
30ed0a8f
DJ
131892007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13190
13191 * Makefile.in (clean): Remove new files.
13192 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13193 (powerpc-64.o, powerpc-64.c): New rules.
13194 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13195 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13196 with SPE.
13197 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13198 SPE targets.
13199 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13200 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13201 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13202 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13203 (target_regsets): Add AltiVec and SPE register sets.
13204 * configure.ac: Check for AltiVec and SPE.
13205 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13206 (ppc_fill_vrregset, ppc_store_vrregset): New.
13207 (target_regsets): Add AltiVec register set.
13208 * configure: Regenerated.
13209
fd462a61
DJ
132102007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13211
13212 * linux-low.c (O_LARGEFILE): Define.
13213 (linux_read_memory): Use /proc/PID/mem.
13214 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13215 * configure, config.in: Regenerated.
13216
69f223ed
DJ
132172007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13218
13219 * linux-low.c (linux_wait_for_event): Do not pass signals while
13220 single-stepping.
13221
aec18585
PA
132222007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13223
13224 * win32-low.c (create_process): New.
13225 (win32_create_inferior): Use create_process instead of
13226 CreateProcess. If create_process failed retry appending an ".exe"
13227 suffix. Store the GetLastError result immediatelly after
13228 create_process calls and use it on the call to error.
13229
34d86ddd
PA
132302007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13231
13232 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13233
5a0e3bd0
JB
132342007-08-23 Joel Brobecker <brobecker@adacore.com>
13235
13236 * configure.ac: Switch license to GPLv3.
13237
f88c79e6
MS
132382007-08-01 Michael Snyder <msnyder@access-company.com>
13239
13240 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13241
6b3d9b83
PA
132422007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13243
13244 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13245 typedef.
13246 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13247 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13248 CloseToolhelp32Snapshot.
13249 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13250 CloseToolhelp32Snapshot.
13251
c588c53c
MS
132522007-07-27 Michael Snyder <michael.snyder@access-company.com>
13253
13254 * server.c (main): Check for inferior exit before main loop.
13255
aa0403d9
PA
132562007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13257
13258 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13259 instead of on tmp_desc.
13260
255e7678
DJ
132612007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13262 Daniel Jacobowitz <dan@codesourcery.com>
13263
13264 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13265 (add_thread): Minor cleanups.
13266 (clear_inferiors): Move lower in the file. Clear the DLL
13267 list.
13268 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13269 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13270 (xml_escape_text): New.
13271 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13272 for qSupported.
13273 (handle_v_cont): Report errors.
13274 (gdbserver_version): Update.
13275 (main): Correct size of own_buf. Do not report initial DLL events.
13276 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13277 (unloaded_dll, xml_escape_text): New.
13278 * win32-low.c (enum target_waitkind): Update comments.
13279 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13280 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13281 (win32_EnumProcessModules, win32_GetModuleInformation)
13282 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13283 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13284 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13285 (win32_Module32First, win32_Module32Next, load_toolhelp)
13286 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13287 (get_child_debug_event): Handle DLL events.
13288 (win32_wait): Likewise.
13289
0d37add9
DJ
132902007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13291
13292 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13293 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13294
45e2715e
PA
132952007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13296
13297 * win32-low.c (handle_output_debug_string): Ignore event if not
13298 waiting.
13299
c5674cf1
PA
133002007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13301
13302 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13303
2bbe3cc1
DJ
133042007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13305
13306 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13307
ae13219e
DJ
133082007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13309
13310 * inferiors.c (change_inferior_id): Add comment.
13311 * linux-low.c (check_removed_breakpoint): Add an early
13312 prototype. Improve debug output.
13313 (linux_attach): Doc update.
13314 (linux_detach_one_process, linux_detach): Clean up before releasing
13315 each process.
13316 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13317 * linux-low.h (struct process_info): Doc improvement.
13318 * mem-break.c (delete_all_breakpoints): New.
13319 * mem-break.h (delete_all_breakpoints): New prototype.
13320 * thread-db.c (find_first_thread): New.
13321 (thread_db_create_event): Call it instead of
13322 thread_db_find_new_threads. Clean up unused variables.
13323 (maybe_attach_thread): Remove first thread handling.
13324 (thread_db_find_new_threads): Use find_first_thread.
13325 (thread_db_get_tls_address): Likewise.
13326
4105de34
DJ
133272007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13328
13329 * thread-db.c (thread_db_find_new_threads): Add prototype.
13330 (thread_db_create_event): Check for the main thread before adding
13331 a new thread.
13332 (maybe_attach_thread): Only enable event reporting if TID == 0.
13333 (thread_db_get_tls_address): Check for new threads.
13334
2b876972
DJ
133352007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13336
13337 * linux-low.c (linux_create_inferior): Try execv before execvp.
13338 * spu-low.c (spu_create_inferior): Likewise.
13339
7a245884
DJ
133402007-06-13 Mike Frysinger <vapier@gentoo.org>
13341
13342 * linux-low.c (linux_create_inferior): Change execv to execvp.
13343 * spu-low.c (spu_create_inferior): Likewies.
13344
117ce543
DJ
133452007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13346
13347 * Makefile.in (clean): Clean new files instead of deleted ones.
13348 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13349 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13350 rules.
13351 * configure.srv: Specify XML files and new regformats for MIPS and
13352 MIPS64 GNU/Linux.
13353 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13354 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13355 an entry for the restart register.
13356 (mips_cannot_fetch_register, mips_cannot_store_register)
13357 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13358 register names to match the XML descriptions.
13359 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13360 restart register instead of $0.
13361
0e7f50da
UW
133622007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13363 Markus Deuling <deuling@de.ibm.com>
13364
13365 * remote-utils.c (decode_xfer_write): New function.
13366 * server.h (decode_xfer_write): Add prototype.
13367 * server.c (handle_query): Add PACKET_LEN argument. Support
13368 qXfer:spu:read and qXfer:spu:write packets.
13369 (main): Pass packet_len to handle_query.
13370 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13371 * target.h (target_ops): Add qxfer_spu.
13372
374c1d38
UW
133732007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13374
13375 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13376 accessing non-seekable spufs files.
13377
bb63802a
UW
133782007-05-16 Markus Deuling <deuling@de.ibm.com>
13379
889bf7c5 13380 * server.c (handle_query): Add reply for qC packet.
bb63802a 13381
7390519e
PA
133822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13383 Leo Zayas <lerele@champenstudios@com>
13384
13385 * server.h (check_remote_input_interrupt_request): New function.
13386 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13387 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13388 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13389 (check_remote_input_interrupt_request): New function.
13390 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13391 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13392 winapi_GenerateConsoleCtrlEvent): New typedefs.
13393 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13394 to 250 ms.
13395 (win32_wait): Check for remote interrupt request
13396 with check_remote_input_interrupt_request.
13397 (win32_request_interrupt): New function.
13398 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13399
34b34921
PA
134002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13401
13402 * win32-low.c (debug_registers_changed,
13403 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13404 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13405 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13406 (thread_rec): Get context using the low target.
13407 (child_add_thread): Call thread_added on the low target,
13408 which does the same thing.
13409 (regptr): Delete.
13410 (do_initial_child_stuff): Remove debug registers references.
13411 Set context using the low target. Resume threads after
13412 setting the contexts.
13413 (child_continue): Remove dead variable. Remove debug
13414 registers references.
13415 (child_fetch_inferior_registers): Go through the low target.
13416 (do_child_store_inferior_registers): Remove.
13417 (child_store_inferior_registers): Go through the low target.
13418 (win32_resume): Remove debug registers references.
13419 Set context using the low target.
13420 (handle_exception): Change return type to void. Don't record
13421 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13422 first chance exception.
889bf7c5 13423 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13424 goto loop. Always return after waiting for debug event.
13425 (win32_wait): Convert to switch statement. Handle spurious
13426 events.
13427
13428 * win32-i386-low.c (debug_registers_changed,
13429 debug_registers_used): New.
13430 (initial_stuff): Rename to ...
13431 (i386_initial_stuff): ... this. Clear debug registers
13432 state variables.
13433 (store_debug_registers): Delete.
13434 (i386_get_thread_context): New.
13435 (load_debug_registers): Delete.
13436 (i386_set_thread_context): New.
13437 (i386_thread_added): New.
13438 (single_step): Rename to ...
13439 (i386_single_step): ... this.
13440 (do_fetch_inferior_registers): Rename to ...
13441 (i386_fetch_inferior_register): ... this.
13442 (i386_store_inferior_register): New.
13443 (the_low_target): Adapt to new interface.
13444
13445 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13446 (arm_get_thread_context): New.
13447 (arm_set_thread_context): New.
13448 (regptr): New.
13449 (do_fetch_inferior_registers): Rename to ...
13450 (arm_fetch_inferior_register): ... this.
13451 (arm_store_inferior_register): New.
13452 (arm_wince_breakpoint): Reimplement as unsigned long.
13453 (arm_wince_breakpoint_len): Define.
13454 (the_low_target): Adapt to new interface.
13455
13456 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13457 load_debug_registers. Add get_thread_context, set_thread_context,
13458 thread_added and store_inferior_register. Rename
13459 fetch_inferior_registers to fetch_inferior_register.
13460 (regptr): Remove declaration.
13461
dd6953e1
PA
134622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13463
13464 * linux-low.c (linux_detach): Change return type to int. Return 0.
13465 * spu-low.c (spu_detach): Likewise.
13466
444d6139
PA
134672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13468
13469 * target.h (target_ops): Change return type of detach to int.
13470 Add join.
13471 (join_inferior): New.
13472 * server.c (main): Don't skip detach support on mingw32.
13473 If the inferior doesn't support detaching return error.
13474 Call join_inferior instead of using waitpid.
13475 * linux-low.c (linux_join): New.
13476 (linux_target_op): Add linux_join.
13477 * spu-low.c (spu_join): New.
13478 (spu_target_ops): Add spu_join.
13479 * win32-low.c (win32_detach): Adapt to new interface.
13480 Reopen current_process_handle before detaching. Issue a child
13481 resume before detaching.
13482 (win32_join): New.
13483 (win32_target_op): Add win32_join.
13484
1d5315fe
PA
134852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13486
13487 * win32-low.c (win32-attach): Fix return value.
13488 * target.h (target_ops): Describe ATTACH return values.
13489
bf914831
PA
134902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13491
13492 * win32-low.c (GETPROCADDRESS): Define.
13493 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13494 (winapi_DebugSetProcessKillOnExit): Likewise.
13495 (win32_create_inferior): Force usage of ansi CreateProcessA.
13496 (win32_attach): Use GETPROCADDRESS.
13497 (win32_detach): Likewise.
13498
f72f3e60
PA
134992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13500
13501 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13502
ed50f18f
PA
135032007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13504
13505 * win32-low.c: Commit leftover changes from 2007-03-29.
13506
0c2ead7e
DJ
135072007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13508
13509 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13510 fields short instead of int. Add explicit padding.
13511 (i387_cache_to_fsave): Remove unnecessary casts.
13512 (i387_fsave_to_cache): Doc fix.
13513 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13514
73725ff3
DJ
135152007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13516
13517 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13518 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13519
d99f33d8
PA
135202007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13521
13522 * configure.srv (arm*-*-mingw32ce*): Move near the other
13523 arm targets.
13524
68070c10
PA
135252007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13526
2482afc6 13527 * configure.ac: Add errno checking.
68070c10
PA
13528 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13529 sys/file.h and malloc.h.
13530 (AC_CHECK_DECLS): Add perror.
13531 (srv_mingwce): Handle.
2482afc6 13532 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13533 win32-i386-low.o to srv_tgtobj.
13534 (i[34567]86-*-mingw*): Likewise.
13535 (arm*-*-mingw32ce*): Add case.
13536 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13537 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13538 [__MINGW32CE__] (strerror): New function.
13539 [__MINGW32CE__] (errno): Define to GetLastError.
13540 [__MINGW32CE__] (COUNTOF): New macro.
13541 (remote_open): Remove extra close call.
13542 * mem-break.c (delete_breakpoint_at): New function.
13543 * mem-break.h (delete_breakpoint_at): Declare.
13544 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13545 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13546 [USE_WIN32API] (read, write): Add char* casts.
13547 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13548 * server.h: Include wincecompat.h on Windows CE.
13549 [HAVE_ERRNO_H]: Check.
13550 (perror): Declare if not declared.
13551 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13552 (perror_with_name): Remove errno declaration.
13553 * wincecompat.h: New.
13554 * wincecompat.c: New.
13555 * win32-low.h: New.
13556 * win32-arm-low.c: New.
13557 * win32-i386-low.c: New.
13558 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13559 (OUTMSG2): Make it safe.
13560 (_T): New macro.
13561 (COUNTOF): New macro.
13562 (NUM_REGS): Get it from the low target.
13563 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13564 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13565 (thread_rec): Let low target handle debug registers.
13566 (child_add_thread): Likewise.
13567 (child_init_thread_list): Likewise.
13568 (continue_one_thread): Likewise.
13569 (regptr): New.
13570 (do_child_fetch_inferior_registers): Move to ...
13571 * win32-i386-low.c: ... here, and rename to ...
13572 (do_fetch_inferior_registers): ... this.
889bf7c5 13573 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13574 Go through the low target.
13575 (do_child_store_inferior_registers): Use regptr.
13576 (strwinerror): New function.
13577 (win32_create_inferior): Handle Windows CE.
13578 Use strwinerror instead of strerror on Windows error
13579 codes. Add program to the error output.
13580 Don't close the main thread handle on Windows CE.
13581 (win32_attach): Use coredll.dll on Windows CE.
13582 (win32_kill): Close current process and current
13583 thread handles.
13584 (win32_detach): Use coredll.dll on Windows CE.
13585 (win32_resume): Let low target handle debug registers, and
13586 step request.
13587 (handle_exception): Add/Remove initial breakpoint. Avoid
13588 non-existant WSTOPSIG on Windows CE.
13589 (win32_read_inferior_memory): Cast to remove warning.
13590 (win32_arch_string): Go through the low target.
13591 (initialize_low): Call set_breakpoint_data with the low
13592 target's breakpoint.
13593 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13594 FOP_REGNUM, mappings): Move to ...
13595 * win32-i386-low.c: ... here.
13596 * win32-low.c (win32_thread_info): Move to ...
13597 * win32-low.h: ... here.
13598 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13599 win32-arm-low.c and wincecompat.c.
13600 (all:): Add $EXEEXT.
13601 (install-only:): Likewise.
13602 (gdbserver:): Likewise.
13603 (gdbreplay:): Likewise.
13604 * config.in: Regenerate.
13605 * configure: Regenerate.
13606
41093d81
PA
136072007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13608
13609 * win32-low.c: Rename typedef thread_info to
13610 win32_thread_info throughout.
13611
544afa54
PA
136122007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13613
13614 * win32-i386-low.c: Rename to ...
13615 * win32-low.c: ... this.
13616 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13617 * Makefile.in: Likewise.
13618
bce7165d
PA
136192007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13620
13621 * remote-utils.c (monitor_output): Constify msg parameter.
13622 * server.h (monitor_output): Likewise.
13623 * win32-i386-low.c (handle_output_debug_string): New.
13624 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13625 handle_output_debug_string.
13626 (get_child_debug_event): Likewise.
13627
506c7aa0
DJ
136282007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13629
13630 * server.c (main): Correct strtoul check.
13631
42c81e2a
DJ
136322007-03-27 Jon Ringle <jon@ringle.org>
13633
13634 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13635
9453113a
DJ
136362007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13637
13638 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13639
64a69107
DJ
136402007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13641
13642 * terminal.h: Check HAVE_SGTTY_H.
13643
136442007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13645
13646 * remote-utils.c (remote_open): Print out the assigned port number.
13647
c74d0ad8
DJ
136482007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13649
13650 * remote-utils.c (monitor_output): New function.
13651 * server.c (debug_threads): Define here.
13652 (monitor_show_help): New function.
13653 (handle_query): Handle qRcmd.
13654 (main): Do not handle 'd' packet.
13655 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13656 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13657 of debug_threads.
13658
de7c3b4a
PA
136592007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13660
13661 * Makefile.in (EXEEXT): New.
13662 (clean): Use $(EXEEXT).
13663
ef57601b
PA
136642007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13665
13666 * target.h (target_ops): Rename send_signal to request_interrupt,
13667 and remove enum target_signal parameter.
13668 * linux-low.c (linux_request_interrupt): Rename from
13669 linux_send_signal, and always send SIGINT.
13670 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13671 and always send SIGINT.
13672 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13673 of send_signal.
13674 (input_interrupt): Likewise.
13675
820f2bda
PA
136762007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13677
13678 * server.c (get_features_xml): Check if target implemented
13679 arch_string.
13680 * win32-i386-low.c (win32_arch_string): New.
13681 (win32_target_ops): Add win32_arch_string as arch_string member.
13682
ab39bf24
UW
136832007-02-22 Markus Deuling <deuling@de.ibm.com>
13684
13685 * spu-low.c (spu_arch_string): New.
13686 (spu_target_ops): Add spu_arch_string.
13687
61ff6e04
DJ
136882007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13689
13690 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13691 * configure.ac: Do not check for terminal.h.
13692 * configure, config.in: Regenerated.
13693
fb1e4ffc
DJ
136942007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13695
13696 * Makefile.in (OBS): Add $(XML_BUILTIN).
13697 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13698 (clean): Update.
13699 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13700 (arm-with-iwmmxt.c): New.
13701 * config.in, configure: Regenerate.
13702 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13703 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13704 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13705 (arm*-*-linux*): Add iWMMXt and regset support.
13706 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13707 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13708 (arm_store_wmmxregset, target_regsets): New.
13709 * server.c (get_features_xml): Take annex argument. Check builtin
13710 XML documents.
13711 (handle_query): Handle multiple annexes.
13712
0f48aa01
DJ
137132007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13714
13715 * remote-utils.c [USE_WIN32API] (read, write): Define.
13716 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13717 write.
13718
23181151
DJ
137192007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13720
13721 * linux-i386-low.c (the_low_target): Set arch_string.
13722 * linux-x86-64-low.c (the_low_target): Likewise.
13723 * linux-low.c (linux_arch_string): New.
13724 (linux_target_ops): Add it.
13725 * linux-low.h (struct linux_target_ops): Add arch_string.
13726 * server.c (write_qxfer_response): Use const void * for DATA.
13727 (get_features_xml): New.
13728 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13729 * target.h (struct target_ops): Add arch_string method.
13730
9d606399
DJ
137312007-01-03 Denis Pilat <denis.pilat@st.com>
13732 Daniel Jacobowitz <dan@codesourcery.com>
13733
13734 * linux-low.c (linux_kill): Handle being called with no threads.
13735 * win32-i386-low.c (win32_kill): Likewise.
13736 (get_child_debug_event): Clear current_process_handle.
13737
137382006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13739 Daniel Jacobowitz <dan@codesourcery.com>
13740
13741 * remote-utils.c (remote_open): Check the type of specified
13742 serial port devices before opening them.
13743 * server.c (main): Kill the inferior if an error occurs during
13744 the first remote_open.
13745
a5e13d24
DJ
137462006-12-05 Markus Deuling <deuling@de.ibm.com>
13747
13748 * README: Update supported targets.
13749
186947f7
DJ
137502006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13751
13752 * Makefile.in (clean): Remove reg-mips64.c.
13753 (reg-mips64.c, reg-mips64.o): New rules.
13754 * configure.srv: Handle mips64. Include regset support for mips.
13755 * linux-mips-low.c (union mips_register): New.
13756 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13757 (mips_breakpoint, mips_breakpoint_at): Use int.
13758 (mips_collect_register, mips_supply_register)
13759 (mips_collect_register_32bit, mips_supply_register_32bit)
13760 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13761 (mips_store_fpregset, target_regsets): New.
13762 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13763
a13e2c95
UW
137642006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13765
13766 * configure.srv: Add target "spu*-*-*".
13767 * Makefile.in (clean): Remove reg-spu.c.
13768 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13769 * spu-low.c: New file.
13770
cb7283db
DJ
137712006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13772
13773 * configure.ac: Correct td_thr_tls_get_addr test.
13774 * configure: Regenerated.
13775
89be2091
DJ
137762006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13777
13778 * linux-low.c (linux_wait_for_event): Reformat. Use the
13779 pass_signals array.
13780 * remote-utils.c (decode_address_to_semicolon): New.
13781 * server.c (pass_signals, handle_general_set): New.
13782 (handle_query): Mention QPassSignals for qSupported.
13783 (main): Call handle_general_set.
13784 * server.h (pass_signals, decode_address_to_semicolon): New.
13785
000ef4f0
DJ
137862006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13787
13788 * server.c (handle_query): Correct error handling for read_auxv.
13789
b7149293
UW
137902005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13791
13792 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13793 and srv_linux_thread_db to yes.
13794 * linux-s390-low.c (s390_fill_gregset): New function.
13795 (target_regsets): Define data structure.
13796
dae5f5cf
DJ
137972006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13798
13799 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13800 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13801 * config.in, configure: Regenerated.
13802 * inferiors.c (gdb_id_to_thread): New function.
13803 (gdb_id_to_thread_id): Use it.
13804 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13805 * linux-low.h (struct process_info): Add th member.
13806 (thread_db_get_tls_address): New prototype.
13807 * remote-utils.c (decode_address): Make non-static.
13808 * server.c (handle_query): Handle qGetTLSAddr.
13809 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13810 * target.h (struct target_ops): Add get_tls_address.
13811 * thread-db.c (maybe_attach_thread): Save the thread handle.
13812 (thread_db_get_tls_address): New.
13813
32ca6d61
DJ
138142006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13815
13816 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13817 (linux_resume_one_process): Take a siginfo_t *. Update all
13818 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13819 (struct pending_signals): Add a siginfo_t.
13820 (linux_wait_for_process): Always set last_status.
13821 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13822 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13823 * linux-low.h (struct process_info): Add last_status.
13824
5ffff7c1
DJ
138252006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13826
13827 * remote-utils.c (try_rle): New function.
13828 (putpkt_binary): Use it.
13829
8695c747
DJ
138302006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13831
13832 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13833 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13834 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13835 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13836 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13837 point registers.
13838
290fadea
RS
138392006-08-08 Richard Sandiford <richard@codesourcery.com>
13840
13841 * server.c (terminal_fd): New variable.
13842 (old_foreground_pgrp): Likewise.
13843 (restore_old_foreground_pgrp): New function.
13844 (start_inferior): Record the terminal file descriptor in terminal_fd
13845 and its original foreground group in old_foreground_pgrp. Register
13846 restore_old_foreground_pgrp with atexit().
13847
9f2e1e63
DJ
138482006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13849
13850 * server.c (handle_query): Correct qPart to qXfer.
13851
b80864fb
DJ
138522006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13853
13854 * configure.ac: Check for more headers which are missing on
13855 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13856 * configure.srv: Add Cygwin and mingw32.
13857 * remote-utils.c: Don't include headers unconditionally which
13858 are missing on mingw32. Include <winsock.h> for mingw32.
13859 (remote_open): Adjust for mingw32 support. Flush
13860 standard error after writing to it.
13861 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13862 (unblock_async_io, enable_async_io, disable_async_io)
13863 (readchar, getpkt): Update for Winsock support.
13864 (prepare_resume_reply): Expect a protocol signal number.
13865 * server.c: Disable <sys/wait.h> on mingw32.
13866 (start_inferior): Adjust for mingw32 support. Flush
13867 standard error after writing to it.
13868 (attach_inferior): Likewise. Use protocol signal
13869 numbers.
13870 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13871 and names.
13872 * win32-i386-low.c: New file.
13873 * Makefile.in (XM_CLIBS): Set.
13874 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13875 (win32-i386-low.o): New dependency rule.
13876 * linux-low.c (linux_wait): Use target signal numbers.
13877 * target.h (struct target_ops): Doc fix.
13878 * server.h (target_signal_to_name): New prototype.
13879 * gdbreplay.c: Don't include headers unconditionally which
13880 are missing on mingw32. Include <winsock.h> for mingw32.
13881 (remote_close, remote_open): Adjust for Winsock support.
13882 * configure, config.in: Regenerated.
13883
0876f84a
DJ
138842006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13885
13886 * server.c (decode_xfer_read, write_qxfer_response): New.
13887 (handle_query): Take a packet length argument. Handle
13888 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13889 the qSupported response.
13890 (main): Update call to handle_query.
13891
01f9e8fa
DJ
138922006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13893
13894 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13895 (putpkt_binary): Renamed from putpkt and adjusted for binary
13896 data.
13897 (putpkt): New wrapper for putpkt_binary.
13898 (readchar): Don't mask off the high bit.
13899 (decode_X_packet): New function.
13900 * server.c (main): Call putpkt_binary if a handler sets the packet
13901 length. Save the length of the incoming packet. Handle 'X'.
13902 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13903
be2a5f71
DJ
139042006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13905
13906 * server.c (handle_query): Handle qSupported.
13907
ea025f5f
DJ
139082006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13909
13910 * remote-utils.c (all_symbols_looked_up): New variable.
13911 (look_up_one_symbol): Check it.
13912 * server.h (look_up_one_symbol): New declaration.
13913 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13914
9308fc88
DJ
139152006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13916
13917 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13918 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13919 (PTRACE_GET_THREAD_AREA): Define.
13920 (ps_get_thread_area): New function.
13921
52fb6437
NS
139222006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13923
13924 * configure.srv (m68k*-*-uclinux*): New target.
13925 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13926 (linux_resume_one_process): Remove extraneous cast.
13927 (linux_read_offsets): New.
13928 (linux_target_op): Add linux_read_offsets on mmuless systems.
13929 * server.c (handle_query): Add qOffsets logic.
13930 * target.h (struct target_ops): Add read_offsets.
13931
21b0f40c
DJ
139322006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13933
13934 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13935 (PTRACE_GET_THREAD_AREA): Define.
13936 (ps_get_thread_area): New function.
13937 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13938 (linux-x86-64-low.o): Update.
13939
0050a760
DJ
139402006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13941
13942 * configure.ac: Remove checks for prfpregset_t.
13943 * gdb_proc_service.h: New file.
13944 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13945 new "gdb_proc_service.h".
13946 * proc-service.c: Likewise.
13947 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13948 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13949 * Makefile.in (gdb_proc_service_h): Updated.
13950 * configure, config.in: Regenerated.
13951
b92a518e
DJ
139522006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13953
13954 * remote-utils.c (prepare_resume_reply): Move declaration
13955 of gdb_id_from_wait to the top of the block.
13956
545587ee
DJ
139572006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13958
13959 * linux-low.c (regsets_store_inferior_registers): Read the regset
13960 from the target before filling it.
13961
9db87ebd
DJ
139622006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13963
13964 * server.c (attach_inferior): Return SIGTRAP for a successful
13965 attach.
13966
dd24457d
DJ
139672006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13968
13969 * Makefile.in (OBS): Add version.o.
13970 (STAGESTUFF): Delete.
13971 (version.o): Add dependencies.
13972 (version.c): Replace rule.
13973 (clean): Remove version.c.
13974 * server.c (gdbserver_version): New.
13975 (gdbserver_usage): Use printf.
13976 (main): Handle --version and --help.
13977 * server.h (version, host_name): Add declarations.
13978
6f0f660e
EZ
139792005-12-23 Eli Zaretskii <eliz@gnu.org>
13980
889bf7c5
PA
13981 * linux-arm-low.c:
13982 * linux-arm-low.c:
13983 * inferiors.c:
13984 * i387-fp.h:
13985 * i387-fp.c:
13986 * gdbreplay.c:
13987 * regcache.c:
13988 * proc-service.c:
13989 * mem-break.h:
13990 * mem-break.c:
13991 * linux-x86-64-low.c:
13992 * linux-sh-low.c:
13993 * linux-s390-low.c:
13994 * linux-ppc64-low.c:
13995 * linux-ppc-low.c:
13996 * linux-mips-low.c:
13997 * linux-m68k-low.c:
13998 * linux-m32r-low.c:
13999 * linux-low.h:
14000 * linux-low.c:
14001 * linux-ia64-low.c:
14002 * linux-i386-low.c:
14003 * linux-crisv32-low.c:
14004 * thread-db.c:
14005 * terminal.h:
14006 * target.h:
14007 * target.c:
14008 * server.h:
14009 * server.c:
14010 * remote-utils.c:
14011 * regcache.h:
14012 * utils.c:
14013 * Makefile.in:
14014 * configure.ac:
6f0f660e
EZ
14015 * gdbserver.1: Add (C) after Copyright. Update the FSF
14016 address.
14017
9d1fb177
DJ
140182005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14019
14020 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14021 (arm_breakpoint_at): Recognize both breakpoints.
14022 (the_low_target): Use the correct breakpoint instruction.
14023
011a70c2
DJ
140242005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14025
14026 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14027 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14028 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14029 (the_low_target): Update.
14030
7fb85e41
AS
140312005-10-25 Andreas Schwab <schwab@suse.de>
14032
14033 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14034
14035 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14036 (ia64_num_regs): Reduce to 462.
14037
3db0444b
DJ
140382005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14039
14040 * acinclude.m4: Correct quoting.
14041 * aclocal.m4: Regenerated.
14042
14043 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14044 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14045 (thread_db_init): Call thread_db_err_str.
14046 * configure.ac: Check for TD_VERSION.
14047 * config.in, configure: Regenerated.
14048
bee0189a
DJ
140492005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14050
14051 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14052
e9d25b98
DJ
140532005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14054
14055 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14056 is not available. Define HAVE_PTRACE_GETREGS if it is.
14057 * config.in, configure: Regenerated.
14058 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14059 * linux-i386-low.c, linux-m68k-low.c: Update to use
14060 HAVE_PTRACE_GETREGS.
14061 * linux-low.c (regsets_fetch_inferior_registers)
14062 (regsets_store_inferior_registers): Only return 0 if we processed
14063 GENERAL_REGS.
14064 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14065 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14066
a06660f7
DJ
140672005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14068
14069 * inferiors.c (struct thread_info): Add gdb_id.
14070 (add_thread): Add gdb_id argument.
14071 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14072 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14073 calls to add_thread.
14074 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14075 * server.c (handle_query): Use thread_to_gdb_id.
14076 (handle_v_cont, main): Use gdb_id_to_thread_id.
14077 * server.h (add_thread): Update prototype.
14078 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14079 prototypes.
14080
5a1f5858
DJ
140812005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14082
14083 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14084 left-padded registers.
14085 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14086 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14087
e122f1f5
SE
140882005-07-01 Steve Ellcey <sje@cup.hp.com>
14089
14090 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14091 * configure: Regenerate.
14092 * config.in: Regenerate.
14093 * server.h (NEED_DECLARATION_STRERROR):
14094 Replace with !HAVE_DECL_STRERROR.
14095
d592fa2f
DJ
140962005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14097
14098 * linux-low.c (linux_wait, linux_send_signal): Don't test
14099 an unsigned long variable for > 0 if it could be MAX_ULONG.
14100 * server.c (myresume): Likewise.
14101 * target.c (set_desired_inferior): Likewise.
14102
ccbd4912
MK
141032005-06-13 Mark Kettenis <kettenis@gnu.org>
14104
14105 * configure.ac: Simplify and improve check for socklen_t.
14106 * configure, config.in: Regenerate.
14107
f450004a
DJ
141082005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14109
14110 * acconfig.h: Remove.
14111 * configure.ac: Add a test for socklen_t. Use three-argument
14112 AC_DEFINE throughout.
14113 * config.in: Regenerated using autoheader 2.59.
14114 * configure: Regenerated.
14115
14116 * gdbreplay.c (socklen_t): Provide a default.
14117 (remote_open): Use socklen_t.
14118 * remote-utils.c (socklen_t): Provide a default.
14119 (remote_open): Use socklen_t.
14120 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14121 unsigned char.
14122
14123 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14124 char for buffers.
14125 * linux-low.c (linux_read_memory, linux_write_memory)
14126 (linux_read_auxv): Likewise.
14127 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14128 (check_mem_write): Likewise.
14129 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14130 Likewise.
14131 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14132 (registers_from_string, register_data): Likewise.
14133 * server.c (handle_query, main): Likewise.
14134 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14135 (decode_M_packet): Likewise.
14136 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14137 * target.h (struct target_ops): Update read_memory, write_memory,
14138 and read_auxv.
14139 (read_inferior_memory, write_inferior_memory): Update.
14140 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14141 to unsigned char *.
14142 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14143 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14144 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14145 linux-s390-low.c, linux-sh-low.c: Update for changes in
14146 read_inferior_memory and the_low_target->breakpoint.
14147
eee84df1
DJ
141482005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14149
14150 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14151 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14152 * configure.srv: Add powerpc64-*-linux*.
14153 * linux-ppc64-low.c: New file.
14154
45b134e5
OF
141552005-05-23 Orjan Friberg <orjanf@axis.com>
14156
14157 * linux-cris-low.c: New file with support for CRIS.
14158 * linux-crisv32-low.c: Ditto for CRISv32.
14159 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14160 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14161 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14162 reg-crisv32.o, and reg-crisv32.c to make rules.
14163 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14164 recognized targets.
14165
48d93c75
UW
141662005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14167
14168 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14169 of sizeof (PTRACE_XFER_TYPE).
14170 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14171
e013ee27
OF
141722005-05-12 Orjan Friberg <orjanf@axis.com>
14173
889bf7c5 14174 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14175 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14176 pointers for hardware watchpoint support.
14177 * linux-low.h (struct linux_target_ops): Ditto.
14178 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14179 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14180 to linux_target_ops.
14181 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14182 reply packet.
14183 * server.c (main): Recognize 'Z' and 'z' packets.
14184
b0ded00b
UW
141852005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14186
14187 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14188 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14189 (the_low_target): Add new members.
14190
8643e2ad
DJ
141912005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14192
14193 * proc-service.c (ps_lgetregs): Search all_processes instead of
14194 all_threads.
14195
fc620387
DJ
141962005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14197
14198 * server.c (start_inferior): Change return type to int.
14199 (attach_inferior): Change sigptr to int *.
14200 (handle_v_cont, handle_v_requests): Change signal to int *.
14201 (main): Change signal to int.
14202
142032005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14204
14205 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14206 * configure.srv: Add m32r*-*-linux*.
14207 * linux-m32r-low.c: New file.
14208
e0e76420
DJ
142092005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14210
14211 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14212
a1928bad
DJ
142132005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14214
14215 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14216 Take unsigned long arguments for PIDs.
14217 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14218 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14219 (wait_for_sigstop, linux_resume_one_process)
14220 (regsets_fetch_inferior_registers, linux_send_signal)
14221 (linux_read_auxv): Likewise. Update the types of variables holding
14222 PIDs. Update format string specifiers.
14223 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14224 * remote-utils.c (prepare_resume_reply): Likewise.
14225 * server.c (cont_thread, general_thread, step_thread)
14226 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14227 unsigned long.
14228 (handle_query): Update format specifiers.
14229 (handle_v_cont, main): Use strtoul for thread IDs.
14230 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14231 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14232 (general_thread, step_thread, thread_from_wait)
14233 (old_thread_from_wait): Update.
14234 * target.h (struct thread_resume): Use unsigned long for THREAD.
14235 (struct target_ops): Use unsigned long for arguments to attach and
14236 thread_alive.
14237
dcdb98d2
DJ
142382005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14239
14240 * acinclude.m4: Include bfd/bfd.m4 directly.
14241 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14242 <agriffis@toolchain.org>.
14243 * aclocal.m4, configure: Regenerated.
14244
bec39cab
AC
142452005-01-07 Andrew Cagney <cagney@gnu.org>
14246
14247 * configure.ac: Rename configure.in, require autoconf 2.59.
14248 * configure: Re-generate.
14249
434c4c77
DJ
142502004-12-08 Daniel Jacobowitz <dan@debian.org>
14251
14252 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14253 LIBS when finished.
14254 * aclocal.m4: Regenerated.
14255 * configure: Regenerated.
14256
db1d3e1b
AS
142572004-11-21 Andreas Schwab <schwab@suse.de>
14258
14259 * linux-m68k-low.c (m68k_num_gregs): Define.
14260 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14261 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14262 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14263 (m68k_breakpoint_at): New. Add to the_low_target.
14264
14265 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14266 srv_linux_thread_db to yes.
14267
43360365
JB
142682004-10-20 Joel Brobecker <brobecker@gnat.com>
14269
14270 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14271 (ARCH_SET_FS): Likewise.
14272 (ARCH_GET_FS): Likewise.
14273 (ARCH_GET_GS): Likewise.
14274
fd500816
DJ
142752004-10-16 Daniel Jacobowitz <dan@debian.org>
14276
14277 * linux-i386-low.c (ps_get_thread_area): New.
14278 * linux-x86-64-low.c (ps_get_thread_area): New.
14279 * linux-low.c: Include <sys/syscall.h>.
14280 (linux_kill_one_process): Don't kill the first thread here.
14281 (linux_kill): Kill the first thread here.
14282 (kill_lwp): New function.
14283 (send_sigstop, linux_send_signal): Use it.
14284 * proc-service.c: Clean up #ifdefs.
14285 (fpregset_info): Delete.
14286 (ps_lgetregs): Update and enable implementation.
14287 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14288 implementations.
14289 * remote-utils.c (struct sym_cache, symbol_cache): New.
14290 (input_interrupt): Print a clearer message.
14291 (async_io_enabled): New variable.
14292 (enable_async_io, disable_async_io): Use it. Update comments.
14293 (look_up_one_symbol): Use the symbol cache.
14294 * thread-db.c (thread_db_look_up_symbols): New function.
14295 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14296
f6de3c42
DJ
142972004-10-16 Daniel Jacobowitz <dan@debian.org>
14298
14299 * configure.in: Test for -rdynamic.
14300 * configure: Regenerated.
14301 * Makefile (INTERNAL_LDFLAGS): New.
14302 (gdbserver, gdbreplay): Use it.
14303
2c0fc042
AC
143042004-09-02 Andrew Cagney <cagney@gnu.org>
14305
14306 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14307
075b3282
DJ
143082004-03-23 Daniel Jacobowitz <drow@mvista.com>
14309
14310 * linux-low.c (linux_wait): Clear all_processes list also.
14311
fa6a77dc
DJ
143122004-03-12 Daniel Jacobowitz <drow@mvista.com>
14313
14314 * linux-low.c: Include <errno.h>. Remove extern declaration of
14315 errno.
14316
6d782a97
DJ
143172004-03-12 Daniel Jacobowitz <drow@mvista.com>
14318
14319 * gdbreplay.c, server.h, utils.c: Update copyright years.
14320
3a7fb99b
DJ
143212004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14322
14323 * server.c (main): Print child status or termination signal from
14324 variable 'signal', not 'sig'.
14325
c3e735a6
DJ
143262004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14327
14328 * linux-low.c (linux_read_memory): Change return type to
14329 int. Check for and return error from ptrace().
14330 * target.c (read_inferior_memory): Change return type to int. Pass
14331 back return status from the_target->read_memory().
14332 * target.h (struct target_ops): Adapt *read_memory() prototype.
14333 Update comment.
14334 (read_inferior_memory): Adapt prototype.
14335 * server.c (main): Return an error packet if
14336 read_inferior_memory() returns an error.
14337
a59d1c82
DJ
143382004-03-04 Daniel Jacobowitz <drow@mvista.com>
14339
14340 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14341 Unify with other clean targets.
14342
dc3f8883
DJ
143432004-02-29 Daniel Jacobowitz <drow@mvista.com>
14344
14345 * server.c (handle_v_cont): Call set_desired_inferior.
14346
89a208da
DJ
143472004-02-29 Daniel Jacobowitz <drow@mvista.com>
14348
14349 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14350
62ea82f5
DJ
143512004-02-29 Daniel Jacobowitz <drow@mvista.com>
14352
14353 * linux-low.c (linux_wait): Unblock async I/O.
14354 (linux_resume): Block and enable async I/O.
14355 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14356 * server.h (block_async_io, unblock_async_io): Add prototypes.
14357
6910d122
DJ
143582004-02-29 Daniel Jacobowitz <drow@mvista.com>
14359
14360 * remote-utils.c (remote_open): Print a status notice after
14361 opening a TCP port.
14362 * server.c (attach_inferior): Print a status notice after
14363 attaching.
14364
143652004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14366
14367 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14368
c89dc5d4
DJ
143692004-02-26 Daniel Jacobowitz <drow@mvista.com>
14370
14371 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14372 error packet.
14373 * server.c, target.h: Update copyright years.
14374
4b8dad4a
RM
143752004-02-25 Roland McGrath <roland@redhat.com>
14376
14377 * target.h (struct target_ops): New member `read_auxv'.
14378 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14379 * linux-low.c (linux_read_auxv): New function.
14380 (linux_target_ops): Initialize `read_auxv' member to that.
14381
d7446758
JB
143822004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14383
14384 Committed by Jim Blandy <jimb@redhat.com>.
14385
14386 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14387 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14388 instead of GPR_SIZE to distiguish s390 and s390x targets.
14389
5544ad89
DJ
143902004-01-31 Daniel Jacobowitz <drow@mvista.com>
14391
14392 * linux-low.c: Update copyright year.
14393 (check_removed_breakpoint): Clear pending_is_breakpoint.
14394 (linux_set_resume_request, linux_queue_one_thread)
14395 (resume_status_pending_p): New functions.
14396 (linux_continue_one_thread): Use process->resume.
14397 (linux_resume): Only resume threads if there are no pending events.
14398 * linux-low.h (struct process_info): Add resume request
14399 pointer.
14400
2a68b70e
DJ
144012004-01-30 Daniel Jacobowitz <drow@mvista.com>
14402
14403 * regcache.c (new_register_cache): Clear the allocated register
14404 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14405
64386c31
DJ
144062003-10-13 Daniel Jacobowitz <drow@mvista.com>
14407
14408 * linux-low.c (linux_resume): Take a struct thread_resume *
14409 argument.
14410 (linux_wait): Update call.
14411 (resume_ptr): New static variable.
14412 (linux_continue_one_thread): Renamed from
14413 linux_continue_one_process. Use resume_ptr.
14414 (linux_resume): Use linux_continue_one_thread.
14415 * server.c (handle_v_cont, handle_v_requests): New functions.
14416 (myresume): New function.
14417 (main): Handle 'v' case.
14418 * target.h (struct thread_resume): New type.
14419 (struct target_ops): Change argument of "resume" to struct
14420 thread_resume *.
14421 (myresume): Delete macro.
14422
c938e9b0
L
144232003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14424
14425 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14426 (uninstall): Support DESTDIR.
14427
7f313d07
BC
14428Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14429
14430 * configure.srv: Add xscale*linux copy of arm*linux entry.
14431
3b2fc2ea
DJ
144322003-07-24 Daniel Jacobowitz <drow@mvista.com>
14433
14434 * linux-arm-low.c (arm_reinsert_addr): New function.
14435 (the_low_target): Add arm_reinsert_addr.
14436
1c0a559e
MK
144372003-07-08 Mark Kettenis <kettenis@gnu.org>
14438
14439 * mem-break.c: Remove whitespace at end of file.
14440
43d5792c
DJ
144412003-06-28 Daniel Jacobowitz <drow@mvista.com>
14442
14443 * configure.in: Check whether we need to prototype strerror.
14444 * server.h: Optionally prototype strerror.
14445 * gdbreplay.c (perror_with_name): Use strerror.
14446 * linux-low.c (linux_attach_lwp): Use strerror.
14447 * utils.c (perror_with_name): Use strerror.
14448 * config.in, configure: Regenerated.
14449
c8a86edf
DJ
144502003-06-28 Daniel Jacobowitz <drow@mvista.com>
14451
14452 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14453 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14454
73d37363
DJ
144552003-06-20 Daniel Jacobowitz <drow@mvista.com>
14456
14457 * Makefile.in (SFILES): Update.
14458 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14459 low-sun3.c: Remove files.
14460
6ad8ae5c
DJ
144612003-06-17 Daniel Jacobowitz <drow@mvista.com>
14462
14463 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14464 (linux_detach_one_process, linux_detach): New functions.
14465 (linux_target_ops): Add linux_detach.
14466 * server.c (main): Handle 'D' packet.
14467 * target.h (struct target_ops): Add "detach" member.
14468 (detach_inferior): Define.
14469
1581182a
MK
144702003-06-13 Mark Kettenis <kettenis@gnu.org>
14471
14472 From Kelley Cook <kelleycook@wideopenwest.com>:
14473 * configure.srv: Accept i[34567]86 variants.
14474
e5379b03
DJ
144752003-06-05 Daniel Jacobowitz <drow@mvista.com>
14476
14477 * linux-low.c (linux_wait_for_event): Correct comment typos.
14478 (linux_resume_one_process): Call check_removed_breakpoint.
14479 (linux_send_signal): New function.
14480 (linux_target_ops): Add linux_send_signal.
14481 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14482 of kill.
14483 * target.h (struct target_ops): Add send_signal.
14484
2ff29de4
JB
144852003-05-29 Jim Blandy <jimb@redhat.com>
14486
14487 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14488 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14489 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14490 away part of the register's value.
14491
254787d4
DJ
144922003-03-26 Daniel Jacobowitz <drow@mvista.com>
14493
14494 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14495 (linux_wait_for_event, linux_init_signals): Likewise.
14496
94e10508
DJ
144972003-03-17 Daniel Jacobowitz <drow@mvista.com>
14498
14499 * configure.in: Check for stdlib.h.
14500 * configure: Regenerated.
14501 * config.in: Regenerated.
14502
4c0711e0
DJ
145032003-01-04 Andreas Schwab <schwab@suse.de>
14504
14505 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14506
ef66e766
AC
145072003-01-02 Andrew Cagney <ac131313@redhat.com>
14508
14509 * Makefile.in: Remove obsolete code.
14510
a1358604
DJ
145112002-11-20 Daniel Jacobowitz <drow@mvista.com>
14512
14513 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14514 defined(PT_FPR0_HI).
14515
23ce3b1c
DJ
145162002-11-17 Stuart Hughes <seh@zee2.com>
14517
14518 * linux-arm-low.c (arm_num_regs): Increase.
14519 (arm_regmap): Include status register.
14520
145212002-11-17 Daniel Jacobowitz <drow@mvista.com>
14522
14523 * linux-low.c (register_addr): Remove incorrect -1 check.
14524
a9fa9f7d
DJ
145252002-08-29 Daniel Jacobowitz <drow@mvista.com>
14526
14527 * linux-low.c (linux_create_inferior): Call setpgid. Return
14528 the new PID.
14529 (unstopped_p, linux_signal_pid): Remove.
14530 (linux_target_ops): Remove linux_signal_pid.
14531 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14532 global instead of target method.
14533 * target.h (struct target_ops): Remove signal_pid. Update comment
14534 for create_inferior.
14535 * server.c (signal_pid): New variable.
14536 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14537 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14538 (attach_inferior): Set signal_pid.
14539
17574093
DJ
145402002-08-23 Daniel Jacobowitz <drow@mvista.com>
14541
14542 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14543
145442002-08-20 Jim Blandy <jimb@redhat.com>
14545
14546 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14547 default for this.
14548
145492002-08-01 Andrew Cagney <cagney@redhat.com>
14550
14551 * Makefile.in: Make chill references obsolete.
14552
145532002-07-24 Kevin Buettner <kevinb@redhat.com>
14554
14555 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14556 * configure: Regenerate.
14557 * config.in: Regenerate.
14558
145592002-07-09 David O'Brien <obrien@FreeBSD.org>
14560
14561 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14562 (perror_with_name, remote_close, remote_open, expect, play): Static.
14563
145642002-07-04 Michal Ludvig <mludvig@suse.cz>
14565
4b8dad4a 14566 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14567 byte offsets instead of an array of indexes.
14568 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14569
145702002-06-13 Daniel Jacobowitz <drow@mvista.com>
14571
14572 * regcache.c: Add comment.
14573
145742002-06-11 Daniel Jacobowitz <drow@mvista.com>
14575
14576 * thread-db.c: New file.
14577 * proc-service.c: New file.
14578 * acinclude.m4: New file.
14579 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14580 proc-service.o, and thread-db.o.
14581 (linux-low.o): Add USE_THREAD_DB.
14582 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14583 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14584 * aclocal.m4: Regenerated.
14585 * config.in: Regenerated.
14586 * configure: Regenerated.
14587 * configure.in: Check for proc_service.h, sys/procfs.h,
14588 thread_db.h, and linux/elf.h headrs.
14589 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14590 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14591 Check for -lthread_db and thread support.
14592 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14593 PowerPC, and SuperH.
14594 * i387-fp.c: Constify arguments.
14595 * i387-fp.h: Likewise.
14596 * inferiors.c: (struct thread_info): Renamed from
14597 `struct inferior_info'. Remove PID member. Use generic inferior
14598 list header. All uses updated.
14599 (inferiors, signal_pid): Removed.
14600 (all_threads): New variable.
14601 (get_thread): Define.
14602 (add_inferior_to_list): New function.
14603 (for_each_inferior): New function.
14604 (change_inferior_id): New function.
14605 (add_inferior): Removed.
14606 (remove_inferior): New function.
14607 (add_thread): New function.
14608 (free_one_thread): New function.
14609 (remove_thread): New function.
14610 (clear_inferiors): Use for_each_inferior and free_one_thread.
14611 (find_inferior): New function.
14612 (find_inferior_id): New function.
14613 (inferior_target_data): Update argument type.
14614 (set_inferior_target_data): Likewise.
14615 (inferior_regcache_data): Likewise.
14616 (set_inferior_regcache_data): Likewise.
14617 * linux-low.c (linux_bp_reinsert): Remove.
14618 (all_processes, stopping_threads, using_thrads)
14619 (struct pending_signals, debug_threads, pid_of): New.
14620 (inferior_pid): Replace with macro.
14621 (struct inferior_linux_data): Remove.
14622 (get_stop_pc, add_process): New functions.
14623 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14624 Use add_process and add_thread.
14625 (linux_attach_lwp): New function, based on old linux_attach. Use
14626 add_process and add_thread. Set stop_expected for new threads.
14627 (linux_attach): New function.
14628 (linux_kill_one_process): New function.
14629 (linux_kill): Kill all LWPs.
14630 (linux_thread_alive): Use find_inferior_id.
14631 (check_removed_breakpoints, status_pending_p): New functions.
14632 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14633 Update. Use WNOHANG. Wait for cloned processes also. Update process
14634 struct for the found process.
14635 (linux_wait_for_event): New function.
14636 (linux_wait): Use it. Support LWPs.
14637 (send_sigstop, wait_for_sigstop, stop_all_processes)
14638 (linux_resume_one_process, linux_continue_one_process): New functions.
14639 (linux_resume): Support LWPs.
14640 (REGISTER_RAW_SIZE): Remove.
14641 (fetch_register): Use register_size instead. Call supply_register.
14642 (usr_store_inferior_registers): Likewise. Call collect_register.
14643 Fix recursive case.
14644 (regsets_fetch_inferior_registers): Improve error message.
14645 (regsets_store_inferior_registers): Add debugging.
14646 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14647 (unstopped_p, linux_signal_pid): New functions.
14648 (linux_target_ops): Add linux_signal_pid.
14649 (linux_init_signals): New function.
14650 (initialize_low): Call it. Initialize using_threads.
14651 * regcache.c (inferior_regcache_data): Add valid
14652 flag.
14653 (get_regcache): Fetch registers lazily. Add fetch argument
14654 and update all callers.
14655 (regcache_invalidate_one, regcache_invalidate): New
14656 functions.
14657 (new_register_cache): Renamed from create_register_cache.
14658 Return the new regcache.
14659 (free_register_cache): Change argument to a void *.
14660 (registers_to_string, registers_from_string): Call get_regcache
14661 with fetch flag set.
14662 (register_data): Make static. Pass fetch flag to get_regcache.
14663 (supply_register): Call get_regcache with fetch flag clear.
14664 (collect_register): Call get_regcache with fetch flag set.
14665 (collect_register_as_string): New function.
14666 * regcache.h: Update.
14667 * remote-utils.c (putpkt): Flush after debug output and use
14668 stderr.
14669 Handle input interrupts while waiting for an ACK.
14670 (input_interrupt): Use signal_pid method.
14671 (getpkt): Flush after debug output and use stderr.
14672 (outreg): Use collect_register_as_string.
14673 (new_thread_notify, dead_thread_notify): New functions.
14674 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14675 and general_thread.
14676 (look_up_one_symbol): Flush after debug output.
14677 * server.c (step_thread, server_waiting): New variables.
14678 (start_inferior): Don't use signal_pid. Update call to mywait.
14679 (attach_inferior): Update call to mywait.
14680 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14681 (main): Don't fetch/store registers explicitly. Use
14682 set_desired_inferior. Support proposed ``Hs'' packet. Update
14683 calls to mywait.
14684 * server.h: Update.
14685 (struct inferior_list, struct_inferior_list_entry): New.
14686 * target.c (set_desired_inferior): New.
14687 (write_inferior_memory): Constify.
14688 (mywait): New function.
14689 * target.h: Update.
14690 (struct target_ops): New signal_pid method.
14691 (mywait): Removed macro, added prototype.
14692
14693 * linux-low.h (regset_func): Removed.
14694 (regset_fill_func, regset_store_func): New.
14695 (enum regset_type): New.
14696 (struct regset_info): Add type field. Use new operation types.
14697 (struct linux_target_ops): stop_pc renamed to get_pc.
14698 Add decr_pc_after_break and breakpoint_at.
14699 (get_process, get_thread_proess, get_process_thread)
14700 (strut process_info, all_processes, linux_attach_lwp)
14701 (thread_db_init): New.
14702
14703 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14704 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14705 (the_low_target): Add new members.
14706 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14707 (i386_store_fpxregset): Constify.
14708 (target_regsets): Add new kind identifier.
14709 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14710 (i386_set_pc): Add debugging.
14711 (i386_breakpoint_at): New function.
14712 (the_low_target): Add new members.
14713 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14714 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14715 (mips_breakpoint_at): New.
14716 (the_low_target): Add new members.
14717 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14718 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14719 (the_low_target): Add new members.
14720 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14721 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14722 (the_low_target): Add new members.
14723 * linux-x86-64-low.c (target_regsets): Add new kind
14724 identifier.
14725
147262002-05-15 Daniel Jacobowitz <drow@mvista.com>
14727
14728 From Martin Pool <mbp@samba.org>:
14729 * server.c (gdbserver_usage): New function.
14730 (main): Call it.
14731
147322002-05-14 Daniel Jacobowitz <drow@mvista.com>
14733
14734 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14735 stop_at -> stop_pc.
14736
147372002-05-04 Andrew Cagney <ac131313@redhat.com>
14738
14739 * Makefile.in: Remove obsolete code.
14740
147412002-04-24 Michal Ludvig <mludvig@suse.cz>
14742
14743 * linux-low.c (regsets_fetch_inferior_registers),
14744 (regsets_store_inferior_registers): Removed cast to int from
14745 ptrace() calls.
14746 * regcache.h: Added declaration of struct inferior_info.
14747
147482002-04-20 Daniel Jacobowitz <drow@mvista.com>
14749
14750 * inferiors.c (struct inferior_info): Add regcache_data.
14751 (add_inferior): Call create_register_cache.
14752 (clear_inferiors): Call free_register_cache.
14753 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14754 * regcache.c (struct inferior_regcache_data): New.
14755 (registers): Remove.
14756 (get_regcache): New function.
14757 (create_register_cache, free_register_cache): New functions.
14758 (set_register_cache): Don't initialize the register cache here.
14759 (registers_to_string, registers_from_string, register_data): Call
14760 get_regcache.
14761 * regcache.h: Add prototypes.
14762 * server.h: Likewise.
14763
147642002-04-20 Daniel Jacobowitz <drow@mvista.com>
14765
14766 * mem-break.c: New file.
14767 * mem-break.h: New file.
14768 * Makefile.in: Add mem-break.o rule; update server.h
14769 dependencies.
14770 * inferiors.c (struct inferior_info): Add target_data
14771 member.
14772 (clear_inferiors): Free target_data member if set.
14773 (inferior_target_data, set_inferior_target_data): New functions.
14774 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14775 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14776 * linux-low.c (linux_bp_reinsert): New variable.
14777 (struct inferior_linux_data): New.
14778 (linux_create_inferior): Use set_inferior_target_data.
14779 (linux_attach): Likewise. Call add_inferior.
14780 (linux_wait_for_one_inferior): New function.
14781 (linux_wait): Call it.
14782 (linux_write_memory): Add const.
14783 (initialize_low): Call set_breakpoint_data.
14784 * linux-low.h (struct linux_target_ops): Add breakpoint
14785 handling members.
14786 * server.c (attach_inferior): Remove extra add_inferior
14787 call.
14788 * server.h: Include mem-break.h. Update inferior.c
14789 prototypes.
14790 * target.c (read_inferior_memory)
14791 (write_inferior_memory): New functions.
14792 * target.h (read_inferior_memory)
14793 (write_inferior_memory): Change macros to prototypes.
14794 (struct target_ops): Update comments. Add const to write_memory
14795 definition.
14796
147972002-04-11 Daniel Jacobowitz <drow@mvista.com>
14798
14799 * linux-low.c (usr_store_inferior_registers): Support
14800 registers which are allowed to fail to store.
14801 * linux-low.h (linux_target_ops): Likewise.
14802 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14803 (ppc_cannot_store_register): FPSCR may not be storable.
14804
148052002-04-09 Daniel Jacobowitz <drow@mvista.com>
14806
14807 * server.h: Include <string.h> if HAVE_STRING_H.
14808 * ChangeLog: Correct paths in last ChangeLog entry.
14809
148102002-04-09 Daniel Jacobowitz <drow@mvista.com>
14811
14812 * linux-low.h: Remove obsolete prototypes.
14813 (struct linux_target_ops): New.
14814 (extern the_low_target): New.
14815 * linux-low.c (num_regs, regmap): Remove declarations.
14816 (register_addr): Use the_low_target explicitly.
14817 (fetch_register): Likewise.
14818 (usr_fetch_inferior_registers): Likewise.
14819 (usr_store_inferior_registers): Likewise.
14820 * linux-arm-low.c (num_regs): Remove.
14821 (arm_num_regs): Define.
14822 (arm_regmap): Renamed from regmap, made static.
14823 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14824 made static.
14825 (arm_cannot_store_register): Renamed from cannot_store_register,
14826 made static.
14827 (the_low_target): New.
14828 * linux-i386-low.c (num_regs): Remove.
14829 (i386_num_regs): Define.
14830 (i386_regmap): Renamed from regmap, made static.
14831 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14832 made static.
14833 (i386_cannot_store_register): Renamed from cannot_store_register,
14834 made static.
14835 (the_low_target): New.
14836 * linux-ia64-low.c (num_regs): Remove.
14837 (ia64_num_regs): Define.
14838 (ia64_regmap): Renamed from regmap, made static.
14839 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14840 made static.
14841 (ia64_cannot_store_register): Renamed from cannot_store_register,
14842 made static.
14843 (the_low_target): New.
14844 * linux-m68k-low.c (num_regs): Remove.
14845 (m68k_num_regs): Define.
14846 (m68k_regmap): Renamed from regmap, made static.
14847 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14848 made static.
14849 (m68k_cannot_store_register): Renamed from cannot_store_register,
14850 made static.
14851 (the_low_target): New.
14852 * linux-mips-low.c (num_regs): Remove.
14853 (mips_num_regs): Define.
14854 (mips_regmap): Renamed from regmap, made static.
14855 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14856 made static.
14857 (mips_cannot_store_register): Renamed from cannot_store_register,
14858 made static.
14859 (the_low_target): New.
14860 * linux-ppc-low.c (num_regs): Remove.
14861 (ppc_num_regs): Define.
14862 (ppc_regmap): Renamed from regmap, made static.
14863 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14864 made static.
14865 (ppc_cannot_store_register): Renamed from cannot_store_register,
14866 made static.
14867 (the_low_target): New.
14868 * linux-s390-low.c (num_regs): Remove.
14869 (s390_num_regs): Define.
14870 (s390_regmap): Renamed from regmap, made static.
14871 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14872 made static.
14873 (s390_cannot_store_register): Renamed from cannot_store_register,
14874 made static.
14875 (the_low_target): New.
14876 * linux-sh-low.c (num_regs): Remove.
14877 (sh_num_regs): Define.
14878 (sh_regmap): Renamed from regmap, made static.
14879 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14880 made static.
14881 (sh_cannot_store_register): Renamed from cannot_store_register,
14882 made static.
14883 (the_low_target): New.
14884 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14885 (the_low_target): New.
14886
148872002-04-09 Daniel Jacobowitz <drow@mvista.com>
14888
14889 * Makefile.in: Add stamp-h target.
14890 * configure.in: Create stamp-h.
14891 * configure: Regenerated.
14892
148932002-04-09 Daniel Jacobowitz <drow@mvista.com>
14894
14895 * inferiors.c: New file.
14896 * target.c: New file.
14897 * target.h: New file.
14898 * Makefile.in: Add target.o and inferiors.o. Update
14899 dependencies.
14900 * linux-low.c (inferior_pid): New static variable,
14901 moved from server.c.
14902 (linux_create_inferior): Renamed from create_inferior.
14903 Call add_inferior. Return 0 on success instead of a PID.
14904 (linux_attach): Renamed from myattach.
14905 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14906 (linux_thread_alive): Renamed from mythread_alive.
14907 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14908 child dies.
14909 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14910 (regsets_store_inferior_registers): Correct error message.
14911 Add missing ``return 0''.
14912 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14913 (linux_store_registers): Renamed from store_inferior_registers.
14914 (linux_read_memory): Renamed from read_inferior_memory.
14915 (linux_write_memory): Renamed from write_inferior_memory.
14916 (linux_target_ops): New structure.
14917 (initialize_low): Call set_target_ops ().
14918 * remote-utils.c (unhexify): New function.
14919 (hexify): New function.
14920 (input_interrupt): Send signals to ``signal_pid''.
14921 * server.c (inferior_pid): Remove.
14922 (start_inferior): Update create_inferior call.
14923 (attach_inferior): Call add_inferior.
14924 (handle_query): New function.
14925 (main): Call handle_query for `q' packets.
14926 * server.h: Include "target.h". Remove obsolete prototypes.
14927 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14928
149292002-04-09 Daniel Jacobowitz <drow@mvista.com>
14930
14931 * Makefile.in: Add WARN_CFLAGS. Update configury
14932 dependencies.
14933 * configure.in: Check for <string.h>
14934 * configure: Regenerate.
14935 * config.in: Regenerate.
14936 * gdbreplay.c: Include needed system headers.
14937 (remote_open): Remove strchr prototype.
14938 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14939 * regcache.c (supply_register): Change buf argument to const void *.
14940 (supply_register_by_name): Likewise.
14941 (collect_register): Change buf argument to void *.
14942 (collect_register_by_name): Likewise.
14943 * regcache.h: Add missing prototypes.
14944 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14945 * server.c (handle_query): New function.
14946 (attached): New static variable, moved out of main.
14947 (main): Quiet longjmp clobber warnings.
14948 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14949 * utils.c (error): Remove NORETURN.
14950 (fatal): Likewise.
This page took 1.716422 seconds and 4 git commands to generate.