Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c94fee56
SDJ
12017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * configure: Regenerate.
4
a0ff9e1a
SM
52017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
6
7 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
8 software_single_step change of return type to
9 std::vector<CORE_ADDR>.
10 * linux-low.c (install_software_single_step_breakpoints):
11 Likewise.
12 * linux-low.h (install_software_single_step_breakpoints):
13 Likewise.
14
be628ab8
SDJ
152017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
16
17 * remote-utils.c: Include "gdb_termios.h" instead of
18 "terminal.h".
19 * terminal.h: Delete file.
20
7c5ded6a
SDJ
212017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
22
23 * server.c: Include <vector>.
24 <program_argv, wrapper_argv>: Convert to std::vector.
25 (start_inferior): Rewrite function to use C++.
26 (handle_v_run): Likewise. Update code that calculates the argv
27 based on the vRun packet; use C++.
28 (captured_main): Likewise.
29
436252de
SM
302017-04-06 Simon Marchi <simon.marchi@ericsson.com>
31
32 * server.c (handle_v_cont): Initialize thread_resume::thread
33 with null_ptid.
34
9bf2a700
PA
352017-04-05 Pedro Alves <palves@redhat.com>
36
37 * configure: Regenerate.
38
a121b7c1
PA
392017-04-05 Pedro Alves <palves@redhat.com>
40
41 * gdbreplay.c (sync_error): Constify.
42 * linux-x86-low.c (push_opcode): Constify.
43
21c8a587
PA
442017-04-05 Pedro Alves <palves@redhat.com>
45
46 * win32-low.c (get_child_debug_event)
47 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
48 Report TARGET_WAITKIND_SPURIOUS instead.
49
fb32b4f7
PA
502017-04-05 Pedro Alves <palves@redhat.com>
51
52 * remote-utils.c (remote_prepare, remote_open): Constify.
53 * remote-utils.h (remote_prepare, remote_open): Constify.
54 * server.c (captured_main): Constify 'port' handling.
55
65dd1e59
SM
562017-04-04 Simon Marchi <simon.marchi@ericsson.com>
57
58 * Makefile.in (clean): Clear .deps.
59
8fa5b777
SM
602017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
61
62 * .gitignore: Remove generated files, replace with wildcard.
63 * (clean): Replace removal of generated files with wildcard.
64 (version.c): Replace with...
65 (version-generated.c): ...this.
66 (xml-builtin.c): Replace with...
67 (xml-builtin-generated.c): ...this.
68 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
69 (%.c: *regformats*): Replace with...
70 (%-generated.c: *regformats*): ...this.
71
a12e714b
MF
722017-03-27 Max Filippov <jcmvbkbc@gmail.com>
73
74 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
75 (xtensa_fill_gregset): Call collect_register_by_name for
76 threadptr register.
77 (xtensa_store_gregset): Call supply_register_by_name for
78 threadptr register.
79
1a09b50a
MF
802017-03-27 Max Filippov <jcmvbkbc@gmail.com>
81
82 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
83 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
84 (xtensa_store_gregset): Call supply_register for all registers in
85 a0_regnum..a0_regnum + C0_NREGS range.
86
1a01e7c6
SM
872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
88
89 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
90 (ax-ipa.o: ax.c): Remove.
91 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
92 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
93 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
94 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
95 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
96
36bc18a8
SM
972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
98
99 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
100 (print-utils-ipa.o: ../common/print-utils.c): Remove.
101 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
102 (errors-ipa.o: ../common/errors.c): Remove.
103 (format-ipa.o: ../common/format.c): Remove.
104 (common-utils-ipa.o: ../common/common-utils.c): Remove.
105
a8ebe3d5
SM
1062017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
107
108 * Makefile.in (%-ipa.o: %.c): New rule.
109 (tracepoint-ipa.o: tracepoint.c): Remove.
110 (utils-ipa.o: utils.c): Remove.
111 (remote-utils-ipa.o: remote-utils.c): Remove.
112 (regcache-ipa.o: regcache.c): Remove.
113 (i386-linux-ipa.o: i386-linux.c): Remove.
114 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
115 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
116 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
117 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
118 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
119 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
120 (amd64-linux-ipa.o: amd64-linux.c): Remove.
121 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
122 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
123 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
124 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
125 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
126 (aarch64-ipa.o: aarch64.c): Remove.
127 (s390-linux32-ipa.o: s390-linux32.c): Remove.
128 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
129 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
130 (s390-linux64-ipa.o: s390-linux64.c): Remove.
131 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
132 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
133 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
134 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
135 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
136 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
137 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
138 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
139 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
140 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
141 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
142 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
143 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
144 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
145 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
146 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
147 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
148 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
149 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
150 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
151 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
152 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
153 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
154 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
155 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
156 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
157 (tdesc-ipa.o: tdesc.c): Remove.
158 (x32-linux-ipa.o: x32-linux.c): Remove.
159 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
160 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
161
50cfacb7
SM
1622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
163
164 * Makefile.in (%.o: ../arch/%.c): New rule.
165 (arm.o: ../arch/arm.c): Remove.
166 (arm-linux.o: ../arch/arm-linux.c): Remove.
167 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
168 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
169
c5a22423
SM
1702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
171
172 * Makefile.in (%.o: ../nat/%.c): New rule.
173 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
174 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
175 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
176 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
177 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
178 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
179 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
180 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
181 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
182 (linux-personality.o: ../nat/linux-personality.c): Remove.
183 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
184 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
185 (x86-linux.o: ../nat/x86-linux.c): Remove.
186 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
187 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
188
6bda016b
SM
1892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * Makefile.in (%.o: ../common/%.c): New rule.
192 (signals.o: ../common/signals.c): Remove.
193 (print-utils.o: ../common/print-utils.c): Remove.
194 (rsp-low.o: ../common/rsp-low.c): Remove.
195 (common-utils.o: ../common/common-utils.c): Remove.
196 (posix-strerror.o: ../common/posix-strerror.c): Remove.
197 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
198 (vec.o: ../common/vec.c): Remove.
199 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
200 (xml-utils.o: ../common/xml-utils.c): Remove.
201 (ptid.o: ../common/ptid.c): Remove.
202 (buffer.o: ../common/buffer.c): Remove.
203 (format.o: ../common/format.c): Remove.
204 (filestuff.o: ../common/filestuff.c): Remove.
205 (agent.o: ../common/agent.c): Remove.
206 (errors.o: ../common/errors.c): Remove.
207 (environ.o: ../common/environ.c): Remove.
208 (common-debug.o: ../common/common-debug.c): Remove.
209 (cleanups.o: ../common/cleanups.c): Remove.
210 (common-exceptions.o: ../common/common-exceptions.c): Remove.
211 (fileio.o: ../common/fileio.c): Remove.
212 (common-regcache.o: ../common/common-regcache.c): Remove.
213 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
214 (new-op.o: ../common/new-op.c): Remove.
215 (btrace-common.o: ../common/btrace-common.c): Remove.
216
21122961
SM
2172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
218
219 * Makefile.in (%.o: ../target/%.c): New rule.
220 (waitstatus.o: ../target/waitstatus.c): Remove.
221
c362e621
SM
2222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
223
224 * Makefile.in
225 (%.c: ../regformats/%.dat,
226 (%.c: ../regformats/arm/%.dat,
227 (%.c: ../regformats/i386/%.dat,
228 (%.c: ../regformats/rs6000/%.dat): New rules.
229 (aarch64.c): Remove.
230 (reg-arm.c): Remove.
231 (arm-with-iwmmxt.c): Remove.
232 (arm-with-vfpv2.c): Remove.
233 (arm-with-vfpv3.c): Remove.
234 (arm-with-neon.c): Remove.
235 (reg-bfin.c): Remove.
236 (reg-cris.c): Remove.
237 (reg-crisv32.c): Remove.
238 (i386.c): Remove.
239 (i386-linux.c): Remove.
240 (i386-avx.c): Remove.
241 (i386-avx-linux.c): Remove.
242 (i386-avx-avx512.c): Remove.
243 (i386-avx-avx512-linux.c): Remove.
244 (i386-mpx.c): Remove.
245 (i386-mpx-linux.c): Remove.
246 (i386-avx-mpx-avx512-pku.c): Remove.
247 (i386-avx-mpx-avx512-pku-linux.c): Remove.
248 (i386-avx-mpx.c): Remove.
249 (i386-avx-mpx-linux.c): Remove.
250 (i386-mmx.c): Remove.
251 (i386-mmx-linux.c): Remove.
252 (reg-ia64.c): Remove.
253 (reg-m32r.c): Remove.
254 (reg-m68k.c): Remove.
255 (reg-cf.c): Remove.
256 (mips-linux.c): Remove.
257 (mips-dsp-linux.c): Remove.
258 (mips64-linux.c): Remove.
259 (mips64-dsp-linux.c): Remove.
260 (nios2-linux.c): Remove.
261 (powerpc-32.c): Remove.
262 (powerpc-32l.c): Remove.
263 (powerpc-altivec32l.c): Remove.
264 (powerpc-cell32l.c): Remove.
265 (powerpc-vsx32l.c): Remove.
266 (powerpc-isa205-32l.c): Remove.
267 (powerpc-isa205-altivec32l.c): Remove.
268 (powerpc-isa205-vsx32l.c): Remove.
269 (powerpc-e500l.c): Remove.
270 (powerpc-64l.c): Remove.
271 (powerpc-altivec64l.c): Remove.
272 (powerpc-cell64l.c): Remove.
273 (powerpc-vsx64l.c): Remove.
274 (powerpc-isa205-64l.c): Remove.
275 (powerpc-isa205-altivec64l.c): Remove.
276 (powerpc-isa205-vsx64l.c): Remove.
277 (s390-linux32.c): Remove.
278 (s390-linux32v1.c): Remove.
279 (s390-linux32v2.c): Remove.
280 (s390-linux64.c): Remove.
281 (s390-linux64v1.c): Remove.
282 (s390-linux64v2.c): Remove.
283 (s390-te-linux64.c): Remove.
284 (s390-vx-linux64.c): Remove.
285 (s390-tevx-linux64.c): Remove.
286 (s390x-linux64.c): Remove.
287 (s390x-linux64v1.c): Remove.
288 (s390x-linux64v2.c): Remove.
289 (s390x-te-linux64.c): Remove.
290 (s390x-vx-linux64.c): Remove.
291 (s390x-tevx-linux64.c): Remove.
292 (tic6x-c64xp-linux.c): Remove.
293 (tic6x-c64x-linux.c): Remove.
294 (tic6x-c62x-linux.c): Remove.
295 (reg-sh.c): Remove.
296 (reg-sparc64.c): Remove.
297 (reg-spu.c): Remove.
298 (amd64.c): Remove.
299 (amd64-linux.c): Remove.
300 (amd64-avx.c): Remove.
301 (amd64-avx-linux.c): Remove.
302 (amd64-avx-avx512.c): Remove.
303 (amd64-avx-avx512-linux.c): Remove.
304 (amd64-mpx.c): Remove.
305 (amd64-mpx-linux.c): Remove.
306 (amd64-avx-mpx-avx512-pku.c): Remove.
307 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
308 (amd64-avx-mpx.c): Remove.
309 (amd64-avx-mpx-linux.c): Remove.
310 (x32.c): Remove.
311 (x32-linux.c): Remove.
312 (x32-avx.c): Remove.
313 (x32-avx-linux.c): Remove.
314 (x32-avx-avx512.c): Remove.
315 (x32-avx-avx512-linux.c): Remove.
316 (reg-xtensa.c): Remove.
317 (reg-tilegx.c): Remove.
318 (reg-tilegx32.c): Remove.
319
1672e0d9
SDJ
3202017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
321
322 * Makefile.in (SFILES): Add "common/environ.c".
323 (OBJS): Add "common/environ.h".
324
239b6d10
WT
3252017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
326
327 * configure.ac: Check if the fs_base and gs_base members of
328 `struct user_regs_struct' exist.
329 * config.in: Regenerated.
330 * configure: Likewise.
331
694b382c
AT
3322017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
333
334 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
335 target_read_memory.
336 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
337 (get_next_pcs_syscall_next_pc): Likewise.
338
7dc53023
LM
3392016-12-23 Luis Machado <lgustavo@codesourcery.com>
340
341 * win32-i386-low.c: Fix incorrect reference to a couple source files.
342 * nto-x86-low.c: Likewise.
343
ad02e4fe
SM
3442016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
345
346 * Makefile.in: Include disable-implicit-rules.mk.
347
dcb07cfa
PA
3482016-11-23 Pedro Alves <palves@redhat.com>
349
350 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
351 (debug_vprintf): Use std::chrono::steady_clock instead of
352 gettimeofday. Use '.' instead of ':'.
353 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
354 (get_timestamp): Use std::chrono::steady_clock instead of
355 gettimeofday.
356
8629c02c
SM
3572016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
358
359 * Makefile.in: Fix whitespace formatting.
360
b593ecca
SM
3612016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
362
363 * Makefile.in (SFILES, OBS): Flatten list and order
364 alphabetically.
365
9986ba08
PA
3662016-11-23 Pedro Alves <palves@redhat.com>
367
368 * event-loop.c (handle_file_event): Use warning.
369 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
370 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
371 Use warning.
372
4eefa7bc
PA
3732016-11-23 Pedro Alves <palves@redhat.com>
374
375 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
376 output.
377 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
378 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
379 debug_printf and debug_flush for debug output.
380 * server.c (handle_general_set): Likewise.
381 * thread-db.c (try_thread_db_load): Use debug_printf for debug
382 output.
383
5443506e
SM
3842016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
385
386 * Makefile.in (.c.o): Replace rule with ...
387 (%.o: %.c): ... this one.
388
3b165252
SM
3892016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
390
391 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
392 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
393 make.
394 * configure.ac: Remove checks for the make program.
395 * configure: Re-generate.
396
0bcda685
PA
3972016-10-28 Pedro Alves <palves@redhat.com>
398
399 * Makefile.in (CXX_DIALECT): Get from configure.
400 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
401 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
402 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
403 * config.in: Regenerate.
404 * configure: Regenerate.
405
c3805894
YQ
4062016-10-27 Yao Qi <yao.qi@linaro.org>
407
408 * linux-low.c (linux_supports_range_stepping): Return true if
409 can_software_single_step return true.
410
89342618
YQ
4112016-10-27 Yao Qi <yao.qi@linaro.org>
412
413 * inferiors.c (find_inferior_in_random): New function.
414 * inferiors.h (find_inferior_in_random): Declare.
415 * linux-low.c (linux_wait_for_event_filtered): Call
416 find_inferior_in_random instead of find_inferior.
417
e3652c84
YQ
4182016-10-27 Yao Qi <yao.qi@linaro.org>
419
420 * linux-low.c (linux_wait_1): If single-step breakpoints are
421 inserted, remove them.
422
5a04c4cf
PA
4232016-10-26 Pedro Alves <palves@redhat.com>
424
425 * linux-low.c (handle_extended_wait): Link parent/child fork
426 threads.
427 (linux_wait_1): Unlink them.
428 (linux_set_resume_request): Ignore resume requests for
429 already-resumed and unhandled fork child threads.
430 * linux-low.h (struct lwp_info) <fork_relative>: New field.
431 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
432 New functions.
433 (handle_v_requests) <vCont>: Don't call require_running.
434 * server.h (in_queued_stop_replies): New declaration.
435
cb93dc7f
YQ
4362016-10-24 Yao Qi <yao.qi@linaro.org>
437
438 PR server/20733
439 * linux-aarch64-low.c (append_insns): Cast the return value to
440 'uint32_t *'.
441
a1078bea
YQ
4422016-10-10 Yao Qi <yao.qi@linaro.org>
443
444 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
445
1fb77080
SDJ
4462016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
447
448 * target.c (target_supports_multi_process): New function, moved
449 from...
450 * target.h (target_supports_multi_process): ... here. Remove
451 macro.
452
39b5a3b9
TT
4532016-10-05 Tom Tromey <tom@tromey.com>
454
455 PR remote/20655:
456 * tracepoint.c (handle_tracepoint_bkpts): Check
457 ipa_error_tracepoint, not ipa_stopping_tracepoint.
458
c1d0b70a
YQ
4592016-10-05 Yao Qi <yao.qi@linaro.org>
460
461 * configure.srv: Update the path of arm-*.xml files.
462
0a69eedb
YQ
4632016-10-05 Terry Guo <terry.guo@arm.com>
464 Yao Qi <yao.qi@linaro.org>
465
466 * Makefile.in: Adjust the path of rules.
467 * configure.srv: Update the path of xml files.
468 * regformats/arm-with-iwmmxt.dat: Regenerated.
469 * regformats/arm-with-neon.dat: Likewise.
470 * regformats/arm-with-vfpv2.dat: Likewise.
471 * regformats/arm-with-vfpv3.dat Likewise.
472
17e16485
YQ
4732016-09-30 Yao Qi <yao.qi@linaro.org>
474
475 PR gdbserver/20627
476 * target.c (target_stop_and_wait): Don't call
477 target_continue_no_signal, use resume_stop instead.
478
edeeb602
YQ
4792016-09-26 Yao Qi <yao.qi@linaro.org>
480
481 * linux-low.c (linux_wait_1): Call debug_exit.
482
503b1c39
PA
4832016-09-23 Pedro Alves <palves@redhat.com>
484
485 * Makefile.in (SFILES): Add common/new-op.c.
486 (OBS): Add common/new-op.o.
487 (new-op.o): New rule.
488
74172ecf
SM
4892016-09-21 Simon Marchi <simon.marchi@ericsson.com>
490
491 * .gitinore: Ignore more files.
492
fc6cda2e
YQ
4932016-09-21 Yao Qi <yao.qi@linaro.org>
494
495 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
496 23.
497
bc1e6c81
SDJ
4982016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
499
500 * server.c (start_inferior): Call target_mourn_inferior instead of
501 mourn_inferior; pass ptid_t argument to it.
502 (resume): Likewise.
503 (handle_target_event): Likewise.
504 * target.c (target_mourn_inferior): New function.
505 * target.h (mourn_inferior): Delete macro.
506
0e00e962
AA
5072016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
508
509 * linux-low.c (lwp_is_stepping): New function.
510
1d8cb77d
CL
5112016-09-06 Carl Love <cel@us.ibm.com>
512
513 * server.c (start_inferior): Fixed comment, requested comment change
514 didn't get updated correctly. Removed reference to ptrace () call as
515 it is only true on Linux systems.
516
7313bced
CL
5172016-09-06 Carl Love <cel@us.ibm.com>
518
519 * server.c (start_inferior): Do not call
520 function target_post_create_inferior () if the
521 inferior process has already exited.
522
cf6de44d
PA
5232016-09-05 Pedro Alves <palves@redhat.com>
524
525 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
526 (COMPILE.pre, CC_LD): Use CXX directly.
527 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
528 * acinclude.m4: Don't include build-with-cxx.m4.
529 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
530 * configure: Regenerate.
531
c1da6748
AT
5322016-09-02 Akash Trehan <akash.trehan123@gmail.com>
533
534 PR gdb/19495
535 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
536 call writing data to own_buf.
537
f2b9e3df
SDJ
5382016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
539
540 * target.c (mywait): Call target_wait instead of
541 the_target->wait.
542 (target_wait): New function.
543
049a8570
SDJ
5442016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
545
546 * server.c (start_inferior): New variable 'ptid'. Replace calls
547 to the_target->resume by target_continue{,_no_signal}, depending
548 on the case.
549 * target.c (target_stop_and_wait): Call target_continue_no_signal
550 instead of the_target->resume.
551 (target_continue): New function.
552
3aa5cfa0
AT
5532016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
554
555 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
556
754653a7
AZ
5572016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
558
559 PR server/20491
560 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
561 ps_prochandle.
562 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
563 * linux-arm-low.c (ps_get_thread_area): Likewise.
564 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
565 * linux-m68k-low.c (ps_get_thread_area): Likewise.
566 * linux-mips-low.c (ps_get_thread_area): Likewise.
567 * linux-nios2-low.c (ps_get_thread_area): Likewise.
568 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
569 * linux-x86-low.c (ps_get_thread_area): Likewise.
570 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
571
ed036b40
PA
5722016-08-19 Pedro Alves <palves@redhat.com>
573
574 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
575
c8ef42ee
PA
5762016-08-19 Pedro Alves <palves@redhat.com>
577
578 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
579 comment. Use memcpy instead of casting through unsigned long.
580
9c235a72
PA
5812016-08-19 Pedro Alves <palves@redhat.com>
582
583 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
584 allocating around 0x80000000.
585
201506da
PA
5862016-08-19 Pedro Alves <palves@redhat.com>
587
588 PR gdb/20415
589 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
590 (x32-avx512-linux-ipa.o): New rules.
591 * configure.ac (x86_64-*-linux*): New x32 check.
592 * configure.srv (ipa_x32_linux_regobj): New.
593 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
594 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
595 descriptions.
596 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
597 descriptions.
598 * configure: Regenerate.
599
f348d89a
PA
6002016-08-09 Pedro Alves <palves@redhat.com>
601
602 PR gdb/18653
603 * Makefile.in (OBS): Add signals-state-save-restore.o.
604 (signals-state-save-restore.o): New rule.
605 * config.in: Regenerate.
606 * configure: Regenerate.
607 * linux-low.c: Include "signals-state-save-restore.h".
608 (linux_create_inferior): Call
609 restore_original_signals_state.
610 * server.c: Include "dispositions-save-restore.h".
611 (captured_main): Call save_original_signals_state.
612
1baf5149
PA
6132016-08-05 Pedro Alves <palves@redhat.com>
614
615 * configure: Regenerate.
616
fcd4a73d
YQ
6172016-08-04 Yao Qi <yao.qi@linaro.org>
618
619 * linux-low.c (regsets_fetch_inferior_registers): Check
620 errno is ESRCH or not.
621
979659d0
YQ
6222016-08-02 Yao Qi <yao.qi@linaro.org>
623
624 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
625 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
626 (thread_db_load_search): Update.
627 (try_thread_db_load_1): Don't look for td_ta_event_addr,
628 td_ta_set_event and td_ta_event_getmsg.
629
6598661d
PA
6302016-07-26 Pedro Alves <palves@redhat.com>
631
632 PR server/20414
633 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
634 of unsigned long for 64-bit registers and use uint32_t instead of
635 unsigned int for 32-bit registers.
636
9cf12d57
PA
6372016-07-26 Pedro Alves <palves@redhat.com>
638
639 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
640 to 'ptrace'.
641
305450ed
TT
6422016-07-21 Tom Tromey <tom@tromey.com>
643
644 * configure: Rebuild.
645
2583da7c
YQ
6462016-07-21 Yao Qi <yao.qi@linaro.org>
647
648 * mem-break.c (find_gdb_breakpoint): Cast bp to
649 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
650
21536b36
YQ
6512016-07-21 Yao Qi <yao.qi@linaro.org>
652
653 * server.c (handle_v_requests): Support s and S actions
654 if target_supports_software_single_step return true.
655
8901d193
YQ
6562016-07-21 Yao Qi <yao.qi@linaro.org>
657
658 * linux-low.c (resume_stopped_resumed_lwps): If resume request
659 is resume_step, call maybe_hw_step.
660 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
661 and unstop them.
662 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
663 breakpoints or not.
664 (proceed_one_lwp): If resume request is resume_step, install
665 reinsert breakpoints and call maybe_hw_step.
666
0e9a339e
YQ
6672016-07-21 Yao Qi <yao.qi@linaro.org>
668
669 * linux-low.c (proceed_one_lwp): Declare.
670 (linux_resume_one_thread): Remove local variable 'step'.
671 Lift code enqueue signal. Call proceed_one_lwp instead of
672 linux_resume_one_lwp.
673
4281b351
YQ
6742016-07-21 Yao Qi <yao.qi@linaro.org>
675
676 * linux-low.c (linux_resume_one_thread): Call
677 enqueue_pending_signal.
678
984a2c04
YQ
6792016-07-21 Yao Qi <yao.qi@linaro.org>
680
681 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
682 * inferiors.c (do_restore_current_thread_cleanup): New function.
683 (make_cleanup_restore_current_thread): Likewise.
684 * linux-low.c (install_software_single_step_breakpoints): Call
685 make_cleanup_restore_current_thread. Switch current_thread to
686 thread.
687
bec903c9
YQ
6882016-07-21 Yao Qi <yao.qi@linaro.org>
689
690 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
691 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
692 (clone_one_breakpoint): Likewise.
693 (delete_reinsert_breakpoints): Change parameter to thread.
694 Callers updated.
695 (has_reinsert_breakpoints): Likewise.
696 (uninsert_reinsert_breakpoints): Likewise.
697 (reinsert_reinsert_breakpoints): Likewise.
698 * mem-break.h (set_reinsert_breakpoint): Update declaration.
699 (delete_reinsert_breakpoints): Likewise.
700 (reinsert_reinsert_breakpoints): Likewise.
701 (uninsert_reinsert_breakpoints): Likewise.
702 (has_reinsert_breakpoints): Likewise.
703
63c40ec7
YQ
7042016-07-21 Yao Qi <yao.qi@linaro.org>
705
706 * inferiors.c (get_thread_process): Make parameter const.
707 * inferiors.h (get_thread_process): Update declaration.
708 * mem-break.c (clone_all_breakpoints): Remove all parameters.
709 Add new parameters child_thread and parent_thread. Callers
710 updated.
711 * mem-break.h (clone_all_breakpoints): Update declaration.
712
9aa76cd0
YQ
7132016-07-21 Yao Qi <yao.qi@linaro.org>
714
715 * mem-break.c (struct breakpoint) <cond_list>: Remove.
716 <command_list, handler>: Remove.
717 (struct gdb_breakpoint): New.
718 (struct other_breakpoint): New.
719 (struct reinsert_breakpoint): New.
720 (is_gdb_breakpoint): New function.
721 (any_persistent_commands): Update command_list if
722 is_gdb_breakpoint returns true.
723 (set_breakpoint): Create breakpoints according to their types.
724 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
725 (set_gdb_breakpoint_1): Likewise.
726 (set_gdb_breakpoint): Likewise.
727 (clear_breakpoint_conditions): Change parameter type to
728 'struct gdb_breakpoint *'.
729 (clear_breakpoint_commands): Likewise.
730 (clear_breakpoint_conditions_and_commands): Likewise.
731 (add_condition_to_breakpoint): Likewise.
732 (add_breakpoint_condition): Likewise.
733 (add_commands_to_breakpoint): Likewise.
734 (check_breakpoints): Check other_breakpoint.
735 (clone_one_breakpoint): Clone breakpopint according to its type.
736 * mem-break.h (struct gdb_breakpoint): Declare.
737 (set_gdb_breakpoint): Update declaration.
738 (clear_breakpoint_conditions_and_commands): Likewise.
739 (add_breakpoint_condition): Likewise.
740 (add_breakpoint_commands): Likewise.
741 * server.c (process_point_options): Change parameter type to
742 'struct gdb_breakpoint *'.
743
811f8301
YQ
7442016-07-21 Yao Qi <yao.qi@linaro.org>
745
746 * mem-break.c (set_breakpoint_at): Rename it to ...
747 (set_breakpoint_type_at): ... it.
748 (set_breakpoint_at): Call set_breakpoint_type_at.
749 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
750 * mem-break.h (set_breakpoint_at): Update comments.
751
b1c51e36
CLT
7522016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
753
754 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
755 to buf parameter.
756 (nios2_store_gregset): Likewise.
757
ced2dffb
PA
7582016-07-01 Pedro Alves <palves@redhat.com>
759 Antoine Tremblay <antoine.tremblay@ericsson.com>
760
761 * linux-low.c: Change interface to take the target lwp_info
762 pointer directly and return void. Handle detaching from a zombie
763 thread.
764 (linux_detach_lwp_callback): New function.
765 (linux_detach): Detach from the leader thread after detaching from
766 the clone threads.
767
2ac09a5b
YQ
7682016-06-28 Yao Qi <yao.qi@linaro.org>
769
770 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
771 for variable new_offset.
772 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
773 (aarch64_ftrace_insn_reloc_cb): Likewise.
774 (aarch64_ftrace_insn_reloc_tb): Likewise.
775 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
776 PRIx64 instead of PRIx32.
777
79e7fd4f
YQ
7782016-06-28 Yao Qi <yao.qi@linaro.org>
779
780 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
781 (the_low_target): Install arm_get_syscall_trapinfo.
782
061fc021
YQ
7832016-06-28 Yao Qi <yao.qi@linaro.org>
784
785 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
786 function.
787 (the_low_target): Install aarch64_get_syscall_trapinfo.
788
4cc32bec
YQ
7892016-06-28 Yao Qi <yao.qi@linaro.org>
790
791 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
792 Callers updated.
793 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
794 Remove parameter sysno.
795 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
796 sysret.
797
782c1122
AA
7982016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
799
800 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
801 (s390_emit_ne_goto): Likewise.
802 (s390_emit_lt_goto): Likewise.
803 (s390_emit_le_goto): Likewise.
804 (s390_emit_gt_goto): Likewise.
805 (s390_emit_ge_goto): Likewise.
806 (s390x_emit_eq_goto): Likewise.
807 (s390x_emit_ne_goto): Likewise.
808 (s390x_emit_lt_goto): Likewise.
809 (s390x_emit_le_goto): Likewise.
810 (s390x_emit_gt_goto): Likewise.
811 (s390x_emit_ge_goto): Likewise.
812 (s390_emit_ops_impl): Mark variable static.
813 (s390x_emit_ops): Likewise.
814
2e7b624b
YQ
8152016-06-17 Yao Qi <yao.qi@linaro.org>
816
817 * linux-low.c (handle_extended_wait): Call
818 uninsert_reinsert_breakpoints for the parent process. Remove
819 reinsert breakpoints from the child process. Reinsert them to
820 the parent process when vfork is done.
821 * mem-break.c (uninsert_reinsert_breakpoints): New function.
822 (reinsert_reinsert_breakpoints): New function.
823 * mem-break.h (uninsert_reinsert_breakpoints): Declare
824 (reinsert_reinsert_breakpoints): Declare.
825
8a81c5d7
YQ
8262016-06-17 Yao Qi <yao.qi@linaro.org>
827
828 * linux-low.c (handle_extended_wait): If the parent is doing
829 step-over, remove the reinsert breakpoints from the forked child.
830
f50bf8e5
YQ
8312016-06-17 Yao Qi <yao.qi@linaro.org>
832
833 * linux-low.c (unsuspend_all_lwps): Declare.
834 (linux_low_filter_event): If thread exited, call finish_step_over.
835 If step-over is finished, unsuspend other threads.
836
8376a3cb
YQ
8372016-06-17 Yao Qi <yao.qi@linaro.org>
838
839 * linux-low.c (linux_resume_one_lwp_throw): Assert
840 has_reinsert_breakpoints returns false.
841 * mem-break.c (delete_disabled_breakpoints): Assert
842 bp type isn't reinsert_breakpoint.
843
f79b145d
YQ
8442016-06-17 Yao Qi <yao.qi@linaro.org>
845
846 * linux-low.c (maybe_hw_step): New function.
847 (linux_resume_one_lwp_throw): Call maybe_hw_step.
848 (finish_step_over): Switch current_thread to lwp temporarily,
849 and assert has_reinsert_breakpoints returns true.
850 (proceed_one_lwp): Call maybe_hw_step.
851 * mem-break.c (has_reinsert_breakpoints): New function.
852 * mem-break.h (has_reinsert_breakpoints): Declare.
853
0ae534d2
JT
8542016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
855
856 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
857
fcdad592
YQ
8582016-05-17 Yao Qi <yao.qi@linaro.org>
859
860 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
861 instead of find_inferior.
862
9e784964
YQ
8632016-05-05 Yao Qi <yao.qi@linaro.org>
864
865 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
866 Initialize res to zero.
867
cf2ebb6e
YQ
8682016-05-05 Yao Qi <yao.qi@linaro.org>
869
870 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
871 to uint32_t.
872
c1aebf87
UW
8732016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
874
875 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
876 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
877 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
878
35fd2deb 8792016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 880 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
881
882 * tracepoint.c (write_inferior_int8): New function.
883 (cmd_qtenable_disable): Write enable flag using
884 write_inferior_int8.
885
484b3c32
YQ
8862016-04-25 Yao Qi <yao.qi@linaro.org>
887
888 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
889 (need_step_over_p): Return zero if the LWP has pending signals
890 can be delivered on software single step target.
891
85ba7d86
YQ
8922016-04-25 Yao Qi <yao.qi@linaro.org>
893
894 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
895 return instead of error.
896
3539aa13
YQ
8972016-04-22 Yao Qi <yao.qi@linaro.org>
898
899 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
900 to 23.
901
5b061e98
YQ
9022016-04-22 Yao Qi <yao.qi@linaro.org>
903
904 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
905 signal when stepping over breakpoint with software single
906 step.
907
3451269c
PA
9082016-04-21 Pedro Alves <palves@redhat.com>
909
910 * linux-s390-low.c (s390_collect_ptrace_register)
911 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
912 add casts.
913 (s390_check_regset): Use void * instead of gdb_byte *.
914
a2358508
PA
9152016-04-20 Pedro Alves <palves@redhat.com>
916
917 * configure: Renegerate.
918
6885166d
YQ
9192016-04-20 Yao Qi <yao.qi@linaro.org>
920
921 * linux-aarch32-low.c: Include "arch/arm-linux.h".
922 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
923 number 16.
924 (arm_store_gregset): Likewise.
925
2b863f51
WT
9262016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
927
928 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
929 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
930 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
931 (amd64-avx-mpx-linux.c): New rules.
932 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
933 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
934 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
935 (srv_amd64_regobj): Add amd64-avx-mpx.o.
936 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
937 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
938 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
939 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
940 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
941 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
942 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
943 * linux-x86-low.c (x86_linux_read_description): Add case for
944 X86_XSTATE_AVX_MPX_MASK.
945 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
946 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
947 init_registers_i386_avx_mpx_linux.
948 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
949 (initialize_low_tracepoint): Call
950 init_registers_i386_avx_mpx_linux.
951 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
952 (initialize_low_tracepoint): Call
953 init_registers_amd64_avx_mpx_linux.
954 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
955 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
956 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
957 declarations.
958
9b30624b
PA
9592016-04-18 Pedro Alves <palves@redhat.com>
960
961 * configure: Regenerate.
962
45e3745e
AT
9632016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
964
965 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
966 (aarch64_emit_sub): Likewise.
967
2afc13ff
PA
9682016-04-12 Pedro Alves <palves@redhat.com>
969
970 * utils.c (prepare_to_throw_exception): Delete.
971
6e774b13
SM
9722016-04-05 Simon Marchi <simon.marchi@ericsson.com>
973
974 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
975
4dca19f8
MK
9762016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
977
978 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
979
d0a9981f
MK
9802016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
981
982 * linux-aarch64-ipa.c: Add <elf.h> include.
983 * linux-ppc-ipa.c: Add <elf.h> include.
984 * linux-s390-ipa.c: Add <elf.h> include.
985
252db07e
MK
9862016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
987
988 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
989 (get_raw_reg_ptr): Likewise.
990 (get_trace_state_variable_value_ptr): Likewise.
991 (set_trace_state_variable_value_ptr): Likewise.
992 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
993 char *.
994
14e2b6d9
MK
9952016-03-31 Wei-cheng Wang <cole945@gmail.com>
996 Marcin Kościelnicki <koriakin@0x04.net>
997
998 PR/17221
999 * linux-ppc-low.c (emit_insns): New function.
1000 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1001 (ppc_emit_prologue): New function.
1002 (ppc_emit_epilogue): New function.
1003 (ppc_emit_add): New function.
1004 (ppc_emit_sub): New function.
1005 (ppc_emit_mul): New function.
1006 (ppc_emit_lsh): New function.
1007 (ppc_emit_rsh_signed): New function.
1008 (ppc_emit_rsh_unsigned): New function.
1009 (ppc_emit_ext): New function.
1010 (ppc_emit_zero_ext): New function.
1011 (ppc_emit_log_not): New function.
1012 (ppc_emit_bit_and): New function.
1013 (ppc_emit_bit_or): New function.
1014 (ppc_emit_bit_xor): New function.
1015 (ppc_emit_bit_not): New function.
1016 (ppc_emit_equal): New function.
1017 (ppc_emit_less_signed): New function.
1018 (ppc_emit_less_unsigned): New function.
1019 (ppc_emit_ref): New function.
1020 (ppc_emit_const): New function.
1021 (ppc_emit_reg): New function.
1022 (ppc_emit_pop): New function.
1023 (ppc_emit_stack_flush): New function.
1024 (ppc_emit_swap): New function.
1025 (ppc_emit_stack_adjust): New function.
1026 (ppc_emit_call): New function.
1027 (ppc_emit_int_call_1): New function.
1028 (ppc_emit_void_call_2): New function.
1029 (ppc_emit_if_goto): New function.
1030 (ppc_emit_goto): New function.
1031 (ppc_emit_eq_goto): New function.
1032 (ppc_emit_ne_goto): New function.
1033 (ppc_emit_lt_goto): New function.
1034 (ppc_emit_le_goto): New function.
1035 (ppc_emit_gt_goto): New function.
1036 (ppc_emit_ge_goto): New function.
1037 (ppc_write_goto_address): New function.
1038 (ppc_emit_ops_impl): New static variable.
1039 (ppc64v1_emit_prologue): New function.
1040 (ppc64v2_emit_prologue): New function.
1041 (ppc64_emit_epilogue): New function.
1042 (ppc64_emit_add): New function.
1043 (ppc64_emit_sub): New function.
1044 (ppc64_emit_mul): New function.
1045 (ppc64_emit_lsh): New function.
1046 (ppc64_emit_rsh_signed): New function.
1047 (ppc64_emit_rsh_unsigned): New function.
1048 (ppc64_emit_ext): New function.
1049 (ppc64_emit_zero_ext): New function.
1050 (ppc64_emit_log_not): New function.
1051 (ppc64_emit_bit_and): New function.
1052 (ppc64_emit_bit_or): New function.
1053 (ppc64_emit_bit_xor): New function.
1054 (ppc64_emit_bit_not): New function.
1055 (ppc64_emit_equal): New function.
1056 (ppc64_emit_less_signed): New function.
1057 (ppc64_emit_less_unsigned): New function.
1058 (ppc64_emit_ref): New function.
1059 (ppc64_emit_const): New function.
1060 (ppc64v1_emit_reg): New function.
1061 (ppc64v2_emit_reg): New function.
1062 (ppc64_emit_pop): New function.
1063 (ppc64_emit_stack_flush): New function.
1064 (ppc64_emit_swap): New function.
1065 (ppc64v1_emit_call): New function.
1066 (ppc64v2_emit_call): New function.
1067 (ppc64v1_emit_int_call_1): New function.
1068 (ppc64v2_emit_int_call_1): New function.
1069 (ppc64v1_emit_void_call_2): New function.
1070 (ppc64v2_emit_void_call_2): New function.
1071 (ppc64_emit_if_goto): New function.
1072 (ppc64_emit_eq_goto): New function.
1073 (ppc64_emit_ne_goto): New function.
1074 (ppc64_emit_lt_goto): New function.
1075 (ppc64_emit_le_goto): New function.
1076 (ppc64_emit_gt_goto): New function.
1077 (ppc64_emit_ge_goto): New function.
1078 (ppc64v1_emit_ops_impl): New static variable.
1079 (ppc64v2_emit_ops_impl): New static variable.
1080 (ppc_emit_ops): New function.
1081 (linux_low_target): Wire in ppc_emit_ops.
1082
a2174ba4
MK
10832016-03-31 Wei-cheng Wang <cole945@gmail.com>
1084 Marcin Kościelnicki <koriakin@0x04.net>
1085
1086 PR/17221
1087 * Makefile.in: Add powerpc-*-ipa.o
1088 * configure.srv: Add ipa_obj for powerpc*-linux.
1089 * linux-ppc-ipa.c: New file.
1090 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1091 includes.
1092 (PPC_FIELD): New macro.
1093 (PPC_SEXT): New macro.
1094 (PPC_OP6): New macro.
1095 (PPC_BO): New macro.
1096 (PPC_LI): New macro.
1097 (PPC_BD): New macro.
1098 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1099 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1100 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1101 (ppc_get_thread_area): New function.
1102 (is_elfv2_inferior): New function.
1103 (gen_ds_form): New function.
1104 (GEN_STD): New macro.
1105 (GEN_STDU): New macro.
1106 (GEN_LD): New macro.
1107 (GEN_LDU): New macro.
1108 (gen_d_form): New function.
1109 (GEN_ADDI): New macro.
1110 (GEN_ADDIS): New macro.
1111 (GEN_LI): New macro.
1112 (GEN_LIS): New macro.
1113 (GEN_ORI): New macro.
1114 (GEN_ORIS): New macro.
1115 (GEN_LWZ): New macro.
1116 (GEN_STW): New macro.
1117 (GEN_STWU): New macro.
1118 (gen_xfx_form): New function.
1119 (GEN_MFSPR): New macro.
1120 (GEN_MTSPR): New macro.
1121 (GEN_MFCR): New macro.
1122 (GEN_MTCR): New macro.
1123 (GEN_SYNC): New macro.
1124 (GEN_LWSYNC): New macro.
1125 (gen_x_form): New function.
1126 (GEN_OR): New macro.
1127 (GEN_MR): New macro.
1128 (GEN_LWARX): New macro.
1129 (GEN_STWCX): New macro.
1130 (GEN_CMPW): New macro.
1131 (gen_md_form): New function.
1132 (GEN_RLDICL): New macro.
1133 (GEN_RLDICR): New macro.
1134 (gen_i_form): New function.
1135 (GEN_B): New macro.
1136 (GEN_BL): New macro.
1137 (gen_b_form): New function.
1138 (GEN_BNE): New macro.
1139 (GEN_LOAD): New macro.
1140 (GEN_STORE): New macro.
1141 (gen_limm): New function.
1142 (gen_atomic_xchg): New function.
1143 (gen_call): New function.
1144 (ppc_relocate_instruction): New function.
1145 (ppc_install_fast_tracepoint_jump_pad): New function.
1146 (ppc_get_min_fast_tracepoint_insn_len): New function.
1147 (ppc_get_ipa_tdesc_idx): New function.
1148 (the_low_target): Wire in the new functions.
1149 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1150 tdescs.
1151 * linux-ppc-tdesc.h: New file.
1152
a13c4696
MK
11532016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1154
1155 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1156 (alloc_jump_pad_buffer): New function.
1157 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1158 (alloc_jump_pad_buffer): New function.
1159 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1160 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1161 (alloc_jump_pad_buffer): New function.
1162 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1163 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1164 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1165 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1166
1cda1512
MK
11672016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1168
1169 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1170 * linux-amd64-ipa.c: Likewise.
1171 * linux-i386-ipa.c: Likewise.
1172 * linux-s390-ipa.c: Likewise.
1173 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1174 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1175 set_trace_state_variable_value_ptr.
1176 (struct ipa_sym_addresses): Likewise.
1177 (symbol_list): Likewise.
1178 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1179 accessing gdb_collect directly.
1180 (gdb_collect_ptr_type): New typedef.
1181 (get_raw_reg_ptr_type): New typedef.
1182 (get_trace_state_variable_value_ptr_type): New typedef.
1183 (set_trace_state_variable_value_ptr_type): New typedef.
1184 (gdb_collect_ptr): New global.
1185 (get_raw_reg_ptr): New global.
1186 (get_trace_state_variable_value_ptr): New global.
1187 (set_trace_state_variable_value_ptr): New global.
1188 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1189 accessing get_raw_reg directly.
1190 (get_get_tsv_func_addr): Likewise for
1191 get_trace_state_variable_value_ptr.
1192 (get_set_tsv_func_addr): Likewise for
1193 set_trace_state_variable_value_ptr.
1194 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1195
72fb5488
SM
11962016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1197
1198 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1199
28170b88
MK
12002016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1201
1202 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1203 packets.
1204 (relocate_instruction): Remove own_buf.
1205 * server.c (own_buf): Make global.
1206 (handle_v_requests): Make global.
1207 * server.h (own_buf): New declaration.
1208 (handle_v_requests): New prototype.
1209
f39e8743
MK
12102016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1211
1212 PR 18377
1213 * linux-s390-low.c (add_insns): New function.
1214 (s390_emit_prologue): New function.
1215 (s390_emit_epilogue): New function.
1216 (s390_emit_add): New function.
1217 (s390_emit_sub): New function.
1218 (s390_emit_mul): New function.
1219 (s390_emit_lsh): New function.
1220 (s390_emit_rsh_signed): New function.
1221 (s390_emit_rsh_unsigned): New function.
1222 (s390_emit_ext): New function.
1223 (s390_emit_log_not): New function.
1224 (s390_emit_bit_and): New function.
1225 (s390_emit_bit_or): New function.
1226 (s390_emit_bit_xor): New function.
1227 (s390_emit_bit_not): New function.
1228 (s390_emit_equal): New function.
1229 (s390_emit_less_signed): New function.
1230 (s390_emit_less_unsigned): New function.
1231 (s390_emit_ref): New function.
1232 (s390_emit_if_goto): New function.
1233 (s390_emit_goto): New function.
1234 (s390_write_goto_address): New function.
1235 (s390_emit_litpool): New function.
1236 (s390_emit_const): New function.
1237 (s390_emit_call): New function.
1238 (s390_emit_reg): New function.
1239 (s390_emit_pop): New function.
1240 (s390_emit_stack_flush): New function.
1241 (s390_emit_zero_ext): New function.
1242 (s390_emit_swap): New function.
1243 (s390_emit_stack_adjust): New function.
1244 (s390_emit_set_r2): New function.
1245 (s390_emit_int_call_1): New function.
1246 (s390_emit_void_call_2): New function.
1247 (s390_emit_eq_goto): New function.
1248 (s390_emit_ne_goto): New function.
1249 (s390_emit_lt_goto): New function.
1250 (s390_emit_le_goto): New function.
1251 (s390_emit_gt_goto): New function.
1252 (s390_emit_ge_goto): New function.
1253 (s390x_emit_prologue): New function.
1254 (s390x_emit_epilogue): New function.
1255 (s390x_emit_add): New function.
1256 (s390x_emit_sub): New function.
1257 (s390x_emit_mul): New function.
1258 (s390x_emit_lsh): New function.
1259 (s390x_emit_rsh_signed): New function.
1260 (s390x_emit_rsh_unsigned): New function.
1261 (s390x_emit_ext): New function.
1262 (s390x_emit_log_not): New function.
1263 (s390x_emit_bit_and): New function.
1264 (s390x_emit_bit_or): New function.
1265 (s390x_emit_bit_xor): New function.
1266 (s390x_emit_bit_not): New function.
1267 (s390x_emit_equal): New function.
1268 (s390x_emit_less_signed): New function.
1269 (s390x_emit_less_unsigned): New function.
1270 (s390x_emit_ref): New function.
1271 (s390x_emit_if_goto): New function.
1272 (s390x_emit_const): New function.
1273 (s390x_emit_call): New function.
1274 (s390x_emit_reg): New function.
1275 (s390x_emit_pop): New function.
1276 (s390x_emit_stack_flush): New function.
1277 (s390x_emit_zero_ext): New function.
1278 (s390x_emit_swap): New function.
1279 (s390x_emit_stack_adjust): New function.
1280 (s390x_emit_int_call_1): New function.
1281 (s390x_emit_void_call_2): New function.
1282 (s390x_emit_eq_goto): New function.
1283 (s390x_emit_ne_goto): New function.
1284 (s390x_emit_lt_goto): New function.
1285 (s390x_emit_le_goto): New function.
1286 (s390x_emit_gt_goto): New function.
1287 (s390x_emit_ge_goto): New function.
1288 (s390_emit_ops): New function.
1289 (struct linux_target_ops): Fill in emit_ops hook.
1290
abd9baf9
MK
12912016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1292
1293 PR 18377
1294 * Makefile.in: Add s390 IPA files.
1295 * configure.srv: Build IPA for s390.
1296 * linux-s390-ipa.c: New file.
1297 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1298 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1299 (tdesc_s390_linux32): Likewise.
1300 (init_registers_s390_linux32v1): Likewise.
1301 (tdesc_s390_linux32v1): Likewise.
1302 (init_registers_s390_linux32v2): Likewise.
1303 (tdesc_s390_linux32v2): Likewise.
1304 (init_registers_s390_linux64): Likewise.
1305 (tdesc_s390_linux64): Likewise.
1306 (init_registers_s390_linux64v1): Likewise.
1307 (tdesc_s390_linux64v1): Likewise.
1308 (init_registers_s390_linux64v2): Likewise.
1309 (tdesc_s390_linux64v2): Likewise.
1310 (init_registers_s390_te_linux64): Likewise.
1311 (tdesc_s390_te_linux64): Likewise.
1312 (init_registers_s390_vx_linux64): Likewise.
1313 (tdesc_s390_vx_linux64): Likewise.
1314 (init_registers_s390_tevx_linux64): Likewise.
1315 (tdesc_s390_tevx_linux64): Likewise.
1316 (init_registers_s390x_linux64): Likewise.
1317 (tdesc_s390x_linux64): Likewise.
1318 (init_registers_s390x_linux64v1): Likewise.
1319 (tdesc_s390x_linux64v1): Likewise.
1320 (init_registers_s390x_linux64v2): Likewise.
1321 (tdesc_s390x_linux64v2): Likewise.
1322 (init_registers_s390x_te_linux64): Likewise.
1323 (tdesc_s390x_te_linux64): Likewise.
1324 (init_registers_s390x_vx_linux64): Likewise.
1325 (tdesc_s390x_vx_linux64): Likewise.
1326 (init_registers_s390x_tevx_linux64): Likewise.
1327 (tdesc_s390x_tevx_linux64): Likewise.
1328 (have_hwcap_s390_vx): New static variable.
1329 (s390_arch_setup): Fill have_hwcap_s390_vx.
1330 (s390_get_thread_area): New function.
1331 (s390_ft_entry_gpr_esa): New const.
1332 (s390_ft_entry_gpr_zarch): New const.
1333 (s390_ft_entry_misc): New const.
1334 (s390_ft_entry_fr): New const.
1335 (s390_ft_entry_vr): New const.
1336 (s390_ft_main_31): New const.
1337 (s390_ft_main_64): New const.
1338 (s390_ft_exit_fr): New const.
1339 (s390_ft_exit_vr): New const.
1340 (s390_ft_exit_misc): New const.
1341 (s390_ft_exit_gpr_esa): New const.
1342 (s390_ft_exit_gpr_zarch): New const.
1343 (append_insns): New function.
1344 (s390_relocate_instruction): New function.
1345 (s390_install_fast_tracepoint_jump_pad): New function.
1346 (s390_get_min_fast_tracepoint_insn_len): New function.
1347 (s390_get_ipa_tdesc_idx): New function.
1348 (struct linux_target_ops): Wire in the above functions.
1349 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1350 * linux-s390-tdesc.h: New file.
1351
a4105d04
MK
13522016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1353
1354 * linux-s390-low.c (s390_supports_tracepoints): New function.
1355 (struct linux_target_ops): Fill supports_tracepoints hook.
1356
35ac8b3e
YQ
13572016-03-18 Yao Qi <yao.qi@linaro.org>
1358
1359 * linux-low.c (lwp_signal_can_be_delivered): New function.
1360 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1361
94610ec4
YQ
13622016-03-18 Yao Qi <yao.qi@linaro.org>
1363
1364 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1365 0 if signal is enqueued. Remove 'signal' from one debugging
1366 message. Move one debugging message to some lines below.
1367 Remove code setting 'signal' to 0.
1368
80aea927
YQ
13692016-03-18 Yao Qi <yao.qi@linaro.org>
1370
1371 * linux-low.c (linux_low_filter_event): Remove redundant
1372 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1373
b04fd3be
MK
13742016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1375
1376 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1377 (struct linux_target_ops): Wire in the above.
1378
c40c8d4b
YQ
13792016-03-03 Yao Qi <yao.qi@linaro.org>
1380
1381 * linux-low.c: Update comments to start_step_over.
1382
0f8288ae
YQ
13832016-03-03 Yao Qi <yao.qi@linaro.org>
1384
1385 PR server/19736
1386 * linux-low.c (handle_extended_wait): Set child suspended
1387 if event_lwp->bp_reinsert isn't zero.
1388
fdbd04a8
YQ
13892016-03-02 Yao Qi <yao.qi@linaro.org>
1390
1391 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1392 enqueue_pending_signal.
1393
6896a8fa
MK
13942016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1395
1396 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1397 is actually loaded.
1398
ab503087
MK
13992016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1400
1401 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1402 (s390_regmap_3264) [!__s390x__]: New global.
1403 (s390_collect_ptrace_register): Skip map entries containing -1.
1404 (s390_supply_ptrace_register): Ditto.
1405 (s390_fill_gprs_high): New function.
1406 (s390_store_gprs_high): New function.
1407 (s390_regsets): Add NT_S390_HIGH_GPRS.
1408 (s390_get_hwcap): Enable on 31-bit.
1409 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1410 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1411 Detect NT_S390_HIGH_GPRS.
1412 (s390_usrregs_info_3264): Enable on 31-bit.
1413 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1414 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1415
ae91f625
MK
14162016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1417
1418 PR gdb/13808
1419 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1420 * configure.srv: Ditto.
1421 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1422 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1423 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1424 (init_registers_amd64_linux): Remove prototype.
1425 (tdesc_amd64_linux): Remove declaration.
1426 (get_ipa_tdesc): New function.
1427 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1428 initialize remaining tdescs.
1429 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1430 (init_registers_i386_linux): Remove prototype.
1431 (tdesc_i386_linux): Remove declaration.
1432 (get_ipa_tdesc): New function.
1433 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1434 initialize remaining tdescs.
1435 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1436 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1437 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1438 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1439 (x86_get_ipa_tdesc_idx): New function.
1440 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1441 * linux-x86-tdesc.h: New file.
1442 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1443 (target_get_ipa_tdesc_idx): New macro.
1444 * tracepoint.c (ipa_tdesc_idx): New macro.
1445 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1446 (symbol_list): Add ipa_tdesc_idx.
1447 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1448 (ipa_tdesc): Remove.
1449 (ipa_tdesc_idx): New variable.
1450 (get_context_regcache): Use get_ipa_tdesc.
1451 (gdb_collect): Ditto.
1452 (gdb_probe): Ditto.
1453 * tracepoint.h (get_ipa_tdesc): New prototype.
1454 (ipa_tdesc): Remove.
1455
e7ad2f14
PA
14562016-02-24 Pedro Alves <palves@redhat.com>
1457
1458 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1459 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1460 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1461 Factor out common code between the USE_SIGTRAP_SIGINFO and
1462 !USE_SIGTRAP_SIGINFO blocks.
1463 (linux_low_filter_event): Call save_stop_reason instead of
1464 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1465 Update comments.
1466 (linux_wait_1): Update comments.
1467
657f9cde
WW
14682016-02-24 Wei-cheng Wang <cole945@gmail.com>
1469
1470 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1471 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1472 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1473 ppc_insert_point, ppc_remove_point.
1474
b00b61e1
MK
14752016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1476
1477 * linux-s390-low.c (s390_supports_z_point_type): New function.
1478 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1479
553cb527
YQ
14802016-02-16 Yao Qi <yao.qi@linaro.org>
1481
1482 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1483 PC. Get pc from regcache_read_pc.
1484
a5652c21
YQ
14852016-02-12 Yao Qi <yao.qi@linaro.org>
1486
1487 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1488 or linux_get_pc_32bit.
1489 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1490
ed443b61
YQ
14912016-02-12 Yao Qi <yao.qi@linaro.org>
1492
1493 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1494 arm_linux_get_next_pcs_fixup.
1495
020ecd38
MK
14962016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1497
1498 * tracepoint.c (x_tracepoint_action_download): Change
1499 write_inferior_data_ptr to write_inferior_data_pointer.
1500 (cmd_qtstart): Likewise.
1501 (write_inferior_data_ptr): Remove.
1502 (download_agent_expr): Change write_inferior_data_ptr to
1503 write_inferior_data_pointer.
1504 (download_tracepoint_1): Likewise.
1505 (download_tracepoint): Likewise.
1506 (download_trace_state_variables): Likewise.
1507
7cae9051
WW
15082016-02-11 Wei-cheng Wang <cole945@gmail.com>
1509 Marcin Kościelnicki <koriakin@0x04.net>
1510
1511 * tracepoint.c (struct tracepoint_action_ops): Remove.
1512 (struct tracepoint_action): Remove ops.
1513 (m_tracepoint_action_download, r_tracepoint_action_download)
1514 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1515 size and offset accordingly.
1516 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1517 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1518 (tracepoint_action_send, tracepoint_action_download): New functions.
1519 Helpers for trace action handlers.
1520 (add_tracepoint_action): Remove setup actions ops.
1521 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1522
9f6a71b4
YQ
15232016-02-10 Yao Qi <yao.qi@linaro.org>
1524
1525 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1526
1e94266c
SM
15272016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1528
1529 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1530 to AC_OUTPUT.
1531 * configure: Regenerate.
1532
8adce034
SM
15332016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1534
1535 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1536 void * to gdb_byte *.
1537 * linux-low.c (siginfo_fixup): Likewise.
1538 (linux_xfer_siginfo): Likewise.
1539 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1540 Likewise.
1541 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1542
93813b37
WT
15432016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1544
1545 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1546 to srv_tgtobj.
1547 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1548 to srv_tgtobj.
1549 * linux-x86-low.c [__x86_64__]: Include
1550 "nat/amd64-linux-siginfo.h".
1551 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1552 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1553 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1554 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1555 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1556 (cpt_si_fd, si_timerid, si_overrun): Move from
1557 nat/amd64-linux-siginfo.c.
1558 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1559
8424cc97
SM
15602016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1561
1562 * server.c (skip_to_semicolon): Remove.
1563 (process_point_options): Use strchrnul instead of
1564 skip_to_semicolon.
1565
4d18591b
YQ
15662016-01-26 Yao Qi <yao.qi@linaro.org>
1567
1568 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1569 * linux-low.c (install_software_single_step_breakpoints): Don't
1570 call regcache_read_pc.
1571 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1572 argument pc.
1573
d8020970
YQ
15742016-01-26 Yao Qi <yao.qi@linaro.org>
1575
1576 * linux-low.c (install_software_single_step_breakpoints): Call
1577 regcache_read_pc instead of get_pc.
1578
8b207339
YQ
15792016-01-26 Yao Qi <yao.qi@linaro.org>
1580
1581 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1582 (unblock_async_io): Rename to ...
1583 (block_unblock_async_io): ... it. New function.
1584 (enable_async_io): Don't install SIGIO handler. Unblock it
1585 instead.
1586 (disable_async_io): Don't ignore SIGIO. Block it instead.
1587 (initialize_async_io): Install SIGIO handler. Don't call
1588 unblock_async_io.
1589
18879fef
YQ
15902016-01-26 Yao Qi <yao.qi@linaro.org>
1591
1592 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1593 first character is '\003', call *the_target->request_interrupt.
1594
a0f8e08a
YQ
15952016-01-25 Yao Qi <yao.qi@linaro.org>
1596
1597 * remote-utils.c (new_thread_notify): Remove.
1598 (dead_thread_notify): Likewise.
1599 * remote-utils.h (new_thread_notify): Remove declaration.
1600 (dead_thread_notify): Likewise.
1601
cc5fd9ab
MK
16022016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1603
1604 * gdb.trace/pending.exp: Fix expected message on continue.
1605
99e8eb11
MK
16062016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1607
1608 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1609 it works properly on big-endian machines where sizeof (CORE_ADDR)
1610 != sizeof (void *).
1611
a994041d
PA
16122016-01-21 Pedro Alves <palves@redhat.com>
1613
1614 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1615 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1616 * configure: Regenerate.
1617
f7a6a40d
YQ
16182016-01-21 Yao Qi <yao.qi@linaro.org>
1619
1620 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1621 is_thumb and set it according to CPSR saved on the stack.
1622 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1623 arm_sigreturn_next_pc.
1624
6f69e520
YQ
16252016-01-18 Yao Qi <yao.qi@linaro.org>
1626
1627 * linux-low.c (linux_set_pc_64bit): New function.
1628 (linux_get_pc_64bit): New function.
1629 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1630 Declare.
1631 * linux-sparc-low.c (debug_threads): Remove declaration.
1632 (sparc_get_pc): Remove.
1633 (the_low_target): Use linux_get_pc_64bit instead of
1634 sparc_get_pc.
1635 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1636 (the_low_target): Use linux_get_pc_64bit and
1637 linux_set_pc_64bit.
1638
276d4552
YQ
16392016-01-18 Yao Qi <yao.qi@linaro.org>
1640
1641 * linux-arm-low.c (debug_threads): Remove declaration.
1642 (arm_get_pc, arm_set_pc): Remove.
1643 (the_low_target): Use linux_get_pc_32bit and
1644 linux_set_pc_32bit.
1645 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1646 (the_low_target): Use linux_get_pc_32bit and
1647 linux_set_pc_32bit.
1648 * linux-cris-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-crisv32-low.c (debug_threads): Remove declaration.
1653 (cris_get_pc, cris_set_pc): Remove.
1654 (the_low_target): Use linux_get_pc_32bit and
1655 linux_set_pc_32bit.
1656 * linux-low.c: Include inttypes.h.
1657 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1658 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1659 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1660 (the_low_target): Use linux_get_pc_32bit and
1661 linux_set_pc_32bit.
1662 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1663 (the_low_target): Use linux_get_pc_32bit and
1664 linux_set_pc_32bit.
1665 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1666 (the_low_target): Use linux_get_pc_32bit and
1667 linux_set_pc_32bit.
1668 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1669 (the_low_target): Use linux_get_pc_32bit and
1670 linux_set_pc_32bit.
1671 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1672 (the_low_target): Use linux_get_pc_32bit and
1673 linux_set_pc_32bit.
1674
eb0edac8
GB
16752016-01-18 Gary Benson <gbenson@redhat.com>
1676
1677 * configure.ac (AC_FUNC_FORK): New check.
1678 * config.in: Regenerate.
1679 * configure: Likewise.
1680
1b451dda
YQ
16812016-01-14 Yao Qi <yao.qi@linaro.org>
1682
1683 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1684 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1685 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1686 arm_get_next_pcs_ctor.
1687
82075af2
JS
16882016-01-12 Josh Stone <jistone@redhat.com>
1689 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1690
1691 * inferiors.h: Include "gdb_vecs.h".
1692 (struct process_info): Add syscalls_to_catch.
1693 * inferiors.c (remove_process): Free syscalls_to_catch.
1694 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1695 syscall_return stops.
1696 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1697 * server.c (handle_general_set): Handle QCatchSyscalls.
1698 (handle_query): Report support for QCatchSyscalls.
1699 * target.h (struct target_ops): Add supports_catch_syscall.
1700 (target_supports_catch_syscall): New macro.
1701 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1702 (struct lwp_info): Add syscall_state.
1703 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1704 Maintain syscall_state and syscalls_to_catch across exec.
1705 (get_syscall_trapinfo): New function, proxy to the_low_target.
1706 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1707 (linux_low_filter_event): Toggle syscall_state entry/return for
1708 syscall traps, and set it ignored for all others.
1709 (gdb_catching_syscalls_p): New function.
1710 (gdb_catch_this_syscall_p): New function.
1711 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1712 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1713 (linux_supports_catch_syscall): New function.
1714 (linux_target_ops): Install it.
1715 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1716 (the_low_target): Install it.
1717
8f13a3ce
MF
17182016-01-12 Mike Frysinger <vapier@gentoo.org>
1719
1720 * acinclude.m4: Include new ../warning.m4 file.
1721 * configure: Regenerated.
1722 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1723
5b3da067
MF
17242016-01-12 Mike Frysinger <vapier@gentoo.org>
1725
1726 * ax.c (is_goto_target): Mark static.
1727 * linux-low.c (register_addr): Likewise.
1728 (linux_fetch_registers, linux_store_registers): Likewise.
1729 * mem-break.c (any_persistent_commands): Fix old prototype.
1730 (add_commands_to_breakpoint): Mark static.
1731 * regcache.c (find_register_by_name): Delete unused func.
1732 * remote-utils.c (hex_or_minus_one): Mark static.
1733 * server.c (monitor_show_help): Mark static.
1734 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1735 handle_v_requests): Likewise.
1736
bc504a31
PA
17372016-01-12 Pedro Alves <palves@redhat.com>
1738
1739 Remove use of the registered trademark symbol throughout.
1740
5a0dd67a
YQ
17412016-01-08 Yao Qi <yao.qi@linaro.org>
1742
1743 * remote-utils.c (getpkt): If c is '\003', call target hook
1744 request_interrupt.
1745
b2ca446f
YQ
17462016-01-06 Yao Qi <yao.qi@linaro.org>
1747
1748 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1749 linux-aarch32-low.c.
1750 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1751 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1752 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1753 (thumb2_breakpoint): Declare.
1754 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1755 linux-aarch32-low.h.
1756 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1757 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1758 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1759
edd88788
JB
17602016-01-01 Joel Brobecker <brobecker@adacore.com>
1761
1762 * gdbreplay.c (gdbreplay_version): Change copyright year in
1763 version message.
1764 * server.c (gdbserver_version): Likewise.
1765
65da7f14
PP
17662015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1767
1768 * server.c (crc32_table): Delete.
1769 (crc32): Use libiberty's xcrc32 function.
1770
4abd5ed2
JB
17712015-12-22 Joel Brobecker <brobecker@adacore.com>
1772
1773 * lynx-low.c (lynx_delete_thread_callback): New function.
1774 (lynx_mourn): Properly delete our process and all of its
1775 threads. Remove call to clear_inferiors.
1776
0e50fe5c
JB
17772015-12-22 Joel Brobecker <brobecker@adacore.com>
1778
1779 * target.c (thread_search_callback): Add check that
1780 the thread_stopped target callback is not NULL before
1781 calling it.
1782
35adc03f
YQ
17832015-12-21 Yao Qi <yao.qi@linaro.org>
1784
1785 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1786 arm breakpoint.
1787
bd2b2909
AT
17882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1789
1790 * server.c (handle_query): Call target_supports_software_single_step.
1791
7fe5e27e
AT
17922015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1793
1794 * linux-low.c (single_step): New function.
1795 (linux_resume_one_lwp_throw): Call single_step.
1796 (start_step_over): Likewise.
1797
d9311bfa
AT
17982015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1799
1800 * Makefile.in (SFILES): Append arch/arm-linux.c,
1801 arch/arm-get-next-pcs.c.
1802 (arm-linux.o): New rule.
1803 (arm-get-next-pcs.o): New rule.
1804 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1805 arm-linux.o.
1806 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1807 to linux-aarch32-low.c.
1808 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1809 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1810 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1811 (thumb2_breakpoint_len): Likewise.
1812 (arm_is_thumb_mode): Make non-static.
1813 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1814 from linux-aarch32-low.c.
1815 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1816 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1817 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1818 (thumb2_breakpoint_len): Likewise.
1819 (arm_is_thumb_mode): New declaration.
1820 * linux-arm-low.c: Include arch/arm-linux.h
1821 aarch/arm-get-next-pcs.h, sys/syscall.h.
1822 (get_next_pcs_ops): New struct.
1823 (get_next_pcs_addr_bits_remove): New function.
1824 (get_next_pcs_is_thumb): New function.
1825 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1826 (arm_sigreturn_next_pc): Likewise.
1827 (get_next_pcs_syscall_next_pc): Likewise.
1828 (arm_gdbserver_get_next_pcs): Likewise.
1829 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1830 Initialize.
1831 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1832 * server.h: Include gdb_vecs.h.
1833
68ce2059
AT
18342015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1835
1836 * Makefile.in (SFILES): Append common/common-regcache.c.
1837 (OBS): Append common-regcache.o.
1838 (common-regcache.o): New rule.
1839 * regcache.c (init_register_cache): Initialize cache to
1840 REG_UNAVAILABLE.
1841 (regcache_raw_read_unsigned): New function.
1842 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1843 register_status enum.
1844
fa5308bd
AT
18452015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1846
1847 * linux-aarch64-low.c (the_low_targets): Rename
1848 breakpoint_reinsert_addr to get_next_pcs.
1849 * linux-arm-low.c (the_low_targets): Likewise.
1850 * linux-bfin-low.c (the_low_targets): Likewise.
1851 * linux-cris-low.c (the_low_targets): Likewise.
1852 * linux-crisv32-low.c (the_low_targets): Likewise.
1853 * linux-low.c (can_software_single_step): Likewise.
1854 (install_software_single_step_breakpoints): New function.
1855 (start_step_over): Use install_software_single_step_breakpoints.
1856 * linux-low.h: New CORE_ADDR vector.
1857 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1858 get_next_pcs.
1859 * linux-mips-low.c (the_low_targets): Likewise.
1860 * linux-nios2-low.c (the_low_targets): Likewise.
1861 * linux-sparc-low.c (the_low_targets): Likewise.
1862
4a6ed09b
PA
18632015-12-17 Pedro Alves <palves@redhat.com>
1864
1865 * linux-low.c (linux_kill_one_lwp): Remove references to
1866 LinuxThreads.
1867 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1868 to 'kill'.
1869 (linux_init_signals): Delete.
1870 (initialize_low): Adjust.
1871 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1872
7544db95
PA
18732015-12-16 Pedro Alves <palves@redhat.com>
1874
1875 * configure.ac (compiler warning flags): When testing a
1876 -Wno-foo option, check whether -Wfoo works instead.
1877 * configure: Regenerate.
1878
8020350c
DB
18792015-12-11 Don Breazeal <donb@codesourcery.com>
1880
1881 * server.c (process_serial_event): Don't exit from gdbserver
1882 in remote mode if there are still active inferiors.
1883
db91f502
YQ
18842015-12-11 Yao Qi <yao.qi@linaro.org>
1885
1886 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1887 arm_breakpoint_at if the process is 32-bit.
1888
b37a6290
YQ
18892015-12-11 Yao Qi <yao.qi@linaro.org>
1890
1891 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1892 arm breakpoint.
1893
17b1509a
YQ
18942015-12-07 Yao Qi <yao.qi@linaro.org>
1895
1896 * configure.srv: Append arm.o to srv_tgtobj for
1897 aarch64*-*-linux* target.
1898 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1899 from linux-arm-low.c.
1900 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1901 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1902 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1903 (thumb2_breakpoint_len): Likewise.
1904 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1905 (arm_breakpoint_kinds): Likewise.
1906 (arm_breakpoint_kind_from_pc): Likewise.
1907 (arm_sw_breakpoint_from_kind): Likewise.
1908 (arm_breakpoint_kind_from_current_state): Likewise.
1909 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1910 (arm_sw_breakpoint_from_kind): Declare.
1911 (arm_breakpoint_kind_from_current_state): Declare.
1912 (arm_breakpoint_at): Declare.
1913 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1914 arm_sw_breakpoint_from_kind if process is 32-bit.
1915 (aarch64_breakpoint_kind_from_pc): New function.
1916 (aarch64_breakpoint_kind_from_current_state): New function.
1917 (the_low_target): Initialize fields breakpoint_kind_from_pc
1918 and breakpoint_kind_from_current_state.
1919 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1920 linux-aarch32-low.c.
1921 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1922 (arm_breakpoint, arm_breakpoint_len): Likewise.
1923 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1924 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1925 (arm_is_thumb_mode): Likewise.
1926 (arm_breakpoint_at): Likewise.
1927 (arm_breakpoint_kind_from_pc): Likewise.
1928 (arm_sw_breakpoint_from_kind): Likewise.
1929 (arm_breakpoint_kind_from_current_state): Likewise.
1930
1931 Revert:
1932 2015-08-04 Yao Qi <yao.qi@linaro.org>
1933
1934 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1935 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1936 * server.c (extended_protocol): Remove "static".
1937 * server.h (extended_protocol): Declare it.
1938
ece66d65
JS
19392015-12-04 Josh Stone <jistone@redhat.com>
1940
1941 * target.h (struct target_ops) <arch_setup>: Rename to ...
1942 (struct target_ops) <post_create_inferior>: ... this.
1943 (target_arch_setup): Rename to ...
1944 (target_post_create_inferior): ... this, calling post_create_inferior.
1945 * server.c (start_inferior): Update target_arch_setup calls to
1946 target_post_create_inferior.
1947 * linux-low.c (linux_low_ptrace_options): Forward declare.
1948 (linux_arch_setup): Update its comment for general use.
1949 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1950 (struct linux_target_ops): Use linux_post_create_inferior.
1951 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1952 to post_create_inferior.
1953 * nto-low.c (struct nto_target_ops): Likewise.
1954 * spu-low.c (struct spu_target_ops): Likewise.
1955 * win32-low.c (struct win32_target_ops): Likewise.
1956
e58c48b4
AT
19572015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1958
1959 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1960
fbec8956
AT
19612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1962
1963 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1964 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1965 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1966 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1967 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1968 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1969 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1970 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1971 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1972 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1973 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1974 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1975
9b4c5f87
AT
19762015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1977
1978 * linux-low.c (linux_look_up_symbols): Don't call
1979 linux_supports_traceclone.
1980 * linux-low.h (thread_db_init): Remove use_events argument.
1981 * thread-db.c (thread_db_use_event): Remove global variable.
1982 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1983 (struct thread_db) <td_create_bp>: Remove field.
1984 (thread_db_create_event): Remove function.
1985 (thread_db_enable_reporting): Likewise.
1986 (find_one_thread): Don't check for thread_db_use_events.
1987 (attach_thread): Likewise.
1988 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1989 (try_thread_db_load_1): Don't check for thread_db_use_events.
1990 (thread_db_init): Remove use_events argument and thread events
1991 handling.
1992 (remove_thread_event_breakpoints): Remove function.
1993 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1994
7d00775e
AT
19952015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1996
1997 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1998 New function.
1999 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2000 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2001 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2002 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2003 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2004 Initialize.
2005 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2006 New function.
2007 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2008 * linux-low.c (can_hardware_single_step): Use
2009 supports_hardware_single_step.
2010 (can_software_single_step): New function.
2011 (start_step_over): Call can_software_single_step.
2012 (linux_supports_hardware_single_step): New function.
2013 (struct target_ops) <supports_software_single_step>: Initialize.
2014 * linux-low.h (struct linux_target_ops)
2015 <supports_hardware_single_step>: Initialize.
2016 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2017 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2018 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2019 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2020 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2021 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2022 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2023 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2024 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2025 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2026 Initialize.
2027 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2028 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2029 Initialize.
2030 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2031 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2032 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2033 New function.
2034 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2035 * target.h (struct target_ops): <supports_software_single_step>:
2036 New field.
2037 (target_supports_software_single_step): New macro.
2038
2d97cd35
AT
20392015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2040
2041 * linux-low.c (linux_wait_1): Fix pc advance condition.
2042 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2043 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2044
769ef81f
AT
20452015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2046
2047 * linux-arm-low.c (arm_is_thumb_mode): New function.
2048 (arm_breakpoint_at): Use arm_is_thumb_mode.
2049 (arm_breakpoint_kind_from_current_state): New function.
2050 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2051 Initialize.
2052 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2053 (linux_breakpoint_kind_from_current_state): New function.
2054 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2055 * linux-low.h (struct linux_target_ops)
2056 <breakpoint_kind_from_current_state>: New field.
2057 * target.h (struct target_ops): Likewise.
2058 (target_breakpoint_kind_from_current_state): New macro.
2059
1bebeeca
PA
20602015-11-30 Pedro Alves <palves@redhat.com>
2061
2062 * linux-low.c (linux_resume): Wake up the event loop before
2063 returning.
2064
a67a9fae
PA
20652015-11-30 Pedro Alves <palves@redhat.com>
2066
2067 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2068 check.
2069 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2070 to -1.
2071 * target.c (struct thread_search): New structure.
2072 (thread_search_callback): New function.
2073 (prev_general_thread): New global.
2074 (prepare_to_access_memory, done_accessing_memory): New functions.
2075 * target.h (prepare_to_access_memory, done_accessing_memory):
2076 Replace macros with function declarations.
2077
f2faf941
PA
20782015-11-30 Pedro Alves <palves@redhat.com>
2079
2080 PR 14618
2081 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2082 report TARGET_WAITKIND_NO_RESUMED.
2083 * remote-utils.c (prepare_resume_reply): Handle
2084 TARGET_WAITKIND_NO_RESUMED.
2085 * server.c (report_no_resumed): New global.
2086 (handle_query) <qSupported>: Handle "no-resumed+". Report
2087 "no-resumed+" support.
2088 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2089 return error if the client doesn't support no-resumed events.
2090 (push_stop_notification): New function.
2091 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2092 events if the client supports them.
2093
a681f9c9
PA
20942015-11-30 Pedro Alves <palves@redhat.com>
2095
2096 * linux-low.c (thread_still_has_status_pending_p): Don't check
2097 vCont;t here.
2098 (lwp_resumed): New function.
2099 (status_pending_p_callback): Return early if the LWP is not
2100 supposed to be resumed.
2101
65706a29
PA
21022015-11-30 Pedro Alves <palves@redhat.com>
2103
2104 * linux-low.c (handle_extended_wait): Assert that the LWP's
2105 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2106 thread create events, leave the new child's status pending.
2107 (linux_low_filter_event): If GDB wants to hear about thread exit
2108 events, leave the LWP marked dead and don't delete it.
2109 (linux_wait_for_event_filtered): Don't check for thread exit.
2110 (filter_exit_event): New function.
2111 (linux_wait_1): Use it, when returning an exit event.
2112 (linux_resume_one_lwp_throw): Assert that the LWP's
2113 waitstatus is TARGET_WAITKIND_IGNORE.
2114 * remote-utils.c (prepare_resume_reply): Handle
2115 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2116 * server.c (report_thread_events): New global.
2117 (handle_general_set): Handle QThreadEvents.
2118 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2119 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2120 TARGET_WAITKIND_THREAD_EXITED.
2121 * server.h (report_thread_events): Declare.
2122
56cf4bed
PA
21232015-11-30 Pedro Alves <palves@redhat.com>
2124
2125 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2126 the thread's last_resume_kind was resume_stop.
2127
500c1d85
PA
21282015-11-30 Pedro Alves <palves@redhat.com>
2129
2130 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2131 before returning.
2132
de979965
PA
21332015-11-30 Pedro Alves <palves@redhat.com>
2134
2135 * server.c (handle_v_requests): Handle vCtrlC.
2136
34c65914
PA
21372015-11-30 Pedro Alves <palves@redhat.com>
2138
2139 * gdbthread.h (find_any_thread_of_pid): Declare.
2140 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2141 functions.
2142 * server.c (handle_query): If current_thread is NULL, look for
2143 another thread of the selected process.
2144
79efa585 21452015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2146 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2147
2148 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2149 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2150 name in reply.
2151 * target.h (struct target_ops) <thread_name>: New field.
2152 (target_thread_name): New macro.
2153
80d82c19
JB
21542015-11-23 Joel Brobecker <brobecker@adacore.com>
2155
2156 * regcache.h (regcache_invalidate_pid): Add declaration.
2157 * regcache.c (regcache_invalidate_pid): New function, extracted
2158 from regcache_invalidate.
2159 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2160 Add trivial documentation comment.
2161 * lynx-low.c: Use regcache_invalidate_pid instead of
2162 regcache_invalidate.
2163
64da5dd5
JB
21642015-11-23 Joel Brobecker <brobecker@adacore.com>
2165
2166 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2167 and Elf64_auxv_t if the target is Android.
2168
37ce4055
DE
21692015-11-22 Doug Evans <xdje42@gmail.com>
2170
2171 * target.h: #include <sys/types.h>.
2172
06e03fff
PA
21732015-11-19 Pedro Alves <palves@redhat.com>
2174
2175 * linux-low.c (linux_process_qsupported): Change prototype.
2176 Adjust.
2177 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2178 Change prototype.
2179 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2180 and adjust to loop over all features.
2181 * server.c (handle_query) <qSupported>: Adjust to call
2182 target_process_qsupported once, passing it a vector of unprocessed
2183 features.
2184 * target.h (struct target_ops) <process_qsupported>: Change
2185 prototype.
2186 (target_process_qsupported): Adjust.
2187
9a084706
PA
21882015-11-19 Pedro Alves <palves@redhat.com>
2189
2190 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2191 mode.
2192 * configure: Regenerate.
2193
dad44a1f
PA
21942015-11-19 Pedro Alves <palves@redhat.com>
2195
2196 * configure: Regenerate.
2197
231c0592
YQ
21982015-11-19 Yao Qi <yao.qi@linaro.org>
2199
2200 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2201 type to uint32_t.
2202
6c1c9a8b
YQ
22032015-11-19 Yao Qi <yao.qi@linaro.org>
2204
2205 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2206 (struct aarch64_operand): Move enum out.
2207
9caa3311
YQ
22082015-11-19 Yao Qi <yao.qi@linaro.org>
2209
2210 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2211 struct user_fpsimd_state *.
2212 (aarch64_store_fpregset): Likewise.
2213
6a69a054
YQ
22142015-11-19 Yao Qi <yao.qi@linaro.org>
2215
2216 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2217 struct user_pt_regs *.
2218 (aarch64_store_gregset): Likewise.
2219
1798301e
PA
22202015-11-18 Pedro Alves <palves@redhat.com>
2221
2222 * Makefile.in (all_object_files): Add $IPA_OBJS.
2223
ce7715e2
PA
22242015-11-17 Pedro Alves <palves@redhat.com>
2225
2226 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2227 GDB_SIGNAL_0 and gdb_signal_to_string.
2228
c0879059
PA
22292015-11-17 Pedro Alves <palves@redhat.com>
2230
2231 * win32-low.c (handle_output_debug_string): Remove parameter.
2232 (win32_kill): Remove our_status local and adjust call to
2233 handle_output_debug_string.
2234 (get_child_debug_event): Adjust call to
2235 handle_output_debug_string.
2236
1996e237
SM
22372015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2238
2239 * linux-mips-low.c (mips_fill_gregset): Add cast.
2240 (mips_store_gregset): Likewise.
2241 (mips_fill_fpregset): Likewise.
2242 (mips_store_fpregset): Likewise.
2243
cbec665b
SM
22442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2245
2246 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2247 priv.
2248
eb3e3c67
SM
22492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2250
2251 * linux-mips-low.c (mips_linux_new_thread): Change type of
2252 watch_type to enum target_hw_bp_type.
2253
171de4b8
SM
22542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2255
2256 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2257 Change return type to arm_hwbp_type.
2258
04248ead
SM
22592015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2260
2261 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2262 (arm_store_gregset): Likewise.
2263 * linux-arm-low.c (arm_get_hwcap): Likewise.
2264 (arm_read_description): Likewise.
2265
04b3479c
SM
22662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2267
2268 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2269
2bc84e8a
SM
22702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2271
2272 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2273 (ppc_fill_vsxregset): Likewise.
2274 (ppc_store_vsxregset): Likewise.
2275 (ppc_fill_vrregset): Likewise.
2276 (ppc_store_vrregset): Likewise.
2277 (ppc_fill_evrregset): Likewise.
2278 (ppc_store_evrregset): Likewise.
2279
e6c5bb05
SM
22802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2281
2282 * linux-ppc-low.c (ppc_usrregs_info): Remove
2283 forward-declaration.
2284 (ppc_arch_setup): Move lower in file.
2285
7ea45d72
SM
22862015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2287
2288 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2289 (ps_pdwrite): Likewise.
2290
69291610
HW
22912015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2292
2293 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2294 to after assert checks.
2295
b42945fd
SM
22962015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2297
2298 * proc-service.c (ps_pdread): Add/adjust casts.
2299 (ps_pdwrite): Add/adjust casts.
2300
d6f85c84
SM
23012015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2302
2303 * server.c (handle_search_memory_1): Cast return value of
2304 memmem.
2305
f98cd059
SM
23062015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2307
2308 * server.c (write_qxfer_response): Change type of data to
2309 gdb_byte *.
2310
d2412fa5
PA
23112015-10-29 Pedro Alves <palves@redhat.com>
2312
2313 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2314
c17414a2
PA
23152015-10-29 Pedro Alves <palves@redhat.com>
2316
2317 * tracepoint.c (clear_installed_tracepoints): Add casts.
2318
e053fbc4
PA
23192015-10-29 Pedro Alves <palves@redhat.com>
2320
2321 * server.c (handle_v_cont, process_serial_event): Add enum
2322 gdb_signal casts to signal parsing code.
2323
add67df8
PA
23242015-10-29 Pedro Alves <palves@redhat.com>
2325
2326 * linux-low.h (NULL_REGSET): Define.
2327 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2328 * linux-arm-low.c (arm_regsets): Likewise.
2329 * linux-crisv32-low.c (cris_regsets): Likewise.
2330 * linux-m68k-low.c (m68k_regsets): Likewise.
2331 * linux-mips-low.c (mips_regsets): Likewise.
2332 * linux-nios2-low.c (nios2_regsets): Likewise.
2333 * linux-ppc-low.c (ppc_regsets): Likewise.
2334 * linux-s390-low.c (s390_regsets): Likewise.
2335 * linux-sh-low.c (sh_regsets): Likewise.
2336 * linux-sparc-low.c (sparc_regsets): Likewise.
2337 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2338 * linux-tile-low.c (tile_regsets): Likewise.
2339 * linux-x86-low.c (x86_regsets): Likewise.
2340 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2341
50bc912a
PA
23422015-10-29 Pedro Alves <palves@redhat.com>
2343
2344 * linux-low.h (NULL_REGSET): Define.
2345 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2346 * linux-arm-low.c (arm_regsets): Likewise.
2347 * linux-crisv32-low.c (cris_regsets): Likewise.
2348 * linux-m68k-low.c (m68k_regsets): Likewise.
2349 * linux-mips-low.c (mips_regsets): Likewise.
2350 * linux-nios2-low.c (nios2_regsets): Likewise.
2351 * linux-ppc-low.c (ppc_regsets): Likewise.
2352 * linux-s390-low.c (s390_regsets): Likewise.
2353 * linux-sh-low.c (sh_regsets): Likewise.
2354 * linux-sparc-low.c (sparc_regsets): Likewise.
2355 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2356 * linux-tile-low.c (tile_regsets): Likewise.
2357 * linux-x86-low.c (x86_regsets): Likewise.
2358 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2359
682b2546
DE
23602015-10-26 Doug Evans <dje@google.com>
2361
2362 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2363
963843d4
DE
23642015-10-26 Doug Evans <dje@google.com>
2365
2366 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2367
d41401ac
DE
23682015-10-26 Doug Evans <dje@google.com>
2369
2370 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2371 for debug_printf.
2372 (attach_thread, find_new_threads_callback): Ditto.
2373
3db28855
AT
23742015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2375
2376 * mem-break.h (set_breakpoint_data): Remove.
2377
fb78e89c
AT
23782015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2379
2380 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2381 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2382 (initialize_low): Remove set_breakpoint_data call.
2383 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2384 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2385 (initialize_low): Remove set_breakpoint_data call.
2386 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2387 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2388 (initialize_low): Remove set_breakpoint_data call.
2389
2e6ee069
AT
23902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2391
2392 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2393 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2394 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2395 * target.h (target_breakpoint_kind_from_pc): New macro.
2396
1652a986
AT
23972015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2398
2399 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2400 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2401 the default breakpoint kind.
2402
abeead09
AT
24032015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2404
2405 * linux-arm-low.c (arm_supports_z_point_type): Add software
2406 breakpoint support.
2407
b0b4b501
AT
24082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2409
2410 * linux-arm-low.c: Refactor breakpoint definitions.
2411 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2412 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2413
8689682c
AT
24142015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2415
2416 * Makefile.in: Add arm.c/o.
2417 * configure.srv: Likewise.
2418 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2419 (arm_breakpoint_kind_from_pc): New function.
2420 (arm_sw_breakpoint_from_kind): Return proper kind.
2421 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2422
27165294
AT
24232015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2424
2425 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2426 removal.
2427 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2428 (struct raw_breakpoint) <size>: Remove.
2429 (struct raw_breakpoint) <kind>: Add.
2430 (bp_size): New function.
2431 (bp_opcode): Likewise.
2432 (find_raw_breakpoint_at): Adjust for kind.
2433 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2434 (remove_memory_breakpoint): Adjust for kind call bp_size.
2435 (set_raw_breakpoint_at): Adjust for kind.
2436 (set_breakpoint): Likewise.
2437 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2438 (delete_raw_breakpoint): Adjust for kind.
2439 (delete_breakpoint): Likewise.
2440 (find_gdb_breakpoint): Likewise.
2441 (set_gdb_breakpoint_1): Likewise.
2442 (set_gdb_breakpoint): Likewise.
2443 (delete_gdb_breakpoint_1): Likewise.
2444 (delete_gdb_breakpoint): Likewise.
2445 (uninsert_raw_breakpoint): Likewise.
2446 (reinsert_raw_breakpoint): Likewise.
2447 (set_breakpoint_data): Remove.
2448 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2449 (check_mem_read): Adjust for kind call bp_size.
2450 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2451 (clone_one_breakpoint): Adjust for kind.
2452 * mem-break.h (set_gdb_breakpoint): Likewise.
2453 (delete_gdb_breakpoint): Likewise.
2454 * server.c (process_serial_event): Likewise.
2455
dd373349
AT
24562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2457
2458 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2459 (struct linux_target_ops) <breakpoint>: Remove.
2460 (struct linux_target_ops) <breakpoint_len>: Remove.
2461 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2462 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2463 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2464 (arm_sw_breakpoint_from_kind): New function.
2465 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2466 (struct linux_target_ops) <breakpoint>: Remove.
2467 (struct linux_target_ops) <breakpoint_len>: Remove.
2468 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2469 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2470 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2471 (struct linux_target_ops) <breakpoint>: Remove.
2472 (struct linux_target_ops) <breakpoint_len>: Remove.
2473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2475 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2476 (struct linux_target_ops) <breakpoint>: Remove.
2477 (struct linux_target_ops) <breakpoint_len>: Remove.
2478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2480 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2481 and sw_breakpoint_from_kind to increment the pc.
2482 (linux_breakpoint_kind_from_pc): New function.
2483 (linux_sw_breakpoint_from_kind): New function.
2484 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2485 (initialize_low): Call breakpoint_kind_from_pc and
2486 sw_breakpoint_from_kind to replace breakpoint_data/len.
2487 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2488 New field.
2489 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2490 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2491 (struct linux_target_ops) <breakpoint>: Remove.
2492 (struct linux_target_ops) <breakpoint_len>: Remove.
2493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2494 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2495 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2496 (struct linux_target_ops) <breakpoint>: Remove.
2497 (struct linux_target_ops) <breakpoint_len>: Remove.
2498 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2499 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2500 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2501 (struct linux_target_ops) <breakpoint>: Remove.
2502 (struct linux_target_ops) <breakpoint_len>: Remove.
2503 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2504 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2505 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2506 (struct linux_target_ops) <breakpoint>: Remove.
2507 (struct linux_target_ops) <breakpoint_len>: Remove.
2508 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2509 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2510 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2511 (struct linux_target_ops) <breakpoint>: Remove.
2512 (struct linux_target_ops) <breakpoint_len>: Remove.
2513 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2514 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2515 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2516 (struct linux_target_ops) <breakpoint>: Remove.
2517 (struct linux_target_ops) <breakpoint_len>: Remove.
2518 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2519 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2520 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2521 (struct linux_target_ops) <breakpoint>: Remove.
2522 (struct linux_target_ops) <breakpoint_len>: Remove.
2523 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2524 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2525 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2526 (struct linux_target_ops) <breakpoint>: Remove.
2527 (struct linux_target_ops) <breakpoint_len>: Remove.
2528 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2529 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2530 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2531 (struct linux_target_ops) <breakpoint>: Remove.
2532 (struct linux_target_ops) <breakpoint_len>: Remove.
2533 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2534 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2535 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2536 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2537 (struct linux_target_ops) <breakpoint>: Remove.
2538 (struct linux_target_ops) <breakpoint_len>: Remove.
2539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2540 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2541 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2542 (struct linux_target_ops) <breakpoint>: Remove.
2543 (struct linux_target_ops) <breakpoint_len>: Remove.
2544 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2545 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2546
4cd98a19
AT
25472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2548
2549 * linux-cris-low.c (cris_get_pc): Remove void arg.
2550
774ee6d2
AR
25512015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2552
2553 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2554 variable name.
2555
833dcd29
AR
25562015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2557
2558 * inferiors.c (thread_pid_matches_callback): New function.
2559 (find_thread_process): New function.
2560 (remove_thread): Reset current_thread.
2561 (remove_process): Assert threads have been removed first.
2562
8d689ee5
YQ
25632015-10-15 Yao Qi <yao.qi@linaro.org>
2564
2565 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2566 if it is 3.
2567 (aarch64_remove_point): Likewise.
2568 * regcache.c (regcache_register_size): New function.
2569
1c2e1515
YQ
25702015-10-12 Yao Qi <yao.qi@linaro.org>
2571
2572 * linux-aarch64-low.c: Update all callers as emit_load_store
2573 is renamed to aarch64_emit_load_store.
2574
e1c587c3
YQ
25752015-10-12 Yao Qi <yao.qi@linaro.org>
2576
2577 * linux-aarch64-low.c: Update all callers of function renaming
2578 from emit_insn to aarch64_emit_insn.
2579
b6542f81
YQ
25802015-10-12 Yao Qi <yao.qi@linaro.org>
2581
2582 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2583 arch/aarch64-insn.h.
2584 (struct aarch64_memory_operand): Likewise.
2585 (ENCODE): Likewise.
2586 (emit_insn): Move to arch/aarch64-insn.c.
2587 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2588 (emit_load_store): Move to arch/aarch64-insn.c.
2589 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2590 (can_encode_int32): Remove.
2591
246994ce
YQ
25922015-10-12 Yao Qi <yao.qi@linaro.org>
2593
2594 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2595 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2596 (aarch64_relocate_instruction): Likewise.
2597 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2598 (struct aarch64_insn_visitor): Likewise.
2599
0badd99f
YQ
26002015-10-12 Yao Qi <yao.qi@linaro.org>
2601
2602 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2603 (struct aarch64_insn_visitor): New.
2604 (struct aarch64_insn_relocation_data): New.
2605 (aarch64_ftrace_insn_reloc_b): New function.
2606 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2607 (aarch64_ftrace_insn_reloc_cb): Likewise.
2608 (aarch64_ftrace_insn_reloc_tb): Likewise.
2609 (aarch64_ftrace_insn_reloc_adr): Likewise.
2610 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2611 (aarch64_ftrace_insn_reloc_others): Likewise.
2612 (visitor): New.
2613 (aarch64_relocate_instruction): Use visitor.
2614
dfaffe9d
YQ
26152015-10-12 Yao Qi <yao.qi@linaro.org>
2616
2617 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2618 int. Add argument buf.
2619 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2620 aarch64_relocate_instruction.
2621
70b439f0
YQ
26222015-10-12 Yao Qi <yao.qi@linaro.org>
2623
2624 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2625 argument insn. Remove local variable insn. Don't call
2626 target_read_uint32.
2627 (aarch64_install_fast_tracepoint_jump_pad): Call
2628 target_read_uint32.
2629
7781c06f
YQ
26302015-09-30 Yao Qi <yao.qi@linaro.org>
2631
2632 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2633 (emit_load_store_pair): Likewise.
2634
9a3c8263
SM
26352015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * dll.c (match_dll): Add cast(s).
2638 (unloaded_dll): Likewise.
2639 * linux-low.c (second_thread_of_pid_p): Likewise.
2640 (delete_lwp_callback): Likewise.
2641 (count_events_callback): Likewise.
2642 (select_event_lwp_callback): Likewise.
2643 (linux_set_resume_request): Likewise.
2644 * server.c (accumulate_file_name_length): Likewise.
2645 (emit_dll_description): Likewise.
2646 (handle_qxfer_threads_worker): Likewise.
2647 (visit_actioned_threads): Likewise.
2648 * thread-db.c (any_thread_of): Likewise.
2649 * tracepoint.c (same_process_p): Likewise.
2650 (match_blocktype): Likewise.
2651 (build_traceframe_info_xml): Likewise.
2652
224c3ddb
SM
26532015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2654
2655 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2656 assignment.
2657 (gdb_unparse_agent_expr): Likewise.
2658 * hostio.c (require_data): Likewise.
2659 (handle_pread): Likewise.
2660 * linux-low.c (disable_regset): Likewise.
2661 (fetch_register): Likewise.
2662 (store_register): Likewise.
2663 (get_dynamic): Likewise.
2664 (linux_qxfer_libraries_svr4): Likewise.
2665 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2666 (set_fast_tracepoint_jump): Likewise.
2667 (uninsert_fast_tracepoint_jumps_at): Likewise.
2668 (reinsert_fast_tracepoint_jumps_at): Likewise.
2669 (validate_inserted_breakpoint): Likewise.
2670 (clone_agent_expr): Likewise.
2671 * regcache.c (init_register_cache): Likewise.
2672 * remote-utils.c (putpkt_binary_1): Likewise.
2673 (decode_M_packet): Likewise.
2674 (decode_X_packet): Likewise.
2675 (look_up_one_symbol): Likewise.
2676 (relocate_instruction): Likewise.
2677 (monitor_output): Likewise.
2678 * server.c (handle_search_memory): Likewise.
2679 (handle_qxfer_exec_file): Likewise.
2680 (handle_qxfer_libraries): Likewise.
2681 (handle_qxfer): Likewise.
2682 (handle_query): Likewise.
2683 (handle_v_cont): Likewise.
2684 (handle_v_run): Likewise.
2685 (captured_main): Likewise.
2686 * target.c (write_inferior_memory): Likewise.
2687 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2688 * tracepoint.c (init_trace_buffer): Likewise.
2689 (add_tracepoint_action): Likewise.
2690 (add_traceframe): Likewise.
2691 (add_traceframe_block): Likewise.
2692 (cmd_qtdpsrc): Likewise.
2693 (cmd_qtdv): Likewise.
2694 (cmd_qtstatus): Likewise.
2695 (response_source): Likewise.
2696 (response_tsv): Likewise.
2697 (cmd_qtnotes): Likewise.
2698 (gdb_collect): Likewise.
2699 (initialize_tracepoint): Likewise.
2700
afbe19f8
PL
27012015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2702
2703 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2704 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2705 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2706 <NOP>: New.
2707 (enum aarch64_condition_codes): New enum.
2708 (w0): New static global.
2709 (fp): Likewise.
2710 (lr): Likewise.
2711 (struct aarch64_memory_operand) <type>: New
2712 MEMORY_OPERAND_POSTINDEX type.
2713 (postindex_memory_operand): New helper function.
2714 (emit_ret): New function.
2715 (emit_load_store_pair): New function, factored out of emit_stp
2716 with support for MEMORY_OPERAND_POSTINDEX.
2717 (emit_stp): Rewrite using emit_load_store_pair.
2718 (emit_ldp): New function.
2719 (emit_load_store): Likewise.
2720 (emit_ldr): Mention post-index instruction in comment.
2721 (emit_ldrh): New function.
2722 (emit_ldrb): New function.
2723 (emit_ldrsw): Mention post-index instruction in comment.
2724 (emit_str): Likewise.
2725 (emit_subs): New function.
2726 (emit_cmp): Likewise.
2727 (emit_and): Likewise.
2728 (emit_orr): Likewise.
2729 (emit_orn): Likewise.
2730 (emit_eor): Likewise.
2731 (emit_mvn): Likewise.
2732 (emit_lslv): Likewise.
2733 (emit_lsrv): Likewise.
2734 (emit_asrv): Likewise.
2735 (emit_mul): Likewise.
2736 (emit_sbfm): Likewise.
2737 (emit_sbfx): Likewise.
2738 (emit_ubfm): Likewise.
2739 (emit_ubfx): Likewise.
2740 (emit_csinc): Likewise.
2741 (emit_cset): Likewise.
2742 (emit_nop): Likewise.
2743 (emit_ops_insns): New helper function.
2744 (emit_pop): Likewise.
2745 (emit_push): Likewise.
2746 (aarch64_emit_prologue): New function.
2747 (aarch64_emit_epilogue): Likewise.
2748 (aarch64_emit_add): Likewise.
2749 (aarch64_emit_sub): Likewise.
2750 (aarch64_emit_mul): Likewise.
2751 (aarch64_emit_lsh): Likewise.
2752 (aarch64_emit_rsh_signed): Likewise.
2753 (aarch64_emit_rsh_unsigned): Likewise.
2754 (aarch64_emit_ext): Likewise.
2755 (aarch64_emit_log_not): Likewise.
2756 (aarch64_emit_bit_and): Likewise.
2757 (aarch64_emit_bit_or): Likewise.
2758 (aarch64_emit_bit_xor): Likewise.
2759 (aarch64_emit_bit_not): Likewise.
2760 (aarch64_emit_equal): Likewise.
2761 (aarch64_emit_less_signed): Likewise.
2762 (aarch64_emit_less_unsigned): Likewise.
2763 (aarch64_emit_ref): Likewise.
2764 (aarch64_emit_if_goto): Likewise.
2765 (aarch64_emit_goto): Likewise.
2766 (aarch64_write_goto_address): Likewise.
2767 (aarch64_emit_const): Likewise.
2768 (aarch64_emit_call): Likewise.
2769 (aarch64_emit_reg): Likewise.
2770 (aarch64_emit_pop): Likewise.
2771 (aarch64_emit_stack_flush): Likewise.
2772 (aarch64_emit_zero_ext): Likewise.
2773 (aarch64_emit_swap): Likewise.
2774 (aarch64_emit_stack_adjust): Likewise.
2775 (aarch64_emit_int_call_1): Likewise.
2776 (aarch64_emit_void_call_2): Likewise.
2777 (aarch64_emit_eq_goto): Likewise.
2778 (aarch64_emit_ne_goto): Likewise.
2779 (aarch64_emit_lt_goto): Likewise.
2780 (aarch64_emit_le_goto): Likewise.
2781 (aarch64_emit_gt_goto): Likewise.
2782 (aarch64_emit_ge_got): Likewise.
2783 (aarch64_emit_ops_impl): New static global variable.
2784 (aarch64_emit_ops): New target function, return
2785 &aarch64_emit_ops_impl.
2786 (struct linux_target_ops): Install it.
2787
bb903df0
PL
27882015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2789
2790 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2791 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2792 aarch64-ipa.o.
2793 * linux-aarch64-ipa.c: New file.
2794 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2795 and endian.h.
2796 (aarch64_get_thread_area): New target method.
2797 (extract_signed_bitfield): New helper function.
2798 (aarch64_decode_ldr_literal): New function.
2799 (enum aarch64_opcodes): New enum.
2800 (struct aarch64_register): New struct.
2801 (struct aarch64_operand): New struct.
2802 (x0): New static global.
2803 (x1): Likewise.
2804 (x2): Likewise.
2805 (x3): Likewise.
2806 (x4): Likewise.
2807 (w2): Likewise.
2808 (ip0): Likewise.
2809 (sp): Likewise.
2810 (xzr): Likewise.
2811 (aarch64_register): New helper function.
2812 (register_operand): Likewise.
2813 (immediate_operand): Likewise.
2814 (struct aarch64_memory_operand): New struct.
2815 (offset_memory_operand): New helper function.
2816 (preindex_memory_operand): Likewise.
2817 (enum aarch64_system_control_registers): New enum.
2818 (ENCODE): New macro.
2819 (emit_insn): New helper function.
2820 (emit_b): New function.
2821 (emit_bcond): Likewise.
2822 (emit_cb): Likewise.
2823 (emit_tb): Likewise.
2824 (emit_blr): Likewise.
2825 (emit_stp): Likewise.
2826 (emit_ldp_q_offset): Likewise.
2827 (emit_stp_q_offset): Likewise.
2828 (emit_load_store): Likewise.
2829 (emit_ldr): Likewise.
2830 (emit_ldrsw): Likewise.
2831 (emit_str): Likewise.
2832 (emit_ldaxr): Likewise.
2833 (emit_stxr): Likewise.
2834 (emit_stlr): Likewise.
2835 (emit_data_processing_reg): Likewise.
2836 (emit_data_processing): Likewise.
2837 (emit_add): Likewise.
2838 (emit_sub): Likewise.
2839 (emit_mov): Likewise.
2840 (emit_movk): Likewise.
2841 (emit_mov_addr): Likewise.
2842 (emit_mrs): Likewise.
2843 (emit_msr): Likewise.
2844 (emit_sevl): Likewise.
2845 (emit_wfe): Likewise.
2846 (append_insns): Likewise.
2847 (can_encode_int32_in): New helper function.
2848 (aarch64_relocate_instruction): New function.
2849 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2850 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2851 (struct linux_target_ops): Install aarch64_get_thread_area,
2852 aarch64_install_fast_tracepoint_jump_pad and
2853 aarch64_get_min_fast_tracepoint_insn_len.
2854
787749ea
PL
28552015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2856
2857 * Makefile.in (aarch64-insn.o): New rule.
2858 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2859
9812b2e6
YQ
28602015-09-21 Yao Qi <yao.qi@linaro.org>
2861
2862 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2863
18fe412b
YQ
28642015-09-21 Yao Qi <yao.qi@linaro.org>
2865
2866 * tracepoint.c (max_jump_pad_size): Remove.
2867
a0cc84cd
YQ
28682015-09-18 Yao Qi <yao.qi@linaro.org>
2869
2870 * linux-aarch64-low.c: Don't include sys/uio.h.
2871 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2872
d78908cf
WW
28732015-09-16 Wei-cheng Wang <cole945@gmail.com>
2874
2875 * tracepoint.c (eval_result_type): Change prototype.
2876 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2877
d57e0d50
PA
28782015-09-15 Pedro Alves <palves@redhat.com>
2879
2880 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2881 Check whether to report exec events instead of checking whether
2882 multiprocess is enabled.
2883
5a676acc
PA
28842015-09-15 Pedro Alves <palves@redhat.com>
2885
2886 PR remote/18965
2887 * remote-utils.c (prepare_resume_reply): Merge
2888 TARGET_WAITKIND_VFORK_DONE switch case with the
2889 TARGET_WAITKIND_FORKED case.
2890
7c5d0fad
YQ
28912015-09-15 Yao Qi <yao.qi@linaro.org>
2892
2893 * server.c (handle_query): Check string comparison using
2894 "else if" instead of "if".
2895
750ce8d1
YQ
28962015-09-15 Yao Qi <yao.qi@linaro.org>
2897
2898 * server.c (vCont_supported): New global variable.
2899 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2900 matches. Append ";vContSupported+" to own_buf.
2901 (handle_v_requests): Append ";s;S" to own_buf if target supports
2902 hardware single step or vCont_supported is false.
2903 (capture_main): Set vCont_supported to zero.
2904
70b90b91
YQ
29052015-09-15 Yao Qi <yao.qi@linaro.org>
2906
2907 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2908 it to ...
2909 (linux_supports_hardware_single_step): ... New function.
2910 (linux_target_ops): Update.
2911 * lynx-low.c (lynx_target_ops): Set field
2912 supports_hardware_single_step to target_can_do_hardware_single_step.
2913 * nto-low.c (nto_target_ops): Likewise.
2914 * spu-low.c (spu_target_ops): Likewise.
2915 * win32-low.c (win32_target_ops): Likewise.
2916 * target.c (target_can_do_hardware_single_step): New function.
2917 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2918 Remove. <supports_hardware_single_step>: New field.
2919 (target_supports_conditional_breakpoints): Remove.
2920 (target_supports_hardware_single_step): New macro.
2921 (target_can_do_hardware_single_step): Declare.
2922 * server.c (handle_query): Use target_supports_hardware_single_step
2923 instead of target_supports_conditional_breakpoints.
2924
ade90bde
YQ
29252015-09-15 Yao Qi <yao.qi@linaro.org>
2926
2927 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2928 function.
2929 (struct linux_target_ops the_low_target): Install
2930 aarch64_linux_siginfo_fixup.
2931
94585166
DB
29322015-09-11 Don Breazeal <donb@codesourcery.com>
2933 Luis Machado <lgustavo@codesourcery.com>
2934
2935 * linux-low.c (linux_mourn): Static declaration.
2936 (linux_arch_setup): Move in front of
2937 handle_extended_wait.
2938 (linux_arch_setup_thread): New function.
2939 (handle_extended_wait): Handle exec events. Call
2940 linux_arch_setup_thread. Make event_lwp argument a
2941 pointer-to-a-pointer.
2942 (check_zombie_leaders): Do not check stopped threads.
2943 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2944 (linux_low_filter_event): Add lwp and thread for exec'ing
2945 non-leader thread if leader thread has been deleted.
2946 Refactor code into linux_arch_setup_thread and call it.
2947 Pass child lwp pointer by reference to handle_extended_wait.
2948 (linux_wait_for_event_filtered): Update comment.
2949 (linux_wait_1): Prevent clobbering exec event status.
2950 (linux_supports_exec_events): New function.
2951 (linux_target_ops) <supports_exec_events>: Initialize new member.
2952 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2953 new member.
2954 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2955 * server.c (report_exec_events): New global variable.
2956 (handle_query): Handle qSupported query for exec-events feature.
2957 (captured_main): Initialize report_exec_events.
2958 * server.h (report_exec_events): Declare new global variable.
2959 * target.h (struct target_ops) <supports_exec_events>: New
2960 member.
2961 (target_supports_exec_events): New macro.
2962 * win32-low.c (win32_target_ops) <supports_exec_events>:
2963 Initialize new member.
2964
0568462b
MM
29652015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2966
2967 * linux-low.c (linux_low_enable_btrace): Remove.
2968 (linux_target_ops): Replace linux_low_enable_btrace with
2969 linux_enable_btrace.
2970
39edd165
YQ
29712015-09-03 Yao Qi <yao.qi@linaro.org>
2972
2973 * linux-aarch64-low.c (aarch64_insert_point): Call
2974 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2975 returns true.
2976
1db33b5a
UW
29772015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2978
2979 * linux-low.c (check_stopped_by_breakpoint): Use
2980 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2981
ab290430
PA
29822015-08-27 Pedro Alves <palves@redhat.com>
2983
2984 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2985
8d749320
SM
29862015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2987
6711b7f8
SM
2988 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2989 the XNEW-family equivalent.
8d749320
SM
2990 (compile_bytecodes): Likewise.
2991 * dll.c (loaded_dll): Likewise.
2992 * event-loop.c (append_callback_event): Likewise.
2993 (create_file_handler): Likewise.
2994 (create_file_event): Likewise.
2995 * hostio.c (handle_open): Likewise.
2996 * inferiors.c (add_thread): Likewise.
2997 (add_process): Likewise.
2998 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2999 * linux-arm-low.c (arm_new_process): Likewise.
3000 (arm_new_thread): Likewise.
3001 * linux-low.c (add_to_pid_list): Likewise.
3002 (linux_add_process): Likewise.
3003 (handle_extended_wait): Likewise.
3004 (add_lwp): Likewise.
3005 (enqueue_one_deferred_signal): Likewise.
3006 (enqueue_pending_signal): Likewise.
3007 (linux_resume_one_lwp_throw): Likewise.
3008 (linux_resume_one_thread): Likewise.
3009 (linux_read_memory): Likewise.
3010 (linux_write_memory): Likewise.
3011 * linux-mips-low.c (mips_linux_new_process): Likewise.
3012 (mips_linux_new_thread): Likewise.
3013 (mips_add_watchpoint): Likewise.
3014 * linux-x86-low.c (initialize_low_arch): Likewise.
3015 * lynx-low.c (lynx_add_process): Likewise.
3016 * mem-break.c (set_raw_breakpoint_at): Likewise.
3017 (set_breakpoint): Likewise.
3018 (add_condition_to_breakpoint): Likewise.
3019 (add_commands_to_breakpoint): Likewise.
3020 (clone_agent_expr): Likewise.
3021 (clone_one_breakpoint): Likewise.
3022 * regcache.c (new_register_cache): Likewise.
3023 * remote-utils.c (look_up_one_symbol): Likewise.
3024 * server.c (queue_stop_reply): Likewise.
3025 (start_inferior): Likewise.
3026 (queue_stop_reply_callback): Likewise.
3027 (handle_target_event): Likewise.
3028 * spu-low.c (fetch_ppc_memory): Likewise.
3029 (store_ppc_memory): Likewise.
3030 * target.c (set_target_ops): Likewise.
3031 * thread-db.c (thread_db_load_search): Likewise.
3032 (try_thread_db_load_1): Likewise.
3033 * tracepoint.c (add_tracepoint): Likewise.
3034 (add_tracepoint_action): Likewise.
3035 (create_trace_state_variable): Likewise.
3036 (cmd_qtdpsrc): Likewise.
3037 (cmd_qtro): Likewise.
3038 (add_while_stepping_state): Likewise.
3039 * win32-low.c (child_add_thread): Likewise.
3040 (get_image_name): Likewise.
3041
ed8b7b42
YQ
30422015-08-25 Yao Qi <yao.qi@linaro.org>
3043
3044 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3045
db3cb7cb
YQ
30462015-08-25 Yao Qi <yao.qi@linaro.org>
3047
3048 * Makefile.in (aarch64-linux.o): New rule.
3049 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3050 srv_tgtobj.
3051 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3052 (aarch64_init_debug_reg_state): Make it extern.
3053 (aarch64_linux_prepare_to_resume): Remove.
3054
f6011a1c
YQ
30552015-08-25 Yao Qi <yao.qi@linaro.org>
3056
3057 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3058 lwp_arch_private_info and ptid_of_lwp.
3059
88e2cf7e
YQ
30602015-08-25 Yao Qi <yao.qi@linaro.org>
3061
3062 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3063 Find proc_info by find_process_pid. All callers updated.
3064
5e35436e
YQ
30652015-08-25 Yao Qi <yao.qi@linaro.org>
3066
3067 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3068 Remove.
3069 (debug_reg_change_callback): Remove.
3070 (aarch64_notify_debug_reg_change): Remove.
3071
4a8a7965
YQ
30722015-08-25 Yao Qi <yao.qi@linaro.org>
3073
3074 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3075 Call current_lwp_ptid.
3076
32a271ee
YQ
30772015-08-25 Yao Qi <yao.qi@linaro.org>
3078
3079 * linux-aarch64-low.c (debug_reg_change_callback): Use
3080 debug_printf.
3081
0d51c8d7
YQ
30822015-08-25 Yao Qi <yao.qi@linaro.org>
3083
3084 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3085
31a43dd5
YQ
30862015-08-25 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3089
8ee52567
YQ
30902015-08-25 Yao Qi <yao.qi@linaro.org>
3091
3092 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3093 the code.
3094
ff3f0f45
YQ
30952015-08-25 Yao Qi <yao.qi@linaro.org>
3096
3097 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3098 Remove.
3099 (debug_reg_change_callback): Remove argument entry and add argument
3100 lwp. Remove local variable thread. Don't print thread id in the
3101 debugging output. Don't check whether pid of thread equals to pid.
3102 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3103 iterate_over_lwps instead find_inferior.
3104
3d40fbb5
PA
31052015-08-24 Pedro Alves <palves@redhat.com>
3106
3107 * inferiors.c (get_first_process): New function.
3108 * inferiors.h (get_first_process): New declaration.
3109 * remote-utils.c (read_ptid): Default to the first process in the
3110 list, instead of to the current thread's process.
3111
438e1e42
PA
31122015-08-24 Pedro Alves <palves@redhat.com>
3113
3114 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3115 * event-loop.c: Likewise.
3116 * remote-utils.c: Likewise.
3117 * tracepoint.c: Likewise.
3118
a8c6d4fc
PA
31192015-08-24 Pedro Alves <palves@redhat.com>
3120
3121 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3122 ptid_get_lwp.
3123
99b0bb12
PA
31242015-08-21 Pedro Alves <palves@redhat.com>
3125
3126 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3127 instead of literal 1.
3128
f8904751
PA
31292015-08-21 Pedro Alves <palves@redhat.com>
3130
3131 * tdesc.c (default_description): Explicitly zero-initialize.
3132
465a859e
PA
31332015-08-21 Pedro Alves <palves@redhat.com>
3134
3135 PR gdb/18749
3136 * inferiors.c (remove_thread): Discard any pending stop reply for
3137 this thread.
3138 * server.c (remove_all_on_match_pid): Rename to ...
3139 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3140 instead of a pid.
3141 (discard_queued_stop_replies): Change parameter to a ptid. Now
3142 extern.
3143 (handle_v_kill, kill_inferior_callback, captured_main)
3144 (process_serial_event): Adjust.
3145 * server.h (discard_queued_stop_replies): Declare.
3146
f0db101d
PA
31472015-08-21 Pedro Alves <palves@redhat.com>
3148
3149 * linux-low.c (wait_for_sigstop): Always switch to no thread
3150 selected if the previously current thread dies.
3151 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3152 process instead of the current thread's.
3153 * remote-utils.c (input_interrupt): Don't check if there's no
3154 current thread.
3155 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3156 current thread to the general thread fails, error out.
3157 (handle_qxfer_auxv, handle_qxfer_libraries)
3158 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3159 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3160 (handle_query): Check if there's a thread selected instead of
3161 checking whether there's any thread in the thread list.
3162 (handle_qxfer_threads, handle_qxfer_btrace)
3163 (handle_qxfer_btrace_conf): Don't error out early if there's no
3164 thread in the thread list.
3165 (handle_v_cont, myresume): Don't set the current thread to the
3166 continue thread.
3167 (process_serial_event) <Hg handling>: Also set thread_id if the
3168 previous general thread is still alive.
3169 (process_serial_event) <g/G handling>: If setting the current
3170 thread to the general thread fails, error out.
3171 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3172 thread's lwp instead of the current thread's.
3173 * target.c (set_desired_thread): If the desired thread was not
3174 found, leave the current thread pointing to NULL. Return an int
3175 (boolean) indicating success.
3176 * target.h (set_desired_thread): Change return type to int.
3177
40045d91
MF
31782015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3179
3180 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3181 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3182 #includes.
3183 (ps_get_thread_area): New function.
3184
45face3b
GB
31852015-08-19 Gary Benson <gbenson@redhat.com>
3186
3187 * hostio.c (handle_pread): Do not attempt to read more data
3188 than hostio_reply_with_data can fit in a packet.
3189
16d5f642
JB
31902015-08-18 Joel Brobecker <brobecker@adacore.com>
3191
3192 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3193
a738da3a
MF
31942015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3195
3196 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3197
33ebda9d
PA
31982015-08-06 Pedro Alves <palves@redhat.com>
3199
3200 * tracepoint.c (expr_eval_result): Now an int.
3201
a44892be
PA
32022015-08-06 Pedro Alves <palves@redhat.com>
3203
3204 * gdbthread.h (struct regcache): Forward declare.
3205 (struct thread_info) <regcache_data>: Now a struct regcache
3206 pointer.
3207 * inferiors.c (inferior_regcache_data)
3208 (set_inferior_regcache_data): Now work with struct regcache
3209 pointers.
3210 * inferiors.h (struct regcache): Forward declare.
3211 (inferior_regcache_data, set_inferior_regcache_data): Now work
3212 with struct regcache pointers.
3213 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3214 (free_register_cache_thread): Remove struct regcache pointer
3215 casts.
3216
608a1e46
PA
32172015-08-06 Pedro Alves <palves@redhat.com>
3218
3219 * server.c (captured_main): On error, print the exception message
3220 to stderr, and if run_once is set, throw a quit.
3221
f0ce0d3a
PA
32222015-08-06 Pedro Alves <palves@redhat.com>
3223
3224 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3225 the current thread.
3226
bf47e248
PA
32272015-08-06 Pedro Alves <palves@redhat.com>
3228
3229 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3230 reading beyond the passed in buffer length.
3231
b6b9ffcc
PL
32322015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3233
3234 * tracepoint.c (symbol_list) <required>: Remove.
3235
863d01bd
PA
32362015-08-06 Pedro Alves <palves@redhat.com>
3237
3238 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3239 count if stopping and suspending threads.
3240 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3241 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3242 (linux_detach): Complete an ongoing step-over.
3243 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3244 throughout.
3245 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3246 (linux_wait_1): If passing a signal to the inferior after
3247 finishing a step-over, unsuspend and re-resume all lwps. If we
3248 see a single-step event but the thread should be continuing, don't
3249 pass the trap to gdb.
3250 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3251 internal_error instead of gdb_assert.
3252 (enqueue_pending_signal): New function.
3253 (check_ptrace_stopped_lwp_gone): Add debug output.
3254 (start_step_over): Use internal_error instead of gdb_assert.
3255 (complete_ongoing_step_over): New function.
3256 (linux_resume_one_thread): Don't resume a suspended thread.
3257 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3258 it stepping.
3259
00db26fa
PA
32602015-08-06 Pedro Alves <palves@redhat.com>
3261
3262 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3263 (linux_thread_alive): Use lwp_is_marked_dead.
3264 (extended_event_reported): Delete.
3265 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3266 instead of extended_event_reported.
3267 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3268 as well.
3269 (lwp_is_marked_dead): New function.
3270 (lwp_running): Use lwp_is_marked_dead.
3271 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3272 comment.
3273
ad071a30
PA
32742015-08-06 Pedro Alves <palves@redhat.com>
3275
3276 * linux-low.c (linux_wait_1): Move fork event output out of the
3277 !report_to_gdb check. Pass event_child->waitstatus to
3278 target_waitstatus_to_string instead of ourstatus.
3279
524b57e6
YQ
32802015-08-04 Yao Qi <yao.qi@linaro.org>
3281
3282 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3283 if current_thread is 32 bit.
3284
6085d6f6
YQ
32852015-08-04 Yao Qi <yao.qi@linaro.org>
3286
3287 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3288 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3289 * server.c (extended_protocol): Remove "static".
3290 * server.h (extended_protocol): Declare it.
3291
8a7e4587
YQ
32922015-08-04 Yao Qi <yao.qi@linaro.org>
3293
3294 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3295 both aarch64 and aarch32.
3296 (aarch64_set_pc): Likewise.
3297
3b53ae99
YQ
32982015-08-04 Yao Qi <yao.qi@linaro.org>
3299
3300 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3301 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3302 arm-with-neon.xml to srv_xmlfiles.
3303 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3304 (is_64bit_tdesc): New function.
3305 (aarch64_linux_read_description): New function.
3306 (aarch64_arch_setup): Call aarch64_linux_read_description.
3307 (regs_info): Rename to regs_info_aarch64.
3308 (aarch64_regs_info): Return right regs_info.
3309 (initialize_low_arch): Call initialize_low_arch_aarch32.
3310
bd9e6534
YQ
33112015-08-04 Yao Qi <yao.qi@linaro.org>
3312
3313 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3314 * linux-aarch32-low.c: New file.
3315 * linux-aarch32-low.h: New file.
3316 * linux-arm-low.c (arm_fill_gregset): Move it to
3317 linux-aarch32-low.c.
3318 (arm_store_gregset): Likewise.
3319 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3320 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3321 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3322 (regs_info): Rename to regs_info_arm.
3323 (arm_regs_info): Return regs_info_aarch32 if
3324 have_ptrace_getregset is 1 and target description is
3325 arm_with_neon or arm_with_vfpv3.
3326 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3327 Call initialize_low_arch_aarch32 instead.
3328
ded48a5e
YQ
33292015-08-04 Yao Qi <yao.qi@linaro.org>
3330
3331 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3332 * linux-low.c: ... here.
3333 * linux-low.h (have_ptrace_getregset): Declare it.
3334
96e9210f
PA
33352015-08-04 Pedro Alves <palves@redhat.com>
3336
3337 * thread-db.c (struct thread_db): Use new typedefs.
3338 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3339 CHK calls.
3340 (disable_thread_event_reporting): Cast result of dlsym to
3341 destination function pointer type.
3342 (thread_db_mourn): Use td_ta_delete_ftype.
3343
af60a1ef
SL
33442015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3345
3346 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3347 arch variant.
3348 (CDX_BREAKPOINT): Define for R2.
3349 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3350 (the_low_target): Add comments.
3351
e8b41681
YQ
33522015-07-30 Yao Qi <yao.qi@linaro.org>
3353
3354 * linux-arm-low.c (arm_hwcap): Remove it.
3355 (arm_read_description): New local variable arm_hwcap. Don't
3356 set arm_hwcap to zero.
3357
89abb039
YQ
33582015-07-30 Yao Qi <yao.qi@linaro.org>
3359
3360 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3361 Use regcache->tdesc instead.
3362 (arm_store_wmmxregset): Likewise.
3363 (arm_fill_vfpregset): Likewise.
3364 (arm_store_vfpregset): Likewise.
3365
deca266c
YQ
33662015-07-30 Yao Qi <yao.qi@linaro.org>
3367
3368 * linux-arm-low.c: Include arch/arm.h.
3369 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3370 (arm_store_gregset): Likewise.
3371
aa58a496
SM
33722015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3373
3374 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3375 ptrace's 4th parameter.
3376
50904b25
YQ
33772015-07-27 Yao Qi <yao.qi@linaro.org>
3378
3379 * configure.srv (case aarch64*-*-linux*): Don't set
3380 srv_linux_usrregs.
3381
5826e159
PA
33822015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3383
3384 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3385 sys/ptrace.h.
3386 * linux-arm-low.c: Likewise.
3387 * linux-cris-low.c: Likewise.
3388 * linux-crisv32-low.c: Likewise.
3389 * linux-low.c: Likewise.
3390 * linux-m68k-low.c: Likewise.
3391 * linux-mips-low.c: Likewise.
3392 * linux-nios2-low.c: Likewise.
3393 * linux-s390-low.c: Likewise.
3394 * linux-sparc-low.c: Likewise.
3395 * linux-tic6x-low.c: Likewise.
3396 * linux-tile-low.c: Likewise.
3397 * linux-x86-low.c: Likewise.
3398
54019719
PA
33992015-07-24 Pedro Alves <palves@redhat.com>
3400
3401 * config.in: Regenerate.
3402 * configure: Regenerate.
3403
eb7aa561
PA
34042015-07-24 Pedro Alves <palves@redhat.com>
3405
3406 * acinclude.m4: Include ../ptrace.m4.
3407 * configure.ac: Call GDB_AC_PTRACE.
3408 * config.in, configure: Regenerate.
3409
55d7b841
YQ
34102015-07-24 Yao Qi <yao.qi@linaro.org>
3411
3412 * linux-low.c (linux_create_inferior): Remove setting to
3413 proc->priv->new_inferior.
3414 (linux_attach): Likewise.
3415 (linux_low_filter_event): Likewise.
3416 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3417
c06cbd92
YQ
34182015-07-24 Yao Qi <yao.qi@linaro.org>
3419
3420 * linux-low.c (linux_arch_setup): New function.
3421 (linux_low_filter_event): If proc->tdesc is NULL and
3422 proc->attached is true, call the_low_target.arch_setup.
3423 Otherwise, keep status pending, and return.
3424 (linux_resume_one_lwp_throw): Don't call get_pc if
3425 thread->while_stepping isn't NULL. Don't call
3426 get_thread_regcache if proc->tdesc is NULL.
3427 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3428 (linux_target_ops): Install arch_setup.
3429 * server.c (start_inferior): Call the_target->arch_setup.
3430 * target.h (struct target_ops) <arch_setup>: New field.
3431 (target_arch_setup): New marco.
3432 * lynx-low.c (lynx_target_ops): Update.
3433 * nto-low.c (nto_target_ops): Update.
3434 * spu-low.c (spu_target_ops): Update.
3435 * win32-low.c (win32_target_ops): Update.
3436
5ae3ebba
YQ
34372015-07-24 Yao Qi <yao.qi@linaro.org>
3438
3439 * linux-low.c (linux_add_process): Don't set
3440 proc->priv->new_inferior.
3441 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3442 (linux_attach): Likewise.
3443
eb97750b
YQ
34442015-07-24 Yao Qi <yao.qi@linaro.org>
3445
3446 * server.c (start_inferior): Code refactor.
3447
51aee833
YQ
34482015-07-24 Yao Qi <yao.qi@linaro.org>
3449
3450 * server.c (process_serial_event): Set general_thread.
3451
af1b22f3
YQ
34522015-07-21 Yao Qi <yao.qi@linaro.org>
3453
3454 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3455 aarch64_linux_get_debug_reg_capacity.
3456
554717a3
YQ
34572015-07-17 Yao Qi <yao.qi@linaro.org>
3458
3459 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3460 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3461 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3462 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3463 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3464 (AARCH64_HWP_ALIGNMENT): Likewise.
3465 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3466 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3467 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3468 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3469 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3470 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3471 (struct aarch64_debug_reg_state): Likewise.
3472 (struct arch_lwp_info): Likewise.
3473 (aarch64_align_watchpoint): Likewise.
3474 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3475 (aarch64_watchpoint_length): Likewise.
3476 (aarch64_point_encode_ctrl_reg): Likewise
3477 (aarch64_point_is_aligned): Likewise.
3478 (aarch64_align_watchpoint): Likewise.
3479 (aarch64_linux_set_debug_regs):
3480 (aarch64_dr_state_insert_one_point): Likewise.
3481 (aarch64_dr_state_remove_one_point): Likewise.
3482 (aarch64_handle_breakpoint): Likewise.
3483 (aarch64_handle_aligned_watchpoint): Likewise.
3484 (aarch64_handle_unaligned_watchpoint): Likewise.
3485 (aarch64_handle_watchpoint): Likewise.
3486
c67ca4de
YQ
34872015-07-17 Yao Qi <yao.qi@linaro.org>
3488
3489 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3490 and don't aarch64_get_debug_reg_state. All callers update.
3491 (aarch64_handle_aligned_watchpoint): Likewise.
3492 (aarch64_handle_unaligned_watchpoint): Likewise.
3493 (aarch64_handle_watchpoint): Likewise.
3494 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3495 (aarch64_remove_point): Likewise.
3496
25abf979
YQ
34972015-07-17 Yao Qi <yao.qi@linaro.org>
3498
3499 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3500 debug_printf.
3501 (aarch64_handle_unaligned_watchpoint): Likewise.
3502
db1ff28b
JK
35032015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3504
3505 Revert the previous 3 commits:
3506 Move gdb_regex* to common/
3507 Move linux_find_memory_regions_full & co.
3508 gdbserver build-id attribute generator
3509
700ca40f
JK
35102015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3511 Jan Kratochvil <jan.kratochvil@redhat.com>
3512
3513 gdbserver build-id attribute generator.
3514 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3515 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3516 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3517 (find_phdr): New.
3518 (get_dynamic): Use find_pdhr to traverse program headers.
3519 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3520 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3521 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3522 (get_hex_build_id): New.
3523 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3524 to reply XML document.
3525
9904185c
JK
35262015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3527 Jan Kratochvil <jan.kratochvil@redhat.com>
3528
3529 * target.c: Include target/target-utils.h and fcntl.h.
3530 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3531 (target_fileio_read_stralloc): New functions.
3532
6e5b4429
JK
35332015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3534
3535 * Makefile.in (OBS): Add gdb_regex.o.
3536 (gdb_regex.o): New.
3537 * config.in: Rebuilt.
3538 * configure: Rebuilt.
3539
ddc98fbf
JK
35402015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3541 Jan Kratochvil <jan.kratochvil@redhat.com>
3542
3543 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3544 * Makefile.in (OBS): Add target-utils.o.
3545 (linux-maps.o, target-utils.o): New.
3546 * configure.srv (srv_linux_obj): Add linux-maps.o.
3547
e57bb7a0
PL
35482015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3549
3550 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3551 function, return 1.
3552 (the_low_target): Install it.
3553
586b02a9
PA
35542015-07-14 Pedro Alves <palves@redhat.com>
3555
3556 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3557 Instead, ignore ECHILD, and throw an error for other errnos.
3558
58c1b36c
PA
35592015-07-10 Pedro Alves <palves@redhat.com>
3560
3561 * event-loop.c (struct callback_event) <data>: Change type to
3562 gdb_client_data instance instead of gdb_client_data pointer.
3563 (append_callback_event): Adjust.
3564
421530db
PL
35652015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3566
3567 * linux-aarch64-low.c: Add comments for each linux_target_ops
3568 method. Remove comments already covered in target_ops and
3569 linux_target_ops definitions.
3570 (the_low_target): Add comments for each unimplemented method.
3571
c2d65f38
YQ
35722015-07-09 Yao Qi <yao.qi@linaro.org>
3573
3574 * linux-aarch64-low.c (aarch64_regmap): Remove.
3575 (aarch64_usrregs_info): Remove.
3576 (regs_info): Set field usrregs to NULL.
3577
b20a6524
MM
35782015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3579
3580 * linux-low.c: Include "rsp-low.h"
3581 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3582 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3583 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3584 (handle_btrace_enable_pt): New.
3585 (handle_btrace_general_set): Support "pt".
3586 (handle_btrace_conf_general_set): Support "pt:size".
3587
96c97461
PL
35882015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3589
3590 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3591 Z_PACKET_SW_BP.
3592
37d66942
PL
35932015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3594
3595 * linux-aarch64-low.c: Remove comment about endianness.
3596 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3597 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3598 memcmp.
3599
dc06243f
GB
36002015-06-24 Gary Benson <gbenson@redhat.com>
3601
3602 * linux-i386-ipa.c (stdint.h): Do not include.
3603 * lynx-i386-low.c (stdint.h): Likewise.
3604 * lynx-ppc-low.c (stdint.h): Likewise.
3605 * mem-break.c (stdint.h): Likewise.
3606 * thread-db.c (stdint.h): Likewise.
3607 * tracepoint.c (stdint.h): Likewise.
3608 * win32-low.c (stdint.h): Likewise.
3609
124e13d9
SM
36102015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3611
3612 * server.c (write_qxfer_response): Update call to
3613 remote_escape_output.
3614
909c2cda
JK
36152015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3616 Jan Kratochvil <jan.kratochvil@redhat.com>
3617
3618 Merge multiple hex conversions.
3619 * gdbreplay.c (tohex): Rename to 'fromhex'.
3620 (logchar): Use fromhex.
3621
24c05f46
JK
36222015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3623
3624 * server.c (handle_qxfer_libraries): Set `version' attribute for
3625 <library-list>.
3626
14d2069a
GB
36272015-06-10 Gary Benson <gbenson@redhat.com>
3628
3629 * target.h (struct target_ops) <multifs_open>: New field.
3630 <multifs_unlink>: Likewise.
3631 <multifs_readlink>: Likewise.
3632 * linux-low.c (nat/linux-namespaces.h): New include.
3633 (linux_target_ops): Initialize the_target->multifs_open,
3634 the_target->multifs_unlink and the_target->multifs_readlink.
3635 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3636 * hostio.c (hostio_fs_pid): New static variable.
3637 (hostio_handle_new_gdb_connection): New function.
3638 (handle_setfs): Likewise.
3639 (handle_open): Use the_target->multifs_open as appropriate.
3640 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3641 (handle_readlink): Use the_target->multifs_readlink as
3642 appropriate.
3643 (handle_vFile): Handle vFile:setfs packets.
3644 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3645 after target_handle_new_gdb_connection.
3646
4b8b5e72
GB
36472015-06-10 Gary Benson <gbenson@redhat.com>
3648
3649 * configure.ac (AC_CHECK_FUNCS): Add setns.
3650 * config.in: Regenerate.
3651 * configure: Likewise.
3652 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3653 (linux-namespaces.o): New rule.
3654 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3655
3ac2e371
GB
36562015-06-09 Gary Benson <gbenson@redhat.com>
3657
3658 * hostio.c (handle_open): Process mode argument with
3659 fileio_to_host_mode.
3660
ca9b78ce
YQ
36612015-06-01 Yao Qi <yao.qi@linaro.org>
3662
3663 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3664 * linux-x86-low.c: Likewise.
3665
bfacd19d
DB
36662015-05-28 Don Breazeal <donb@codesourcery.com>
3667
3668 * linux-low.c (handle_extended_wait): Initialize
3669 thread_info.last_resume_kind for new fork children.
3670
452003ef
PA
36712015-05-15 Pedro Alves <palves@redhat.com>
3672
3673 * target.h (target_handle_new_gdb_connection): Rewrite using if
3674 wrapped in do/while.
3675
1041a03c
JB
36762015-05-14 Joel Brobecker <brobecker@adacore.com>
3677
3678 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3679 * configure, config.in: Regenerate.
3680 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3681 Declare typedef.
3682
c269dbdb
DB
36832015-05-12 Don Breazeal <donb@codesourcery.com>
3684
3685 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3686 PTRACE_EVENT_VFORK_DONE.
3687 (linux_low_ptrace_options, extended_event_reported): Add vfork
3688 events.
3689 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3690 and "vforkdone" for RSP 'T' Stop Reply Packet.
3691 * server.h (report_vfork_events): Declare
3692 global variable.
3693
3a8a0396
DB
36942015-05-12 Don Breazeal <donb@codesourcery.com>
3695
3696 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3697 (the_low_target) <new_fork>: Initialize new member.
3698 * linux-arm-low.c (arm_new_fork): New function.
3699 (the_low_target) <new_fork>: Initialize new member.
3700 * linux-low.c (handle_extended_wait): Call new target function
3701 new_fork.
3702 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3703 * linux-mips-low.c (mips_add_watchpoint): New function
3704 extracted from mips_insert_point.
3705 (the_low_target) <new_fork>: Initialize new member.
3706 (mips_linux_new_fork): New function.
3707 (mips_insert_point): Call mips_add_watchpoint.
3708 * linux-x86-low.c (x86_linux_new_fork): New function.
3709 (the_low_target) <new_fork>: Initialize new member.
3710
de0d863e
DB
37112015-05-12 Don Breazeal <donb@codesourcery.com>
3712
3713 * linux-low.c (handle_extended_wait): Implement return value,
3714 rename argument 'event_child' to 'event_lwp', handle
3715 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3716 (linux_low_ptrace_options): New function.
3717 (linux_low_filter_event): Call linux_low_ptrace_options,
3718 use different argument fo linux_enable_event_reporting,
3719 use return value from handle_extended_wait.
3720 (extended_event_reported): New function.
3721 (linux_wait_1): Call extended_event_reported and set
3722 status to report fork events.
3723 (linux_write_memory): Add pid to debug message.
3724 (reset_lwp_ptrace_options_callback): New function.
3725 (linux_handle_new_gdb_connection): New function.
3726 (linux_target_ops): Initialize new structure member.
3727 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3728 * lynx-low.c: Initialize new structure member.
3729 * remote-utils.c (prepare_resume_reply): Implement stop reason
3730 "fork" for "T" stop message.
3731 * server.c (handle_query): Call handle_new_gdb_connection.
3732 * server.h (report_fork_events): Declare global flag.
3733 * target.h (struct target_ops) <handle_new_gdb_connection>:
3734 New member.
3735 (target_handle_new_gdb_connection): New macro.
3736 * win32-low.c: Initialize new structure member.
3737
ddcbc397
DB
37382015-05-12 Don Breazeal <donb@codesourcery.com>
3739
3740 * mem-break.c (APPEND_TO_LIST): Define macro.
3741 (clone_agent_expr): New function.
3742 (clone_one_breakpoint): New function.
3743 (clone_all_breakpoints): New function.
3744 * mem-break.h: Declare new functions.
3745
89245bc0
DB
37462015-05-12 Don Breazeal <donb@codesourcery.com>
3747
3748 * linux-low.c (linux_supports_fork_events): New function.
3749 (linux_supports_vfork_events): New function.
3750 (linux_target_ops): Initialize new structure members.
3751 (initialize_low): Call linux_check_ptrace_features.
3752 * lynx-low.c (lynx_target_ops): Initialize new structure
3753 members.
3754 * server.c (report_fork_events, report_vfork_events):
3755 New global flags.
3756 (handle_query): Add new features to qSupported packet and
3757 response.
3758 (captured_main): Initialize new global variables.
3759 * target.h (struct target_ops) <supports_fork_events>:
3760 New member.
3761 <supports_vfork_events>: New member.
3762 (target_supports_fork_events): New macro.
3763 (target_supports_vfork_events): New macro.
3764 * win32-low.c (win32_target_ops): Initialize new structure
3765 members.
3766
835205d0
GB
37672015-05-12 Gary Benson <gbenson@redhat.com>
3768
3769 * server.c (handle_qxfer_exec_file): Use current process
3770 if annex is empty.
3771
21e94bd9
SL
37722015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3773
3774 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3775 Remove HAVE_PTRACE_GETREGS conditionals.
3776 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3777 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3778
45614f15
YQ
37792015-05-08 Yao Qi <yao.qi@linaro.org>
3780
3781 * linux-low.c (linux_supports_conditional_breakpoints): New
3782 function.
3783 (linux_target_ops): Install new target method.
3784 * lynx-low.c (lynx_target_ops): Install NULL hook for
3785 supports_conditional_breakpoints.
3786 * nto-low.c (nto_target_ops): Likewise.
3787 * spu-low.c (spu_target_ops): Likewise.
3788 * win32-low.c (win32_target_ops): Likewise.
3789 * server.c (handle_query): Check
3790 target_supports_conditional_breakpoints.
3791 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3792 New field.
3793 (target_supports_conditional_breakpoints): New macro.
3794
80ad801e
PA
37952015-05-06 Pedro Alves <palves@redhat.com>
3796
3797 PR server/18081
3798 * server.c (start_inferior): If the process exits, mourn it.
3799
819843c7
GB
38002015-04-21 Gary Benson <gbenson@redhat.com>
3801
3802 * hostio.c (fileio_open_flags_to_host): Factored out to
3803 fileio_to_host_openflags in common/fileio.c. Single use
3804 updated.
3805
a2d5a9d7
MF
38062015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3807
3808 * linux-xtensa-low.c (xtensa_fill_gregset)
3809 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3810 XCHAL_HAVE_LOOP.
3811
deb44829
MF
38122015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3813
3814 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3815 (regs_info): Replace usrregs pointer with NULL.
3816
e57f1de3
GB
38172015-04-17 Gary Benson <gbenson@redhat.com>
3818
3819 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3820 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3821 * server.c (handle_qxfer_exec_file): New function.
3822 (qxfer_packets): Add exec-file entry.
3823 (handle_query): Report qXfer:exec-file:read as supported packet.
3824
62828379
RN
38252015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3826
3827 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3828
b88bb450
GB
38292015-04-09 Gary Benson <gbenson@redhat.com>
3830
3831 * hostio-errno.c (errno_to_fileio_error): Remove function.
3832 Update caller to use remote_fileio_to_fio_error.
3833
c8f4bfdd
YQ
38342015-04-09 Yao Qi <yao.qi@linaro.org>
3835
3836 * linux-low.c (linux_insert_point): Call
3837 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3838 (linux_remove_point): Call remove_memory_breakpoint if type is
3839 raw_bkpt_type_sw.
3840 * linux-x86-low.c (x86_insert_point): Don't call
3841 insert_memory_breakpoint.
3842 (x86_remove_point): Don't call remove_memory_breakpoint.
3843
41f98f02
PA
38442015-04-01 Pedro Alves <palves@redhat.com>
3845 Cleber Rosa <crosa@redhat.com>
3846
3847 * server.c (gdbserver_usage): Reorganize and extend the usage
3848 message.
3849
2bf6fb9d
PA
38502015-03-24 Pedro Alves <palves@redhat.com>
3851
3852 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3853 output. Also dump TRAP_TRACE.
3854 (linux_low_filter_event): In debug output, distinguish a
3855 resume_stop SIGSTOP from a delayed SIGSTOP.
3856
369f6daa
GB
38572015-03-24 Gary Benson <gbenson@redhat.com>
3858
3859 * linux-x86-low.c (x86_linux_new_thread): Moved to
3860 nat/x86-linux.c.
3861 (x86_linux_prepare_to_resume): Likewise.
3862
8e5d4070
GB
38632015-03-24 Gary Benson <gbenson@redhat.com>
3864
3865 * Makefile.in (x86-linux-dregs.o): New rule.
3866 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3867 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3868 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3869 (x86_linux_dr_get): Likewise.
3870 (x86_linux_dr_set): Likewise.
3871 (update_debug_registers_callback): Likewise.
3872 (x86_linux_dr_set_addr): Likewise.
3873 (x86_linux_dr_get_addr): Likewise.
3874 (x86_linux_dr_set_control): Likewise.
3875 (x86_linux_dr_get_control): Likewise.
3876 (x86_linux_dr_get_status): Likewise.
3877 (x86_linux_update_debug_registers): Likewise.
3878
2b95d440
GB
38792015-03-24 Gary Benson <gbenson@redhat.com>
3880
3881 * linux-x86-low.c (x86_linux_update_debug_registers):
3882 New function, factored out from...
3883 (x86_linux_prepare_to_resume): ...this.
3884
14b0bc68
GB
38852015-03-24 Gary Benson <gbenson@redhat.com>
3886
3887 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3888 (x86_linux_dr_set): Likewise.
3889 (update_debug_registers_callback): Likewise.
3890 (x86_linux_dr_set_addr): Likewise.
3891 (x86_linux_dr_get_addr): Likewise.
3892 (x86_linux_dr_set_control): Likewise.
3893 (x86_linux_dr_get_control): Likewise.
3894 (x86_linux_dr_get_status): Likewise.
3895 (x86_linux_prepare_to_resume): Likewise.
3896
5dfe6ca8
GB
38972015-03-24 Gary Benson <gbenson@redhat.com>
3898
3899 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3900 Use perror_with_name. Pass string through gettext.
3901 (x86_linux_dr_set): Likewise.
3902
d33472ad
GB
39032015-03-24 Gary Benson <gbenson@redhat.com>
3904
3905 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3906 (x86_linux_dr_set_addr): ...this.
3907 (x86_dr_low_get_addr): Rename to...
3908 (x86_linux_dr_get_addr): ...this.
3909 (x86_dr_low_set_control): Rename to...
3910 (x86_linux_dr_set_control): ...this.
3911 (x86_dr_low_get_control): Rename to...
3912 (x86_linux_dr_get_control): ...this.
3913 (x86_dr_low_get_status): Rename to...
3914 (x86_linux_dr_get_status): ...this.
3915 (x86_dr_low): Update with new function names.
3916
4b134ca1
GB
39172015-03-24 Gary Benson <gbenson@redhat.com>
3918
3919 * Makefile.in (x86-linux.o): New rule.
3920 * configure.srv: Add x86-linux.o to relevant targets.
3921 * linux-low.c (lwp_set_arch_private_info): New function.
3922 (lwp_arch_private_info): Likewise.
3923 * linux-x86-low.c: Include nat/x86-linux.h.
3924 (arch_lwp_info): Removed structure.
3925 (update_debug_registers_callback):
3926 Use lwp_set_debug_registers_changed.
3927 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3928 and lwp_set_debug_registers_changed.
3929 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3930
34c703da
GB
39312015-03-24 Gary Benson <gbenson@redhat.com>
3932
3933 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3934 * linux-arm-low.c (arm_new_thread): Likewise.
3935 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3936 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3937 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3938 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3939
cff068da
GB
39402015-03-24 Gary Benson <gbenson@redhat.com>
3941
3942 * linux-low.c (ptid_of_lwp): New function.
3943 (lwp_is_stopped): Likewise.
3944 (lwp_stop_reason): Likewise.
3945 * linux-x86-low.c (update_debug_registers_callback):
3946 Use lwp_is_stopped.
3947 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3948 lwp_stop_reason.
3949
b2f7c7e8
GB
39502015-03-24 Gary Benson <gbenson@redhat.com>
3951
3952 * linux-low.h (linux_stop_lwp): Remove declaration.
3953
6d4ee8c6
GB
39542015-03-24 Gary Benson <gbenson@redhat.com>
3955
3956 * linux-low.h: Include nat/linux-nat.h.
3957 * linux-low.c (iterate_over_lwps_args): New structure.
3958 (iterate_over_lwps_filter): New function.
3959 (iterate_over_lwps): Likewise.
3960 * linux-x86-low.c (update_debug_registers_callback):
3961 Update signature to what iterate_over_lwps expects.
3962 Remove PID check that iterate_over_lwps now performs.
3963 (x86_dr_low_set_addr): Use iterate_over_lwps.
3964 (x86_dr_low_set_control): Likewise.
3965
70a0bb6b
GB
39662015-03-24 Gary Benson <gbenson@redhat.com>
3967
3968 * linux-x86-low.c (x86_debug_reg_state): New function.
3969 (x86_linux_prepare_to_resume): Use the above.
3970
7b669087
GB
39712015-03-24 Gary Benson <gbenson@redhat.com>
3972
3973 * linux-low.c (current_lwp_ptid): New function.
3974 * linux-x86-low.c: Include nat/linux-nat.h.
3975 (x86_dr_low_get_addr): Use current_lwp_ptid.
3976 (x86_dr_low_get_control): Likewise.
3977 (x86_dr_low_get_status): Likewise.
3978
eef49a3d
PA
39792015-03-20 Pedro Alves <palves@redhat.com>
3980
3981 * tracepoint.c (cmd_qtstatus): Make "str" const.
3982
b2333d22
PA
39832015-03-20 Pedro Alves <palves@redhat.com>
3984
3985 * server.c (handle_general_set): Make "req_str" const.
3986
23f238d3
PA
39872015-03-19 Pedro Alves <palves@redhat.com>
3988
3989 * linux-low.c (linux_resume_one_lwp): Rename to ...
3990 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3991 instead call perror_with_name.
3992 (check_ptrace_stopped_lwp_gone): New function.
3993 (linux_resume_one_lwp): Reimplement as wrapper around
3994 linux_resume_one_lwp_throw that swallows errors if the LWP is
3995 gone.
3996
91baf43f
PA
39972015-03-19 Pedro Alves <palves@redhat.com>
3998
3999 * linux-low.c (count_events_callback, select_event_lwp_callback):
4000 No longer check whether the thread has resume_stop as last resume
4001 kind.
4002
8bf3b159
PA
40032015-03-19 Pedro Alves <palves@redhat.com>
4004
4005 * linux-low.c (count_events_callback, select_event_lwp_callback):
4006 Use the lwp's status_pending_p field, not the thread's.
4007
b90fc188
PA
40082015-03-19 Pedro Alves <palves@redhat.com>
4009
4010 * linux-low.c (select_event_lwp_callback): Update comments to
4011 no longer mention SIGTRAP.
4012
464b0089
GB
40132015-03-18 Gary Benson <gbenson@redhat.com>
4014
4015 * server.c (handle_query): Do not report vFile:fstat as supported.
4016
aa9e327f
GB
40172015-03-11 Gary Benson <gbenson@redhat.com>
4018
4019 * hostio.c (sys/types.h): New include.
4020 (sys/stat.h): Likewise.
4021 (common-remote-fileio.h): Likewise.
4022 (handle_fstat): New function.
4023 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4024
791c0056
GB
40252015-03-11 Gary Benson <gbenson@redhat.com>
4026
4027 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4028 struct stat.st_blocks and struct stat.st_blksize.
4029 * configure: Regenerate.
4030 * config.in: Likewise.
4031 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4032 (OBS): Add common-remote-fileio.o.
4033 (common-remote-fileio.o): New rule.
4034
9a9df970
PA
40352015-03-09 Pedro Alves <palves@redhat.com>
4036
4037 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4038 'struct sockaddr' pointer in 'accept' call.
4039
9eb1356e
PA
40402015-03-09 Pedro Alves <palves@redhat.com>
4041
4042 Revert:
4043 2015-03-07 Pedro Alves <palves@redhat.com>
4044 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4045 or <winsock2.h> here. Instead include "gdb_socket.h".
4046 (remote_open): Use union gdb_sockaddr_u.
4047 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4048 or <winsock2.h> here. Instead include "gdb_socket.h".
4049 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4050 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4051 or <sys/un.h>.
4052 (init_named_socket, gdb_agent_helper_thread): Use union
4053 gdb_sockaddr_u.
4054
aac331e4
PA
40552015-03-07 Pedro Alves <palves@redhat.com>
4056
4057 * configure.ac (build_warnings): Move
4058 -Wdeclaration-after-statement to the C-specific set.
4059 * configure: Regenerate.
4060
366c75fc
PA
40612015-03-07 Pedro Alves <palves@redhat.com>
4062
4063 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4064 or <winsock2.h> here. Instead include "gdb_socket.h".
4065 (remote_open): Use union gdb_sockaddr_u.
4066 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4067 or <winsock2.h> here. Instead include "gdb_socket.h".
4068 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4069 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4070 or <sys/un.h>.
4071 (init_named_socket, gdb_agent_helper_thread): Use union
4072 gdb_sockaddr_u.
4073
492d29ea
PA
40742015-03-07 Pedro Alves <palves@redhat.com>
4075
4076 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4077 instead.
4078
60a191ed
YQ
40792015-03-06 Yao Qi <yao.qi@linaro.org>
4080
4081 * linux-aarch64-low.c (aarch64_insert_point): Use
4082 show_debug_regs as a boolean.
4083 (aarch64_remove_point): Likewise.
4084
f5771b1d
PA
40852015-03-05 Pedro Alves <palves@redhat.com>
4086
4087 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4088 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4089 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4090 * nto-low.c (nto_target_ops): Likewise.
4091 * spu-low.c (spu_target_ops): Likewise.
4092 * win32-low.c (win32_target_ops): Likewise.
4093
3e572f71
PA
40942015-03-04 Pedro Alves <palves@redhat.com>
4095
72f4393d 4096 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4097 Decide whether a breakpoint triggered based on the SIGTRAP's
4098 siginfo.si_code.
72f4393d
L
4099 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4100 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4101 (linux_low_filter_event): Check for breakpoints before checking
4102 watchpoints.
4103 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4104 siginfo.si_code.
72f4393d
L
4105 (linux_stopped_by_sw_breakpoint)
4106 (linux_supports_stopped_by_sw_breakpoint)
4107 (linux_stopped_by_hw_breakpoint)
4108 (linux_supports_stopped_by_hw_breakpoint): New functions.
4109 (linux_target_ops): Install new target methods.
3e572f71 4110
1ec68e26
PA
41112015-03-04 Pedro Alves <palves@redhat.com>
4112
4113 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4114 * server.c (swbreak_feature, hwbreak_feature): New globals.
4115 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4116 (captured_main): Clear swbreak_feature and hwbreak_feature.
4117 * server.h (swbreak_feature, hwbreak_feature): Declare.
4118 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4119 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4120 supports_stopped_by_hw_breakpoint>: New fields.
4121 (target_supports_stopped_by_sw_breakpoint)
4122 (target_stopped_by_sw_breakpoint)
4123 (target_supports_stopped_by_hw_breakpoint)
4124 (target_stopped_by_hw_breakpoint): Declare.
4125
15c66dd6
PA
41262015-03-04 Pedro Alves <palves@redhat.com>
4127
4128 enum lwp_stop_reason -> enum target_stop_reason
4129 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4130 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4131 (linux_wait_1, stuck_in_jump_pad_callback)
4132 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4133 (linux_stopped_by_watchpoint):
4134 * linux-low.h (enum lwp_stop_reason): Delete.
4135 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4136 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4137
98fc70d6
YQ
41382015-03-04 Yao Qi <yao.qi@linaro.org>
4139
4140 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4141
dd2ac174
GB
41422015-03-03 Gary Benson <gbenson@redhat.com>
4143
4144 * hostio.c (handle_vFile): Fix prefix lengths.
4145
d68e53f4
MM
41462015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4147
4148 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4149 ptr_bits.
4150
bf2d68ab
AA
41512015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4152
4153 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4154 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4155 (clean): Add "rm -f" for above C files.
4156 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4157 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4158 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4159 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4160 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4161 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4162 (init_registers_s390x_vx_linux64)
4163 (init_registers_s390x_tevx_linux64)
4164 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4165 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4166 declarations.
4167 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4168 (s390_store_vxrs_high): New functions.
4169 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4170 NT_S390_VXRS_HIGH.
4171 (s390_arch_setup): Add logic for selecting one of the new target
4172 descriptions. Activate the new vector regsets if applicable.
4173 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4174 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4175 and init_registers_s390x_tevx_linux64.
4176
c966a859
PA
41772015-03-01 Pedro Alves <palves@redhat.com>
4178
4179 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4180 parameter.
4181
4180215b
PA
41822015-02-27 Pedro Alves <palves@redhat.com>
4183
4184 * linux-x86-low.c (u_debugreg_offset): New function.
4185 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4186
749bab01
PA
41872015-02-27 Pedro Alves <palves@redhat.com>
4188
4189 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4190 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4191 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4192 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4193 (ps_lsetfpregs, ps_getpid)
4194 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4195 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4196 (ps_lsetxregs, ps_plog): Declare.
4197
3c14e5a3
PA
41982015-02-27 Pedro Alves <palves@redhat.com>
4199
4200 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4201 IP_AGENT_EXPORT_FUNC.
4202 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4203 IP_AGENT_EXPORT_FUNC.
4204 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4205 (IP_AGENT_EXPORT): Delete.
4206 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4207 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4208 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4209 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4210 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4211 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4212 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4213 (traceframe_read_count, traceframe_write_count)
4214 (traceframes_created, trace_state_variables, get_raw_reg)
4215 (get_trace_state_variable_value, set_trace_state_variable_value)
4216 (ust_loaded, helper_thread_id, cmd_buf): Use
4217 IPA_SYM_EXPORTED_NAME.
4218 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4219 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4220 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4221 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4222 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4223 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4224 EXTERN_C_PUSH/EXTERN_C_POP.
4225 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4226 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4227 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4228 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4229 (traceframe_write_count, traceframe_read_count)
4230 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4231 (about_to_request_buffer_space, get_trace_state_variable_value)
4232 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4233 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4234 EXTERN_C_PUSH/EXTERN_C_POP.
4235 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4236 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4237 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4238 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4239 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4240 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4241 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4242 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4243 Define.
4244 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4245 (IP_AGENT_EXPORT_VAR_DECL): Define.
4246 (tracing): Declare.
4247 (gdb_agent_get_raw_reg): Declare.
4248
fe978cb0
PA
42492015-02-27 Tom Tromey <tromey@redhat.com>
4250 Pedro Alves <palves@redhat.com>
4251
4252 Rename symbols whose names are reserved C++ keywords throughout.
4253
3bc3d82a
PA
42542015-02-27 Pedro Alves <palves@redhat.com>
4255
4256 * Makefile.in (COMPILER): New, get it from autoconf.
4257 (CXX): Get from autoconf instead.
4258 (COMPILE.pre): Use COMPILER.
4259 (CC-LD): Rename to ...
4260 (CC_LD): ... this. Use COMPILER.
4261 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4262 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4263 * acinclude.m4: Include build-with-cxx.m4.
4264 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4265 Disable -Werror by default if building in C++ mode.
4266 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4267 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4268 the C++ compiler. Save/restore CXXFLAGS too.
4269 * configure: Regenerate.
4270
07697489
PA
42712015-02-27 Pedro Alves <palves@redhat.com>
4272
4273 * acinclude.m4: Include libiberty.m4.
4274 * configure.ac: Call libiberty_INIT.
4275 * config.in, configure: Regenerate.
4276
9beb7c4e
PA
42772015-02-26 Pedro Alves <palves@redhat.com>
4278
4279 * linux-low.c (linux_wait_1): When incrementing the PC past a
4280 program breakpoint always use the_low_target.breakpoint_len as
4281 increment, rather than the maximum between that and
4282 the_low_target.decr_pc_after_break.
4283
8090aef2
PA
42842015-02-23 Pedro Alves <palves@redhat.com>
4285
4286 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4287 thread was doing a step-over; always adjust the PC if
4288 we stepped over a permanent breakpoint.
4289 (linux_wait_1): If we stepped over breakpoint that was on top of a
4290 permanent breakpoint, manually advance the PC past it.
4291
bc9540e8
PA
42922015-02-23 Pedro Alves <palves@redhat.com>
4293
4294 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4295 modes.
4296 (x86_fill_gregset, x86_store_gregset): Use it when handling
4297 $orig_eax.
4298
2db9a427
PA
42992015-02-20 Pedro Alves <palves@redhat.com>
4300
4301 * thread-db.c: Include "nat/linux-procfs.h".
4302 (thread_db_init): Skip listing new threads if the kernel supports
4303 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4304
afa8d396
PA
43052015-02-20 Pedro Alves <palves@redhat.com>
4306
4307 * linux-low.c (status_pending_p_callback): Use ptid_match.
4308
c9587f88
AT
43092015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4310
4311 PR breakpoints/16812
4312 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4313 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4314 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4315
b05ec7a5
AT
43162015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4317
4318 PR breakpoints/15956
4319 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4320
d33501a5
MM
43212015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4322
4323 * linux-low.c (linux_low_btrace_conf): Print size.
4324 * server.c (handle_btrace_conf_general_set): New.
4325 (hanle_general_set): Call handle_btrace_conf_general_set.
4326 (handle_query): Report Qbtrace-conf:bts:size as supported.
4327
f4abbc16
MM
43282015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4329
4330 * linux-low.c (linux_low_enable_btrace): Update parameters.
4331 (linux_low_btrace_conf): New.
4332 (linux_target_ops)<to_btrace_conf>: Initialize.
4333 * server.c (current_btrace_conf): New.
4334 (handle_btrace_enable): Rename to ...
4335 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4336 to target_enable_btrace. Update comment. Update users.
4337 (handle_qxfer_btrace_conf): New.
4338 (qxfer_packets): Add btrace-conf entry.
4339 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4340 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4341 (target_ops)<read_btrace_conf>: New.
4342 (target_enable_btrace): Update parameters.
4343 (target_read_btrace_conf): New.
4344
043c3577
MM
43452015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4346
4347 * server.c (handle_btrace_general_set): Remove call to
4348 target_supports_btrace.
4349 (supported_btrace_packets): New.
4350 (handle_query): Call supported_btrace_packets.
4351 * target.h: include btrace-common.h.
4352 (btrace_target_info): Removed.
4353 (supports_btrace, target_supports_btrace): Update parameters.
4354
734b0e4b
MM
43552015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4356
4357 * Makefile.in (SFILES): Add common/btrace-common.c.
4358 (OBS): Add common/btrace-common.o.
4359 (btrace-common.o): Add build rules.
4360 * linux-low: Include btrace-common.h.
4361 (linux_low_read_btrace): Use struct btrace_data. Call
4362 btrace_data_init and btrace_data_fini.
4363
d6c146e9
PA
43642015-02-06 Pedro Alves <palves@redhat.com>
4365
4366 * thread-db.c (find_new_threads_callback): Add debug output.
4367
20ba1ce6
PA
43682015-02-04 Pedro Alves <palves@redhat.com>
4369
4370 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4371 (resume_stopped_resumed_lwps): New function.
4372 (linux_wait_for_event_filtered): Use it.
4373
8cc73a39
SDJ
43742015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4375
4376 * Makefile.in (SFILES): Add linux-personality.c.
4377 (linux-personality.o): New rule.
4378 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4379 list of objects to be built.
4380 * linux-low.c: Include nat/linux-personality.h.
4381 (linux_create_inferior): Remove code to disable address space
4382 randomization (moved to ../nat/linux-personality.c). Create
4383 cleanup to disable address space randomization.
4384
fb23d554
SDJ
43852015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4386
4387 * Makefile.in (posix-strerror.o): New rule.
4388 (mingw-strerror.o): Likewise.
4389 * configure: Regenerated.
4390 * configure.ac: Source file ../common/common.host. Initialize new
4391 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4392
cdf43629
YQ
43932015-01-14 Yao Qi <yao@codesourcery.com>
4394
4395 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4396 (ppc-linux.o): New rule.
4397 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4398 * configure.ac: AC_CHECK_FUNCS(getauxval).
4399 * config.in: Re-generated.
4400 * configure: Re-generated.
4401 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4402 ppc64_64bit_inferior_p
4403
514c5338
YQ
44042015-01-14 Yao Qi <yao@codesourcery.com>
4405
4406 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4407 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4408 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4409 (PT_ORIG_R3, PT_TRAP): Likewise.
4410 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4411 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4412 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4413
3368c1e5
JB
44142015-01-10 Joel Brobecker <brobecker@adacore.com>
4415
4416 * i387-fp.c (i387_cache_to_xsave): In look over
4417 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4418 zmmh_low_space field by use of zmmh_high_space.
4419
582511be
PA
44202015-01-09 Pedro Alves <palves@redhat.com>
4421
4422 * linux-low.c (step_over_bkpt): Move higher up in the file.
4423 (handle_extended_wait): Don't store the stop_pc here.
4424 (get_stop_pc): Adjust comments and rename to ...
4425 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4426 stopped for a software breakpoint or hardware breakpoint.
4427 (thread_still_has_status_pending_p): New function.
4428 (status_pending_p_callback): Use
4429 thread_still_has_status_pending_p. If the event is no longer
4430 interesting, resume the LWP.
4431 (handle_tracepoints): Add assert.
4432 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4433 (wstatus_maybe_breakpoint): New function.
4434 (cancel_breakpoint): Delete function.
4435 (check_stopped_by_watchpoint): New function, factored out from
4436 linux_low_filter_event.
4437 (lp_status_maybe_breakpoint): Delete function.
4438 (linux_low_filter_event): Remove filter_ptid argument.
4439 Leave thread group exits pending here. Store the LWP's stop PC.
4440 Always leave events pending.
4441 (linux_wait_for_event_filtered): Pull all events out of the
4442 kernel, and leave them all pending.
4443 (count_events_callback, select_event_lwp_callback): Consider all
4444 events.
4445 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4446 (select_event_lwp): Only give preference to the stepping LWP in
4447 all-stop mode. Adjust comments.
4448 (ignore_event): New function.
4449 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4450 references to cancel_breakpoints. Adjust to renames. Also give
4451 equal priority to all LWPs that have had events in non-stop mode.
4452 If reporting a software breakpoint event, unadjust the LWP's PC.
4453 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4454 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4455 Adjust.
4456 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4457 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4458 (linux_stopped_by_watchpoint): Adjust.
4459 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4460 * linux-low.h (enum lwp_stop_reason): New.
4461 (struct lwp_info) <stop_pc>: Adjust comment.
4462 <stopped_by_watchpoint>: Delete field.
4463 <stop_reason>: New field.
4464 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4465 * mem-break.c (software_breakpoint_inserted_here)
4466 (hardware_breakpoint_inserted_here): New function.
4467 * mem-break.h (software_breakpoint_inserted_here)
4468 (hardware_breakpoint_inserted_here): Declare.
4469 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4470 (cancel_breakpoints): Delete.
4471 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4472 (upload_fast_traceframes): Remove references to
4473 cancel_breakpoints.
4474
a33e3959
PA
44752015-01-09 Pedro Alves <palves@redhat.com>
4476
4477 * thread-db.c (find_new_threads_callback): Ignore thread if the
4478 kernel thread ID is -1.
4479
8784d563
PA
44802015-01-09 Pedro Alves <palves@redhat.com>
4481
4482 * linux-low.c (linux_attach_fail_reason_string): Move to
4483 nat/linux-ptrace.c, and rename.
4484 (linux_attach_lwp): Update comment.
4485 (attach_proc_task_lwp_callback): New function.
4486 (linux_attach): Adjust to rename and use
4487 linux_proc_attach_tgid_threads.
4488 (linux_attach_fail_reason_string): Delete declaration.
4489
76f2b779
JB
44902015-01-01 Joel Brobecker <brobecker@adacore.com>
4491
4492 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4493 * server.c (gdbserver_version): Likewise.
4494
fafcc06a
SDJ
44952014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4496
4497 * remote-utils.c: Include ctype.h.
4498 (input_interrupt): Explicitly handle the case when the char
4499 received is the NUL byte. Improve the printing of non-ASCII
4500 characters.
4501
beed38b8
JB
45022014-12-16 Joel Brobecker <brobecker@adacore.com>
4503
4504 * linux-low.c (linux_low_filter_event): Update call to
4505 linux_enable_event_reporting following the addition of
4506 a new parameter to that function.
4507
bf330350
CU
45082014-12-16 Catalin Udma <catalin.udma@freescale.com>
4509
4510 PR server/17457
4511 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4512 (AARCH64_FPCR_REGNO): Likewise.
4513 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4514 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4515 (aarch64_store_fpregset): Likewise.
4516
5227d625
JB
45172014-12-15 Joel Brobecker <brobecker@adacore.com>
4518
4519 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4520 Remove FIXME comment about assumption about N.
4521
f93b65a0
JB
45222014-12-13 Joel Brobecker <brobecker@adacore.com>
4523
4524 * configure.ac: If large-file support is disabled in GDBserver,
4525 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4526 * configure: Regenerate.
4527
e5a9158d
AA
45282014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4529
4530 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4531 warning upon ENODATA from ptrace.
4532 * linux-s390-low.c (s390_store_tdb): New.
4533 (s390_regsets): Add regset for NT_S390_TDB.
4534
feea5f36
AA
45352014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4536
4537 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4538 without a fill_function.
4539 * linux-s390-low.c (s390_fill_last_break): Remove.
4540 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4541 (s390_arch_setup): Use regset's size instead of fill_function for
4542 loop end condition.
4543
098dbe61
AA
45442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4545
4546 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4547 the regset's store function when ptrace returned an error.
4548 * regcache.c (get_thread_regcache): Invalidate register cache
4549 before fetching inferior's registers.
4550
28eef672
AA
45512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4552
4553 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4554 while-loop as for-loop.
4555 (regsets_store_inferior_registers): Likewise.
4556
bdca27a2
YQ
45572014-11-28 Yao Qi <yao@codesourcery.com>
4558
4559 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4560 * config.in, configure: Re-generate.
4561 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4562 is defined.
4563
9c232dda
YQ
45642014-11-21 Yao Qi <yao@codesourcery.com>
4565
4566 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4567 (AC_CHECK_HEADERS): Remove malloc.h.
4568 * configure: Re-generated.
4569 * config.in: Re-generated.
4570 * server.h: Don't include alloca.h and malloc.h.
4571 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4572 Don't include malloc.h.
4573
43968415
JB
45742014-11-17 Joel Brobecker <brobecker@adacore.com>
4575
4576 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4577 corresponding ERRNO check in same block.
4578
40e91bc7
PA
45792014-11-12 Pedro Alves <palves@redhat.com>
4580
4581 * server.c (cont_thread): Update comment.
4582 (start_inferior, attach_inferior): No longer clear cont_thread.
4583 (handle_v_cont): No longer set cont_thread.
4584 (captured_main): Clear cont_thread each time a GDB connects.
4585
c2c118cf
PA
45862014-11-12 Pedro Alves <palves@redhat.com>
4587
4588 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4589 thread, and don't resume all threads if the Hc thread has exited.
4590
78708b7c
PA
45912014-11-12 Pedro Alves <palves@redhat.com>
4592
4593 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4594 the process group instead of to a specific LWP.
4595
a2abc7de
PA
45962014-10-15 Pedro Alves <palves@redhat.com>
4597
4598 PR server/17487
4599 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4600 parameter.
4601 (arm_set_thread_context): Delete.
4602 (the_low_target): Adjust.
4603 * win32-i386-low.c (debug_registers_changed)
4604 (debug_registers_used): Delete.
4605 (update_debug_registers_callback): New function.
4606 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4607 needing to update their debug registers.
4608 (win32_get_current_dr): New function.
4609 (x86_dr_low_get_addr, x86_dr_low_get_control)
4610 (x86_dr_low_get_status): Fetch the debug register from the thread
4611 record's context.
4612 (i386_initial_stuff): Adjust.
4613 (i386_get_thread_context): Remove current_event parameter. Don't
4614 clear debug_registers_changed nor copy DR values to
4615 debug_reg_state.
4616 (i386_set_thread_context): Delete.
4617 (i386_prepare_to_resume): New function.
4618 (i386_thread_added): Mark the thread as needing to update irs
4619 debug registers.
4620 (the_low_target): Remove i386_set_thread_context and install
4621 i386_prepare_to_resume.
4622 * win32-low.c (win32_get_thread_context): Adjust.
4623 (win32_set_thread_context): Use SetThreadContext
4624 directly.
4625 (win32_prepare_to_resume): New function.
4626 (win32_require_context): New function, factored out from ...
4627 (thread_rec): ... this.
4628 (continue_one_thread): Call win32_prepare_to_resume on each thread
4629 we're about to continue.
4630 (win32_resume): Call win32_prepare_to_resume on the event thread.
4631 * win32-low.h (struct win32_thread_info)
4632 <debug_registers_changed>: New field.
4633 (struct win32_target_ops): Change prototype of set_thread_context,
4634 delete set_thread_context and add prepare_to_resume.
4635 (win32_require_context): New declaration.
4636
a442d071
GB
46372014-10-08 Gary Benson <gbenson@redhat.com>
4638
4639 * server.h: Do not include common-exceptions.h.
4640
6f1947e8
GB
46412014-10-08 Gary Benson <gbenson@redhat.com>
4642
4643 * server.h: Do not include cleanups.h.
4644
63b434a4
JH
46452014-09-30 James Hogan <james.hogan@imgtec.com>
4646
4647 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4648 mips64-dsp-linux.c.
4649
c4d9ceb6
YQ
46502014-09-23 Yao Qi <yao@codesourcery.com>
4651
4652 * linux-low.c (lp_status_maybe_breakpoint): New function.
4653 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4654 (count_events_callback): Likewise.
4655 (select_event_lwp_callback): Likewise.
4656 (cancel_breakpoints_callback): Likewise.
4657
89a5711c
DB
46582014-09-19 Don Breazeal <donb@codesourcery.com>
4659
4660 * linux-low.c (handle_extended_wait): Call
4661 linux_ptrace_get_extended_event.
4662 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4663 linux_is_extended_waitstatus.
4664
bffc0964
JB
46652014-09-16 Joel Brobecker <brobecker@adacore.com>
4666
4667 * Makefile.in (CPPFLAGS): Define.
4668 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4669 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4670
0bfdf32f
GB
46712014-09-16 Gary Benson <gbenson@redhat.com>
4672
4673 * inferiors.h (current_inferior): Renamed as...
4674 (current_thread): New variable. All uses updated.
4675 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4676 (maybe_move_out_of_jump_pad): Likewise.
4677 (cancel_breakpoint): Likewise.
4678 (linux_low_filter_event): Likewise.
4679 (wait_for_sigstop): Likewise.
4680 (linux_resume_one_lwp): Likewise.
4681 (need_step_over_p): Likewise.
4682 (start_step_over): Likewise.
4683 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4684 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4685 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4686 and save_inferior as saved_thread.
4687 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4688 saved_thread.
4689 (regcache_invalidate_thread): Likewise.
4690 * remote-utils.c (prepare_resume_reply): Likewise.
4691 * thread-db.c (thread_db_get_tls_address): Likewise.
4692 (disable_thread_event_reporting): Likewise.
4693 (remove_thread_event_breakpoints): Likewise.
4694 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4695 as saved_thread.
4696 * target.h (set_desired_inferior): Renamed as...
4697 (set_desired_thread): New declaration. All uses updated.
4698 * server.c (myresume): Updated comment to reference thread instead
4699 of inferior.
4700 (handle_serial_event): Likewise.
4701 (handle_target_event): Likewise.
4702
361c8ade
GB
47032014-09-12 Tom Tromey <tromey@redhat.com>
4704 Gary Benson <gbenson@redhat.com>
4705
4706 * regcache.h: Include common-regcache.h.
4707 (regcache_read_pc): Don't declare.
4708 * regcache.c (get_thread_regcache_for_ptid): New function.
4709
bd9269f7
GB
47102014-09-11 Tom Tromey <tromey@redhat.com>
4711 Gary Benson <gbenson@redhat.com>
4712
4713 * symbol.c: New file.
4714 * Makefile.in (SFILES): Add symbol.c.
4715 (OBS): Add symbol.o.
4716
f8c1d06b
GB
47172014-09-11 Gary Benson <gbenson@redhat.com>
4718
4719 * target.c (target_stop_ptid, target_continue_ptid): New
4720 functions.
4721
721ec300
GB
47222014-09-11 Tom Tromey <tromey@redhat.com>
4723 Gary Benson <gbenson@redhat.com>
4724
4725 * target.h: Include target/target.h.
4726 * target.c (target_read_memory, target_read_uint32)
4727 (target_write_memory): New functions.
4728
c5e92cca
GB
47292014-09-11 Gary Benson <gbenson@redhat.com>
4730
4731 * server.h (debug_hw_points): Don't declare.
4732 * server.c (debug_hw_points): Don't define. Replace all uses
4733 with show_debug_regs.
4734 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4735 all uses with show_debug_regs.
4736
2e4bb98a
EBM
47372014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4738
4739 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4740 endianness into account.
4741 (ppc_supply_ptrace_register): Likewise.
4742
ac740bc7
JH
47432014-09-03 James Hogan <james.hogan@imgtec.com>
4744
4745 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4746 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4747
97ea6506
GB
47482014-09-03 Gary Benson <gbenson@redhat.com>
4749
4750 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4751 ALL_DEBUG_ADDRESS_REGISTERS.
4752
df7e5265
GB
47532014-09-02 Gary Benson <gbenson@redhat.com>
4754
4755 * i386-low.h: Renamed as...
4756 * x86-low.h: New file. All type, function and variable name
4757 prefixes changed from "i386_" to "x86_". All references updated.
4758 * i386-low.c: Renamed as...
4759 * x86-low.c: New file. All type, function and variable name
4760 prefixes changed from "i386_" to "x86_". All references updated.
4761
ed859da7
GB
47622014-09-02 Gary Benson <gbenson@redhat.com>
4763
4764 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4765 (x86_linux_new_thread): Likewise.
4766
860789c7
GB
47672014-08-29 Gary Benson <gbenson@redhat.com>
4768
4769 * server.h (setjmp.h): Do not include.
4770 (toplevel): Do not declare.
4771 (common-exceptions.h): Include.
4772 (cleanups.h): Likewise.
4773 * server.c (toplevel): Do not define.
4774 (exit_code): New static global.
4775 (detach_or_kill_for_exit_cleanup): New function.
4776 (main): New function. Original main renamed to...
4777 (captured_main): New function.
4778 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4779
ff55e1b5
GB
47802014-08-29 Gary Benson <gbenson@redhat.com>
4781
4782 * Makefile.in (SFILES): Add common/common-exceptions.c.
4783 (OBS): Add common-exceptions.o.
4784 (common-exceptions.o): New rule.
4785 * utils.c (prepare_to_throw_exception): New function.
4786
e9bcb658
GB
47872014-08-29 Gary Benson <gbenson@redhat.com>
4788
4789 * config.in: Regenerate.
4790 * configure: Likewise.
4791
e3180625
GB
47922014-08-29 Gary Benson <gbenson@redhat.com>
4793
4794 * Makefile.in (SFILES): Add common/cleanups.c.
4795 (OBS): cleanups.o.
4796 (cleanups.o): New rule.
4797
e3d6ba5d
GB
47982014-08-29 Gary Benson <gbenson@redhat.com>
4799
4800 * utils.c (internal_vwarning): New function.
4801
7096e886
GB
48022014-08-28 Gary Benson <gbenson@redhat.com>
4803
4804 * utils.h (fatal): Remove declaration.
4805 * utils.c (fatal): Remove function.
4806
14ce3192
GB
48072014-08-28 Gary Benson <gbenson@redhat.com>
4808
4809 * tracepoint.c (gdb_agent_init): Replace fatal with
4810 perror_with_name.
4811 (initialize_tracepoint): Likewise.
4812
50278d59
GB
48132014-08-28 Gary Benson <gbenson@redhat.com>
4814
4815 * remote-utils.c (remote_prepare): Replace fatal with error.
4816
aa96c426
GB
48172014-08-28 Gary Benson <gbenson@redhat.com>
4818
4819 * linux-low.c (linux_async): Replace fatal with warning.
4820 Tidy up and return.
4821 (linux_start_non_stop): Return -1 if linux_async failed.
4822
f7160e97
GB
48232014-08-28 Gary Benson <gbenson@redhat.com>
4824
4825 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4826 gdb_assert.
4827 (i386_dr_low_get_addr): Remove vague comment.
4828 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4829 gdb_assert.
4830
38e08fca
GB
48312014-08-28 Gary Benson <gbenson@redhat.com>
4832
4833 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4834 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4835 internal_error.
4836 (linux_resume_one_lwp): Likewise.
4837 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4838 gdb_assert.
4839 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4840 with internal_error.
4841 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4842 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4843 (find_register_by_name): Replace fatal with internal_error.
4844 (find_regno): Likewise.
4845 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4846 * thread-db.c (thread_db_create_event): Likewise.
4847 (thread_db_load_search): Likewise.
4848 (try_thread_db_load_1): Likewise.
4849 * tracepoint.c (get_jump_space_head): Replace fatal with
4850 internal_error.
4851 (claim_trampoline_space): Likewise.
4852 (have_fast_tracepoint_trampoline_buffer): Likewise.
4853 (cmd_qtstart): Likewise.
4854 (stop_tracing): Likewise.
4855 (fast_tracepoint_collecting): Likewise.
4856 (target_malloc): Likewise.
4857 (download_tracepoint): Likewise.
4858 (download_trace_state_variables): Replace check with gdb_assert.
4859 (upload_fast_traceframes): Replace fatal with internal_error.
4860
34abf635
GB
48612014-08-19 Tom Tromey <tromey@redhat.com>
4862 Gary Benson <gbenson@redhat.com>
4863
4864 * Makefile.in (SFILES): Add common/common-debug.c.
4865 (OBS): Add common-debug.o.
4866 (common-debug.o): New rule.
4867 * debug.h (debug_printf): Don't declare.
4868 * debug.c (debug_printf): Renamed and rewritten as...
4869 (debug_vprintf): New function.
4870
f6e94d78
GB
48712014-08-19 Gary Benson <gbenson@redhat.com>
4872
4873 * utils.h: Do not include print-utils.h.
4874
9239eeab
GB
48752014-08-19 Tom Tromey <tromey@redhat.com>
4876 Gary Benson <gbenson@redhat.com>
4877
4878 * server.h: Add static assertion.
4879 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4880
ef87c8bb
GB
48812014-08-19 Tom Tromey <tromey@redhat.com>
4882 Gary Benson <gbenson@redhat.com>
4883
4884 * Makefile.in (SFILES): Add common/errors.c.
4885 (OBS): Add errors.o.
4886 (IPA_OBS): Add errors-ipa.o.
4887 (errors.o): New rule.
4888 (errors-ipa.o): Likewise.
4889 * utils.h (perror_with_name, error, warning): Don't declare.
4890 * utils.c (warning): Renamed and rewritten as...
4891 (vwarning): New function.
4892 (error): Renamed and rewritten as...
4893 (verror): New function.
4894 (internal_error): Renamed and rewritten as...
4895 (internal_verror): New function.
4896
bb974a24
GB
48972014-08-07 Gary Benson <gbenson@redhat.com>
4898
4899 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4900 * configure: Regenerate.
4901 * config.in: Likewise.
4902 * server.h: Do not include errno.h.
4903 * event-loop.c: Likewise.
4904 * hostio-errno.c: Likewise.
4905 * linux-low.c: Likewise.
4906 * remote-utils.c: Likewise.
4907 * spu-low.c: Likewise.
4908 * utils.c: Likewise.
4909 * gdbreplay.c: Unconditionally include errno.h.
4910
6d3d12eb
GB
49112014-08-07 Gary Benson <gbenson@redhat.com>
4912
4913 * server.h: Do not include string.h.
4914 * event-loop.c: Likewise.
4915 * linux-low.c: Likewise.
4916 * regcache.c: Likewise.
4917 * remote-utils.c: Likewise.
4918 * spu-low.c: Likewise.
4919 * utils.c: Likewise.
4920
dccbb609
GB
49212014-08-07 Gary Benson <gbenson@redhat.com>
4922
4923 * server.h: Do not include gdb_assert.h.
4924
e76df0d0
GB
49252014-08-07 Gary Benson <gbenson@redhat.com>
4926
4927 * server.h: Do not include common-utils.h.
4928
4cb9c816
GB
49292014-08-07 Gary Benson <gbenson@redhat.com>
4930
4931 * server.h: Do not include ptid.h.
4932 * notif.h: Likewise.
4933
3995eeee
GB
49342014-08-07 Gary Benson <gbenson@redhat.com>
4935
4936 * server.h: Do not include gdb_locale.h.
4937
cb9f1a9b
GB
49382014-08-07 Gary Benson <gbenson@redhat.com>
4939
4940 * server.h: Do not include gdb/signals.h.
4941 * win32-low.c: Likewise.
4942
a5fceff8
GB
49432014-08-07 Gary Benson <gbenson@redhat.com>
4944
4945 * server.h: Do not include pathmax.h.
4946
b9391142
GB
49472014-08-07 Gary Benson <gbenson@redhat.com>
4948
4949 * server.h: Do not include libiberty.h.
4950 * linux-bfin-low.c: Likewise.
4951
0e443c87
GB
49522014-08-07 Gary Benson <gbenson@redhat.com>
4953
4954 * server.h: Do not include ansidecl.h.
4955
8ebb3f56
GB
49562014-08-07 Gary Benson <gbenson@redhat.com>
4957
4958 * linux-x86-low.c: Do not include stddef.h.
4959 * lynx-ppc-low.c: Likewise.
4960 * tracepoint.c: Likewise.
4961
8980bdf6
GB
49622014-08-07 Gary Benson <gbenson@redhat.com>
4963
4964 * server.h: Do not include stdarg.h.
4965 * nto-low.c: Likewise.
4966
d7096f71
GB
49672014-08-07 Gary Benson <gbenson@redhat.com>
4968
4969 * server.h: Do not include stdlib.h.
4970 * inferiors.c: Likewise.
4971 * linux-low.c: Likewise.
4972 * regcache.c: Likewise.
4973 * spu-low.c: Likewise.
4974 * tracepoint.c: Likewise.
4975 * utils.c: Likewise.
4976
d02f550d
GB
49772014-08-07 Gary Benson <gbenson@redhat.com>
4978
4979 * server.h: Do not include stdio.h.
4980 * linux-low.c: Likewise.
4981 * remote-utils.c: Likewise.
4982 * spu-low.c: Likewise.
4983 * utils.c: Likewise.
4984 * wincecompat.c: Likewise.
4985
87f6c4e3
GB
49862014-08-06 Gary Benson <gbenson@redhat.com>
4987
4988 * regcache.c (init_register_cache): Move conditionals inside if.
4989
7089dca4
GB
49902014-08-06 Gary Benson <gbenson@redhat.com>
4991
4992 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4993
462f517e
GB
49942014-07-31 Gary Benson <gbenson@redhat.com>
4995
4996 * ax.h: Do not include server.h.
4997 * gdbthread.h: Likewise.
4998 * lynx-low.h: Likewise.
4999 * notif.h: Likewise.
5000
976411d6
GB
50012014-07-30 Gary Benson <gbenson@redhat.com>
5002
5003 * server.h: Include common-defs.h.
5004 Do not include config.h or build-gnulib-gdbserver/config.h.
5005
d41f6d8e
GB
50062014-07-30 Gary Benson <gbenson@redhat.com>
5007
5008 * hostio-errno.c: Move server.h to top of includes list.
5009 * inferiors.c: Likewise.
5010 * linux-x86-low.c: Likewise.
5011 * notif.c: Include server.h.
5012
314c6a35
TT
50132014-07-24 Tom Tromey <tromey@redhat.com>
5014 Gary Benson <gbenson@redhat.com>
5015
5016 * server.h (CORE_ADDR): Now unsigned.
5017
69ff6be5
PA
50182014-07-16 Pedro Alves <palves@redhat.com>
5019
5020 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5021
ce9e3fe7
PA
50222014-07-15 Pedro Alves <palves@redhat.com>
5023
5024 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5025 copy.
5026
e76126e8
PA
50272014-07-11 Pedro Alves <palves@redhat.com>
5028
5029 * linux-low.c (kill_wait_lwp): New function, based on
5030 kill_one_lwp_callback, but use my_waitpid directly.
5031 (kill_one_lwp_callback, linux_kill): Use it.
5032
8e9db26e
PA
50332014-06-23 Pedro Alves <palves@redhat.com>
5034
5035 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5036 before setting DR0..DR3.
5037
698b3e08
GB
50382014-06-20 Gary Benson <gbenson@redhat.com>
5039
5040 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5041 * configure: Regenerated.
5042 * config.in: Likewise.
5043
125f8a3d
GB
50442014-06-20 Gary Benson <gbenson@redhat.com>
5045
5046 * Makefile.in (SFILES): Update locations for files moved
5047 from common to nat.
5048 (object file files): Reordered.
5049
42995dbd
GB
50502014-06-20 Gary Benson <gbenson@redhat.com>
5051
5052 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5053 (i386_dr_low_set_addr): Likewise.
5054 (i386_dr_low_get_addr): Likewise.
5055 (i386_dr_low_can_set_control): Likewise.
5056 (i386_dr_low_set_control): Likewise.
5057 (i386_dr_low_get_control): Likewise.
5058 (i386_dr_low_get_status): Likewise.
5059 (i386_get_debug_register_length): Likewise.
5060 * linux-x86-low.c (i386_dr_low_set_addr):
5061 Changed signature. Made static.
5062 (i386_dr_low_get_addr): Likewise.
5063 (i386_dr_low_set_control): Likewise.
5064 (i386_dr_low_get_control): Likewise.
5065 (i386_dr_low_get_status): Likewise.
5066 (i386_dr_low): New global variable.
5067 * win32-i386-low.c (i386_dr_low_set_addr):
5068 Changed signature. Made static.
5069 (i386_dr_low_get_addr): Likewise.
5070 (i386_dr_low_set_control): Likewise.
5071 (i386_dr_low_get_control): Likewise.
5072 (i386_dr_low_get_status): Likewise.
5073 (i386_dr_low): New global variable.
5074
e1d2394b
MS
50752014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5076
5077 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5078 * Makefile.in (AR, AR_FLAGS): Define.
5079 * configure: Regenerate.
5080
3a8ee006
GB
50812014-06-19 Gary Benson <gbenson@redhat.com>
5082
5083 * Makefile.in (i386-dregs.o): New rule.
5084 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5085 * i386-low.c (target.h): Remove include.
5086 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5087 (DR_CONTROL_SHIFT): Likewise.
5088 (DR_CONTROL_SIZE): Likewise.
5089 (DR_RW_EXECUTE): Likewise.
5090 (DR_RW_WRITE): Likewise.
5091 (DR_RW_READ): Likewise.
5092 (DR_RW_IORW): Likewise.
5093 (DR_LEN_1): Likewise.
5094 (DR_LEN_2): Likewise.
5095 (DR_LEN_4): Likewise.
5096 (DR_LEN_8): Likewise.
5097 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5098 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5099 (DR_ENABLE_SIZE): Likewise.
5100 (DR_LOCAL_SLOWDOWN): Likewise.
5101 (DR_GLOBAL_SLOWDOWN): Likewise.
5102 (DR_CONTROL_RESERVED): Likewise.
5103 (I386_DR_CONTROL_MASK): Likewise.
5104 (I386_DR_VACANT): Likewise.
5105 (I386_DR_LOCAL_ENABLE): Likewise.
5106 (I386_DR_GLOBAL_ENABLE): Likewise.
5107 (I386_DR_DISABLE): Likewise.
5108 (I386_DR_SET_RW_LEN): Likewise.
5109 (I386_DR_GET_RW_LEN): Likewise.
5110 (I386_DR_WATCH_HIT): Likewise.
5111 (i386_wp_op_t): Likewise.
5112 (i386_show_dr): Likewise.
5113 (i386_length_and_rw_bits): Likewise.
5114 (i386_insert_aligned_watchpoint): Likewise.
5115 (i386_remove_aligned_watchpoint): Likewise.
5116 (i386_handle_nonaligned_watchpoint): Likewise.
5117 i386_update_inferior_debug_regs(): Likewise.
5118 (i386_dr_insert_watchpoint): Likewise.
5119 (i386_dr_remove_watchpoint): Likewise.
5120 (i386_dr_region_ok_for_watchpoint): Likewise.
5121 (i386_dr_stopped_data_address): Likewise.
5122 (i386_dr_stopped_by_watchpoint): Likewise.
5123
8f26655c
GB
51242014-06-19 Gary Benson <gbenson@redhat.com>
5125
5126 * i386-low.c (i386_dr_show): Renamed to
5127 i386_show_dr and made static. All uses updated.
5128 (i386_dr_length_and_rw_bits): Renamed to
5129 i386_length_and_rw_bits and made static.
5130 All uses updated.
5131 (i386_dr_insert_aligned_watchpoint): Renamed to
5132 i386_insert_aligned_watchpoint and made static.
5133 All uses updated.
5134 (i386_dr_remove_aligned_watchpoint): Renamed to
5135 i386_remove_aligned_watchpoint and made static.
5136 All uses updated.
5137 (i386_dr_update_inferior_debug_regs): Renamed to
5138 i386_update_inferior_debug_regs and made static.
5139 All uses updated.
5140
b9228891
GB
51412014-06-18 Gary Benson <gbenson@redhat.com>
5142
5171def3
GB
5143 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5144 (i386_dr_low_can_set_control): Likewise.
5145 (i386_get_debug_register_length): Likewise.
5146 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5147 (i386_dr_low_can_set_control): Likewise.
5148 (i386_get_debug_register_length): Likewise.
5149
51502014-06-17 Gary Benson <gbenson@redhat.com>
5151
b9228891
GB
5152 * i386-low.h (i386-dregs.h): New include.
5153 (DR_FIRSTADDR): Now in i386-dregs.h.
5154 (DR_LASTADDR): Likewise.
5155 (DR_NADDR): Likewise.
5156 (DR_STATUS): Likewise.
5157 (DR_CONTROL): Likewise.
5158 (i386_debug_reg_state): Likewise.
5159 (i386_dr_insert_watchpoint): Likewise.
5160 (i386_dr_remove_watchpoint): Likewise.
5161 (i386_dr_region_ok_for_watchpoint): Likewise.
5162 (i386_dr_stopped_data_address): Likewise.
5163 (i386_dr_stopped_by_watchpoint): Likewise.
5164 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5165
4be83cc2
GB
51662014-06-18 Gary Benson <gbenson@redhat.com>
5167
5168 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5169 i386_dr_insert_watchpoint.
5170 (i386_low_remove_watchpoint): Renamed to
5171 i386_dr_remove_watchpoint.
5172 (i386_low_region_ok_for_watchpoint): Renamed to
5173 i386_dr_region_ok_for_watchpoint.
5174 (i386_low_stopped_data_address): Renamed to
5175 i386_dr_stopped_data_address.
5176 (i386_low_stopped_by_watchpoint): Renamed to
5177 i386_dr_stopped_by_watchpoint.
5178 * i386-low.c (i386_show_dr): Renamed to
5179 i386_dr_show and made nonstatic. All uses updated.
5180 (i386_length_and_rw_bits): Renamed to
5181 i386_dr_length_and_rw_bits and made nonstatic.
5182 All uses updated.
5183 (i386_insert_aligned_watchpoint): Renamed to
5184 i386_dr_insert_aligned_watchpoint and made nonstatic.
5185 All uses updated.
5186 (i386_remove_aligned_watchpoint): Renamed to
5187 i386_dr_remove_aligned_watchpoint and made nonstatic.
5188 All uses updated.
5189 (i386_update_inferior_debug_regs): Renamed to
5190 i386_dr_update_inferior_debug_regs and made nonstatic.
5191 All uses updated.
5192 (i386_low_insert_watchpoint): Renamed to
5193 i386_dr_insert_watchpoint. All uses updated.
5194 (i386_low_remove_watchpoint): Renamed to
5195 i386_dr_remove_watchpoint. All uses updated.
5196 (i386_low_region_ok_for_watchpoint): Renamed to
5197 i386_dr_region_ok_for_watchpoint. All uses updated.
5198 (i386_low_stopped_data_address): Renamed to
5199 i386_dr_stopped_data_address. All uses updated.
5200 (i386_low_stopped_by_watchpoint): Renamed to
5201 i386_dr_stopped_by_watchpoint. All uses updated.
5202
131aa0d4
GB
52032014-06-18 Gary Benson <gbenson@redhat.com>
5204
5205 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5206 (i386_dr_low_can_set_control): Likewise.
5207 (i386_insert_aligned_watchpoint): New check.
5208
d9305f7f
GB
52092014-06-18 Gary Benson <gbenson@redhat.com>
5210
5211 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5212 Renamed to state.
5213
e927c9fc
GB
52142014-06-18 Gary Benson <gbenson@redhat.com>
5215
5216 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5217 instead of fatal and error.
5218 (i386_handle_nonaligned_watchpoint): Likewise.
5219
1b6d4134
GB
52202014-06-18 Gary Benson <gbenson@redhat.com>
5221
5222 * i386-low.c (i386_get_debug_register_length): New macro.
5223 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5224 (i386_show_dr): Use debug_printf instead of fprintf. Use
5225 phex to format values.
5226
6e62758f
GB
52272014-06-18 Gary Benson <gbenson@redhat.com>
5228
5229 * i386-low.h: Comment changes.
5230 * i386-low.c: Likewise.
5231
fc6e2f03
GB
52322014-06-18 Gary Benson <gbenson@redhat.com>
5233
5234 * i386-low.c: Whitespace changes.
5235
f9d1eeed
TT
52362014-06-12 Tom Tromey <tromey@redhat.com>
5237
5238 * utils.c (freeargv): Remove.
5239
0b04e523
TT
52402014-06-12 Tom Tromey <tromey@redhat.com>
5241
5242 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5243 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5244 (parse_debug_format_options): Likewise.
5245 (gdbserver_usage): Likewise.
5246 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5247 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5248 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5249 against libiberty.
5250 ($(LIBGNU)): Depend on libiberty.
5251 (all-lib): Recurse into all subdirs.
5252 (install-only): Invoke "install" target in subdirs.
5253 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5254 targets.
5255 * configure: Rebuild.
5256 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5257 for vasprintf, vsnprintf, or gettimeofday.
5258 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5259 srv_tgtobj.
5260
270c9937
JB
52612014-06-05 Joel Brobecker <brobecker@adacore.com>
5262
5263 * development.sh: Delete.
5264 * Makefile.in (config.status): Adjust dependency on development.sh.
5265 * configure.ac: Adjust development.sh source call.
5266 * configure: Regenerate.
5267
0a261ed8
PA
52682014-06-02 Pedro Alves <palves@redhat.com>
5269
5270 * ax.c (gdb_free_agent_expr): New function.
5271 * ax.h (gdb_free_agent_expr): New declaration.
5272 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5273 list.
5274 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5275 static.
5276 (clear_breakpoint_conditions_and_commands): New function.
5277 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5278 (clear_breakpoint_conditions_and_commands): New declaration.
5279
e9dae05e
RR
52802014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5281
5282 * linux-aarch64-low.c (asm/ptrace.h): Include.
5283
5876f503
JK
52842014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5285
5286 Fix TLS access for -static -pthread.
5287 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5288 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5289 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5290
802e8e6d
PA
52912014-05-20 Pedro Alves <palves@redhat.com>
5292
5293 * linux-aarch64-low.c (aarch64_insert_point)
5294 (aarch64_remove_point): No longer check whether the type is
5295 supported here. Adjust to new interface.
5296 (the_low_target): Install aarch64_supports_z_point_type as
5297 supports_z_point_type method.
5298 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5299 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5300 instead of a Z packet char. Adjust.
5301 (arm_supports_z_point_type): New function.
5302 (arm_insert_point, arm_remove_point): Adjust to new interface.
5303 (the_low_target): Install arm_supports_z_point_type.
5304 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5305 (cris_insert_point, cris_remove_point): Adjust to new interface.
5306 Don't check whether the type is supported here.
5307 (the_low_target): Install cris_supports_z_point_type.
5308 * linux-low.c (linux_supports_z_point_type): New function.
5309 (linux_insert_point, linux_remove_point): Adjust to new interface.
5310 * linux-low.h (struct linux_target_ops) <insert_point,
5311 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5312 raw_breakpoint pointer parameter.
5313 <supports_z_point_type>: New method.
5314 * linux-mips-low.c (mips_supports_z_point_type): New function.
5315 (mips_insert_point, mips_remove_point): Adjust to new interface.
5316 Use mips_supports_z_point_type.
5317 (the_low_target): Install mips_supports_z_point_type.
5318 * linux-ppc-low.c (the_low_target): Install NULL as
5319 supports_z_point_type method.
5320 * linux-s390-low.c (the_low_target): Install NULL as
5321 supports_z_point_type method.
5322 * linux-sparc-low.c (the_low_target): Install NULL as
5323 supports_z_point_type method.
5324 * linux-x86-low.c (x86_supports_z_point_type): New function.
5325 (x86_insert_point): Adjust to new insert_point interface. Use
5326 insert_memory_breakpoint. Adjust to new
5327 i386_low_insert_watchpoint interface.
5328 (x86_remove_point): Adjust to remove_point interface. Use
5329 remove_memory_breakpoint. Adjust to new
5330 i386_low_remove_watchpoint interface.
5331 (the_low_target): Install x86_supports_z_point_type.
5332 * lynx-low.c (lynx_target_ops): Install NULL as
5333 supports_z_point_type callback.
5334 * nto-low.c (nto_supports_z_point_type): New.
5335 (nto_insert_point, nto_remove_point): Adjust to new interface.
5336 (nto_target_ops): Install nto_supports_z_point_type.
5337 * mem-break.c: Adjust intro comment.
5338 (struct raw_breakpoint) <raw_type, size>: New fields.
5339 <inserted>: Update comment.
5340 <shlib_disabled>: Delete field.
5341 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5342 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5343 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5344 (raw_bkpt_type_to_target_hw_bp_type): New function.
5345 (find_enabled_raw_code_breakpoint_at): New function.
5346 (find_raw_breakpoint_at): New type and size parameters. Use them.
5347 (insert_memory_breakpoint): New function, based off
5348 set_raw_breakpoint_at.
5349 (remove_memory_breakpoint): New function.
5350 (set_raw_breakpoint_at): Reimplement.
5351 (set_breakpoint): New, based on set_breakpoint_at.
5352 (set_breakpoint_at): Reimplement.
5353 (delete_raw_breakpoint): Go through the_target->remove_point
5354 instead of assuming memory breakpoints.
5355 (find_gdb_breakpoint_at): Delete.
5356 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5357 (find_gdb_breakpoint): New function.
5358 (set_gdb_breakpoint_at): Delete.
5359 (z_type_supported): New function.
5360 (set_gdb_breakpoint_1): New function, loosely based off
5361 set_gdb_breakpoint_at.
5362 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5363 (delete_gdb_breakpoint_at): Delete.
5364 (delete_gdb_breakpoint_1): New function, loosely based off
5365 delete_gdb_breakpoint_at.
5366 (delete_gdb_breakpoint): New function.
5367 (clear_gdb_breakpoint_conditions): Rename to ...
5368 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5369 breakpoint.
5370 (add_condition_to_breakpoint): Make static.
5371 (add_breakpoint_condition): Take a struct breakpoint pointer
5372 instead of an address. Adjust.
5373 (gdb_condition_true_at_breakpoint): Rename to ...
5374 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5375 z_type parameter.
5376 (gdb_condition_true_at_breakpoint): Reimplement.
5377 (add_breakpoint_commands): Take a struct breakpoint pointer
5378 instead of an address. Adjust.
5379 (gdb_no_commands_at_breakpoint): Rename to ...
5380 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5381 parameter. Return true if no breakpoint was found. Change debug
5382 output.
5383 (gdb_no_commands_at_breakpoint): Reimplement.
5384 (run_breakpoint_commands): Rename to ...
5385 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5386 and change return type to boolean.
5387 (run_breakpoint_commands): New function.
5388 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5389 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5390 breakpoint. Go through the_target->remove_point instead of
5391 assuming memory breakpoint.
5392 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5393 software and hardware breakpoints.
5394 (reinsert_raw_breakpoint): Go through the_target->insert_point
5395 instead of assuming memory breakpoint.
5396 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5397 software and hardware breakpoints.
5398 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5399 Check both software and hardware breakpoints.
5400 (validate_inserted_breakpoint): Assert the breakpoint is a
5401 software breakpoint. Set the inserted flag to -1 instead of
5402 setting shlib_disabled.
5403 (delete_disabled_breakpoints): Adjust.
5404 (validate_breakpoints): Only validate software breakpoints.
5405 Adjust to inserted flag change.
5406 (check_mem_read, check_mem_write): Skip breakpoint types other
5407 than software breakpoints. Adjust to inserted flag change.
5408 * mem-break.h (enum raw_bkpt_type): New enum.
5409 (raw_breakpoint, struct process_info): Forward declare.
5410 (Z_packet_to_target_hw_bp_type): Delete declaration.
5411 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5412 (set_gdb_breakpoint, delete_gdb_breakpoint)
5413 (clear_breakpoint_conditions): New declarations.
5414 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5415 (breakpoint_inserted_here): Update comment.
5416 (add_breakpoint_condition, add_breakpoint_commands): Replace
5417 address parameter with a breakpoint pointer parameter.
5418 (gdb_breakpoint_here): Update comment.
5419 (delete_gdb_breakpoint_at): Delete.
5420 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5421 * server.c (process_point_options): Take a struct breakpoint
5422 pointer instead of an address. Adjust.
5423 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5424 delete_gdb_breakpoint.
5425 * spu-low.c (spu_target_ops): Install NULL as
5426 supports_z_point_type method.
5427 * target.h: Include mem-break.h.
5428 (struct target_ops) <prepare_to_access_memory>: Update comment.
5429 <supports_z_point_type>: New field.
5430 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5431 instead of a char. Also take a raw breakpoint pointer.
5432 * win32-arm-low.c (the_low_target): Install NULL as
5433 supports_z_point_type.
5434 * win32-i386-low.c (i386_supports_z_point_type): New function.
5435 (i386_insert_point, i386_remove_point): Adjust to new interface.
5436 (the_low_target): Install i386_supports_z_point_type.
5437 * win32-low.c (win32_supports_z_point_type): New function.
5438 (win32_insert_point, win32_remove_point): Adjust to new interface.
5439 (win32_target_ops): Install win32_supports_z_point_type.
5440 * win32-low.h (struct win32_target_ops):
5441 <supports_z_point_type>: New method.
5442 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5443 instead of a char. Also take a raw breakpoint pointer.
5444
932539e3
PA
54452014-05-20 Pedro Alves <palves@redhat.com>
5446
5447 * mem-break.h: Include break-common.h.
5448 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5449 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5450 (Z_packet_to_target_hw_bp_type): New declaration.
5451 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5452 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5453 (Z_PACKET_ACCESS_WP): Delete macros.
5454 (Z_packet_to_hw_type): Delete function.
5455 * i386-low.h: Don't include break-common.h here.
5456 (Z_packet_to_hw_type): Delete declaration.
5457 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5458 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5459 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5460 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5461 * linux-aarch64-low.c: Don't include break-common.h here.
5462 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5463 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5464 (Z_packet_to_target_hw_bp_type): Delete function.
5465 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5466 function.
5467 (mips_insert_point, mips_remove_point): Use
5468 Z_packet_to_target_hw_bp_type.
5469
4ff0d3d8
PA
54702014-05-20 Pedro Alves <palves@redhat.com>
5471
5472 * linux-aarch64-low.c: Include break-common.h.
5473 (enum target_point_type): Delete.
5474 (Z_packet_to_point_type): Rename to ...
5475 (Z_packet_to_target_hw_bp_type): ... this, and return a
5476 target_hw_bp_type instead.
5477 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5478 instead of an enum target_point_type.
5479 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5480 breakpoint type.
5481 (aarch64_dr_state_insert_one_point)
5482 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5483 (aarch64_handle_aligned_watchpoint)
5484 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5485 Take an enum target_hw_bp_type instead of an enum
5486 target_point_type.
5487 (aarch64_supports_z_point_type): New function.
5488 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5489 use Z_packet_to_target_hw_bp_type.
5490
786dc519
JB
54912014-05-20 Joel Brobecker <brobecker@adacore.com>
5492
5493 * configure.ac: Only use -Werror by default when DEVELOPMENT
5494 is true.
5495 * configure: Regenerate.
5496
9e0aa64f
JK
54972014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5498
5499 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5500 * linux-x86-low.c (X86_64_USER_REGS): New.
5501 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5502
2b577b92
YQ
55032014-04-28 Yao Qi <yao@codesourcery.com>
5504
5505 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5506 name.
5507
94611da2
PA
55082014-04-25 Pedro Alves <palves@redhat.com>
5509
5510 PR server/16255
5511 * linux-low.c (linux_attach_fail_reason_string): New function.
5512 (linux_attach_lwp): Delete.
5513 (linux_attach_lwp_1): Rename to ...
5514 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5515 argument. Remove "initial" parameter. Return int instead of
5516 void. Don't error or warn here.
5517 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5518 failure to attach to the tgid. Call warning when failing to
5519 attach to an lwp.
5520 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5521 argument. Remove "initial" parameter. Return int instead of
5522 void. Don't error or warn here.
5523 (linux_attach_fail_reason_string): New declaration.
5524 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5525 interface change. Use linux_attach_fail_reason_string.
5526
01f9f808
MS
55272014-04-24 Michael Sturm <michael.sturm@mintel.com>
5528 Walfred Tedeschi <walfred.tedeschi@intel.com>
5529
5530 * Makefile.in: Added rules to handle new files
5531 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5532 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5533 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5534 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5535 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5536 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5537 x32-avx512-linux.o.
5538 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5539 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5540 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5541 i386/x32-avx512.xml.
5542 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5543 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5544 i386/x32-avx512-linux.xml.
5545 * i387-fp.c (num_avx512_k_registers): New constant for number
5546 of K registers.
5547 (num_avx512_zmmh_low_registers): New constant for number of
5548 lower ZMM registers (0-15).
5549 (num_avx512_zmmh_high_registers): New constant for number of
5550 higher ZMM registers (16-31).
5551 (num_avx512_ymmh_registers): New contant for number of higher
5552 YMM registers (ymm16-31 added by avx521 on x86_64).
5553 (num_avx512_xmm_registers): New constant for number of higher
5554 XMM registers (xmm16-31 added by AVX512 on x86_64).
5555 (struct i387_xsave): Add space for AVX512 registers.
5556 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5557 Add code to handle AVX512 registers.
5558 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5559 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5560 prototypei from generated file.
5561 (tdesc_amd64_avx512_linux): Likewise.
5562 (init_registers_x32_avx512_linux): Likewise.
5563 (tdesc_x32_avx512_linux): Likewise.
5564 (init_registers_i386_avx512_linux): Likewise.
5565 (tdesc_i386_avx512_linux): Likewise.
5566 (x86_64_regmap): Add AVX512 registers.
5567 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5568 mask.
5569 (initialize_low_arch): Add code to initialize AVX512 registers.
5570
51aa91f9
PA
55712014-04-23 Pedro Alves <palves@redhat.com>
5572
5573 * mem-break.c (find_gdb_breakpoint_at): Make static.
5574 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5575
a4165e94
PA
55762014-04-23 Pedro Alves <palves@redhat.com>
5577
5578 * i386-low.c: Don't include break-common.h here.
5579 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5580 prototype to take target_hw_bp_type as argument instead of a Z
5581 packet char.
5582 * i386-low.h: Include break-common.h here.
5583 (Z_packet_to_hw_type): Declare.
5584 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5585 prototypes.
5586 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5587 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5588 (x86_remove_point): Convert the packet number to a
5589 target_hw_bp_type before calling i386_low_remove_watchpoint.
5590 * win32-i386-low.c (i386_insert_point): Convert the packet number
5591 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5592 (i386_remove_point): Convert the packet number to a
5593 target_hw_bp_type before calling i386_low_remove_watchpoint.
5594
b8acf843
PA
55952014-04-23 Pedro Alves <palves@redhat.com>
5596
5597 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5598
d708bcd1
PA
55992014-04-10 Pedro Alves <palves@redhat.com>
5600
5601 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5602 Check if the condition or command is NULL before checking if the
5603 breakpoint is known. On success, return true.
5604 * mem-break.h (add_breakpoint_condition): Document return.
5605 (add_breakpoint_commands): Add describing comment.
5606 * server.c (skip_to_semicolon): New function.
5607 (process_point_options): Use it.
5608
2eec7d5b
PA
56092014-04-09 Pedro Alves <palves@redhat.com>
5610
5611 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5612 to lwpid_of.
5613
fa96cb38
PA
56142014-02-27 Pedro Alves <palves@redhat.com>
5615
5616 PR 12702
5617 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5618 macros.
5619 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5620 output.
5621 (last_thread_of_process_p): Take a PID argument instead of a
5622 thread pointer.
5623 (linux_wait_for_lwp): Delete.
5624 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5625 functions.
5626 (linux_low_filter_event): New function, party factored out from
5627 linux_wait_for_event.
5628 (linux_wait_for_event): Rename to ...
5629 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5630 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5631 sigsuspend. Check for zombie leaders.
5632 (linux_wait_for_event): Reimplement as wrapper around
5633 linux_wait_for_event_filtered.
5634 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5635 a normal or signal exit is seen, it's the whole process exiting.
5636 (wait_for_sigstop): No longer a for_each_inferior callback.
5637 Rewrite on top of linux_wait_for_event_filtered.
5638 (stop_all_lwps): Call wait_for_sigstop directly.
5639 * server.c (resume, handle_target_event): Handle
5640 TARGET_WAITKIND_NO_RESUMED.
5641
d763de10
JB
56422014-02-26 Joel Brobecker <brobecker@adacore.com>
5643
5644 * win32-low.c (psapi_get_dll_name,
5645 * win32_CreateToolhelp32Snapshot): Delete.
5646 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5647 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5648 Delete.
5649 (handle_load_dll): Add function description.
5650 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5651
850a0f76
JB
56522014-02-26 Joel Brobecker <brobecker@adacore.com>
5653
5654 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5655 Add comment.
5656 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5657 base address when calling win32_add_one_solib.
5658 (handle_load_dll): Delete local variable load_addr.
5659 Remove 0x1000 offset applied to DLL base address when calling
5660 win32_add_one_solib.
5661 (handle_unload_dll): Add comment.
5662
f25b3fc3
JB
56632014-02-26 Joel Brobecker <brobecker@adacore.com>
5664
5665 * win32-low.c (win32_add_all_dlls): Renames
5666 win32_ensure_ntdll_loaded. Rewrite function documentation.
5667 Adjust implementation to always load all DLLs.
5668 Add 0x1000 offset to DLL base address when calling
5669 win32_add_one_solib.
5670 (child_initialization_done): New static global.
5671 (do_initial_child_stuff): Set child_initialization_done to
5672 zero during child initialization, and 1 after. Replace call
5673 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5674 Add comment.
5675 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5676 (handle_unload_dll): Add function documentation.
5677 (get_child_debug_event): Ignore load and unload DLL events
5678 during child initialization.
5679
d86d4aaf
DE
56802014-02-20 Doug Evans <dje@google.com>
5681
3bc32da3 5682 Remove global all_lwps.
d86d4aaf
DE
5683 * inferiors.h (ptid_of): Move here from linux-low.h.
5684 (pid_of, lwpid_of): Ditto.
5685 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5686 parameter is a struct thread_info * now.
5687 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5688 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5689 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5690 directly.
5691 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5692 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5693 * linux-arm-low.c (update_registers_callback): Update, "entry"
5694 parameter is a struct thread_info * now.
5695 Fetch lwpid from current_inferior directly.
5696 (arm_insert_point): Pass &all_threads to find_inferior instead of
5697 &all_lwps.
5698 (arm_remove_point): Ditto.
5699 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5700 (arm_prepare_to_resume): Fetch pid from thread.
5701 (arm_read_description): Fetch lwpid from current_inferior directly.
5702 * linux-low.c (all_lwps): Delete.
5703 (delete_lwp): Delete call to remove_inferior.
5704 (handle_extended_wait): Fetch lwpid from thread.
5705 (add_lwp): Don't set lwp->entry.id. Remove call to
5706 add_inferior_to_list.
5707 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5708 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5709 (kill_one_lwp_callback): Ditto.
5710 (linux_kill): Don't dereference NULL pointer.
5711 Fetch ptid,lwpid from thread.
5712 (get_detach_signal): Fetch ptid from thread.
5713 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5714 Simplify call to regcache_invalidate_thread.
5715 (delete_lwp_callback): Update, "entry" parameter is a
5716 struct thread_info * now. Fetch pid from thread.
5717 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5718 (status_pending_p_callback): Update, "entry" parameter is a
5719 struct thread_info * now. Fetch ptid from thread.
5720 (find_lwp_pid): Update, "entry" parameter is a
5721 struct thread_info * now.
5722 (linux_wait_for_lwp): Fetch pid from thread.
5723 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5724 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5725 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5726 (dequeue_one_deferred_signal): Ditto.
5727 (cancel_breakpoint): Fetch ptid from current_inferior.
5728 (linux_wait_for_event): Pass &all_threads to find_inferior,
5729 not &all_lwps. Fetch ptid, lwpid from thread.
5730 (count_events_callback): Update, "entry" parameter is a
5731 struct thread_info * now.
5732 (select_singlestep_lwp_callback): Ditto.
5733 (select_event_lwp_callback): Ditto.
5734 (cancel_breakpoints_callback): Ditto.
5735 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5736 not &all_lwps.
5737 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5738 (unsuspend_one_lwp): Update, "entry" parameter is a
5739 struct thread_info * now.
5740 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5741 not &all_lwps.
5742 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5743 Fetch lwpid from thread, not lwp.
5744 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5745 Pass &all_threads to find_inferior, not &all_lwps.
5746 (send_sigstop): Fetch lwpid from thread, not lwp.
5747 (send_sigstop_callback): Update, "entry" parameter is a
5748 struct thread_info * now.
5749 (suspend_and_send_sigstop_callback): Ditto.
5750 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5751 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5752 struct thread_info * now.
5753 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5754 from thread, lwp.
5755 (lwp_running): Update, "entry" parameter is a
5756 struct thread_info * now.
5757 (stop_all_lwps): Fetch ptid from thread.
5758 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5759 (linux_resume_one_lwp): Fetch lwpid from thread.
5760 (linux_set_resume_request): Update, "entry" parameter is a
5761 struct thread_info * now. Fetch pid, lwpid from thread.
5762 (resume_status_pending_p): Update, "entry" parameter is a
5763 struct thread_info * now.
5764 (need_step_over_p): Ditto. Fetch lwpid from thread.
5765 (start_step_over): Fetch lwpid from thread.
5766 (linux_resume_one_thread): Update, "entry" parameter is a
5767 struct thread_info * now. Fetch lwpid from thread.
5768 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5769 (proceed_one_lwp): Update, "entry" parameter is a
5770 struct thread_info * now. Fetch lwpid from thread.
5771 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5772 struct thread_info * now.
5773 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5774 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5775 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5776 directly.
5777 (regsets_store_inferior_registers): Ditto.
5778 (fetch_register, store_register): Ditto.
5779 (linux_read_memory, linux_write_memory): Ditto.
5780 (linux_request_interrupt): Ditto.
5781 (linux_read_auxv): Ditto.
5782 (linux_xfer_siginfo): Ditto.
5783 (linux_qxfer_spu): Ditto.
5784 (linux_qxfer_libraries_svr4): Ditto.
5785 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5786 moved to inferiors.h.
5787 (get_lwp): Delete.
5788 (get_thread_lwp): Update.
5789 (struct lwp_info): Delete member "entry". Simplify comment for
5790 member "thread".
5791 (all_lwps): Delete.
5792 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5793 current_inferior directly.
5794 (update_watch_registers_callback): Update, "entry" parameter is a
5795 struct thread_info * now. Fetch pid from thread.
5796 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5797 (mips_insert_point): Fetch lwpid from current_inferior.
5798 Pass &all_threads to find_inferior, not &all_lwps.
5799 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5800 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5801 directly.
5802 (mips_stopped_data_address): Ditto.
5803 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5804 directly.
5805 * linux-tile-low.c (tile_arch_setup): Ditto.
5806 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5807 (update_debug_registers_callback): Update, "entry" parameter is a
5808 struct thread_info * now. Fetch pid from thread.
5809 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5810 Pass &all_threads to find_inferior, not &all_lwps.
5811 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5812 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5813 Pass &all_threads to find_inferior, not &all_lwps.
5814 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5815 (i386_dr_low_get_status): Ditto.
5816 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5817 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5818 (x86_linux_read_description): Ditto.
5819 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5820
3b8361aa
DE
58212014-02-20 Doug Evans <dje@google.com>
5822
5823 * inferiors.c (get_first_inferior): Fix buglet.
5824
f7667f0d
DE
58252014-02-19 Doug Evans <dje@google.com>
5826
5827 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5828 * inferiors.c (add_thread): Change result type to struct thread_info *.
5829 All callers updated.
5830 (add_lwp): Call add_thread here instead of in callers.
5831 All callers updated.
5832 * linux-low.h (get_lwp_thread): Rewrite.
5833 (struct lwp_info): New member "thread".
5834
b3312d80
DE
58352014-02-19 Doug Evans <dje@google.com>
5836
5837 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5838 All callers updated.
5839
ecc6f45c
DE
58402014-02-19 Doug Evans <dje@google.com>
5841
5842 * inferiors.c (add_thread): Fix whitespace.
5843
649ebbca
DE
58442014-02-19 Doug Evans <dje@google.com>
5845
5846 * dll.c (clear_dlls): Replace accessing list implemention details
5847 with API function.
5848 * gdbthread.h (get_first_thread): Declare.
5849 * inferiors.c (for_each_inferior_with_data): New function.
5850 (get_first_thread): New function.
5851 (find_thread_ptid): Simplify.
5852 (get_first_inferior): New function.
5853 (clear_list): Delete.
5854 (one_inferior_p): New function.
5855 (clear_inferior_list): New function.
5856 (clear_inferiors): Update.
5857 * inferiors.h (for_each_inferior_with_data): Declare.
5858 (clear_inferior_list): Declare.
5859 (one_inferior_p): Declare.
5860 (get_first_inferior): Declare.
5861 * linux-low.c (linux_wait_for_event): Replace accessing list
5862 implemention details with API function.
5863 * server.c (target_running): Ditto.
5864 (accumulate_file_name_length): New function.
5865 (emit_dll_description): New function.
5866 (handle_qxfer_libraries): Replace accessing list implemention
5867 details with API function.
5868 (handle_qxfer_threads_worker): New function.
5869 (handle_qxfer_threads_proper): Replace accessing list implemention
5870 details with API function.
5871 (handle_query): Ditto.
5872 (visit_actioned_threads_callback_ftype): New typedef.
5873 (visit_actioned_threads_data): New struct.
5874 (visit_actioned_threads): Rewrite to be find_inferior callback.
5875 (resume): Call find_inferior.
5876 (handle_status): Replace accessing list implemention
5877 details with API function.
5878 (process_serial_event): Replace accessing list implemention details
5879 with API function.
5880 * target.c (set_desired_inferior): Replace accessing list implemention
5881 details with API function.
5882 * tracepoint.c (same_process_p): New function.
5883 (gdb_agent_about_to_close): Replace accessing list implemention
5884 details with API function.
5885 * win32-low.c (child_delete_thread): Replace accessing list
5886 implemention details with API function.
5887 (match_dll_by_basename): New function.
5888 (dll_is_loaded_by_basename): New function.
5889 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5890 details call to dll_is_loaded_by_basename.
5891
80894984
DE
58922014-02-19 Doug Evans <dje@google.com>
5893
5894 * dll.h (struct dll_info): Add comment.
5895 * gdbthread.h (struct thread_info): Add comment.
5896 (current_ptid): Simplify.
5897 * inferiors.c (add_process): Update.
5898 (remove_process): Update.
5899 * inferiors.h (struct process_info): Rename member "head" to "entry".
5900 * linux-low.c (delete_lwp): Update.
5901 (add_lwp): Update.
5902 (last_thread_of_process_p): Update.
5903 (kill_one_lwp_callback, linux_kill): Update.
5904 (status_pending_p_callback): Update.
5905 (wait_for_sigstop): Update. Simplify read of ptid.
5906 (start_step_over): Update.
5907 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5908 (get_lwp_thread): Update.
5909 (struct lwp_info): Rename member "head" to "entry".
5910 * regcache.h (inferior_list_entry): Delete.
5911 * server.c (kill_inferior_callback): Update.
5912 (detach_or_kill_inferior_callback): Update.
5913 (print_started_pid): Update.
5914 (print_attached_pid): Update.
5915 (process_serial_event): Simplify read of ptid.
5916 * thread-db.c (thread_db_create_event): Update.
5917 (thread_db_get_tls_address): Update.
5918 * win32-low.c (current_inferior_ptid): Simplify.
5919
46917d26
TT
59202014-02-19 Tom Tromey <tromey@redhat.com>
5921
5922 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5923 argument.
5924 (target_supports_btrace): Update.
5925
0759a81e
YQ
59262014-02-14 Yao Qi <yao@codesourcery.com>
5927
5928 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5929 (rsp-low-ipa.o): New target.
5930
a7191e8b
TT
59312014-02-12 Tom Tromey <tromey@redhat.com>
5932
5933 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5934 convert_ascii_to_int.
5935 * regcache.c (registers_to_string): Likewise.
5936 * remote-utils.c (decode_M_packet): Likewise.
5937 * server.c (process_serial_event): Likewise.
5938
ff0e980e
TT
59392014-02-12 Tom Tromey <tromey@redhat.com>
5940
5941 * server.c (handle_query, handle_v_run): Use hex2bin, not
5942 unhexify.
5943 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5944
e9371aff
TT
59452014-02-12 Tom Tromey <tromey@redhat.com>
5946
5947 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5948 convert_int_to_ascii.
5949 * regcache.c (registers_to_string, collect_register_as_string):
5950 Likewise.
5951 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5952 Likewise.
5953 * server.c (process_serial_event): Likewise.
5954 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5955 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5956
971dc0b8
TT
59572014-02-12 Tom Tromey <tromey@redhat.com>
5958
5959 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5960 bin2hex, not hexify.
5961 * tracepoint.c (cmd_qtstatus): Likewise.
5962
0a822afb
TT
59632014-02-12 Tom Tromey <tromey@redhat.com>
5964
5965 * remote-utils.c (monitor_output): Pass explicit length to
5966 hexify.
5967
9c3d6531
TT
59682014-02-12 Tom Tromey <tromey@redhat.com>
5969
5970 * tracepoint.c: Include rsp-low.h.
5971 * server.c: Include rsp-low.h.
5972 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5973 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5974 declare.
5975 * remote-utils.c: Include rsp-low.h.
5976 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5977 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5978 (convert_int_to_ascii, convert_ascii_to_int): Move to
5979 common/rsp-low.c.
5980 * regcache.c: Include rsp-low.h.
5981 * ax.c: Include rsp-low.h.
5982 * Makefile.in (SFILES): Add common/rsp-low.c.
5983 (OBS): Add rsp-low.o.
5984 (rsp-low.o): New target.
5985
01fd3ea5
TT
59862014-02-12 Tom Tromey <tromey@redhat.com>
5987
5988 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5989 Include print-utils.h.
5990 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5991 (plongest, thirty_two, phex_nz): Remove.
5992 * Makefile.in (SFILES): Add common/print-utils.c.
5993 (OBS): Add print-utils.o.
5994 (print-utils-ipa.o): New target.
5995 (print-utils.o): New target.
5996 (IPA_OBJS): Add print-utils-ipa.o.
5997
e99dc820
TT
59982014-02-06 Tom Tromey <tromey@redhat.com>
5999
6000 * Makefile.in (SFILES): Fix indentation.
6001
ee1e2d4f
DE
60022014-02-05 Doug Evans <dje@google.com>
6003
6004 * linux-low.c (linux_wait_for_event): Improve comment.
6005 (linux_wait_1): Keep current_inferior in sync with event_child.
6006
f5a02773
DE
60072014-01-22 Doug Evans <dje@google.com>
6008
6009 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6010
87ce2a04
DE
60112014-01-22 Doug Evans <dje@google.com>
6012
6013 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6014 * configure: Regenerate.
6015 * config.in: Regenerate.
6016 * Makefile.in (SFILES): Add debug.c.
6017 (OBS): Add debug.o.
6018 * debug.c: New file.
6019 * debug.h: New file.
6020 * linux-aarch64-low.c (*): Update all debugging printfs to use
6021 debug_printf instead of fprintf.
6022 * linux-arm-low.c (*): Ditto.
6023 * linux-cris-low.c (*): Ditto.
6024 * linux-crisv32-low.c (*): Ditto.
6025 * linux-m32r-low.c (*): Ditto.
6026 * linux-sparc-low.c (*): Ditto.
6027 * linux-x86.c (*): Ditto.
6028 * linux-low.c (*): Ditto.
6029 (linux_wait_1): Add calls to debug_enter, debug_exit.
6030 (linux_wait): Remove redundant debugging printf.
6031 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6032 (linux_resume, unstop_all_lwps): Ditto.
6033 * mem-break.c (*): Update all debugging printfs to use
6034 debug_printf instead of fprintf.
6035 * remote-utils.c (*): Ditto.
6036 * thread-db.c (*): Ditto.
6037 * server.c #include <ctype.h>, "gdb_vecs.h".
6038 (debug_threads): Moved to debug.c.
6039 (*): Update all debugging printfs to use debug_printf instead of
6040 fprintf.
6041 (start_inferior): Replace call to fflush with call to debug_flush.
6042 (monitor_show_help): Mention set debug-format.
6043 (parse_debug_format_options): New function.
6044 (handle_monitor_command): Handle "monitor set debug-format".
6045 (gdbserver_usage): Mention --debug-format.
6046 (main): Parse --debug-format.
6047 * server.h (debug_threads): Declaration moved to debug.h.
6048 #include "debug.h".
6049 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6050 trace_debug_1 that uses debug_printf.
6051 (tracepoint_look_up_symbols): Update all debugging printfs to use
6052 debug_printf instead of fprintf.
6053
e671835b
BS
60542014-01-20 Baruch Siach <baruch@tkos.co.il>
6055
6056 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6057 sys/ptrace.h.
6058
b5737fa9
PA
60592014-01-17 Pedro Alves <palves@redhat.com>
6060
ea38d2a9 6061 PR build/16445
c7faa97a
PA
6062 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6063 defined after including gdb_proc_service.h.
b5737fa9 6064
40ed484e
DE
60652014-01-16 Doug Evans <dje@google.com>
6066
6067 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6068 (match_dll): Use it.
6069
969c39fb
MM
60702014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6071
6072 * target.h (target_ops) <read_btrace>: Change parameters and
6073 return type to allow error reporting.
6074 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6075 trace reading errors on.
6076 * linux-low.c (linux_low_read_btrace): Pass trace reading
6077 errors on.
6078 (linux_low_disable_btrace): New.
6079
ab7f45ba
DE
60802014-01-15 Doug Evans <dje@google.com>
6081
6082 * inferiors.c (thread_id_to_gdb_id): Delete.
6083 * inferiors.h (thread_id_to_gdb_id): Delete.
6084
66af0f44
EZ
60852014-01-13 Eli Zaretskii <eliz@gnu.org>
6086
6087 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6088 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6089 versions.
6090
9939e131
PA
60912014-01-08 Pedro Alves <palves@redhat.com>
6092
6093 * server.c (handle_status): Don't discard previous queued stop
6094 replies or thread's pending status here.
6095 (main) <disconnection>: Do it here instead.
6096
b7ea362b
PA
60972014-01-08 Pedro Alves <palves@redhat.com>
6098
6099 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6100 * server.c (visit_actioned_threads, handle_pending_status): New
6101 function.
6102 (handle_v_cont): Factor out parts to ...
6103 (resume): ... this new function. If in all-stop, and a thread
6104 being resumed has a pending status, report it without actually
6105 resuming.
6106 (myresume): Adjust to use the new 'resume' function.
6107 (clear_pending_status_callback, set_pending_status_callback)
6108 (find_status_pending_thread_callback): New functions.
6109 (handle_status): Handle the case of multiple threads having
6110 interesting statuses to report. Report threads' real last signal
6111 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6112 with an interesting thread to report the status for, instead of
6113 always reporting the status of the first thread.
6114
28498c42
JB
61152014-01-01 Joel Brobecker <brobecker@adacore.com>
6116
6117 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6118 * gdbreplay.c (gdbreplay_version): Likewise.
6119
f45c82da
YZ
61202013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6121
6122 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6123 iov.iov_len with the real length in use.
6124
379a5e2d
JB
61252013-12-13 Joel Brobecker <brobecker@adacore.com>
6126
6127 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6128 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6129 for all targets that use win32-low.c.
6130 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6131 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6132
4210d83e
PA
61332013-12-13 Pedro Alves <palves@redhat.com>
6134
6135 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6136 if equal to TARGET_WAITKIND_LOADED.
6137 * win32-low.c (cached_status): New static global.
6138 (win32_wait): Add declaration.
6139 (do_initial_child_stuff): Flush all initial pending debug events
6140 up to the initial breakpoint.
6141 (win32_wait): If CACHED_STATUS was set, return that instead
6142 of doing a real wait. Remove the code resuming the execution
6143 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6144 during the initial phase. Also remove the code changing
6145 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6146 TARGET_WAITKIND_STOPPED.
6147
e7f0d979
YQ
61482013-12-11 Yao Qi <yao@codesourcery.com>
6149
6150 * notif.c (handle_notif_ack): Return 0 if no notification
6151 matches.
6152
ebcf782c
DE
61532013-11-20 Doug Evans <dje@google.com>
6154
6155 * linux-low.c (linux_set_resume_request): Fix comment.
6156
20ad9378
DE
61572013-11-20 Doug Evans <dje@google.com>
6158
6159 * linux-low.c (resume_status_pending_p): Tweak comment.
6160
a196ebeb
WT
61612013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6162
6163 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6164 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6165 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6166 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6167 (srv_amd64_regobj): Add amd64-mpx.o.
6168 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6169 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6170 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6171 * i387-fp.c (num_pl_bnd_register) Added constant.
6172 (num_pl_bnd_cfg_registers) Added constant.
6173 (struct i387_xsave) Added reserved area and MPX fields.
6174 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6175 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6176 function.
6177 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6178 (init_registers_amd64_mpx_linux): Declare new function.
6179 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6180 (x86_64_regmap): Add MPX registers.
6181 (x86_linux_read_description): Add MPX case.
6182 (initialize_low_arch): Initialize MPX targets.
6183
0080a2f6
TT
61842013-11-18 Tom Tromey <tromey@redhat.com>
6185
6186 * configure: Rebuild.
6187 * configure.ac: Don't check for stdlib.h.
6188 * gdbreplay.c: Unconditionally include stdlib.h.
6189
2978b111
TT
61902013-11-18 Tom Tromey <tromey@redhat.com>
6191
6192 * config.in: Rebuild.
6193 * configure: Rebuild.
6194 * configure.ac: Don't use AC_HEADER_DIRENT.
6195
a3d08894
TT
61962013-11-18 Tom Tromey <tromey@redhat.com>
6197
6198 * server.h: Don't check HAVE_STRING_H.
6199 * gdbreplay.c: Don't check HAVE_STRING_H.
6200 * configure: Rebuild.
6201
0a5dd17d
TT
62022013-11-18 Tom Tromey <tromey@redhat.com>
6203
6204 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6205 LIBGNU.
6206
1bd2f0ba
TT
62072013-11-08 Tom Tromey <tromey@redhat.com>
6208
6209 * configure, config.in: Rebuild.
6210 * configure.ac: Remove unused configury.
6211
3266f10b
TT
62122013-11-08 Tom Tromey <tromey@redhat.com>
6213
6214 * acinclude.m4: Include common.m4, codeset.m4.
6215 * configure, config.in: Rebuild.
6216 * configure.ac: Use GDB_AC_COMMON.
6217
6682d959
AA
62182013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6219
6220 * linux-s390-low.c (HWCAP_S390_TE): New define.
6221 (s390_arch_setup): Consider the TE field in the HWCAP for
6222 determining 'have_regset_tdb'.
6223
fd0a4d76
SDJ
62242013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6225
6226 PR gdb/16014
6227 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6228 call to sizeof.
6229
1a3d890b
PA
62302013-10-02 Pedro Alves <palves@redhat.com>
6231
6232 * server.c (process_serial_event): Don't output "GDBserver
6233 exiting" if GDB is connected through stdio.
6234 * target.c (mywait): Likewise, be silent if GDB is connected
6235 through stdio.
6236
97ad4581
JB
62372013-10-01 Joel Brobecker <brobecker@adacore.com>
6238
6239 * lynx-low.c (lynx_add_threads_after_attach): New function.
6240 (lynx_attach): Remove call to add_thread. Add call to
6241 lynx_add_threads_after_attach instead.
6242
5b4e221c
MF
62432013-09-28 Mike Frysinger <vapier@gentoo.org>
6244
6245 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6246 * config.in, configure: Regenerated.
6247
ee47b2f8
YQ
62482013-09-18 Yao Qi <yao@codesourcery.com>
6249
6250 PR server/15959
6251 * server.c (start_inferior): Clear 'resume_info'.
6252
d6707650 62532013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6254
d6707650
JW
6255 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6256 for each register.
6257
9243dd0e 62582013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6259
9243dd0e
JW
6260 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6261 linux-tile-low.o to srv_tgtobj.
6262
c623a6ef
WN
62632013-09-16 Will Newton <will.newton@linaro.org>
6264
6265 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6266 out regs.
6267
fb71d39e
PA
62682013-09-06 Pedro Alves <palves@redhat.com>
6269
6270 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6271 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6272 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6273 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6274 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6275 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6276
8e7e9910
PA
62772013-09-06 Pedro Alves <palves@redhat.com>
6278
6279 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6280 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6281
7c3a12ca
PA
62822013-09-06 Pedro Alves <palves@redhat.com>
6283
6284 * linux-amd64-ipa.c: Include tracepoint.h.
6285 * linux-i386-ipa.c: Include tracepoint.h.
6286
8eb3d7b6
RW
62872013-09-06 Ricard Wanderlof <ricardw@axis.com>
6288
6289 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6290 (ps_get_thread_area): New function.
6291
eddddb9d
RW
62922013-09-06 Ricard Wanderlof <ricardw@axis.com>
6293
6294 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6295 (initialize_low_arch): Call init_registers_crisv32 rather than
6296 init_register_crisv32.
6297
533b0600
PA
62982013-09-05 Pedro Alves <palves@redhat.com>
6299
6300 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6301 to ...
6302 * hostio.h: ... this new file.
6303 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6304 win32-low.c: Include hostio.h.
6305
0ce3d3b5
PA
63062013-09-05 Pedro Alves <palves@redhat.com>
6307
6308 * server.h (gdb_client_data, handler_func, callback_handler_func)
6309 (delete_file_handler, add_file_handler, append_callback_event)
6310 (delete_callback_event, start_event_loop, initialize_event_loop):
6311 Move to event-loop.h and include it.
6312 * event-loop.h: New file.
6313
799cdc37
PA
63142013-09-05 Pedro Alves <palves@redhat.com>
6315
6316 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6317 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6318 (loaded_dll, unloaded_dll): Move to ...
6319 * dll.h: ... this new file.
6320 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6321
6a6bbd9d
PA
63222013-09-05 Pedro Alves <palves@redhat.com>
6323
6324 * server.h (current_process, get_thread_process, all_processes)
6325 (add_inferior_to_list, for_each_inferior, current_inferior)
6326 (remove_inferior, add_process, remove_process, find_process_pid)
6327 (have_started_inferiors_p, have_attached_inferiors_p)
6328 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6329 (clear_inferiors, find_inferior, find_inferior_id)
6330 (inferior_target_data, set_inferior_target_data)
6331 (inferior_regcache_data, set_inferior_regcache_data): Move to
6332 inferiors.h, and include it.
6333 * inferiors.h: New file.
6334
f699aaba
PA
63352013-09-05 Pedro Alves <palves@redhat.com>
6336
6337 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6338 Move ...
72f4393d 6339 * ax.h: ... here.
f699aaba 6340
c144c7a0
PA
63412013-09-05 Pedro Alves <palves@redhat.com>
6342
6343 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6344 tracepoint.h.
6345 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6346 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6347 (handle_tracepoint_general_set, handle_tracepoint_query)
6348 (tracepoint_finished_step, tracepoint_was_hit)
6349 (release_while_stepping_state_list, current_traceframe)
6350 (in_readonly_region, traceframe_read_mem)
6351 (fetch_traceframe_registers, traceframe_read_sdata)
6352 (traceframe_read_info, struct fast_tpoint_collect_status)
6353 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6354 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6355 (supply_fast_tracepoint_registers)
6356 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6357 (ipa_tdesc, claim_trampoline_space)
6358 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6359 (agent_mem_read, agent_get_trace_state_variable_value)
6360 (agent_set_trace_state_variable_value, agent_tsv_read)
6361 (agent_mem_read_string, get_raw_reg_func_addr)
6362 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6363 * tracepoint.h: ... this new file.
6364
ff42e6ab
PA
63652013-09-05 Pedro Alves <palves@redhat.com>
6366
6367 * server.h (perror_with_name, error, fatal, warning, paddress)
6368 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6369 include it.
6370 * utils.h: New file.
6371
541af0f4
PA
63722013-09-05 Pedro Alves <palves@redhat.com>
6373
6374 * server.h (remote_debug, noack_mode, transport_is_reliable)
6375 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6376 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6377 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6378 (write_enn, initialize_async_io, enable_async_io)
6379 (disable_async_io, check_remote_input_interrupt_request)
6380 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6381 (dead_thread_notify, prepare_resume_reply)
6382 (decode_address_to_semicolon, decode_address, decode_m_packet)
6383 (decode_M_packet, decode_X_packet, decode_xfer_write)
6384 (decode_search_memory_packet, unhexify, hexify)
6385 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6386 (look_up_one_symbol, relocate_instruction)
6387 (monitor_output): Move to remote-utils.h, and include it.
6388 * remote-utils.h: New file.
6389
eebdf26b
PA
63902013-09-05 Pedro Alves <palves@redhat.com>
6391
6392 * server.h (_): Delete.
6393
3aafd2ff
PA
63942013-09-02 Pedro Alves <palves@redhat.com>
6395
6396 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6397 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6398 allocated.
6399 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6400
cee83bcb
PM
64012013-09-02 Pierre Muller <muller@sourceware.org>
6402
6403 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6404 or WriteProcessMemory complete successfully and handle
6405 ERROR_PARTIAL_COPY error.
6406
9a13b2fa
PA
64072013-09-02 Pedro Alves <palves@redhat.com>
6408
6409 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6410 error instead of EIO.
6411
602e3198
JK
64122013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6413
6414 PR server/15604
6415 * linux-low.c: Include filestuff.h.
6416 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6417 * lynx-low.c: Include filestuff.h.
6418 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6419 * server.c: Include filestuff.h.
6420 (main): Call notice_open_fds.
6421 * spu-low.c: Include filestuff.h.
6422 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6423
96d7229d
LM
64242013-08-22 Luis Machado <lgustavo@codesourcery.com>
6425
6426 * Makefile.in: Explain why ../target and ../nat are not
6427 listed as include file search paths.
6428 (linux-waitpid.o): New object file rule.
6429 * configure.srv (srv_native_linux_obj): New variable.
6430 Replace all occurrences of linux native object files with
6431 $srv_native_linux_obj.
6432 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6433 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6434 (linux_enable_event_reporting): Remove declaration.
6435 (my_waitpid): Moved to common/linux-waitpid.c.
6436 (linux_wait_for_event): Pass ptid when calling
6437 linux_enable_event_reporting.
6438 (linux_supports_tracefork_flag): Remove.
6439 (linux_enable_event_reporting): Likewise.
6440 (linux_tracefork_grandchild): Remove.
6441 (STACK_SIZE): Moved to common/linux-ptrace.c.
6442 (linux_tracefork_child): Remove.
6443 (linux_test_for_tracefork): Remove.
6444 (linux_look_up_symbols): Call linux_supports_traceclone.
6445 (initialize_low): Remove call to linux_test_for_tracefork.
6446 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6447 common/linux-ptrace.h.
6448 (PTRACE_TYPE_ARG4): Likewise.
6449 Include linux-ptrace.h.
6450
32940073
PA
64512013-08-21 Pedro Alves <palves@redhat.com>
6452
6453 * config.in: Renegerate.
6454
33b60d58 64552013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6456
33b60d58
LM
6457 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6458 (SFILES): Remove $(srcdir)/common/target-common.c and
6459 add $(srcdir)/target/waitstatus.c.
6460 (OBS): Remove target-common.o and add waitstatus.o.
6461 (server_h): Remove $(srcdir)/../common/target-common.h and
6462 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6463 and $(srcdir)/../target/waitstatus.h.
6464 (target-common.o): Remove.
6465 (waitstatus.o): New target object file.
6466 * target.h: Do not include target-common.h and
6467 include target/resume.h, target/wait.h and
6468 target/waitstatus.h.
6469
b8e1b30e
LM
64702013-08-13 Luis Machado <lgustavo@codesourcery.com>
6471
6472 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6473 to PTRACE_TYPE_ARG3.
6474 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6475 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6476 PTRACE_TYPE_ARG4.
6477 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6478 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6479
7a60ad40
YQ
64802013-07-27 Jie Zhang <jie@codesourcery.com>
6481 Daniel Jacobowitz <dan@codesourcery.com>
6482 Yao Qi <yao@codesourcery.com>
6483
6484 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6485 (mips-linux-watch.o): New rule.
6486 (mips_linux_watch_h): New variable.
6487 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6488 srv_tgtobj.
6489 * linux-mips-low.c: Include mips-linux-watch.h.
6490 (struct arch_process_info, struct arch_lwp_info): New.
6491 (update_watch_registers_callback): New function.
6492 (mips_linux_new_process, mips_linux_new_thread) New functions.
6493 (mips_linux_prepare_to_resume, mips_insert_point): New
6494 functions.
6495 (mips_remove_point, mips_stopped_by_watchpoint): New
6496 functions.
6497 (rsp_bp_type_to_target_hw_bp_type): New function.
6498 (mips_stopped_data_address): New function.
6499 (the_low_target): Add watchpoint support functions.
6500
de6f69ad
YQ
65012013-07-27 Yao Qi <yao@codesourcery.com>
6502
6503 * i386-low.c: Include break-common.h.
6504 (enum target_hw_bp_type): Remove.
6505
3360c0bf
LM
65062013-07-24 Luis Machado <lgustavo@codesourcery.com>
6507
6508 * Makefile.in (SFILES): /common/target-common.c.
6509 (OBS): Add target-common.o.
6510 (server_h): Add $(srcdir)/../common/target-common.h.
6511 (target-common.o): New target.
6512 * server.c (queue_stop_reply_callback): Free
6513 status string after use.
6514 * target.c (target_waitstatus_to_string): Remove.
6515 * target.h: Include target-common.h.
6516 (resume_kind): Likewise.
6517 (target_waitkind): Likewise.
6518 (target_waitstatus): Likewise.
6519 (TARGET_WNOHANG): Likewise.
6520
bd885420
YQ
65212013-07-04 Yao Qi <yao@codesourcery.com>
6522
6523 * Makefile.in (host_alias): Use @host_noncanonical@.
6524 (target_alias): Use @target_noncanonical@.
6525 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6526 ACX_NONCANONICAL_HOST.
6527 * configure: Regenerated.
6528
6529 Revert:
6530 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6531
6532 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6533 * configure: Rebuild.
6534 * Makefile.in (version_host, version_target): Get from configure.
6535 (version.c): Use $(version_host) and $(version_target).
6536
17ef446e
PA
65372013-07-03 Pedro Alves <palves@redhat.com>
6538
6539 * Makefile.in (config.status): Depend on development.sh.
6540 * acinclude.m4: Include libmcheck.m4.
6541 * configure: Regenerate.
6542
7a9a7487
MG
65432013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6544
6545 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6546 attribute inside the parentheses.
6547 (winapi_DebugSetProcessKillOnExit): Ditto.
6548 (winapi_DebugBreakProcess): Ditto.
6549 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6550
49b64de6
MG
65512013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6552
6553 * notif.h (notif_event): Add a dummy member to avoid compiler
6554 errors.
6555
d5749ee7
PA
65562013-07-01 Pedro Alves <palves@redhat.com>
6557
6558 * hostio.c (HOSTIO_PATH_MAX): Define.
6559 (require_filename, handle_open, handle_unlink, handle_readlink):
6560 Use it.
6561
d8d2a3ee
PA
65622013-07-01 Pedro Alves <palves@redhat.com>
6563
6564 * server.h: Include "pathmax.h".
6565 * linux-low.c: Don't include sys/param.h.
6566 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6567 MAXPATHLEN.
6568 * win32-low.c: Don't include sys/param.h.
6569 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6570
bc7dea8d
PA
65712013-07-01 Pedro Alves <palves@redhat.com>
6572
6573 * event-loop.c: Don't check HAVE_UNISTD_H before including
6574 <unistd.h>.
6575 * gdbreplay.c: Likewise.
6576 * remote-utils.c: Likewise.
6577 * server.c: Likewise.
6578 * configure.ac: Don't check for unistd.h.
6579 * configure: Regenerate.
6580
d6c2da54
TT
65812013-06-28 Tom Tromey <tromey@redhat.com>
6582
6583 * Makefile.in (version.c): Use version.in, not
6584 common/version.in.
6585
257b6bec
MG
65862013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6587
6588 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6589 * configure: Rebuild.
6590 * Makefile.in (version_host, version_target): Get from configure.
6591 (version.c): Use $(version_host) and $(version_target).
6592
86ebe149
DK
65932013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6594
6595 Fix trace-status to output user name without trailing colon.
6596 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6597
f30aa5af
DK
65982013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6599
6600 Fix trace-status to output proper start-time and stop-time.
6601 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6602 output start time and stop time in hex as gdb expects.
6603
28a93511
YQ
66042013-06-26 Pedro Alves <pedro@codesourcery.com>
6605
6606 * tracepoint.c (build_traceframe_info_xml): Output trace state
6607 variables present in the trace buffer.
6608
01208463
TT
66092013-06-24 Tom Tromey <tromey@redhat.com>
6610
6611 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6612 create-version.sh.
6613 (version.o): Remove.
6614 * gdbreplay.c: Include version.h.
6615 (version, host_name): Don't declare.
6616 * server.h: Include version.h.
6617 (version, host_name): Don't declare.
6618
760256f9
PA
66192013-06-12 Pedro Alves <palves@redhat.com>
6620
6621 * linux-x86-low.c (linux_is_elf64): Delete global.
6622 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6623 with local linux_pid_exe_is_elf_64_file use.
6624
030031ee
PA
66252013-06-11 Pedro Alves <palves@redhat.com>
6626
6627 * linux-low.c (regset_disabled, disable_regset): New functions.
6628 (regsets_fetch_inferior_registers)
6629 (regsets_store_inferior_registers): Use them.
6630 (initialize_regsets_info); Don't allocate the disabled_regsets
6631 array here.
6632 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6633 comment.
6634
5da6eb0a
PA
66352013-06-11 Pedro Alves <palves@redhat.com>
6636
6637 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6638 xmalloc.
6639
7e5aaa09
PA
66402013-06-11 Pedro Alves <palves@redhat.com>
6641
6642 * linux-x86-low.c (initialize_low_arch): Call
6643 init_registers_x32_avx_linux.
6644
d878444c
JK
66452013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6646
6647 Fix compatibility with Android Bionic.
6648 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6649 it is not empty.
6650
3aee8918
PA
66512013-06-07 Pedro Alves <palves@redhat.com>
6652
5f2b57b5 6653 PR server/14823
3aee8918
PA
6654 * Makefile.in (OBS): Add tdesc.o.
6655 (IPA_OBJS): Add tdesc-ipa.o.
6656 (tdesc-ipa.o): New rule.
6657 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6658 interface.
6659 * linux-low.c (new_inferior): Delete.
6660 (disabled_regsets, num_regsets): Delete.
6661 (linux_add_process): Adjust to set the new per-process
6662 new_inferior flag.
6663 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6664 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6665 was a stop. When calling arch_setup, switch the current inferior
6666 to the thread that got an event.
6667 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6668 (regsets_fetch_inferior_registers)
6669 (regsets_store_inferior_registers): New regsets_info parameter.
6670 Adjust to use it.
6671 (linux_register_in_regsets): New regs_info parameter. Adjust to
6672 use it.
6673 (register_addr, fetch_register, store_register): New usrregs_info
6674 parameter. Adjust to use it.
6675 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6676 parameter regs_info. Adjust to use it.
6677 (linux_fetch_registers): Get the current inferior's regs_info, and
6678 adjust to use it.
6679 (linux_store_registers): Ditto.
6680 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6681 (initialize_low): Don't initialize the target_regsets here. Call
6682 initialize_low_arch.
6683 * linux-low.h (target_regsets): Delete declaration.
6684 (struct regsets_info): New.
6685 (struct usrregs_info): New.
6686 (struct regs_info): New.
6687 (struct process_info_private) <new_inferior>: New field.
6688 (struct linux_target_ops): Delete the num_regs, regmap, and
6689 regset_bitmap fields. New field regs_info.
6690 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6691 * i387-fp.c (num_xmm_registers): Delete.
6692 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6693 calls to new interface.
6694 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6695 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6696 Infer the number of xmm registers from the regcache's target
6697 description.
6698 * i387-fp.h (num_xmm_registers): Delete.
6699 * inferiors.c (add_thread): Don't install the thread's regcache
6700 here.
6701 * proc-service.c (gregset_info): Fetch the current inferior's
6702 regs_info. Adjust to use it.
6703 * regcache.c: Include tdesc.h.
6704 (register_bytes, reg_defs, num_registers)
6705 (gdbserver_expedite_regs): Delete.
6706 (get_thread_regcache): If the thread doesn't have a regcache yet,
6707 create one, instead of aborting gdbserver.
6708 (regcache_invalidate_one): Rename to ...
6709 (regcache_invalidate_thread): ... this.
6710 (regcache_invalidate_one): New.
6711 (regcache_invalidate): Only invalidate registers of the current
6712 process.
6713 (init_register_cache): Add target_desc parameter, and use it.
6714 (new_register_cache): Ditto. Assert the target description has a
6715 non zero registers_size.
6716 (regcache_cpy): Add assertions. Adjust.
6717 (realloc_register_cache, set_register_cache): Delete.
6718 (registers_to_string, registers_from_string): Adjust.
6719 (find_register_by_name, find_regno, find_register_by_number)
6720 (register_cache_size): Add target_desc parameter, and use it.
6721 (free_register_cache_thread, free_register_cache_thread_one)
6722 (regcache_release, register_cache_size): New.
6723 (register_size): Add target_desc parameter, and use it.
6724 (register_data, supply_register, supply_register_zeroed)
6725 (supply_regblock, supply_register_by_name, collect_register)
6726 (collect_register_as_string, collect_register_by_name): Adjust.
6727 * regcache.h (struct target_desc): Forward declare.
6728 (struct regcache) <tdesc>: New field.
6729 (init_register_cache, new_register_cache): Add target_desc
6730 parameter.
6731 (regcache_invalidate_thread): Declare.
6732 (regcache_invalidate_one): Delete declaration.
6733 (regcache_release): Declare.
6734 (find_register_by_number, register_cache_size, register_size)
6735 (find_regno): Add target_desc parameter.
6736 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6737 declarations.
6738 * remote-utils.c: Include tdesc.h.
6739 (outreg, prepare_resume_reply): Adjust.
6740 * server.c: Include tdesc.h.
6741 (gdbserver_xmltarget): Delete declaration.
6742 (get_features_xml, process_serial_event): Adjust.
6743 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6744 declare.
6745 (struct process_info) <tdesc>: New field.
6746 (ipa_tdesc): Declare.
6747 * tdesc.c: New file.
6748 * tdesc.h: New file.
6749 * tracepoint.c: Include tdesc.h.
6750 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6751 (get_context_regcache): Adjust to pass ipa_tdesc down.
6752 (do_action_at_tracepoint): Adjust to get the register cache size
6753 from the context regcache's description.
6754 (traceframe_walk_blocks): Adjust to get the register cache size
6755 from the current trace frame's description.
6756 (traceframe_get_pc): Adjust to get current trace frame's
6757 description and pass it down.
6758 (gdb_collect): Adjust to get the register cache size from the
6759 IPA's description.
6760 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6761 (gdbserver_xmltarget): Delete.
6762 (initialize_low_tracepoint): Set the ipa's target description.
6763 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6764 (initialize_low_tracepoint): Set the ipa's target description.
6765 * linux-x86-low.c: Include tdesc.h.
6766 [__x86_64__] (is_64bit_tdesc): New.
6767 (ps_get_thread_area, x86_get_thread_area): Use it.
6768 (i386_cannot_store_register): Rename to ...
6769 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6770 (i386_cannot_fetch_register): Rename to ...
6771 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6772 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6773 to new interface.
6774 (target_regsets): Rename to ...
6775 (x86_regsets): ... this.
6776 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6777 interface.
6778 (x86_siginfo_fixup): Use is_64bit_tdesc.
6779 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6780 (tdesc_x32_avx_linux, tdesc_x32_linux)
6781 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6782 Declare.
6783 (x86_linux_update_xmltarget): Delete.
6784 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6785 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6786 (AMD64_LINUX_USER64_CS): New.
6787 (x86_linux_read_description): New, based on
6788 x86_linux_update_xmltarget.
6789 (same_process_callback): New.
6790 (x86_arch_setup_process_callback): New.
6791 (x86_linux_update_xmltarget): New.
6792 (x86_regsets_info): New.
6793 (amd64_linux_regs_info): New.
6794 (i386_linux_usrregs_info): New.
6795 (i386_linux_regs_info): New.
6796 (x86_linux_regs_info): New.
6797 (x86_arch_setup): Reimplement.
6798 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6799 (x86_emit_ops): Ditto.
6800 (the_low_target): Adjust. Install x86_linux_regs_info,
6801 x86_cannot_fetch_register, and x86_cannot_store_register.
6802 (initialize_low_arch): New.
6803 * linux-ia64-low.c (tdesc_ia64): Declare.
6804 (ia64_fetch_register): Adjust.
6805 (ia64_usrregs_info, regs_info): New globals.
6806 (ia64_regs_info): New function.
6807 (the_low_target): Adjust.
6808 (initialize_low_arch): New function.
6809 * linux-sparc-low.c (tdesc_sparc64): Declare.
6810 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6811 Adjust.
6812 (sparc_arch_setup): New function.
6813 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6814 (the_low_target): Adjust.
6815 (initialize_low_arch): New function.
6816 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6817 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6818 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6819 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6820 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6821 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6822 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6823 (tdesc_powerpc_isa205_vsx64l): Declare.
6824 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6825 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6826 (ppc_set_pc, ppc_get_hwcap): Adjust.
6827 (ppc_usrregs_info): Forward declare.
6828 (!__powerpc64__) ppc_regmap_adjusted: New global.
6829 (ppc_arch_setup): Adjust to the current process'es target
6830 description.
6831 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6832 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6833 (ppc_store_evrregset): Adjust.
6834 (target_regsets): Rename to ...
6835 (ppc_regsets): ... this, and make static.
6836 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6837 (ppc_regs_info): New function.
6838 (the_low_target): Adjust.
6839 (initialize_low_arch): New function.
6840 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6841 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6842 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6843 (tdesc_s390x_linux64v2): Declare.
6844 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6845 (s390_fill_gregset, s390_store_last_break): Adjust.
6846 (target_regsets): Rename to ...
6847 (s390_regsets): ... this, and make static.
6848 (s390_get_pc, s390_set_pc): Adjust.
6849 (s390_get_hwcap): New target_desc parameter, and use it.
6850 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6851 (s390_arch_setup): Adjust to set the current process'es target
6852 description. Don't adjust the regmap.
6853 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6854 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6855 (regs_info_3264): New globals.
6856 (s390_regs_info): New function.
6857 (the_low_target): Adjust.
6858 (initialize_low_arch): New function.
6859 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6860 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6861 [__mips64] (init_registers_mips_linux)
6862 (init_registers_mips_dsp_linux): Delete defines.
6863 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6864 (have_dsp): New global.
6865 (mips_read_description): New, based on mips_arch_setup.
6866 (mips_arch_setup): Reimplement.
6867 (get_usrregs_info): New function.
6868 (mips_cannot_fetch_register, mips_cannot_store_register)
6869 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6870 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6871 (target_regsets): Rename to ...
6872 (mips_regsets): ... this, and make static.
6873 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6874 (dsp_regs_info, regs_info): New globals.
6875 (mips_regs_info): New function.
6876 (the_low_target): Adjust.
6877 (initialize_low_arch): New function.
6878 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6879 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6880 Declare.
6881 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6882 (arm_read_description): New, with bits factored from
6883 arm_arch_setup.
6884 (arm_arch_setup): Reimplement.
6885 (target_regsets): Rename to ...
6886 (arm_regsets): ... this, and make static.
6887 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6888 (arm_regs_info): New function.
6889 (the_low_target): Adjust.
6890 (initialize_low_arch): New function.
6891 * linux-m68k-low.c (tdesc_m68k): Declare.
6892 (target_regsets): Rename to ...
6893 (m68k_regsets): ... this, and make static.
6894 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6895 (m68k_regs_info): New function.
6896 (m68k_arch_setup): New function.
6897 (the_low_target): Adjust.
6898 (initialize_low_arch): New function.
6899 * linux-sh-low.c (tdesc_sharch): Declare.
6900 (target_regsets): Rename to ...
6901 (sh_regsets): ... this, and make static.
6902 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6903 (sh_regs_info, sh_arch_setup): New functions.
6904 (the_low_target): Adjust.
6905 (initialize_low_arch): New function.
6906 * linux-bfin-low.c (tdesc_bfin): Declare.
6907 (bfin_arch_setup): New function.
6908 (bfin_usrregs_info, regs_info): New globals.
6909 (bfin_regs_info): New function.
6910 (the_low_target): Adjust.
6911 (initialize_low_arch): New function.
6912 * linux-cris-low.c (tdesc_cris): Declare.
6913 (cris_arch_setup): New function.
6914 (cris_usrregs_info, regs_info): New globals.
6915 (cris_regs_info): New function.
6916 (the_low_target): Adjust.
6917 (initialize_low_arch): New function.
6918 * linux-cris-low.c (tdesc_crisv32): Declare.
6919 (cris_arch_setup): New function.
6920 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6921 (cris_regs_info): New function.
6922 (the_low_target): Adjust.
6923 (initialize_low_arch): New function.
6924 * linux-m32r-low.c (tdesc_m32r): Declare.
6925 (m32r_arch_setup): New function.
6926 (m32r_usrregs_info, regs_info): New globals.
6927 (m32r_regs_info): Adjust.
6928 (initialize_low_arch): New function.
6929 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6930 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6931 (tic6x_usrregs_info): Forward declare.
6932 (tic6x_read_description): New function, based on ...
6933 (tic6x_arch_setup): ... this. Reimplement.
6934 (target_regsets): Rename to ...
6935 (tic6x_regsets): ... this, and make static.
6936 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6937 (tic6x_regs_info): New function.
6938 (the_low_target): Adjust.
6939 (initialize_low_arch): New function.
6940 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6941 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6942 (target_regsets): Rename to ...
6943 (xtensa_regsets): ... this, and make static.
6944 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6945 globals.
6946 (xtensa_arch_setup, xtensa_regs_info): New functions.
6947 (the_low_target): Adjust.
6948 (initialize_low_arch): New function.
6949 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6950 (nios2_arch_setup): Set the current process'es tdesc.
6951 (target_regsets): Rename to ...
6952 (nios2_regsets): ... this.
6953 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6954 (nios2_regs_info): New function.
6955 (the_low_target): Adjust.
6956 (initialize_low_arch): New function.
a261b8f5
PA
6957 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6958 (aarch64_arch_setup): Set the current process'es tdesc.
6959 (target_regsets): Rename to ...
6960 (aarch64_regsets): ... this.
6961 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6962 (aarch64_regs_info): New function.
6963 (the_low_target): Adjust.
6964 (initialize_low_arch): New function.
3aee8918
PA
6965 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6966 globals.
6967 (target_regsets): Rename to ...
6968 (tile_regsets): ... this.
6969 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6970 (tile_regs_info): New function.
6971 (tile_arch_setup): Set the current process'es tdesc.
6972 (the_low_target): Adjust.
6973 (initialize_low_arch): New function.
6974 * spu-low.c (tdesc_spu): Declare.
6975 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6976 * win32-arm-low.c (tdesc_arm): Declare.
6977 (arm_arch_setup): New function.
6978 (the_low_target): Install arm_arch_setup instead of
6979 init_registers_arm.
6980 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6981 (init_windows_x86): Rename to ...
6982 (i386_arch_setup): ... this. Set `win32_tdesc'.
6983 (the_low_target): Adjust.
6984 * win32-low.c (win32_tdesc): New global.
6985 (child_add_thread): Don't create the thread cache here.
6986 (do_initial_child_stuff): Set the new process'es tdesc.
6987 * win32-low.h (struct target_desc): Forward declare.
6988 (win32_tdesc): Declare.
6989 * lynx-i386-low.c (tdesc_i386): Declare global.
6990 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6991 * lynx-low.c (lynx_tdesc): New global.
6992 (lynx_add_process): Set the new process'es tdesc.
6993 * lynx-low.h (struct target_desc): Forward declare.
6994 (lynx_tdesc): Declare global.
6995 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6996 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6997 * nto-low.c (nto_tdesc): New global.
6998 (do_attach): Set the new process'es tdesc.
6999 * nto-low.h (struct target_desc): Forward declare.
7000 (nto_tdesc): Declare.
7001 * nto-x86-low.c (tdesc_i386): Declare.
7002 (nto_x86_arch_setup): Set `nto_tdesc'.
7003
b1fbec62
GB
70042013-06-04 Gary Benson <gbenson@redhat.com>
7005
7006 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7007 to qSupported response when appropriate.
7008 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7009 with nonzero-length annex.
7010 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7011 arguments supplied in annex.
7012
d1ec4ce7
DE
70132013-05-31 Doug Evans <dje@google.com>
7014
ac44adcb 7015 PR server/15594
d1ec4ce7
DE
7016 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7017 64 bits in 64-cross-32 environment.
7018
9b25f2d3
PA
70192013-05-28 Pedro Alves <palves@redhat.com>
7020
7021 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7022 (aarch64-without-fpu.c): Delete rule.
7023 * configure.srv (aarch64*-*-linux*): Remove references to
7024 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7025 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7026 declaration.
7027
6740dc9c
PA
70282013-05-24 Pedro Alves <palves@redhat.com>
7029
7030 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7031 instead of strchr/decode_address. Error if the range isn't split
7032 with a ','. Don't assume there's be a ':' in the action.
7033
c2d6af84
PA
70342013-05-23 Yao Qi <yao@codesourcery.com>
7035 Pedro Alves <palves@redhat.com>
7036
7037 * linux-low.c (lwp_in_step_range): New function.
7038 (linux_wait_1): If the thread was range stepping and stopped
7039 outside the stepping range, report the stop to GDB. Otherwise,
7040 continue stepping. Add range stepping debug output.
7041 (linux_set_resume_request): Copy the step range from the resume
7042 request to the lwp.
7043 (linux_supports_range_stepping): New.
7044 (linux_target_ops) <supports_range_stepping>: Set to
7045 linux_supports_range_stepping.
7046 * linux-low.h (struct linux_target_ops)
7047 <supports_range_stepping>: New field.
7048 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7049 * linux-x86-low.c (x86_supports_range_stepping): New.
7050 (the_low_target) <supports_range_stepping>: Set to
7051 x86_supports_range_stepping.
7052 * server.c (handle_v_cont): Handle 'r' action.
7053 (handle_v_requests): Append ";r" if the target supports range
7054 stepping.
7055 * target.h (struct thread_resume) <step_range_start,
7056 step_range_end>: New fields.
7057 (struct target_ops) <supports_range_stepping>:
7058 New field.
7059 (target_supports_range_stepping): New macro.
7060
58794e1a
JB
70612013-05-17 Joel Brobecker <brobecker@adacore.com>
7062
7063 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7064 confusion in comment.
7065
d631c5a7
JB
70662013-05-17 Joel Brobecker <brobecker@adacore.com>
7067
7068 * lynx-low.c (struct process_info_private): New type.
7069 (lynx_add_process): New function.
7070 (lynx_create_inferior, lynx_attach): Replace calls to
7071 add_process by calls to lynx_add_process.
7072 (lynx_resume): If PTID is null, then try using
7073 current_process()->private->last_wait_event_ptid.
7074 Add comments.
7075 (lynx_clear_inferiors): Delete. The contents of that function
7076 has been inlined in lynx_mourn;
7077 (lynx_wait_1): Save the ptid in the process's private data.
7078 (lynx_mourn): Free the process' private data. Replace call
7079 to lynx_clear_inferiors by call to clear_inferiors.
7080
96f7a20f
YQ
70812013-05-17 Yao Qi <yao@codesourcery.com>
7082
7083 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7084 the right place.
7085
db0dfaa0
LM
70862013-05-16 Luis Machado <lgustavo@codesourcery.com>
7087
7088 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7089 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7090 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7091 PT_TEXT_END_ADDR guards. Update comments.
7092 (linux_target_op) <read_offsets>: Conditionally define to
7093 linux_read_offsets if the target is UCLIBC and if it defines
7094 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7095
68f5f838
SL
70962013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7097 Andrew Jenner <andrew@codesourcery.com>
7098
7099 * Makefile.in (SFILES): Add linux-nios2-low.c.
7100 (clean): Add action to delete nios2-linux.c.
7101 (nios2-linux.c): New rule.
7102 * configure.srv: Add nios2*-*-linux*.
7103 * linux-nios2-low.c: New.
7104
1ebff1fd
HAQ
71052013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7106
7107 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7108
f6150862
HZ
71092013-04-25 Hui Zhu <hui@codesourcery.com>
7110
7111 PR gdb/15186
f6150862
HZ
7112 * ax.c (ax_printf): Add fflush.
7113
614c279d
TT
71142013-04-22 Tom Tromey <tromey@redhat.com>
7115
7116 * Makefile.in (SFILES): Add filestuff.c.
7117 (OBS): Add filestuff.o.
7118 (filestuff.o): New target.
7119 * config.in, configure: Rebuild.
7120 * configure.ac: Check for fdwalk, pipe2.
7121
7d4e5717
PA
71222013-04-17 Pedro Alves <palves@redhat.com>
7123
7124 * configure.ac (USE_THREAD_DB): Delete variable.
7125 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7126 Don't AC_SUBST USE_THREAD_DB.
7127 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7128 * config.in, configure: Regenerate.
7129
d5c93e41
PA
71302013-04-16 Pedro Alves <palves@redhat.com>
7131
7132 * linux-low.h (struct lwp_info) <thread_known>: Move under
7133 the USE_THREAD_DB #ifdef.
7134
04f5fe89
PA
71352013-04-16 Pedro Alves <palves@redhat.com>
7136
7137 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7138 (linux-low.o): Delete rule.
7139 * linux-low.h: Always include "gdb_thread_db.h" instead of
7140 conditionally including thread_db.h.
7141 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7142 HAVE_THREAD_DB_H.
7143
480b27bf
JK
71442013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7145
7146 * Makefile.in (install-only): Fix make install regression.
7147
43662968
JK
71482013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7149
7150 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7151 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7152 installation.
7153 * gdbserver.1: Remove.
7154
3e74e146
PA
71552013-03-22 Pedro Alves <palves@redhat.com>
7156
7157 * linux-low.c (handle_extended_wait): Don't call
7158 linux_enable_event_reporting.
7159
a8347a2a
TT
71602013-03-15 Tony Theodore <tonyt@logyst.com>
7161
7162 PR build/9098:
7163 * Makefile.in (SHELL): Use @SHELL@.
7164
eeb56fa7
SDJ
71652013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7166
7167 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7168 compiler warning.
7169
4fa7e2ff
JB
71702013-03-13 Joel Brobecker <brobecker@adacore.com>
7171
7172 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7173 Remove extraneous NULL element.
7174
8ddb1965
YQ
71752013-03-13 Yao Qi <yao@codesourcery.com>
7176
7177 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7178 'V' block in trace frame.
7179
9accd112
MM
71802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7181
7182 * target.h (struct target_ops): Add btrace ops.
7183 (target_supports_btrace): New macro.
7184 (target_enable_btrace): New macro.
7185 (target_disable_btrace): New macro.
7186 (target_read_btrace): New macro.
7187 * gdbthread.h (struct thread_info): Add btrace field.
7188 * server.c: Include btrace-common.h.
7189 (handle_btrace_general_set): New function.
7190 (handle_btrace_enable): New function.
7191 (handle_btrace_disable): New function.
7192 (handle_general_set): Call handle_btrace_general_set.
7193 (handle_qxfer_btrace): New function.
7194 (struct qxfer qxfer_packets[]): Add btrace entry.
7195 * inferiors.c (remove_thread): Disable btrace.
7196 * linux-low: Include linux-btrace.h.
7197 (linux_low_enable_btrace): New function.
7198 (linux_low_read_btrace): New function.
7199 (linux_target_ops): Add btrace ops.
7200 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7201 Add srv_linux_btrace=yes.
7202 (x86_64-*-linux*): Add linux-btrace.o.
7203 Add srv_linux_btrace=yes.
7204 * configure.ac: Define HAVE_LINUX_BTRACE.
7205 * config.in: Regenerated.
7206 * configure: Regenerated.
7207
5cc22e4c
MM
72082013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7209
7210 * server.c (handle_qxfer): Preserve error message if -3 is
7211 returned.
7212 (qxfer): Document the -3 return value.
7213
7c97f91e
MM
72142013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7215
7216 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7217 (linux_btrace_h): New variable.
7218 (linux-btrace.o): New rule.
7219
be9a119c 72202013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7221 Hafiz Abid Qadeer <abidh@codesourcery.com>
7222
7223 * tracepoint.c (trace_buffer_size): New global.
7224 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7225 (init_trace_buffer): Change to one-argument function. Allocate
7226 trace buffer memory.
7227 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7228 handle QTBuffer:size packet.
7229 (cmd_bigqtbuffer_size): New function.
7230 (initialize_tracepoint): Call init_trace_buffer with
7231 DEFAULT_TRACE_BUFFER_SIZE.
7232 * server.c (handle_query): Add QTBuffer:size in the
7233 supported packets.
7234
e64f7499
YQ
72352013-03-07 Yao Qi <yao@codesourcery.com>
7236
7237 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7238 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7239 of -1.
7240 (cmd_qtsp): Adjust condition. Do post increment.
7241 Set cur_action and cur_step_action back to 0.
7242
f0ae6fc3
PA
72432013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7244
7245 PR server/15236
7246 * linux-low.c (linux_write_memory): Return early success if LEN is
7247 zero.
7248
b5b0b0af
CV
72492013-03-05 Corinna Vinschen <vinschen@redhat.de>
7250
334ad4a8 7251 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7252
589bc927
TT
72532013-02-28 Tom Tromey <tromey@redhat.com>
7254
7255 * configure.ac: Invoke AC_SYS_LARGEFILE.
7256 * configure, config.in: Rebuild.
7257
dfe07582
CV
72582013-02-28 Corinna Vinschen <vinschen@redhat.com>
7259
7260 * win32-low.c: Throughout, fix format strings and casts of
7261 printf-like functions to avoid type related warnings on all
7262 platforms.
7263 (get_child_debug_event): Print dwDebugEventCode as hex since
7264 that's how it's usually documented.
7265
736cd585
YQ
72662013-02-28 Yao Qi <yao@codesourcery.com>
7267
7268 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7269 pulongest.
7270
e1f58301
JW
72712013-02-27 Jiong Wang <jiwang@tilera.com>
7272
7273 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7274 (reg-tilegx32.c): New rule.
7275 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7276 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7277 different register info initializer according to elf class.
7278 (init_registers_tilgx32): New function. The tilegx32 register info
7279 initializer.
7280 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7281 (tile_store_gregset): Likewise.
7282
d171ca78
YQ
72832013-02-27 Yao Qi <yao@codesourcery.com>
7284
7285 * server.c (process_point_options): Print debug message when
7286 debug_threads is true.
7287
282bbdf3
YQ
72882013-02-26 Yao Qi <yao@codesourcery.com>
7289
7290 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7291
aca22551
PA
72922013-02-19 Pedro Alves <palves@redhat.com>
7293 Kai Tietz <ktietz@redhat.com>
7294
7295 PR gdb/15161
7296
7297 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7298 instead of strtoul to extract address from packet.
7299 (process_serial_event) <'z'>: Likewise.
7300
4f3cee1c
YQ
73012013-02-18 Yao Qi <yao@codesourcery.com>
7302
7303 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7304
8e1d55a3
PA
73052013-02-14 Pedro Alves <palves@redhat.com>
7306
7307 Plug memory leak.
7308
7309 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7310 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7311
458820da
PA
73122013-02-14 Pedro Alves <palves@redhat.com>
7313
7314 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7315
baea0dae
PA
73162013-02-14 Pedro Alves <palves@redhat.com>
7317
7318 * tracepoint.c (save_string): Delete.
7319 (add_tracepoint_action): Use savestring instead of save_string.
7320
0b1afbb3
PA
73212013-02-12 Pedro Alves <palves@redhat.com>
7322
7323 * linux-xtensa-low.c: Ditto.
7324 * xtensa-xtregs.c: Ditto.
7325
8a4ac37e
PA
73262013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7327
7328 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7329 thread_db.
7330
148de6bb
MS
73312013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7332
7333 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7334 aarch64_num_wp_regs and aarch64_num_bp_regs to
7335 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7336
55fac6e0
MS
73372013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7338
7339 * linux-aarch64-low.c (ps_get_thread_area): Replace
7340 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7341
176eb98c
MS
73422013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7343 Marcus Shawcroft <marcus.shawcroft@arm.com>
7344 Nigel Stephens <nigel.stephens@arm.com>
7345 Yufeng Zhang <yufeng.zhang@arm.com>
7346
7347 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7348 (aarch64.c, aarch64-without-fpu.c): New targets.
7349 * configure.srv (aarch64*-*-linux*): New.
7350 * linux-aarch64-low.c: New file.
7351
56f7af9c
MS
73522013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7353
43aaf8b6 7354 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7355 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7356 (dequeue_one_deferred_signal, linux_resume_one_thread)
7357 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7358 (linux_tracefork_grandchild, linux_test_for_tracefork)
7359 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7360 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7361 where the argument is 0.
7362
60f662b0
YQ
73632013-01-25 Yao Qi <yao@codesourcery.com>
7364
7365 * event-loop.c: Include "queue.h".
7366 (gdb_event_p): New typedef.
7367 (struct gdb_event) <next_event>: Remove.
7368 (event_queue): Change to QUEUE(gdb_event_p).
7369 (async_queue_event): Remove.
7370 (gdb_event_xfree): New.
7371 (initialize_event_loop): New.
7372 (process_event): Use API from QUEUE.
7373 (wait_for_event): Likewise.
7374 * server.c (main): Call initialize_event_loop.
7375 * server.h (initialize_event_loop): Declare.
7376
5ae4861a
YQ
73772013-01-18 Yao Qi <yao@codesourcery.com>
7378
7379 * ax.h (struct eval_agent_expr_context): New.
7380 (gdb_eval_agent_expr): Update declaration.
7381 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7382 TFRAME. Add new argument CTX.
7383 * server.h (struct eval_agent_expr_context): Declare.
7384 (agent_mem_read, agent_tsv_read): Update declaration.
7385 (agent_mem_read_string): Likewise.
7386 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7387 (add_traceframe_block): Add new argument TPOINT.
7388 Increase TPOINT->traceframe_usage.
7389 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7390 eval_tracepoint_agent_expr.
7391 (condition_true_at_tracepoint): Likewise.
7392 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7393 (agent_mem_read_string, agent_tsv_read): Likewise.
7394
85e00e85
YQ
73952013-01-16 Yao Qi <yao@codesourcery.com>
7396
7397 * linux-low.c (linux_resume_one_lwp): Don't check
7398 'lwp->bp_reinsert != 0'.
7399
4039cf45
JB
74002013-01-07 Joel Brobecker <brobecker@adacore.com>
7401 Pedro Alves <palves@redhat.com>
7402
7403 * lynx-low.c (ptrace_request_to_str): Define a temporary
7404 macro and use it to simplify this function's implementation.
7405
9044dee2
JB
74062013-01-07 Joel Brobecker <brobecker@adacore.com>
7407
7408 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7409 sets errno.
7410
e6352c8f
JB
74112013-01-07 Joel Brobecker <brobecker@adacore.com>
7412
7413 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7414
50681a27
JB
74152013-01-07 Joel Brobecker <brobecker@adacore.com>
7416
7417 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7418
3f6e77ef
JB
74192013-01-07 Joel Brobecker <brobecker@adacore.com>
7420
7421 * lynx-low.c (lynx_resume): Use the resume_info parameter
7422 to determine the ptid for the lynx_ptrace call, unless
7423 it is equal to minus_one_ptid, in which case we use the
7424 ptid of the current_inferior.
7425 (lynx_wait_1): After having received a thread create/exit
7426 event, resume the inferior's execution using the signaling
7427 thread's ptid, rather than the old ptid.
7428
7fda33ae
JB
74292013-01-07 Joel Brobecker <brobecker@adacore.com>
7430
7431 * lynx-low.c (lynx_resume): Delete variable ret.
7432
b9786c74
JB
74332013-01-01 Joel Brobecker <brobecker@adacore.com>
7434
7435 * gdbreplay.c (gdbreplay_version): Update copyright year.
7436 * server.c (gdbserver_version): Likewise.
7437
8b93d60f
JB
74382012-12-17 Joel Brobecker <brobecker@adacore.com>
7439
7440 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7441 new thread.
7442
037335a7
JB
74432012-12-17 Joel Brobecker <brobecker@adacore.com>
7444
7445 * lynx-low.c (ptrace_request_to_str): Add handling for
7446 PTRACE_GETTRACESIG.
7447
52d4cbd8
JB
74482012-12-17 Joel Brobecker <brobecker@adacore.com>
7449
7450 * lynx-low.c (lynx_attach): Delete variable new_process.
7451
ab8f6ca9
JB
74522012-12-17 Joel Brobecker <brobecker@adacore.com>
7453
7454 * lynx-low.c (lynx_create_inferior): Delete variable
7455 new_process.
7456
78cbc024
JB
74572012-12-17 Joel Brobecker <brobecker@adacore.com>
7458
7459 * lynx-low.c (ptrace_request_to_str): Do not handle
7460 PTRACE_GETTHREADLIST if this macro does not exist.
7461
14a00470
YQ
74622012-12-15 Yao Qi <yao@codesourcery.com>
7463
7464 * Makefile.in (OBS): Add notif.o.
7465 * notif.c, notif.h: New.
7466 * server.c: Include "notif.h".
7467 (struct vstop_notif) <next>: Remove.
7468 <base>: New field.
7469 (queue_stop_reply): Update.
7470 (push_event, send_next_stop_reply): Remove.
7471 (discard_queued_stop_replies): Update.
7472 (notif_stop): New variable.
7473 (handle_v_stopped): Remove.
7474 (handle_v_requests): Don't call handle_v_stopped. Call
7475 handle_ack_notif instead.
7476 (queue_stop_reply_callback): Call notif_event_enque instead
7477 of queue_stop_reply.
7478 (handle_status): Don't call send_next_stop_reply, call
7479 notif_write_event instead.
7480 (kill_inferior_callback): Likewise.
7481 (detach_or_kill_inferior_callback): Likewise.
7482 (main): Call initialize_notif.
7483 (process_serial_event): Call QUEUE_is_empty.
7484 (handle_target_event): Call notif_push instead of push event.
7485 * server.h (push_event): Remove declaration.
7486
61c125b9
TT
74872012-12-10 Tom Tromey <tromey@redhat.com>
7488
7489 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7490 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7491 macros.
7492 (.c.o): Rewrite.
7493 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7494 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7495 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7496 (amd64-linux-ipa.o, ax.o): Rewrite.
7497 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7498 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7499 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7500 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7501 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7502 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7503 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7504 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7505 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7506 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7507 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7508 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7509 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7510 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7511 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7512 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7513 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7514 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7515 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7516 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7517 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7518 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7519 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7520 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7521 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7522 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7523 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7524 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7525 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7526 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7527 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7528 (reg-tilegx.o): Remove.
7529 (all_object_files): New macro.
7530 Include .deps files.
7531 * aclocal.m4, configure: Rebuild.
7532 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7533 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7534 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7535
e90e9ad9
TT
75362012-12-05 Tom Tromey <tromey@redhat.com>
7537
7538 PR gdb/14917:
7539 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7540
02d403bf 75412012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7542
7543 * configure.ac: Check for linux/perf_event.h.
7544 * config.in: Regenerated.
7545 * configure: Regenerated.
7546
0270a750
PA
75472012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7548
7549 * hostio.c (handle_readlink): Decrease buffer size
7550 parameter passed to readlink by one byte.
7551
8c29b58e
YQ
75522012-11-26 Yao Qi <yao@codesourcery.com>
7553
7554 * configure.ac (build_warnings): Append '-Wempty-body'.
7555 * configure: Regenerated.
7556 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7557 body.
7558
8bdce1ff
PM
75592012-11-15 Pierre Muller <muller@sourceware.org>
7560
7561 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7562 * config.in: Regenerate.
7563 * configure: Regenerate.
7564 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7565 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7566 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7567 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7568 header.
7569 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7570 instead of <sys/wait.h> header.
7571 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7572
02d403bf 75732012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7574
7575 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7576 (various make rules): Remove -DGDBSERVER
7577
fbd5db48
YQ
75782012-11-09 Yao Qi <yao@codesourcery.com>
7579
7580 * spu-low.c (current_ptid): Move it to ..
7581 * gdbthread.h: ... here. New.
7582 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7583 * server.c (myresume, process_serial_event): Likewise.
7584 * thread-db.c (thread_db_find_new_threads): Likewise.
7585 * tracepoint.c (run_inferior_command): Likewise.
7586
b3dc46ff
AB
75872012-10-01 Andrew Burgess <aburgess@broadcom.com>
7588
7589 * server.c (handle_search_memory_1): Include access length in
7590 warning message.
7591
07c04788
HPN
75922012-09-05 Michael Brandt <michael.brandt@axis.com>
7593
7594 * linux-crisv32-low.c: Fix compile errors.
7595
918d227b
YQ
75962012-09-04 Yao Qi <yao@codesourcery.com>
7597
7598 * tracepoint.c (cmd_qtsv): Adjust debug message.
7599 Don't check CUR_TPOINT.
7600
18c1b81a
YQ
76012012-08-28 Yao Qi <yao@codesourcery.com>
7602
7603 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7604 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7605 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7606 Remove declarations of xmalloc, xreallloc, xstrdup and
7607 freeargv.
7608 * Makefile.in (libiberty_h): New.
7609 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7610 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7611
dc82f37b
YQ
76122012-08-23 Yao Qi <yao@codesourcery.com>
7613
7614 * server.h: Remove declaration of 'xsnprintf'.
7615
406b1477
KS
76162012-08-22 Keith Seitz <keiths@redhat.com>
7617
7618 * server.h: Include build-gnulib-gbserver/config.h.
7619 * gdbreplay.c: Likewise.
7620
e6712ff1
DE
76212012-08-08 Doug Evans <dje@google.com>
7622
7623 * Makefile.in (SFILES): Add gdb_vecs.c.
7624 (OBS): Add gdb_vecs.o.
7625 (gdb_vecs_h, host_defs_h): New variables.
7626 (thread-db.o): Add $(gdb_vecs_h) dependency.
7627 (gdb_vecs.o): New rule.
7628 * thread-db.c: #include "gdb_vecs.h".
7629 (thread_db_load_search): Use a vector to iterate over path elements.
7630 Handle text appearing after "$pdir".
7631
7632 * configure.ac: Add check for strstr.
7633 * config.in: Regenerate.
7634 * configure: Regenerate.
7635
7c3270ae
UW
76362012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7637
7638 * hostio.c (handle_pread): If pread fails, fall back to attempting
7639 lseek/read.
7640 (handle_pwrite): Likewise for pwrite.
7641
b62e2b27
UW
76422012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7643
7644 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7645 between unsupported TYPE and unimplementable ADDR/LEN combination.
7646 (arm_insert_point): Act on new return value.
7647
78a99e91
PA
76482012-07-31 Pedro Alves <palves@redhat.com>
7649
7650 * server.c (process_point_options): Only skip tokens if we find
7651 one that is unrecognized. Don't treat 'X' specially while
7652 skipping unrecognized tokens.
7653
fcf303ab
UW
76542012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7655
7656 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7657 to 4-byte-align HW breakpoint addresses for Thumb.
7658
7255706c
YQ
76592012-07-27 Yao Qi <yao@codesourcery.com>
7660
7661 PR remote/14161.
7662
7663 * server.h: Declare gdb_agent_about_to_close.
7664 * target.c (kill_inferior): Include "agent.h".
7665 New. Send command 'kill'.
7666 * target.h (kill_inferior): Removed macro.
7667 * tracepoint.c (gdb_agent_about_to_close): New.
7668 (gdb_agent_helper_thread): Handle command 'close'.
7669 Wait endlessly until the inferior stops.
7670 Install gdb_agent_remove_socket to atexit hook.
7671 (agent_socket_name): New static variable.
7672 (gdb_agent_socket_init): Replace local variable 'name' with
7673 'agent_socket_name'.
7674 (gdb_agent_remove_socket): New.
7675
5a3f286f
YQ
76762012-07-27 Yao Qi <yao@codesourcery.com>
7677
7678 * server.c (process_point_options): Stop at 'X' when parsing.
7679
961bd387
ME
76802012-07-19 Michael Eager <eager@eagercon.com>
7681
a261b8f5 7682 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7683 to hw_execute.
7684 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7685 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7686 hardware breakpoint.
7687
aa7c7447
JK
76882012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7689
7690 * gdbserver/linux-low.c (initialize_low): Call
7691 linux_ptrace_init_warnings.
7692
7f216e7c
DE
76932012-07-02 Doug Evans <dje@google.com>
7694
7695 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7696 pointer to int.
7697
d3ce09f5
SS
76982012-07-02 Stan Shebs <stan@codesourcery.com>
7699
7700 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7701 (ax.o): Add it to build rule.
7702 (ax-ipa.o): Ditto.
7703 (OBS): Add format.o.
7704 (IPA_OBS): Add format.o.
7705 * server.c (handle_query): Claim support for breakpoint commands.
7706 (process_point_options): Add command case.
7707 (process_serial_event): Leave running if there are printfs in
7708 effect.
7709 * mem-break.h (any_persistent_commands): Declare.
7710 (add_breakpoint_commands): Declare.
7711 (gdb_no_commands_at_breakpoint): Declare.
7712 (run_breakpoint_commands): Declare.
7713 * mem-break.c (struct point_command_list): New struct.
7714 (struct breakpoint): New field command_list.
7715 (any_persistent_commands): New function.
7716 (add_commands_to_breakpoint): New function.
7717 (add_breakpoint_commands): New function.
7718 (gdb_no_commands_at_breakpoint): New function.
7719 (run_breakpoint_commands): New function.
7720 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7721 locally.
7722 * ax.c: Include format.h.
7723 (ax_printf): New function.
7724 (gdb_eval_agent_expr): Add printf opcode.
7725
2f8f6aed
YQ
77262012-06-13 Yao Qi <yao@codesourcery.com>
7727
7728 * server.c (start_inferior): Remove duplicated writes to fields
7729 'last_resume_kind' and 'last_status' of 'current_inferior'.
7730
0c9070b3
YQ
77312012-06-12 Yao Qi <yao@codesourcery.com>
7732 Pedro Alves <palves@redhat.com>
7733
7734 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7735 comment.
7736 * server.c (handle_v_cont): Extend comment.
7737
c52daf70
YQ
77382012-06-11 Yao Qi <yao@codesourcery.com>
7739
7740 * linux-low.c (linux_attach): Add 'static'.
7741
d38bbb0a
YQ
77422012-06-06 Yao Qi <yao@codesourcery.com>
7743
7744 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7745
89dc0afd
JK
77462012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7747
7748 Fix gcc -flto compilation warning.
7749 * server.c (main): Make variable multi_mode and attach volatile.
7750
75f62ce7
TJB
77512012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7752
7753 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7754 if the platform doesn't know about it.
7755
65f479b6
PA
77562012-05-30 Jeff Kenton <jkenton@tilera.com>
7757
7758 * Makefile.in (SFILES): Add linux-tile-low.c.
7759 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7760 * configure.srv: Handle tilegx-*-linux*.
7761 * linux-tile-low.c: New file.
7762
0c5bf5a9
JK
77632012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7764
7765 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7766
a493e3e2
PA
77672012-05-24 Pedro Alves <palves@redhat.com>
7768
7769 PR gdb/7205
7770
43aaf8b6 7771 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7772
2ea28649
PA
77732012-05-24 Pedro Alves <palves@redhat.com>
7774
7775 PR gdb/7205
7776
7777 Replace target_signal with gdb_signal throughout.
7778
8d409d16
MR
77792012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7780
7781 * linux-low.c (linux_store_registers): Avoid the copying sequence
7782 when no data has been retrieved by ptrace.
7783
23512c01
MGD
77842012-05-22 Will Deacon <will.deacon@arm.com>
7785
7786 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7787 Include asm/ptrace.h.
7788 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7789 already defined.
7790
4934b29e
MR
77912012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7792
7793 * linux-low.c (linux_store_registers): Don't re-retrieve data
7794 with ptrace that has already been obtained from /proc. Always
7795 copy any data retrieved with ptrace to the buffer supplied.
7796
bde24c0a
PA
77972012-05-11 Yao Qi <yao@codesourcery.com>
7798 Pedro Alves <palves@redhat.com>
7799
7800 * linux-low.c (enum stopping_threads_kind): New.
7801 (stopping_threads): Change type to `enum stopping_threads_kind'.
7802 (handle_extended_wait): If stopping and suspending threads, leave
7803 the new_lwp suspended too.
7804 (linux_wait_for_event): Adjust.
7805 (stop_all_lwps): Set `stopping_threads' to
7806 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7807 whether we're suspending threads or just stopping them. Assert no
7808 recursion happens.
7809
623b6bdf
YQ
78102012-04-29 Yao Qi <yao@codesourcery.com>
7811
7812 * server.h: Move some code to ...
7813 * gdbthread.h: ... here. New.
7814 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7815 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7816 (nto-low.o, win32-low.o): Likewise.
7817 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7818 * regcache.c, remote-utils.c, server.c: Likewise.
7819 * target.c, tracepoint.c, win32-low.c: Likewise.
7820
f15f9948
TJB
78212012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7822
7823 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7824 (PTRACE_ARG4_TYPE): Likewise.
7825 (PTRACE_XFER_TYPE): Likewise.
7826 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7827 ptrace to PTRACE_ARG3_TYPE.
7828 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7829 (PTRACE_ARG4_TYPE): Likewise.
7830 (PTRACE_XFER_TYPE): Likewise.
7831 (linux_detach_one_lwp): Cast fourth argument of
7832 ptrace to long then PTRACE_ARG4_TYPE.
7833 (regsets_fetch_inferior_registers): Cast third argument of
7834 ptrace to long then PTRACE_ARG3_TYPE.
7835 (regsets_store_inferior_registers): Likewise.
7836
38ea300a
PA
78372012-04-20 Pedro Alves <palves@redhat.com>
7838
7839 * configure: Regenerate.
7840
c971b7fa
PA
78412012-04-19 Pedro Alves <palves@redhat.com>
7842
43aaf8b6 7843 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7844 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7845 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7846 (all, install-only, uninstall, clean-info, all-lib, clean): No
7847 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7848 (maintainer-clean realclean distclean): Use subdir_do.
7849 (subdir_do): New.
7850 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7851 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7852 * acinclude.m4: Include acx_configure_dir.m4.
7853 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7854 calls. Call AC_PROG_RANLIB. Configure gnulib using
7855 ACX_CONFIGURE_DIR.
7856 (GNULIB): New.
7857 (GNULIB_STDINT_H): Adjust.
7858 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7859 * gdbreplay.c: Include build-gnulib/config.h.
7860 * server.h: Likewise.
7861 * aclocal.m4: Regenerate.
7862 * config.in: Regenerate.
7863 * configure: Regenerate.
c971b7fa 7864
809277f8
PA
78652012-04-19 Pedro Alves <palves@redhat.com>
7866
7867 * Makefile.in (LIBGNU, INCGNU): Adjust.
7868 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7869 (all, install-only, uninstall, clean-info, all-lib, clean)
7870 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7871 * configure.ac: Adjust AC_OUTPUT output.
7872 * aclocal.m4: Regenerate.
7873 * configure: Regenerate.
7874
fd9bb8b8
PA
78752012-04-19 Pedro Alves <palves@redhat.com>
7876
7877 * Makefile.in (generated_files): New.
7878 (server_h): Remove the explicit dependency on config.h, and depend
7879 on $generated_files.
7880
1c298c66
PA
78812012-04-19 Pedro Alves <palves@redhat.com>
7882
7883 * Makefile.in (INCGNU): Add -Ignulib.
7884
57c4b50b
PA
78852012-04-19 Pedro Alves <palves@redhat.com>
7886
7887 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7888 (INCGNU): ... this, and spell out -I here.
7889 (GNULIB_LIB): Rename to ...
7890 (LIBGNU): ... this.
7891 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7892
1030e047
PA
78932012-04-19 Pedro Alves <palves@redhat.com>
7894
7895 * config.in: Regenerate.
7896
447d4319
PA
78972012-04-19 Pedro Alves <palves@redhat.com>
7898
7899 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7900 * server.h (memmem): Remove declaration.
7901 * config.in: Regenerate.
7902 * configure: Regenerate.
7903
aad9eab9
YQ
79042012-04-19 Yao Qi <yao@codesourcery.com>
7905
7906 * Makefile.in (SFILES): Add common/vec.c.
7907 (OBS): Add vec.o.
7908 (vec.o): New rule.
7909
3e10640f
YQ
79102012-04-19 Yao Qi <yao@codesourcery.com>
7911
7912 * remote-utils.c (prepare_resume_reply): Replace with macro
7913 target_core_of_thread.
7914 * server.c (handle_qxfer_threads_proper): Likewise.
7915 * target.h (traget_core_of_thread): New macro.
7916
71622373
PA
79172012-04-18 Pedro Alves <palves@redhat.com>
7918
7919 * aclocal.m4: Regenerate.
7920 * configure: Regenerate.
7921
80d26939
YQ
79222012-04-16 Yao Qi <yao@codesourcery.com>
7923
7924 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7925 duplicated on address.
7926
42476b70
YQ
79272012-04-16 Yao Qi <yao@codesourcery.com>
7928
7929 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7930 (struct tracepoint_action_ops) <send>: New field.
7931 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7932 (agent_expr_send, x_tracepoint_action_send): New.
7933 (l_tracepoint_action_send): New.
7934 (cmd_qtdp): Download and install tracepoint
7935 according to `use_agent'.
7936 (run_inferior_command): Add one more parameter `len'.
7937 Update callers.
7938 (tracepoint_send_agent): New.
7939 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7940
7bc83639
YQ
79412012-04-16 Yao Qi <yao@codesourcery.com>
7942
7943 * tracepoint.c (download_tracepoints): Moved to ...
7944 (cmd_qtstart): ... here.
7945
5f18041e
YQ
79462012-04-14 Yao Qi <yao@codesourcery.com>
7947
7948 * tracepoint.c: Include inttypes.h.
7949 (struct collect_memory_action): Use sized types.
7950 (struct tracepoint): Likewise.
7951 (cmd_qtdp, stop_tracing): Update print specifiers.
7952 (cmd_qtp, response_tracepoint): Likewise.
7953 (collect_data_at_tracepoint): Likewise.
7954 (collect_data_at_step): Likewise.
7955
55a8c076
YQ
79562012-04-14 Yao Qi <yao@codesourcery.com>
7957
7958 Import gnulib module inttypes.
7959 * aclocal.m4, config.in, configure: Regenerated.
7960
dc750257
YQ
79612012-04-14 Yao Qi <yao@codesourcery.com>
7962
7963 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7964 Makefile and config.status at last.
7965
0ab5faf9
YQ
79662012-04-13 Yao Qi <yao@codesourcery.com>
7967
7968 * tracepoint.c: Include stdint.h unconditionally.
7969
18f5fd81
TJB
79702012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7971
7972 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7973 on BFD_HAVE_SYS_PROCFS_TYPE.
7974 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7975 * configure: Regenerate.
7976 * config.in: Likewise.
7977
4d47af5c
L
79782012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7979
7980 * Makefile.in (clean): Also remove x32.c x32-linux.c
7981 x32-avx.c x32-avx-linux.c.
7982 (x32.o): New target.
7983 (x32.c): Likewise.
7984 (x32-linux.o): Likewise.
7985 (x32-linux.c): Likewise.
7986 (x32-avx.o): Likewise.
7987 (x32-avx.c): Likewise.
7988 (x32-avx-linux.o): Likewise.
7989 (x32-avx-linux.c): Likewise.
7990
7991 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7992 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7993 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7994 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7995 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7996 i386/x32-avx-linux.xml.
7997
7998 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7999 (init_registers_x32_avx_linux): Likwise.
8000 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8001 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8002
ecedbe58
PA
80032012-04-13 Pedro Alves <palves@redhat.com>
8004
8005 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8006 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8007 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8008 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8009 the sub-make.
8010
c92b5177
L
80112012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8012
8013 * linux-x86-low.c (compat_x32_clock_t): New.
8014 (compat_x32_siginfo_t): Likewise.
8015 (compat_x32_siginfo_from_siginfo): Likewise.
8016 (siginfo_from_compat_x32_siginfo): Likewise.
8017 (linux_is_elf64): Likewise.
8018 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8019 and siginfo_from_compat_x32_siginfo for x32.
8020 (x86_arch_setup): Set linux_is_elf64.
8021
214d508e
L
80222012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8023
8024 PR gdb/13969
8025 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8026 e_machine field.
8027 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8028 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8029 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8030 compatible with process.
8031
c9a1864a
YQ
80322012-04-12 Yao Qi <yao@codesourcery.com>
8033
8034 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8035 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8036 (install-only, install-info, clean): Handle sub dir gnulib.
8037 (all-lib, am--refresh): New targets.
8038 (memmem.o): Remove target.
8039 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8040 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8041 (AC_REPLACE_FUNCS): Remove memmem.
8042 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8043 (AC_OUTPUT): Generate Makefile in gnulib/.
8044 * aclocal.m4, config.in, configure: Regenerated.
8045
367ba2c2
MR
80462012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8047
8048 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8049
9d236627
PA
80502012-04-05 Pedro Alves <palves@redhat.com>
8051
8052 -Werror=strict-aliasing
8053
8054 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8055 pointer.
8056
111217b3
PA
80572012-04-04 Pedro Alves <palves@redhat.com>
8058
8059 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8060 (sparc_store_gregset_from_stack, sparc_store_gregset)
8061 (sparc_breakpoint_at): Fix formatting.
8062
8365dcf5
TJB
80632012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8064
8065 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8066 are available.
8067 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8068 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8069 * config.in: Regenerate.
8070 * configure: Likewise.
8071
689cc2ae
PA
80722012-03-29 Pedro Alves <palves@redhat.com>
8073
8074 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8075 Correct ptrace arguments.
8076
c14dfd32
PA
80772012-03-28 Pedro Alves <palves@redhat.com>
8078
8079 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8080 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8081 (IA64_FR1_REGNUM): New defines.
8082 (ia64_fetch_register): New.
8083 (the_low_target): Install it.
8084 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8085 field.
8086 * linux-low.c (linux_fetch_registers): Try the
8087 the_low_target.fetch_register hook first.
8088
8089 * linux-arm-low.c (the_low_target): Adjust.
8090 * linux-bfin-low.c (the_low_target): Adjust.
8091 * linux-cris-low.c (the_low_target): Adjust.
8092 * linux-crisv32-low.c (the_low_target): Adjust.
8093 * linux-m32r-low.c (the_low_target): Adjust.
8094 * linux-m68k-low.c (the_low_target): Adjust.
8095 * linux-mips-low.c (the_low_target): Adjust.
8096 * linux-ppc-low.c (the_low_target): Adjust.
8097 * linux-s390-low.c (the_low_target): Adjust.
8098 * linux-sh-low.c (the_low_target): Adjust.
8099 * linux-sparc-low.c (the_low_target): Adjust.
8100 * linux-tic6x-low.c (the_low_target): Adjust.
8101 * linux-x86-low.c (the_low_target): Adjust.
8102 * linux-xtensa-low.c (the_low_target): Adjust.
8103
63c88e13
PA
81042012-03-26 Pedro Alves <palves@redhat.com>
8105
8106 * server.c (handle_qxfer_libraries): Don't bail early if
8107 the_target->qxfer_libraries_svr4 is not NULL.
8108
fb723180
PA
81092012-03-26 Pedro Alves <palves@redhat.com>
8110
8111 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8112
0afae3cf
PA
81132012-03-23 Pedro Alves <palves@redhat.com>
8114
8115 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8116 "library-list-svr4" element's start tag when the the DSO list is
8117 empty.
8118
485f1ee4
PA
81192012-03-23 Pedro Alves <palves@redhat.com>
8120
8121 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8122 a variable whose type size is the same as the inferior's pointer
8123 size.
8124
a5362b9a
TS
81252012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8126
8127 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8128 struct siginfo.
8129 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8130 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8131 * linux-low.h: Include <signal.h>.
8132 (struct siginfo): Remove forward declaration.
8133 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8134 struct siginfo.
8135
d226c142
MF
81362012-03-21 Mike Frysinger <vapier@gentoo.org>
8137
8138 * .gitignore: Ignore more files.
8139
122f36ef
PA
81402012-03-19 Pedro Alves <palves@redhat.com>
8141 Jan Kratochvil <jan.kratochvil@redhat.com>
8142
8143 * server.c (cont_thread, general_thread): Add describing comments.
8144 (start_inferior): Clear `cont_thread'.
8145 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8146 of a process.
8147
fc3e5175
YQ
81482012-03-15 Yao Qi <yao@codesourcery.com>
8149
8150 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8151 handling to ...
8152 (cmd_qtdp): ... here.
8153
8d0d92cd
YQ
81542012-03-15 Yao Qi <yao@codesourcery.com>
8155
8156 * tracepoint.c (struct tracepoint_action_ops): New.
8157 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8158 (m_tracepoint_action_download): New.
8159 (r_tracepoint_action_download): New.
8160 (x_tracepoint_action_download): New.
8161 (l_tracepoint_action_download): New.
8162 (add_tracepoint_action): Install `action->ops' according type.
8163 (download_tracepoint_1): Move code `download' function pointer
8164 of various tracepoint_action_ops.
8165
87b0bb13
JK
81662012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8167
8168 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8169 linux_ptrace_attach_warnings.
8170
5f572dec
JK
81712012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8172
8173 * Makefile.in (linux-ptrace.o): New.
8174 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8175 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8176 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8177 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8178 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8179 of these targets.
8180 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8181
f4647387
YQ
81822012-03-08 Yao Qi <yao@codesourcery.com>
8183 Pedro Alves <palves@redhat.com>
8184
8185 Fix PR server/13392.
8186 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8187 offset of JMP insn.
8188 * tracepoint.c (remove_tracepoint): New.
8189 (cmd_qtdp): Call remove_tracepoint when failed to install.
8190
9b224c5e
PA
81912012-03-07 Pedro Alves <palves@redhat.com>
8192
8193 * linux-low.c (get_detach_signal): New.
8194 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8195 Pass on pending signals to PTRACE_DETACH. Check the result of the
8196 ptrace call.
8197 * server.c (program_signals, program_signals_p): New.
8198 (handle_general_set): Handle QProgramSignals.
8199 * server.h (program_signals, program_signals_p): Declare.
8200
e237a7e2
JK
82012012-03-05 Pedro Alves <palves@redhat.com>
8202 Jan Kratochvil <jan.kratochvil@redhat.com>
8203
8204 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8205 New comment why.
8206
5808517f
YQ
82072012-03-03 Yao Qi <yao@codesourcery.com>
8208
8209 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8210 agent_look_up_symbols.
8211
58b4daa5
YQ
82122012-03-03 Yao Qi <yao@codesourcery.com>
8213
8214 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8215 (linux-x86-low.o): Likewise.
8216 * server.h: Remove in_process_agent_loaded.
8217 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8218 common/agent.c.
8219 Update callers.
8220
8ffcbaaf
YQ
82212012-03-03 Yao Qi <yao@codesourcery.com>
8222
8223 * tracepoint.c (gdb_agent_capability): New global.
8224 (in_process_agent_loaded_ust): Renamed to
8225 `in_process_agent_supports_ust'.
8226 Update callers.
8227 (in_process_agent_supports_ust): Call agent_capability_check.
8228 (clear_installed_tracepoints): Assert that agent supports
8229 agent.
8230
d1feda86
YQ
82312012-03-03 Yao Qi <yao@codesourcery.com>
8232
8233 * linux-low.c (linux_supports_agent): New.
8234 (linux_target_ops): Initialize field `supports_agent' with
8235 linux_supports_agent.
8236 * target.h (struct target_ops) <supports_agent>: New.
8237 (target_supports_agent): New macro.
8238 * server.c (handle_general_set): Handle packet 'QAgent'.
8239 (handle_query): Send `QAgent+'.
8240 * Makefile.in (server.o): Depends on agent.h.
8241
2fa291ac
YQ
82422012-03-03 Yao Qi <yao@codesourcery.com>
8243
8244 * Makefile.in (OBS): Add agent.o.
8245 Add new rule for agent.o.
8246 Track dependence of tracepoint.c on agent.h.
8247 * tracepoint.c (run_inferior_command_1):
8248 (run_inferior_command): Call agent_run_command.
8249 (gdb_ust_connect_sync_socket): Deleted. Move it to
8250 common/agent.c.
8251 (resume_thread, stop_thread): Likewise.
8252 (gdb_ust_socket_init): Renamed to ...
8253 (gdb_agent_socket_init): ... New.
8254 (gdb_ust_thread): Renamed to ...
8255 (gdb_agent_helper_thread): ... New.
8256 (gdb_ust_init): Move some code to ...
8257 (gdb_agent_init): ... here. New.
8258 [HAVE_UST]: Call gdb_ust_init.
8259 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8260 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8261 * config.in, configure: Regenerated.
8262
05044653
PA
82632012-03-02 Pedro Alves <palves@redhat.com>
8264
8265 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8266 * linux-low.c (struct simple_pid_list): New.
8267 (stopped_pids): New a struct simple_pid_list pointer.
8268 (add_to_pid_list, pull_pid_from_list): New.
8269 (handle_extended_wait): Don't assume the first signal new children
8270 report is SIGSTOP. Adjust call to pull_pid_from_list.
8271 (linux_wait_for_lwp): Adjust.
8272
8d00225b
YQ
82732012-03-02 Yao Qi <yao@codesourcery.com>
8274
8275 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8276 debug log.
8277
19560ba5
YQ
82782012-03-02 Yao Qi <yao@codesourcery.com>
8279
8280 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8281 `stop_pc' and `tpoint'. Update caller.
8282
1faeff08
MR
82832012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8284
8285 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8286 * linux-low.c (use_linux_regsets): New macro.
8287 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8288 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8289 (linux_register_in_regsets): New function.
8290 (usr_fetch_inferior_registers): Skip registers covered by
8291 regsets.
8292 (usr_store_inferior_registers): Likewise.
8293 (usr_fetch_inferior_registers): New macro.
8294 (usr_store_inferior_registers): Likewise.
8295 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8296 (linux_store_registers): Likewise.
8297 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8298 prototype.
8299 (init_registers_mips64_dsp_linux): Likewise.
8300 (init_registers_mips_linux): New macro.
8301 (init_registers_mips_dsp_linux): Likewise.
8302 (mips_dsp_num_regs): Likewise.
8303 (DSP_BASE, DSP_CONTROL): New fallback macros.
8304 (mips_base_regs): New macro.
8305 (mips_regmap): Use it. Fix the size.
8306 (mips_dsp_regmap): New variable.
8307 (mips_dsp_regset_bitmap): Likewise.
8308 (mips_arch_setup): New function.
8309 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8310 than mips_regmap.
8311 (mips_cannot_store_register): Likewise.
8312 (the_low_target): Update .arch_setup, .num_regs and .regmap
8313 initializers. Add .regset_bitmap initializer.
8314 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8315 initializer.
8316 * linux-bfin-low.c (the_low_target): Likewise.
8317 * linux-cris-low.c (the_low_target): Likewise.
8318 * linux-crisv32-low.c (the_low_target): Likewise.
8319 * linux-ia64-low.c (the_low_target): Likewise.
8320 * linux-m32r-low.c (the_low_target): Likewise.
8321 * linux-m68k-low.c (the_low_target): Likewise.
8322 * linux-ppc-low.c (the_low_target): Likewise.
8323 * linux-s390-low.c (the_low_target): Likewise.
8324 * linux-sh-low.c (the_low_target): Likewise.
8325 * linux-sparc-low.c (the_low_target): Likewise.
8326 * linux-tic6x-low.c (the_low_target): Likewise.
8327 * linux-x86-low.c (the_low_target): Likewise.
8328 * linux-xtensa-low.c (the_low_target): Likewise.
8329 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8330 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8331 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8332 srv_xmlfiles.
8333 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8334 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8335
c03e6ccc
YQ
83362012-02-29 Yao Qi <yao@codesourcery.com>
8337 Pedro Alves <palves@redhat.com>
8338
8339 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8340 `step_over_finished' is true.
8341
644cebc9
PA
83422012-02-27 Pedro Alves <palves@redhat.com>
8343
8344 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8345 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8346
c14d7ab2
PA
83472012-02-27 Pedro Alves <palves@redhat.com>
8348
8349 PR server/9684
8350 * linux-low.c (pid_is_stopped): New.
8351 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8352
412c89dd
LM
83532012-02-25 Luis Machado <lgustavo@codesourcery.com>
8354
8355 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8356 of conditions.
8357
b745defe
MR
83582012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8359
8360 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8361
9f3a5c85
LM
83622012-02-24 Luis Machado <lgustavo@codesourcery>
8363
8364 * server.c (handle_query): Advertise support for target-side
8365 breakpoint condition evaluation.
8366 (process_point_options): New function.
8367 (process_serial_event): When inserting a breakpoint, check for
8368 a target-side condition that should be evaluated.
8369
8370 * mem-break.c: Include regcache.h and ax.h.
8371 (point_cond_list_t): New data structure.
8372 (breakpoint) <cond_list>: New field.
8373 (find_gdb_breakpoint_at): Make non-static.
8374 (delete_gdb_breakpoint_at): Clear any target-side
8375 conditions.
8376 (clear_gdb_breakpoint_conditions): New function.
8377 (add_condition_to_breakpoint): Likewise.
8378 (add_breakpoint_condition): Likewise.
8379 (gdb_condition_true_at_breakpoint): Likewise.
8380 (gdb_breakpoint_here): Return result directly instead
8381 of going through a local variable.
8382
8383 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8384 (clear_gdb_breakpoint_conditions): Likewise.
8385 (add_breakpoint_condition): Likewise.
8386 (gdb_condition_true_at_breakpoint): Likewise.
8387
8388 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8389 (need_step_over_p): Take target-side breakpoint condition into
8390 consideration.
8391
5e1dc496
LM
83922012-02-24 Luis Machado <lgustavo@codesourcery>
8393
8394 * server.h: Include tracepoint.h.
8395 (agent_mem_read, agent_get_trace_state_variable_value,
8396 agent_set_trace_state_variable_value,
8397 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8398 get_set_tsv_func_addr): New prototypes.
8399
8400 * ax.h: New include file.
8401 * ax.c: New source file.
8402
8403 * tracepoint.c: Include ax.h.
8404 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8405 agent_expr, eval_result_type): Move to ax.h.
8406 (parse_agent_expr): Rename to ...
8407 (gdb_parse_agent_expr): ... this, make it non-static and move
8408 to ax.h.
8409 (unparse_agent_expr) Rename to ...
8410 (gdb_unparse_agent_expr): ... this, make it non-static and move
8411 to ax.h.
8412 (eval_agent_expr): Rename to ...
8413 (eval_tracepoint_agent_expr): ... this.
8414 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8415 forward declarations.
8416 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8417 (agent_get_trace_state_variable_value): New function.
8418 (agent_set_trace_state_variable_value): New function.
8419 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8420 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8421 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8422 (condition_true_at_tracepoint): Likewise.
8423 (parse_agent_expr): Rename to ...
8424 (gdb_parse_agent_expr): ... this and move to ax.c.
8425 (unparse_agent_expr): Rename to ...
8426 (gdb_unparse_agent_expr): ... this and move to ax.c.
8427 (gdb_agent_op_name): Move to ax.c.
8428 (eval_agent_expr): Rename to ...
8429 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8430 and move to ax.c.
8431 (eval_tracepoint_agent_expr): New function.
8432 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8433 non-static.
5e1dc496
LM
8434 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8435 ax.c.
8436 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8437 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8438 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8439 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8440 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8441 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8442 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8443 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8444 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8445 (compile_bytecodes): Remove forward declaration.
8446 (is_goto_target): Move to ax.c.
8447 (compile_bytecodes): Move to ax.c and call
8448 agent_get_trace_state_variable_value (...) and
8449 agent_set_trace_state_variable_value (...).
8450
8451 * Makefile.in: Update ax.c and IPA dependencies.
8452
277e4e52
PA
84532012-02-24 Pedro Alves <palves@redhat.com>
8454
8455 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8456 (cmd_bigqtbuffer_circular): ... this. Only handle
8457 'QTBuffer:circular:'.
8458 (handle_tracepoint_general_set): Adjust.
8459
bf4c19f7
YQ
84602012-02-16 Yao Qi <yao@codesourcery.com>
8461
8462 * inferiors.c: Move code to ...
8463 * dll.c: .... here. New.
8464 * server.h: Declare clear_dlls.
8465 * Makefile.in (SFILES): Add dll.c.
8466 (OBS): Add dll.o
8467 (dll.o): New rule.
8468
d73f2619
YQ
84692012-02-11 Yao Qi <yao@codesourcery.com>
8470
8471 * server.c: (handle_monitor_command): Add a new parameter
8472 `own_buf'.
8473 (handle_query): Update caller.
8474
f8255c2a
JB
84752012-02-09 Joel Brobecker <brobecker@adacore.com>
8476
8477 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8478 * configure, config.in: Regenerate.
8479 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8480 is not defined.
8481
da84f473
PA
84822012-02-02 Pedro Alves <palves@redhat.com>
8483
8484 Try SIGKILL first, then PTRACE_KILL.
8485 * linux-low.c (linux_kill_one_lwp): New.
8486 (linux_kill_one_lwp): Rename to ...
8487 (kill_one_lwp_callback): ... this. Use the new
8488 linux_kill_one_lwp.
8489
e886a173
PA
84902012-02-02 Pedro Alves <palves@redhat.com>
8491
8492 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8493 inferior.
8494
be07f1a2
PA
84952012-01-27 Pedro Alves <palves@redhat.com>
8496
8497 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8498 (elf_64_file_p): Make static.
8499 (linux_pid_exe_is_elf_64_file): New.
8500 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8501 Delete declarations.
8502 (linux_pid_exe_is_elf_64_file): Declare.
8503 * linux-x86-low.c (x86_arch_setup): Use
8504 linux_pid_exe_is_elf_64_file.
8505
d8301ad1
JK
85062012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8507
8508 * linux-low.c (linux_wait_for_event_1): Rename to ...
8509 (linux_wait_for_event): ... here and merge it with former
8510 linux_wait_for_event - new variable wait_ptid, use it.
8511 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8512
01b17894
PA
85132012-01-23 Pedro Alves <palves@redhat.com>
8514
8515 * server.c (main): Avoid yet another case of infinite loop while
8516 detaching/killing after a longjmp.
8517
e825046f
JK
85182012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8519
8520 Code cleanup.
8521 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8522
b9e7b9c3
UW
85232012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8524
8525 * hostio.c (handle_readlink): New function.
8526 (handle_vFile): Call it to handle "vFile:readlink" packets.
8527
901f9912
UW
85282012-01-20 Pedro Alves <palves@redhat.com>
8529 Ulrich Weigand <ulrich.weigand@linaro.org>
8530
8531 * server.c (handle_v_requests): Only support vAttach and vRun to
8532 start multiple processes when in extended protocol mode.
8533
fc1ab1a0
PA
85342012-01-17 Pedro Alves <palves@redhat.com>
8535
8536 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8537 memalign plus mprotect to allocate the scratch buffer.
8538
7d5d4e98
PA
85392012-01-13 Pedro Alves <palves@redhat.com>
8540
8541 * server.c (attach_inferior): Clear `cont_thread'.
8542
f128d5e9
PA
85432012-01-13 Pedro Alves <palves@redhat.com>
8544
8545 * server.c (main): Avoid infinite loop while detaching/killing
8546 after a longjmp.
8547
06db92f0
DE
85482012-01-09 Doug Evans <dje@google.com>
8549
8550 * server.c (start_inferior): Set last_ptid in --wrapper case.
8551
32d92999
YQ
85522012-01-06 Yao Qi <yao@codesourcery.com>
8553
8554 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8555 defined.
8556 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8557
5e0a92a9
YQ
85582012-01-04 Yao Qi <yao@codesourcery.com>
8559
8560 * tracepoint.c (cmd_qtdp): Print debug message
8561 for static tracepoint.
8562
ae639e8c
YQ
85632012-01-04 Yao Qi <yao@codesourcery.com>
8564
8565 * tracepoint.c (trace_vdebug): Differentiate debug message
8566 between gdbserver and IPA.
8567
f72429c5
YQ
85682012-01-03 Yao Qi <yao@codesourcery.com>
8569
8570 * tracepoint.c (tracepoint_was_hit): Don't collect for
8571 static tracepoint.
8572
12c3e59c
JB
85732012-01-02 Joel Brobecker <brobecker@adacore.com>
8574
8575 * terminal.h: Reformat copyright header.
8576
67827812
JB
85772012-01-02 Joel Brobecker <brobecker@adacore.com>
8578
8579 * server.c (gdbserver_version): Update copyright year.
8580 * gdbreplay.c (gdbreplay_version): Likewise.
8581
3e52c33d
JK
85822011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8583
8584 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8585
8586 Revert:
8587 2011-12-18 Hui Zhu <teawater@gmail.com>
8588 * linux-low.c (linux_create_inferior): Save return value to ret.
8589
66f1260e
HZ
85902011-12-18 Hui Zhu <teawater@gmail.com>
8591
8592 * linux-low.c (linux_create_inferior): Save return value to ret.
8593
e77616d7
DE
85942011-12-16 Doug Evans <dje@google.com>
8595
e7b06c57
DE
8596 * linux-low.c (linux_create_inferior): If stdio connection,
8597 redirect stdin from /dev/null, stdout to stderr.
8598 * remote-utils.c (remote_is_stdio): New static global.
8599 (remote_connection_is_stdio): New function.
8600 (remote_prepare): Handle stdio connection.
8601 (remote_open): Ditto.
8602 (remote_close): Don't close stdin for stdio connections.
8603 (read_prim,write_prim): New functions. Replace all calls to
8604 read/write to these.
8605 * server.c (main): Watch for "-" argument. Move call to
8606 remote_prepare before start_inferior.
8607 * server.h (STDIO_CONNECTION_NAME): New macro.
8608 (remote_connection_is_stdio): Declare.
8609
e77616d7
DE
8610 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8611 in debugging output.
8612
82067193
YQ
86132011-12-15 Yao Qi <yao@codesourcery.com>
8614
8615 * tracepoint.c: Include sys/syscall.h.
8616 (gdb_ust_thread): Remove preprocessor conditional.
8617
82bfbe7e
PA
86182011-12-14 Pedro Alves <pedro@codesourcery.com>
8619
8620 * linux-low.c (linux_detach_one_lwp): Call
8621 the_low_target.prepare_to_resume before detaching.
8622
712c6575
YQ
86232011-12-14 Yao Qi <yao@codesourcery.com>
8624
8625 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8626 of write.
8627
d54d1edf
YQ
86282011-12-14 Yao Qi <yao@codesourcery.com>
8629
8630 * i386-low.c (i386_low_stopped_data_address): Initialize local
8631 variable `control'.
8632
6210a125
PA
86332011-12-13 Pedro Alves <pedro@codesourcery.com>
8634
8635 PR remote/13492
8636
8637 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8638 DR_CONTROL unless necessary. Extend comments.
8639 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8640 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8641
2ece8244
YQ
86422011-12-13 Yao Qi <yao@codesourcery.com>
8643
8644 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8645 macros.
8646 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8647
784867a5
JK
86482011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8649
8650 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8651 Print new debug message for such case.
8652
6bf36717
JK
86532011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8654
8655 Fix overlapping memcpy.
8656 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8657 the read_inferior_memory transfer.
8658 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8659 write_inferior_memory transfer.
8660 (set_fast_tracepoint_jump): New variable buf. Use it for the
8661 read_inferior_memory and write_inferior_memory transfers.
8662 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8663 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8664 Use it for the write_inferior_memory transfer.
8665 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8666 buffers.
8667
50275556
MR
86682011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8669
8670 * linux-low.c (fetch_register, store_register): Make code
8671 consistent, fix formatting.
8672
7325beb4
MR
86732011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8674
8675 * linux-low.c (usr_store_inferior_registers): Factor out code
8676 to handle individual registers into...
8677 (store_register): ... this new function.
8678
c642a434
UW
86792011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8680
8681 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8682 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8683 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8684 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8685 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8686 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8687 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8688 (srv_xmlfiles): Add new XML files.
8689
8690 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8691 and <sys/uio.h>.
8692 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8693 (init_registers_s390_linux32v1): Add prototype.
8694 (init_registers_s390_linux32v2): Likewise.
8695 (init_registers_s390_linux64v1): Likewise.
8696 (init_registers_s390_linux64v2): Likewise.
8697 (init_registers_s390x_linux64v1): Likewise.
8698 (init_registers_s390x_linux64v2): Likewise.
8699 (s390_num_regs): Increment to 52.
8700 (s390_regmap): Add orig_r2 register.
8701 (s390_num_regs_3264): Increment to 68.
8702 (s390_regmap_3264): Add orig_r2 register.
8703 (s390_collect_ptrace_register): Handle orig_r2 register.
8704 (s390_supply_ptrace_register): Likewise.
8705 (s390_fill_last_break): New function.
8706 (s390_store_last_break): Likewise.
8707 (s390_fill_system_call): New function.
8708 (s390_store_system_call): Likewise.
8709 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8710 register sets.
8711 (s390_check_regset): New function.
8712 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8713 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8714 Update target_regsets for available register sets.
8715
2268b414
JK
87162011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8717 Jan Kratochvil <jan.kratochvil@redhat.com>
8718
8719 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8720 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8721 New.
8722 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8723 * linux-low.h (struct process_info_private): New member r_debug.
8724 * server.c (handle_qxfer_libraries): Call
8725 the_target->qxfer_libraries_svr4.
8726 (handle_qxfer_libraries_svr4): New function.
8727 (qxfer_packets): New entry "libraries-svr4".
8728 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8729 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8730 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8731 PACKET_qXfer_libraries_svr4.
8732
d6db1fab
UW
87332011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8734
8735 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8736 PSW address/mask between 8-byte and 16-byte formats.
8737 (s390_supply_ptrace_register): Likewise.
8738 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8739 basic addressing mode bit.
8740
242f5f1c
SS
87412011-11-24 Stan Shebs <stan@codesourcery.com>
8742
8743 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8744
f196051f
SS
87452011-11-17 Stan Shebs <stan@codesourcery.com>
8746
8747 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8748 (tracing_start_time): New global.
8749 (tracing_stop_time): New global.
8750 (tracing_user_name): New global.
8751 (tracing_notes): New global.
8752 (tracing_stop_note): New global.
8753 (cmd_qtstart): Set traceframe_usage, start_time.
8754 (stop_tracing): Set stop_time.
8755 (cmd_qtstatus): Report additional status.
8756 (cmd_qtp): New function.
8757 (handle_tracepoint_query): Call it.
8758 (cmd_qtnotes): New function.
8759 (handle_tracepoint_general_set): Call it.
8760 (get_timestamp): Rename from tsv_get_timestamp.
8761
405f8e94
SS
87622011-11-14 Stan Shebs <stan@codesourcery.com>
8763 Kwok Cheung Yeung <kcy@codesourcery.com>
8764
8765 * linux-x86-low.c (small_jump_insn): New.
8766 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8767 trampoline and error message, build a trampoline and issue a small
8768 jump instruction to it.
8769 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8770 trampoline and error message.
8771 (x86_get_min_fast_tracepoint_insn_len): New.
8772 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8773 * linux-low.h (struct linux_target_ops): Add arguments to
8774 install_fast_tracepoint_jump_pad operation, add new operation.
8775 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8776 arguments.
8777 (linux_get_min_fast_tracepoint_insn_len): New function.
8778 (linux_target_op): Add new operation.
8779 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8780 (gdb_trampoline_buffer_end): Ditto.
8781 (gdb_trampoline_buffer_error): Ditto.
8782 (struct ipa_sym_addresses): Add fields for new IPA variables.
8783 (symbol_list): Add entries for new IPA variables.
8784 (struct tracepoint): Add fields to hold the address range of the
8785 trampoline used by the tracepoint.
8786 (trampoline_buffer_head): New static variable.
8787 (trampoline_buffer_tail): Ditto.
8788 (claim_trampoline_space): New function.
8789 (have_fast_tracepoint_trampoline_buffer): New function.
8790 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8791 structure.
8792 (install_fast_tracepoint): Ditto, also add error buffer argument.
8793 (cmd_qtminftpilen): New function.
8794 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8795 (fast_tracepoint_from_trampoline_address): New function.
8796 (fast_tracepoint_collecting): Handle trampoline as part of jump
8797 pad space.
8798 (set_trampoline_buffer_space): New function.
8799 (initialize_tracepoint): Initialize new IPA variables.
8800 * target.h (struct target_ops): Add arguments to
8801 install_fast_tracepoint_jump_pad operation, add new
8802 get_min_fast_tracepoint_insn_len operation.
8803 (target_get_min_fast_tracepoint_insn_len): New.
8804 (install_fast_tracepoint_jump_pad): Add arguments.
8805 * server.h (IPA_BUFSIZ): Define.
8806 * linux-i386-ipa.c: Include extra header files.
8807 (initialize_fast_tracepoint_trampoline_buffer): New function.
8808 (initialize_low_tracepoint): Call it.
8809 * server.h (set_trampoline_buffer_space): Declare.
8810 (claim_trampoline_space): Ditto.
8811 (have_fast_tracepoint_trampoline_buffer): Ditto.
8812
1e4d1764
YQ
88132011-11-14 Yao Qi <yao@codesourcery.com>
8814
8815 * server.c (handle_query): Handle InstallInTrace for qSupported.
8816 * tracepoint.c (add_tracepoint): Sort list.
8817 (install_tracepoint, download_tracepoint): New.
8818 (cmd_qtdp): Call them to install and download tracepoints.
8819 (sort_tracepoints): Removed.
8820 (cmd_qtstart): Update.
8821
5c73ff4e
YQ
88222011-11-14 Yao Qi <yao@codesourcery.com>
8823
8824 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8825 * mem-break.h: Declare.
8826 * tracepoint.c (cmd_qtstart): Move some code to ...
8827 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8828 New.
8829 (download_tracepoints): Move some code to ...
8830 (download_tracepoint_1): ... here. New.
8831
86a30030
YQ
88322011-11-08 Yao Qi <yao@codesourcery.com>
8833
8834 * remote-utils.c (relocate_instruction): A comment fix.
8835
8d26e50c
JB
88362011-11-07 Joel Brobecker <brobecker@adacore.com>
8837
8838 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8839 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8840 dr_status_mirror and dr_control_mirror from debug_reg_state.
8841 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8842 (i386_initial_stuff): Remove use of deleted globals.
8843 (i386_get_thread_context, i386_set_thread_context,
8844 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8845 from debug_reg_state.
8846
a59306a3
YQ
88472011-11-05 Yao Qi <yao@codesourcery.com>
8848
8849 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8850 address as TPOINT's.
8851
3065dfb6
SS
88522011-11-02 Stan Shebs <stan@codesourcery.com>
8853
8854 * tracepoint.c (agent_mem_read_string): New function.
8855 (eval_agent_expr): Call it for tracenz.
8856 * server.c (handle_query): Report support for tracenz.
8857
fd0d8c7c
YQ
88582011-11-02 Yao Qi <yao@codesourcery.com>
8859
8860 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8861
609086b1
YQ
88622011-11-02 Yao Qi <yao@codesourcery.com>
8863
8864 * target.h: Fix a typo in comment.
8865
b9fd1791
PA
88662011-10-31 Pedro Alves <pedro@codesourcery.com>
8867
8868 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8869 clobber the breakpoints' shadows with fast tracepoint jumps.
8870 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8871 * target.c (write_inferior_memory): Also pass MYADDR down to
8872 check_mem_write.
8873
03583c20
UW
88742011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8875
8876 * configure.ac: Check support for personality routine.
8877 * configure: Regenerate.
8878 * config.in: Likewise.
8879 * linux-low.c: Include <sys/personality.h>.
8880 Define ADDR_NO_RANDOMIZE if necessary.
8881 (linux_create_inferior): Disable address space randomization when
8882 forking inferior, if requested.
8883 (linux_supports_disable_randomization): New function.
8884 (linux_target_ops): Install it.
8885 * server.h (disable_randomization): Declare.
8886 * server.c (disable_randomization): New global variable.
8887 (handle_general_set): Handle QDisableRandomization.
8888 (handle_query): Likewise for qSupported.
8889 (main): Support --disable-randomization and --no-disable-randomization
8890 command line arguments.
8891 * target.h (struct target_ops): Add supports_disable_randomization.
8892 (target_supports_disable_randomization): New macro.
8893
723b724b
MF
88942011-09-29 Mike Frysinger <vapier@gentoo.org>
8895
8896 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8897 ifdef check.
8898 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8899 [!PT_GETDSBT] (target_loadmap): New definition.
8900 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8901 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8902 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8903 and PT_GETDSBT to LINUX_LOADMAP.
8904 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8905 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8906
55329a5c 89072011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8908
8909 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8910 (arm_linux_hwbp_cap): New static variable.
8911 (arm_linux_get_hwbp_cap): Replace by ...
8912 (arm_linux_init_hwbp_cap): ... this new function.
8913 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8914 (arm_linux_get_hw_watchpoint_count): Likewise.
8915 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8916 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8917 (arm_prepare_to_resume): Use perror_with_name instead of error.
8918
55329a5c 89192011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8920
8921 * linux-arm-low.c: Include <signal.h>.
8922 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8923 (struct arm_linux_hwbp_cap): New data type.
8924 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8925 (struct arm_linux_hw_breakpoint): New data type.
8926 (MAX_BPTS, MAX_WPTS): Define.
8927 (struct arch_process_info, struct arch_lwp_info): New data types.
8928 (arm_linux_get_hwbp_cap): New function.
8929 (arm_linux_get_hw_breakpoint_count): Likewise.
8930 (arm_linux_get_hw_watchpoint_count): Likewise.
8931 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8932 (arm_hwbp_control_initialize): Likewise.
8933 (arm_hwbp_control_is_enabled): Likewise.
8934 (arm_hwbp_control_is_initialized): Likewise.
8935 (arm_hwbp_control_disable): Likewise.
8936 (arm_linux_hw_breakpoint_equal): Likewise.
8937 (arm_linux_hw_point_initialize): Likewise.
8938 (struct update_registers_data): New data structure.
8939 (update_registers_callback: New function.
8940 (arm_insert_point): Likewise.
8941 (arm_remove_point): Likewise.
8942 (arm_stopped_by_watchpoint): Likewise.
8943 (arm_stopped_data_address): Likewise.
8944 (arm_new_process): Likewise.
8945 (arm_new_thread): Likewise.
8946 (arm_prepare_to_resume): Likewise.
8947 (the_low_target): Register arm_insert_point, arm_remove_point,
8948 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8949 arm_new_thread, and arm_prepare_to_resume.
8950
6b9801d4
SS
89512011-09-15 Stan Shebs <stan@codesourcery.com>
8952
8953 * server.h (struct emit_ops): Add compare-goto fields.
8954 * tracepoint.c (gdb_agent_op_sizes): New table.
8955 (emit_eq_goto): New function.
8956 (emit_ne_goto): New function.
8957 (emit_lt_goto): New function.
8958 (emit_le_goto): New function.
8959 (emit_gt_goto): New function.
8960 (emit_ge_goto): New function.
8961 (is_goto_target): New function.
8962 (compile_bytecodes): Recognize special cases of compare-goto
8963 combinations and call specialized emitters for them.
8964 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8965 (amd64_emit_ne_goto): New function.
8966 (amd64_emit_lt_goto): New function.
8967 (amd64_emit_le_goto): New function.
8968 (amd64_emit_gt_goto): New function.
8969 (amd64_emit_ge_goto): New function.
8970 (amd64_emit_ops): Add the new functions.
8971 (i386_emit_eq_goto): New function.
8972 (i386_emit_ne_goto): New function.
8973 (i386_emit_lt_goto): New function.
8974 (i386_emit_le_goto): New function.
8975 (i386_emit_gt_goto): New function.
8976 (i386_emit_ge_goto): New function.
8977 (i386_emit_ops): Add the new functions.
8978
bf15cbda
SS
89792011-09-08 Stan Shebs <stan@codesourcery.com>
8980
8981 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8982 (i386_emit_epilogue): Restore %ebx.
8983
943ca1dd
JZ
89842011-08-31 Jie Zhang <jzhang918@gmail.com>
8985
8986 * server.c (step_thread): Remove definition.
8987 (process_serial_event): Don't handle Hs.
8988 * server.h (step_thread): Remove declaration.
8989 * target.c (set_desired_inferior): Remove use of step_thread.
8990
e3deef73
LM
89912011-08-24 Luis Machado <lgustavo@codesourcery.com>
8992
8993 * linux-low.c: Include linux-procfs.h.
8994 (linux_attach_lwp_1): Update comments.
8995 (linux_attach): Scan for existing threads when attaching to a
8996 process that is the tgid.
8997 * Makefile.in: Update dependencies.
8998
13da1c97
LM
89992011-08-24 Luis Machado <lgustavo@codesourcery.com>
9000
9001 * configure.srv: Add linux-procfs.o dependencies.
9002
881127c9
YQ
90032011-08-14 Yao Qi <yao@codesourcery.com>
9004
9005 * target.h (struct target_ops): Fix indent.
9006 * win32-low.c (win32_target_ops): Fix comment.
9007
58dbd541
YQ
90082011-08-14 Andrew Jenner <andrew@codesourcery.com>
9009 Yao Qi <yao@codesourcery.com>
9010
9011 * Makefile.in (clean): Remove tic6x-*.c files.
9012 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9013 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9014 (tic6x-c64xp-linux.c): Likewise.
9015 * configure.srv: Add support for tic6x-*-uclinux.
9016 * linux-tic6x-low.c: New.
9017 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9018
78d85199
YQ
90192011-08-14 Andrew Stubbs <ams@codesourcery.com>
9020 Yao Qi <yao@codesourcery.com>
9021
9022 * target.h (struct target_ops): Add read_loadmap.
9023 * linux-low.c (struct target_loadseg): New type.
9024 (struct target_loadmap): New type.
9025 (linux_read_loadmap): New function.
9026 (linux_target_ops): Add linux_read_loadmap.
9027 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9028 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9029 to NULL.
78d85199 9030
a959a88d
EZ
90312011-08-05 Eli Zaretskii <eliz@gnu.org>
9032
9033 * win32-low.c: Include <stdint.h>.
9034
1ced966e
PA
90352011-07-22 Pedro Alves <pedro@codesourcery.com>
9036
9037 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9038 to the inferior here.
9039 (i386_remove_aligned_watchpoint): Ditto.
9040 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9041 fit part of the watchpoint in the debug registers.
9042 (i386_update_inferior_debug_regs): New.
9043 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9044 registers, and only update the inferior on success.
9045 (i386_low_remove_watchpoint): Ditto.
9046
d26e3629
KY
90472011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9048
9049 * linux-low.c (compare_ints, unique, list_threads, show_process,
9050 linux_core_of_thread): Delete.
9051 (linux_target_ops): Change linux_core_of_thread to
9052 linux_common_core_of_thread.
9053 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9054 * utils.c (malloc_failure): Change type of argument.
9055 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9056 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9057 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9058 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9059 (IPA_OBJS): Add common-utils-ipa.o.
9060 (ptid_h, linux_osdata_h): New macros.
9061 (server_h): Add common/common-utils.h, common/xml-utils.h,
9062 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9063 common/ptid.h.
9064 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9065 ptid.o, buffer.o): New rules.
9066 (linux-low.o): Add common/linux-osdata.h as a dependency.
9067 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9068 * configure.ac: Add AC_HEADER_DIRENT check.
9069 * config.in: Regenerate.
9070 * configure: Regenerate.
9071 * remote-utils.c (xml_escape_text): Delete.
9072 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9073 buffer_xml_printf): Move to common/buffer.c.
9074 * server.c (main): Remove call to initialize_inferiors.
9075 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9076 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9077 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9078 internal_error, gdb_assert, gdb_assert_fail): Delete.
9079 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9080 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9081 common/buffer.h.
9082 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9083 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9084 initialize_inferiors): Delete.
9085
2275a1a7
PA
90862011-07-20 Pedro Alves <pedro@codesourcery.com>
9087
9088 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9089 symbol error.
9090
0a5b1e09
PA
90912011-05-31 Pedro Alves <pedro@codesourcery.com>
9092
9093 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9094 assertion.
9095 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9096
6938fd34
YQ
90972011-05-26 Yao Qi <yao@codesourcery.com>
9098
9099 * Makefile.in (thread-db.o): Track dependence to
9100 common/gdb_thread_db.h.
9101 * thread-db.c: include gdb_thread_db.h from right place.
9102
b481f9e0
TT
91032011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9104
9105 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9106 __FILE__ and __LINE__ to internal_error.
9107
98a5dd13
DE
91082011-05-13 Doug Evans <dje@google.com>
9109
9110 * thread-db.c (try_thread_db_load_from_sdir): New function.
9111 (try_thread_db_load_from_dir): New function.
9112 (thread_db_load_search): Handle $sdir, ignore $pdir.
9113 Remove trying of system directories if search of
9114 libthread-db-search-path fails, that is now done via $sdir.
9115
d248b706
KY
91162011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9117
9118 * server.c (handle_query): Add EnableDisableTracepoints to the list
9119 of supported features.
43aaf8b6 9120 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9121 tracepoints.
43aaf8b6
PA
9122 (cmd_qtenable_disable): New.
9123 (cmd_qtstart): Install tracepoints even if disabled.
9124 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9125 receiving a QTEnable or QTDisable packet.
9126 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9127 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9128 tracepoints.
9129 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9130
84e578fb
DE
91312011-05-10 Doug Evans <dje@google.com>
9132
9133 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9134
71f55dd8
DE
91352011-05-04 Doug Evans <dje@google.com>
9136
9137 * linux-low.c (linux_join): Skip process lookup.
9138 * spu-low.c (spu_join): Ditto.
9139 * server.c (join_inferiors_callback): Delete.
9140 (process_serial_event): For 'D' packet (detach) call join_inferior
9141 directly.
9142
4d393d60
JM
91432011-05-04 Joseph Myers <joseph@codesourcery.com>
9144
9145 * README: Don't mention xscale*-*-linux*.
9146 * configure.srv (xscale*-*-linux*): Don't handle target.
9147
b00ad6ff
NF
91482011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9149
9150 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9151 casting pointers.
9152 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9153 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9154 (i386_emit_void_call_2): Likewise.
9155
af96c192
YQ
91562011-04-26 Yao Qi <yao@codesourcery.com>
9157
43aaf8b6
PA
9158 * linux-low.c: Move common macros to linux-ptrace.h.
9159 Include linux-ptrace.h.
af96c192
YQ
9160 * Makefile.in (linux_ptrace_h): New.
9161 (linux-low.o): Depends on linux-ptrace.h.
9162
03f2bd59
JK
91632011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9164
9165 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9166 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9167 (remote_prepare): New function with most of the TCP code from ...
9168 (remote_open): ... here. Detect PORT here unconditionally. Move also
9169 setting transport_is_reliable.
9170 * server.c (run_once): New variable.
9171 (gdbserver_usage): Document it.
9172 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9173 the first run if RUN_ONCE.
9174 * server.h (run_once, remote_prepare): New declarations.
9175
7a9dd1b2
TT
91762011-04-19 Tom Tromey <tromey@redhat.com>
9177
9178 * win32-low.c (handle_load_dll): Remove duplicate "the".
9179
81239425
PM
91802011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9181
9182 Remove support for old Cygwin 1.5 versions.
9183 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9184 function to avoid warning.
9185 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9186 warning.
9187
9e0627f1
PM
91882011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9189
9190 * gdbserver/server.h (Macro _): Define it if not available.
9191
588eebee
MS
91922011-03-14 Michael Snyder <msnyder@vmware.com>
9193
348af9f7 9194 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9195
43f70d4c
JB
91962011-03-10 Joel Brobecker <brobecker@adacore.com>
9197
9198 * Makefile.in (maintainer-clean realclean distclean): Remove
9199 "make ... subdir_do" command.
9200
348af9f7
MS
92012011-03-10 Michael Snyder <msnyder@vmware.com>
9202
9203 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9204
9205 * server.c (handle_v_run): Free alloced buffer on early return.
9206
e637a4f5
YQ
92072011-03-09 Yao Qi <yao@codesourcery.com>
9208
9209 Revert:
9210 2011-03-04 Yao Qi <yao@codesourcery.com>
9211
9212 * Makefile.in: Remove GNU make feature --directory.
9213
9214 2011-03-05 Yao Qi <yao@codesourcery.com>
9215
9216 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9217 (subdir_do): New make target. Copied from gdb/Makefile.
9218 (maintainer-clean, realclean, distclean, clean): Call corresponding
9219 make targets in common/Makefile.
9220
9221 2011-02-11 Yao Qi <yao@codesourcery.com>
9222
9223 * configure.ac: Call AC_PROG_RANLIB.
9224 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9225 * configure: Regenerate.
9226
e6edda56
JK
92272011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9228
9229 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9230
e5141119
JB
92312011-03-06 Yao Qi <yao@codesourcery.com>
9232
9233 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9234
64794aa4
JB
92352011-03-05 Yao Qi <yao@codesourcery.com>
9236
9237 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9238 (subdir_do): New make target. Copied from gdb/Makefile.
9239 (maintainer-clean, realclean, distclean, clean): Call corresponding
9240 make targets in common/Makefile.
9241
7a762829
YQ
92422011-03-04 Yao Qi <yao@codesourcery.com>
9243
9244 * Makefile.in: Remove GNU make feature --directory.
9245
348af9f7
MS
92462011-03-04 Michael Snyder <msnyder@vmware.com>
9247
9248 * server.c (queue_stop_reply): Call xmalloc not malloc.
9249
92502011-03-02 Michael Snyder <msnyder@vmware.com>
9251
9252 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9253
9f72fee2
MS
92542011-02-28 Michael Snyder <msnyder@vmware.com>
9255
588eebee
MS
9256 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9257 (cmd_qtframe): Ditto.
9258 (cmd_qtbuffer): Ditto.
9259 (cmd_bigqtbuffer): Ditto.
9260
9f72fee2
MS
9261 * utils.c (decimal2str): Initialize 'width' to nine, then
9262 don't mess with it.
9263
8040bd49
UW
92642011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9265
9266 * hostio.c (require_data): Free *data, not data.
9267
7e52cbd0
JK
92682011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9269
9270 * hostio.c (require_data): Use free, not xfree.
9271
9130f83e
MS
92722011-02-27 Michael Snyder <msnyder@vmware.com>
9273
4b812f4e
MS
9274 * server.c (handle_query): Discard unused value.
9275
9130f83e
MS
9276 * hostio.c (require_data): Free malloc memory before returning
9277 error.
9278
69d37113
MS
92792011-02-26 Michael Snyder <msnyder@vmware.com>
9280
9281 * linux-low.c (list_threads): Call closedir for dirent.
9282
35f5825a
MS
92832011-02-27 Michael Snyder <msnyder@vmware.com>
9284
2a589cef
MS
9285 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9286 a case statement falls through.
9287
0adea5f7
MS
9288 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9289
35f5825a
MS
9290 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9291 in comparison.
9292
238f1c74
MS
92932011-02-26 Michael Snyder <msnyder@vmware.com>
9294
9295 * utils.c (decimal2str): Eliminate dead code and dead param.
9296 (pulongest): Drop dead param from call to decimal2str.
9297 (plongest): Ditto.
9298
633ff500
JB
92992011-02-24 Joel Brobecker <brobecker@adacore.com>
9300
9301 Revert the following patch (not approved yet):
9302 2011-02-21 Hui Zhu <teawater@gmail.com>
9303 * tracepoint.c (tp_printf): New function.
9304 (eval_agent_expr): Handle gdb_agent_op_printf.
9305
f9c6ff72
HZ
93062011-02-21 Hui Zhu <teawater@gmail.com>
9307
9308 * tracepoint.c (tp_printf): New function.
9309 (eval_agent_expr): Handle gdb_agent_op_printf.
9310
94d5e490
TT
93112011-02-18 Tom Tromey <tromey@redhat.com>
9312
9313 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9314 (tracepoint.o): Likewise.
9315 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9316 (gdb_agent_op_names): Likewise.
9317
c7f96d2b
TT
93182011-02-18 Tom Tromey <tromey@redhat.com>
9319
9320 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9321 gdb_agent_op_rot>: New constants.
9322 (gdb_agent_op_names): Add pick and roll.
9323 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9324 cases.
9325
0feedb2c
JK
93262011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9327
9328 * aclocal.m4: Regenerated with aclocal-1.11.1.
9329
b3b9301e
PA
93302011-02-14 Pedro Alves <pedro@codesourcery.com>
9331
9332 * server.c (handle_qxfer_traceframe_info): New.
9333 (qxfer_packets): Register "traceframe-info".
9334 (handle_query): Report support for qXfer:traceframe-info:read+.
9335 * tracepoint.c (match_blocktype): New.
9336 (traceframe_find_block_type): Rename to ...
9337 (traceframe_walk_blocks): ... this. Add callback filter argument,
9338 and use it.
9339 (traceframe_find_block_type): New, reimplemented on top of
9340 traceframe_walk_blocks.
9341 (build_traceframe_info_xml): New.
9342 (traceframe_read_info): New.
9343 * server.h (traceframe_read_info): Declare.
9344
4f3e6fb7
YQ
93452011-02-11 Yao Qi <yao@codesourcery.com>
9346
9347 * configure.ac: Call AC_PROG_RANLIB.
9348 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9349 * configure: Regenerate.
9350
764880b7
PA
93512011-02-07 Pedro Alves <pedro@codesourcery.com>
9352
9353 * server.c (gdb_read_memory): Change return semantics to allow
9354 partial transfers.
9355 (handle_search_memory_1): Adjust.
9356 (process_serial_event) <'m' packet>: Handle partial transfers.
9357 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9358
1c79eb8a
PA
93592011-01-28 Pedro Alves <pedro@codesourcery.com>
9360
9361 * regcache.c (init_register_cache): Initialize
9362 regcache->register_status.
9363 (free_register_cache): Release regcache->register_status.
9364 (regcache_cpy): Copy register_status.
9365 (registers_to_string): Print 'x's for unavailable registers.
9366 (supply_register): Mark the register's status valid or
9367 unavailable, depending on whether a buffer was passed in or not.
9368 (supply_register_zeroed): New.
9369 (supply_regblock): Mark the registers' status valid or
9370 unavailable, depending on whether a buffer was passed in or not.
9371 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9372 (struct regcache): New `register_status' field.
9373 (supply_register_zeroed): Declare.
9374 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9375 supply_register_zeroed, rather than passing a NULL buffer to
9376 supply_register.
9377 * tracepoint.c (fetch_traceframe_registers): Update comment.
9378
85724a0e
PA
93792011-01-28 Pedro Alves <pedro@codesourcery.com>
9380
9381 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9382 buffer explicit.
9383
d08aafef
PA
93842011-01-25 Pedro Alves <pedro@codesourcery.com>
9385
9386 * server.h (decode_xfer_write): Change prototype.
9387 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9388 and don't extract the annex here.
9389 * server.c (decode_xfer_read): Remove `annex' parameter,
9390 and don't extract the annex here.
9391 (decode_xfer): New.
9392 (struct qxfer): New.
9393 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9394 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9395 (handle_qxfer_statictrace): New functions, abstracted out from
9396 handle_query, and made to use the struct qxfer interface.
9397 (handle_threads_qxfer_proper): Rename to ...
9398 (handle_qxfer_threads_proper): ... this.
9399 (handle_threads_qxfer): Rename to ...
9400 (handle_qxfer_threads): ... this. Adjust.
9401 (qxfer_packets): New array.
9402 (handle_qxfer): New function.
9403 (handle_query): Use handle_qxfer.
9404
493e2a69
MS
94052011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9406
9407 * gdbreplay.c: Shorten lines of >= 80 columns.
9408 * linux-low.c: Ditto.
9409 * linux-ppc-low.c: Ditto.
9410 * linux-s390-low.c: Ditto.
9411 * linux-sparc-low.c: Ditto.
9412 * linux-x86-low.c: Ditto.
9413 * linux-xtensa-low.c: Ditto.
9414 * mem-break.c: Ditto.
9415 * nto-low.c: Ditto.
9416 * regcache.h: Ditto.
9417 * remote-utils.c: Ditto.
9418 * server.c: Ditto.
9419 * server.h: Ditto.
9420 * thread-db.c: Ditto.
9421 * tracepoint.c: Ditto.
9422 * utils.c: Ditto.
9423 * win32-low.h: Ditto.
9424
44944448
JB
94252011-01-05 Joel Brobecker <brobecker@adacore.com>
9426
9427 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9428 update.
9429
71ce852c
JB
94302011-01-01 Joel Brobecker <brobecker@adacore.com>
9431
9432 * server.c (gdbserver_version): Update copyright year in version
9433 output.
9434 * gdbreplay.c (gdbreplay_version): Ditto.
9435
eb826dc6
MF
94362010-12-29 Jie Zhang <jie.zhang@analog.com>
9437
9438 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9439 * linux-bfin-low.c: New file.
9440 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9441 PT_DATA_ADDR for BFIN targets.
9442 * Makefile.in (SFILES): Add linux-bfin-low.c.
9443 (clean): Remove reg-bfin.c.
9444 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9445 * README: Mention supported Blackfin targets.
9446
39ab222a
MF
94472010-12-23 Mike Frysinger <vapier@gentoo.org>
9448
9449 * .gitignore: New file.
9450
a1f2ce7d
MF
94512010-11-16 Mike Frysinger <vapier@gentoo.org>
9452
9453 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9454
f474844c
JZ
94552010-10-22 Jie Zhang <jie@codesourcery.com>
9456
9457 * Makefile.in: Add FLAGS_TO_PASS variable.
9458 (install): Remove dependency of install-only and recursively
9459 invoke make for install-only.
9460
f1048712
DE
94612010-10-04 Doug Evans <dje@google.com>
9462
9463 * Makefile.in (uninstall): Use $(DESTDIR).
9464
b53a1623
PA
94652010-09-24 Pedro Alves <pedro@codesourcery.com>
9466
e6ee044d
PA
9467 PR gdb/11842
9468
b53a1623
PA
9469 * linux-x86-low.c (compat_siginfo_from_siginfo)
9470 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9471 si_code is < 0. Check for si_code == SI_TIMER before checking for
9472 si_code < 0.
9473
fa1bd1e4
JB
94742010-09-13 Joel Brobecker <brobecker@adacore.com>
9475
9476 * lynx-i386-low.c: New file.
9477 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9478
47fac8f8
JB
94792010-09-13 Joel Brobecker <brobecker@adacore.com>
9480
9481 * lynx-low.c (ptrace_request_to_str): Remove handling for
9482 request values that have been removed in LynxOS 5.x.
9483
1adfc54d
JB
94842010-09-13 Joel Brobecker <brobecker@adacore.com>
9485
9486 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9487 <ptrace.h>
9488
c2a66c29
NS
94892010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9490
9491 * configure.ac: Add --enable-inprocess-agent option.
9492 * configure: Rebuilt.
9493
32fcada3
YQ
94942010-09-06 Yao Qi <yao@codesourcery.com>
9495
9496 * linux-low.c (linux_kill): Remove unused variable.
9497 (linux_stabilize_threads): Likewise.
9498 * server.c (start_inferior): Likewise.
9499 (queue_stop_reply_callback): Likewise.
9500 * tracepoint.c (do_action_at_tracepoint): Likewise.
9501
0cccb683
YQ
95022010-09-06 Yao Qi <yao@codesourcery.com>
9503
9504 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9505 on return.
9506
423ec54c
JK
95072010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9508
9509 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9510
12ac6819
PA
95112010-09-06 Pedro Alves <pedro@codesourcery.com>
9512
9513 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9514 "$(IPA_DEPFILES)".
9515
8ed54b31
JB
95162010-09-01 Joel Brobecker <brobecker@adacore.com>
9517
9518 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9519 gdbserver/lynx-ppc-low.c: New files.
9520 * Makefile.in (lynx_low_h): New variable.
9521 (lynx-low.o, lynx-ppc-low.o): New rules.
9522 * configure.ac: On LynxOS, link with -lnetinet.
9523 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9524 * configure: regenerate.
9525
bb0116a4
JB
95262010-09-01 Joel Brobecker <brobecker@adacore.com>
9527
9528 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9529 * configure.ac: Add check for vasprintf and vsnprintf.
9530 * configure, config.in: Regenerate.
9531 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9532
a778ab81 95332010-09-01 Joel Brobecker <brobecker@adacore.com>
9534
9535 * gdbreplay.c: Move include of alloca.h up, next to include of
9536 malloc.h.
9537 * server.h: Add include of malloc.h.
9538 * mem-break.c: Remove include of malloc.h.
9539 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9540
8b034a19 95412010-09-01 Joel Brobecker <brobecker@adacore.com>
9542
9543 * Makefile.in (memmem.o): Build with -Wno-error.
9544
95452010-09-01 Joel Brobecker <brobecker@adacore.com>
9546
9547 * utils.c (xsnprintf): Make non-static.
9548 * server.h: Add xsnprintf declaration.
9549 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9550 replace calls to snprintf by calls to xsnprintf throughout.
9551
95522010-09-01 Joel Brobecker <brobecker@adacore.com>
9553
9554 * configure.ac: Add configure check for alloca.
9555 * configure, config.in: Regenerate.
9556 * server.h: Include alloca.h if it exists.
9557 * gdbreplay.c: Include alloca.h if it exists.
9558
1a981360
PA
95592010-08-28 Pedro Alves <pedro@codesourcery.com>
9560
9561 * linux-low.c (__SIGRTMIN): Define if not already defined.
9562 (linux_create_inferior): Check for __ANDROID__ rather than
9563 __SIGRTMIN.
9564 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9565 are already deferred.
9566 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9567 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9568 stopped and already has a pending signal to report.
9569 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9570 a pending signal to report or is moving out of a jump pad.
9571 (linux_init_signals): Check for __ANDROID__ rather than
9572 __SIGRTMIN.
9573
b4d51a55
PA
95742010-08-28 Pedro Alves <pedro@codesourcery.com>
9575
9576 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9577 debug_threads check. Avoid a linear search when not doing debug
9578 output.
9579
ec48365d
PA
95802010-08-27 Pedro Alves <pedro@codesourcery.com>
9581
9582 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9583 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9584 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9585 (process_event): Change local fd's type to gdb_fildes_t.
9586 (create_file_handler): Adjust prototype.
9587 (delete_file_handler): Adjust prototype.
9588 (handle_file_event): Adjust prototype. Use pfildes.
9589 (create_file_event): Adjsut prototype.
9590 * remote-utils.c (remote_desc, listen_desc): Change type to
9591 gdb_fildes_t.
9592 * server.h: New gdb_fildes_t typedef.
9593 [USE_WIN32API]: Include winsock2.h.
9594 (delete_file_handler, add_file_handler): Adjust prototypes.
9595 (pfildes): Declare.
9596 * utils.c (pfildes): New.
9597
854d88f0
PA
95982010-08-27 Pedro Alves <pedro@codesourcery.com>
9599
9600 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9601 * configure: Regenerate.
9602
0146f85b
PA
96032010-08-27 Pedro Alves <pedro@codesourcery.com>
9604
9605 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9606 (linux_done_accessing_memory): ... this.
9607 (linux_target_ops): Adjust.
9608 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9609 * nto-low.c (nto_target_ops): Adjust comment.
9610 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9611 * spu-low.c (spu_target_ops): Adjust comment.
9612 * target.h (target_ops): Rename unprepare_to_access_memory field
9613 to done_accessing_memory.
9614 (unprepare_to_access_memory): Rename to ...
9615 (done_accessing_memory): ... this.
9616
90d74c30
PA
96172010-08-26 Pedro Alves <pedro@codesourcery.com>
9618
9619 * linux-low.c (linux_prepare_to_access_memory): New.
9620 (linux_unprepare_to_access_memory): New.
9621 (linux_target_ops): Install them.
9622 * server.c (read_memory): Rename to ...
9623 (gdb_read_memory): ... this. Use
9624 prepare_to_access_memory/prepare_to_access_memory.
9625 (write_memory): Rename to ...
9626 (gdb_write_memory): ... this. Use
9627 prepare_to_access_memory/prepare_to_access_memory.
9628 (handle_search_memory_1): Adjust.
9629 (process_serial_event): Adjust.
9630 * target.h (struct target_ops): New fields
9631 prepare_to_access_memory and unprepare_to_access_memory.
9632 (prepare_to_access_memory, unprepare_to_access_memory): New.
9633 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9634 prepare_to_access_memory/prepare_to_access_memory.
9635 * nto-low.c (nto_target_ops): Adjust.
9636 * spu-low.c (spu_target_ops): Adjust.
9637 * win32-low.c (win32_target_ops): Adjust.
9638
fd467969
PA
96392010-08-26 Pedro Alves <pedro@codesourcery.com>
9640
9641 * Makefile.in (WARN_CFLAGS): Get it from configure.
9642 (WERROR_CFLAGS): New.
9643 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9644 * configure.ac: Introduce --enable-werror, which adds -Werror to
9645 the compiler command line. Enabled by default. Disable with
9646 --disable-werror. Add -Wdeclaration-after-statement
9647 Wpointer-arith and -Wformat-nonliteral to warning flags.
9648 * configure: Regenerate.
9649
331e2f5f
PA
96502010-08-26 Pedro Alves <pedro@codesourcery.com>
9651
9652 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9653
e581f2b4
PA
96542010-08-26 Pedro Alves <pedro@codesourcery.com>
9655
9656 * gdbreplay.c (remote_error): New.
9657 (gdbchar): New.
9658 (expect): Use gdbchar. Check for error reading from GDB.
9659 Clarify sync error output.
9660 (play): Check for errors writing to GDB.
9661 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9662 * remote-utils.c (getpkt): Check for errors writing to the remote
9663 descriptor.
9664
3c11dd79
PA
96652010-08-25 Pedro Alves <pedro@codesourcery.com>
9666
9667 * linux-low.c (linux_wait_1): Move non-debugging code out of
9668 `debug_threads' control.
9669
d20a8ad9
PA
96702010-08-25 Pedro Alves <pedro@codesourcery.com>
9671
9672 * linux-low.c (linux_wait_1): Don't set last_status here.
9673 * server.c (push_event, queue_stop_reply_callback): Assert we're
9674 not pushing a TARGET_WAITKIND_IGNORE event.
9675 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9676 (myresume, handle_target_event): Set the thread's last_resume_kind
9677 and last_status from the target returned status.
9678
964e4306
PA
96792010-08-25 Pedro Alves <pedro@codesourcery.com>
9680
9681 PR threads/10729
9682
9683 * linux-x86-low.c (update_debug_registers_callback): New.
9684 (i386_dr_low_set_addr): Use it.
9685 (i386_dr_low_get_addr): New.
9686 (i386_dr_low_set_control): Use update_debug_registers_callback.
9687 (i386_dr_low_get_control): New.
9688 (i386_dr_low_get_status): Adjust.
9689 * linux-low.c (linux_stop_lwp): New.
9690 * linux-low.h (linux_stop_lwp): Declare.
9691
9692 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9693 argument instead of a i386_debug_reg_state.
9694 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9695 a i386_debug_reg_state.
9696 (i386_insert_aligned_watchpoint): Adjust.
9697 (i386_remove_aligned_watchpoint): Adjust.
9698 (i386_low_stopped_data_address): Read the debug registers from the
9699 inferior instead of from the mirrors.
9700 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9701 (i386_dr_low_get_addr): Declare.
9702 (i386_dr_low_get_control): Declare.
9703 (i386_dr_low_get_status): Change prototype.
9704
9705 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9706 (i386_dr_low_get_addr): New.
9707 (i386_dr_low_get_control): New.
9708 (i386_dr_low_get_status): Adjust prototype. Return
9709 dr_status_mirror.
9710 (i386_initial_stuff): Clear dr_status_mirror and
9711 dr_control_mirror.
9712 (i386_get_thread_context): Adjust.
9713 (i386_set_thread_context): Adjust.
9714 (i386_thread_added): Adjust.
9715
5f21a75b
PA
97162010-08-24 Pedro Alves <pedro@codesourcery.com>
9717
9718 * linux-low.h (linux_thread_area): Delete declaration.
9719
3e4c1235
TS
97202010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9721
9722 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9723 after its termination.
9724
1971b033
PA
97252010-08-09 Pedro Alves <pedro@codesourcery.com>
9726
9727 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9728 (gdb_wants_all_stopped): Delete.
9729 (linux_wait_1): Don't call them.
9730 * server.c (handle_v_cont): Tag all threads as want-stopped.
9731 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9732 stopped as "client-wants-stopped".
9733
310444ac
PA
97342010-07-31 Pedro Alves <pedro@codesourcery.com>
9735
9736 * Makefile.in (signals_h): New.
9737 (server_h): Depend on it.
9738 (server.o): Don't depend on $(signals_def).
9739 (signals.o): Depend on $(signals_def).
9740
a19cae16
JK
97412010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9742
9743 * Makefile.in (signals_def): New.
9744 (server_h): Append include/gdb/signals.h and signals_def.
9745 (server.o): Append signals_def.
9746
30d50328
JK
97472010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9748
9749 * server.c (handle_target_event): Use target_signal_to_host for
9750 resume_info.sig initialization.
9751 * target.h (struct thread_resume) <sig>: New comment.
9752
5c3216e2
OS
97532010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9754
c6f46ca0
OS
9755 * server.c (handle_query): strcpy() the returned string from paddress()
9756 instead of sprintf().
5c3216e2
OS
9757 * utils.c (paddress): Return phex_nz().
9758
6bd31874
JB
97592010-07-07 Joel Brobecker <brobecker@adacore.com>
9760
9761 * server.c (handle_v_cont): Call mourn_inferior if process
9762 just exited.
9763 (myresume): Likewise.
9764
0fb4aa4b
PA
97652010-07-01 Pedro Alves <pedro@codesourcery.com>
9766
9767 Static tracepoints, and integration with UST.
9768
9769 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9770 * mem-break.c (uninsert_all_breakpoints)
9771 (reinsert_all_breakpoints): New.
9772 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9773 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9774 (gdb_agent_ust_loaded, helper_thread_id)
9775 (gdb_agent_helper_thread_id): New macros.
9776 (struct ipa_sym_addresses): Add addr_ust_loaded,
9777 addr_helper_thread_id, addr_cmd_buf.
9778 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9779 (in_process_agent_loaded_ust): New.
9780 (write_e_ust_not_loaded): New.
9781 (maybe_write_ipa_ust_not_loaded): New.
9782 (struct collect_static_trace_data_action): New.
9783 (enum tracepoint_type) <static_tracepoint>: New.
9784 (struct tracepoint) <handle>: Mention static tracepoints.
9785 (struct static_tracepoint_ctx): New.
9786 (CMD_BUF_SIZE): New.
9787 (add_tracepoint_action): Handle static tracepoint actions.
9788 (unprobe_marker_at): New.
9789 (clear_installed_tracepoints): Handle static tracepoints.
9790 (cmd_qtdp): Handle static tracepoints.
9791 (probe_marker_at): New.
9792 (cmd_qtstart): Handle static tracepoints.
9793 (response_tracepoint): Handle static tracepoints.
9794 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9795 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9796 (get_context_regcache): Handle static tracepoints.
9797 (do_action_at_tracepoint): Handle static tracepoint actions.
9798 (traceframe_find_block_type): Handle static trace data blocks.
9799 (traceframe_read_sdata): New.
9800 (download_tracepoints): Download static tracepoint actions.
9801 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9802 (GDB_PROBE_NAME): New.
9803 (ust_ops): New.
9804 (GET_UST_SYM): New.
9805 (USTF): New.
9806 (dlsym_ust): New.
9807 (ust_marker_to_static_tracepoint): New.
9808 (gdb_probe): New.
9809 (collect_ust_data_at_tracepoint): New.
9810 (gdb_ust_probe): New.
9811 (UNIX_PATH_MAX, SOCK_DIR): New.
9812 (gdb_ust_connect_sync_socket): New.
9813 (resume_thread, stop_thread): New.
9814 (run_inferior_command): New.
9815 (init_named_socket): New.
9816 (gdb_ust_socket_init): New.
9817 (cstr_to_hexstr): New.
9818 (next_st): New.
9819 (first_marker, next_marker): New.
9820 (response_ust_marker): New.
9821 (cmd_qtfstm, cmd_qtsstm): New.
9822 (unprobe_marker_at, probe_marker_at): New.
9823 (cmd_qtstmat, gdb_ust_thread): New.
9824 (gdb_ust_init): New.
9825 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9826 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9827 (ST_REGENTRY): New.
9828 (x86_64_st_collect_regmap): New.
9829 (X86_64_NUM_ST_COLLECT_GREGS): New.
9830 (AMD64_RIP_REGNUM): New.
9831 (supply_static_tracepoint_registers): New.
9832 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9833 (ST_REGENTRY): New.
9834 (i386_st_collect_regmap): New.
9835 (i386_NUM_ST_COLLECT_GREGS): New.
9836 (supply_static_tracepoint_registers): New.
9837 * server.c (handle_query): Handle qXfer:statictrace:read.
9838 <qSupported>: Report support for StaticTracepoints, and
9839 qXfer:statictrace:read features.
9840 * server.h (traceframe_read_sdata)
9841 (supply_static_tracepoint_registers): Declare.
9842 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9843 (unpack_varlen_hex): Include in IPA build.
9844 * Makefile.in (ustlibs, ustinc): New.
9845 (IPA_OBJS): Add remote-utils-ipa.o.
9846 ($(IPA_LIB)): Link -ldl and -lpthread.
9847 (UST_CFLAGS): New.
9848 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9849 * config.in, configure: Regenerate.
9850
9e4344e5
PA
98512010-06-20 Ian Lance Taylor <iant@google.com>
9852 Pedro Alves <pedro@codesourcery.com>
9853
9854 * linux-x86-low.c (always_true): Delete.
9855 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9856 trying to fool the compiler with always_true.
9857
c6beb2cb
PA
98582010-06-20 Pedro Alves <pedro@codesourcery.com>
9859
9860 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9861 conditions in gdbserver.
9862
d2ed6730
UW
98632010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9864
9865 * spu-low.c (spu_read_memory): Wrap around local store limit.
9866 (spu_write_memory): Likewise.
9867
4e29fb54
PA
98682010-06-15 Pedro Alves <pedro@codesourcery.com>
9869
9870 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9871 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9872 LONGEST uses.
9873 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9874 uses.
9875 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9876 uses with LONGEST uses.
9877
6a271cae
PA
98782010-06-14 Stan Shebs <stan@codesourcery.com>
9879 Pedro Alves <pedro@codesourcery.com>
9880
9881 Bytecode compiler.
9882
9883 * linux-x86-low.c: Include limits.h.
9884 (add_insns): New.
9885 (always_true): New.
9886 (EMIT_ASM): New.
9887 (EMIT_ASM32): New.
9888 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9889 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9890 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9891 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9892 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9893 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9894 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9895 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9896 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9897 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9898 (amd64_emit_void_call_2): New.
9899 (amd64_emit_ops): New.
9900 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9901 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9902 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9903 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9904 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9905 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9906 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9907 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9908 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9909 (i386_emit_stack_adjust, i386_emit_int_call_1)
9910 (i386_emit_void_call_2): New.
9911 (i386_emit_ops): New.
9912 (x86_emit_ops): New.
9913 (the_low_target): Install x86_emit_ops.
9914 * server.h (struct emit_ops): New.
9915 (get_raw_reg_func_addr): Declare.
9916 (current_insn_ptr, emit_error): Declare.
9917 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9918 (set_trace_state_variable_value): New defines.
9919 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9920 addr_get_trace_state_variable_value and
9921 addr_set_trace_state_variable_value.
9922 (symbol_list): New fields for get_raw_reg,
9923 get_trace_state_variable_value and set_trace_state_variable_value.
9924 (condfn): New typedef.
9925 (struct tracepoint): New field `compiled_cond'.
9926 (do_action_at_tracepoint): Clear compiled_cond.
9927 (get_trace_state_variable_value, set_trace_state_variable_value):
9928 Export in the IPA.
9929 (condition_true_at_tracepoint): If there's a compiled condition,
9930 run that.
9931 (current_insn_ptr, emit_error): New globals.
9932 (struct bytecode_address): New.
9933 (get_raw_reg_func_addr): New.
9934 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9935 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9936 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9937 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9938 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9939 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9940 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9941 (compile_tracepoint_condition, compile_bytecodes): New.
9942 * target.h (emit_ops): Forward declare.
9943 (struct target_ops): New field emit_ops.
9944 (target_emit_ops): New.
9945 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9946 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9947 * linux-low.c (linux_emit_ops): New.
9948 (linux_target_ops): Install it.
9949 * linux-low.h (struct linux_target_ops): New field emit_ops.
9950
92b72907
UW
99512010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9952
9953 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9954 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9955
fa593d66
PA
99562010-06-01 Pedro Alves <pedro@codesourcery.com>
9957 Stan Shebs <stan@codesourcery.com>
9958
9959 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9960 (all): Depend on $(extra_libraries).
9961 (install-only): Install the IPA.
9962 (IPA_OBJS, IPA_LIB): New.
9963 (clean): Remove the IPA lib.
9964 (IPAGENT_CFLAGS): New.
9965 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9966 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9967 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9968 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9969 * configure.ac: Check for atomic builtins support in the compiler.
9970 (IPA_DEPFILES, extra_libraries): Define.
9971 * configure.srv (ipa_obj): Add description.
9972 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9973 (i[34567]86-*-linux*): Set ipa_obj.
9974 (x86_64-*-linux*): Set ipa_obj.
9975 * linux-low.c (stabilizing_threads): New.
9976 (supports_fast_tracepoints): New.
9977 (linux_detach): Stabilize threads before detaching.
9978 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9979 the lwp is either not stabilizing, or is moving out of a jump pad.
9980 (linux_fast_tracepoint_collecting): New.
9981 (maybe_move_out_of_jump_pad): New.
9982 (enqueue_one_deferred_signal): New.
9983 (dequeue_one_deferred_signal): New.
9984 (linux_wait_for_event_1): If moving out of a jump pad, defer
9985 pending signals to later.
9986 (linux_stabilize_threads): New.
9987 (linux_wait_1): Check if threads need moving out of jump pads, and
9988 do it if so.
9989 (stuck_in_jump_pad_callback): New.
9990 (move_out_of_jump_pad_callback): New.
9991 (lwp_running): New.
9992 (linux_resume_one_lwp): Handle moving out of jump pads.
9993 (linux_set_resume_request): Dequeue deferred signals.
9994 (need_step_over_p): Also step over fast tracepoint jumps.
9995 (start_step_over): Also uninsert fast tracepoint jumps.
9996 (finish_step_over): Also reinsert fast tracepoint jumps.
9997 (linux_install_fast_tracepoint_jump): New.
9998 (linux_target_ops): Install linux_stabilize_threads and
9999 linux_install_fast_tracepoint_jump_pad.
10000 * linux-low.h (linux_target_ops) <get_thread_area,
10001 install_fast_tracepoint_jump_pad>: New fields.
10002 (struct lwp_info) <collecting_fast_tracepoint,
10003 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10004 (linux_get_thread_area): Declare.
10005 * linux-x86-low.c (jump_insn): New.
10006 (x86_get_thread_area): New.
10007 (append_insns): New.
10008 (push_opcode): New.
10009 (amd64_install_fast_tracepoint_jump_pad): New.
10010 (i386_install_fast_tracepoint_jump_pad): New.
10011 (x86_install_fast_tracepoint_jump_pad): New.
10012 (the_low_target): Install x86_get_thread_area and
10013 x86_install_fast_tracepoint_jump_pad.
10014 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10015 (struct fast_tracepoint_jump): New.
10016 (fast_tracepoint_jump_insn): New.
10017 (fast_tracepoint_jump_shadow): New.
10018 (find_fast_tracepoint_jump_at): New.
10019 (fast_tracepoint_jump_here): New.
10020 (delete_fast_tracepoint_jump): New.
10021 (set_fast_tracepoint_jump): New.
10022 (uninsert_fast_tracepoint_jumps_at): New.
10023 (reinsert_fast_tracepoint_jumps_at): New.
10024 (set_breakpoint_at): Use write_inferior_memory.
10025 (uninsert_raw_breakpoint): Use write_inferior_memory.
10026 (check_mem_read): Mask out fast tracepoint jumps.
10027 (check_mem_write): Mask out fast tracepoint jumps.
10028 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10029 (set_fast_tracepoint_jump): Declare.
10030 (delete_fast_tracepoint_jump)
10031 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10032 (reinsert_fast_tracepoint_jumps_at): Declare.
10033 * regcache.c: Don't compile many functions when building the
10034 in-process agent library.
10035 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10036 the register buffer in the heap.
10037 (free_register_cache): If the register buffer isn't owned by the
10038 regcache, don't free it.
10039 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10040 pre-existing register caches.
10041 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10042 type.
10043 (convert_ascii_to_int): : Constify `from' parameter type.
10044 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10045 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10046 the needed buffer in-place.
10047 (relocate_instruction): New.
10048 * server.c (handle_query) <qSymbols>: If the target supports
10049 tracepoints, give it a chance of looking up symbols. Report
10050 support for fast tracepoints.
10051 (handle_status): Stabilize threads.
10052 (process_serial_event): Adjust.
10053 * server.h (struct fast_tracepoint_jump): Forward declare.
10054 (struct process_info) <fast_tracepoint_jumps>: New field.
10055 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10056 (decode_X_packet, decode_M_packet): Adjust.
10057 (relocate_instruction): Declare.
10058 (in_process_agent_loaded): Declare.
10059 (tracepoint_look_up_symbols): Declare.
10060 (struct fast_tpoint_collect_status): Declare.
10061 (fast_tracepoint_collecting): Declare.
10062 (force_unlock_trace_buffer): Declare.
10063 (handle_tracepoint_bkpts): Declare.
10064 (initialize_low_tracepoint)
10065 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10066 * target.h (struct target_ops) <stabilize_threads,
10067 install_fast_tracepoint_jump_pad>: New fields.
10068 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10069 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10070 [HAVE_STDINT_H]: Include stdint.h.
10071 (trace_debug_1): Rename to ...
10072 (trace_vdebug): ... this.
10073 (trace_debug): Rename to ...
10074 (trace_debug_1): ... this. Add `level' parameter.
10075 (trace_debug): New.
10076 (ATTR_USED, ATTR_NOINLINE): New.
10077 (IP_AGENT_EXPORT): New.
10078 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10079 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10080 (about_to_request_buffer_space, trace_buffer_is_full)
10081 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10082 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10083 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10084 (traceframe_write_count, traceframes_created)
10085 (trace_state_variables)
10086 New renaming defines.
10087 (struct ipa_sym_addresses): New.
10088 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10089 (symbol_list): New.
10090 (ipa_sym_addrs): New.
10091 (all_tracepoint_symbols_looked_up): New.
10092 (in_process_agent_loaded): New.
10093 (write_e_ipa_not_loaded): New.
10094 (maybe_write_ipa_not_loaded): New.
10095 (tracepoint_look_up_symbols): New.
10096 (debug_threads) [IN_PROCESS_AGENT]: New.
10097 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10098 (UNKNOWN_SIDE_EFFECTS): New.
10099 (stop_tracing): New.
10100 (flush_trace_buffer): New.
10101 (stop_tracing_bkpt): New.
10102 (flush_trace_buffer_bkpt): New.
10103 (read_inferior_integer): New.
10104 (read_inferior_uinteger): New.
10105 (read_inferior_data_pointer): New.
10106 (write_inferior_data_pointer): New.
10107 (write_inferior_integer): New.
10108 (write_inferior_uinteger): New.
10109 (struct collect_static_trace_data_action): Delete.
10110 (enum tracepoint_type): New.
10111 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10112 <actions_str, step_actions, step_actions_str>: Only include in
10113 GDBserver.
fa593d66
PA
10114 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10115 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10116 (tracepoints): Use IP_AGENT_EXPORT.
10117 (last_tracepoint): Don't include in the IPA.
10118 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10119 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10120 (alloced_trace_state_variables): New.
10121 (trace_state_variables): Use IP_AGENT_EXPORT.
10122 (traceframe_t): Delete unused variable.
10123 (circular_trace_buffer): Don't include in the IPA.
10124 (trace_buffer_start): Delete.
10125 (struct trace_buffer_control): New.
10126 (trace_buffer_free): Delete.
10127 (struct ipa_trace_buffer_control): New.
10128 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10129 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10130 New.
10131 (trace_buffer_ctrl): New.
10132 (TRACE_BUFFER_CTRL_CURR): New.
10133 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10134 Reimplement as macros.
10135 (trace_buffer_wrap): Delete.
10136 (traceframe_write_count, traceframe_read_count)
10137 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10138 (struct tracepoint_hit_ctx) <type>: New field.
10139 (struct fast_tracepoint_ctx): New.
10140 (memory_barrier): New.
10141 (cmpxchg): New.
10142 (record_tracepoint_error): Update atomically in the IPA.
10143 (clear_inferior_trace_buffer): New.
10144 (about_to_request_buffer_space): New.
10145 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10146 updating the same buffer.
10147 (add_tracepoint): Default the tracepoint's type to trap
10148 tracepoint, and orig_size to -1.
10149 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10150 internal variables.
10151 (create_trace_state_variable): New parameter `gdb'. Handle it.
10152 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10153 (cmd_qtdp): Handle fast tracepoints.
10154 (cmd_qtdv): Adjust.
10155 (max_jump_pad_size): New.
10156 (gdb_jump_pad_head): New.
10157 (get_jump_space_head): New.
10158 (claim_jump_space): New.
10159 (sort_tracepoints): New.
10160 (MAX_JUMP_SIZE): New.
10161 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10162 IPA.
10163 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10164 support. Upload fast traceframes, and delete internal IPA
10165 breakpoints.
10166 (stop_tracing_handler): New.
10167 (flush_trace_buffer_handler): New.
10168 (cmd_qtstop): Upload fast tracepoints.
10169 (response_tracepoint): Handle fast tracepoints.
10170 (tracepoint_finished_step): Upload fast traceframes. Set the
10171 tracepoint hit context's tracepoint type.
10172 (handle_tracepoint_bkpts): New.
10173 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10174 type. Add comment about fast tracepoints.
10175 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10176 non-existing action_str field.
10177 (get_context_regcache): Handle fast tracepoints.
10178 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10179 to the regcache.
10180 (fast_tracepoint_from_jump_pad_address): New.
10181 (fast_tracepoint_from_ipa_tpoint_address): New.
10182 (collecting_t): New.
10183 (force_unlock_trace_buffer): New.
10184 (fast_tracepoint_collecting): New.
10185 (collecting): New.
10186 (gdb_collect): New.
10187 (write_inferior_data_ptr): New.
10188 (target_tp_heap): New.
10189 (target_malloc): New.
10190 (download_agent_expr): New.
10191 (UALIGN): New.
10192 (download_tracepoints): New.
10193 (download_trace_state_variables): New.
10194 (upload_fast_traceframes): New.
10195 (IPA_FIRST_TRACEFRAME): New.
10196 (IPA_NEXT_TRACEFRAME_1): New.
10197 (IPA_NEXT_TRACEFRAME): New.
10198 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10199 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10200 (gdb_jump_pad_buffer_end): New.
10201 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10202 (initialize_tracepoint): Adjust.
10203 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10204 buffer. Initialize the low module.
10205 * utils.c (PREFIX, TOOLNAME): New.
10206 (malloc_failure): Use PREFIX.
10207 (error): In the IPA, an error causes an exit.
10208 (fatal, warning): Use PREFIX.
10209 (internal_error): Use TOOLNAME.
10210 (NUMCELLS): Increase to 10.
10211 * configure, config.in: Regenerate.
10212
d149dd1d
PA
102132010-06-01 Pedro Alves <pedro@codesourcery.com>
10214
10215 * server.c (handle_query) <qSupported>: Do two passes over the
10216 qSupported string to avoid nesting strtok.
10217
f6528abd
JK
102182010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10219
10220 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10221 (CDEPS): New.
10222 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10223 -Wl,--dynamic-list.
10224 * configure: Regenerate.
10225 * proc-service.list: New.
10226
ca2a87a0
JK
102272010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10228
10229 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10230 New comment.
10231
363a6e9f
OS
102322010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10233
10234 * gdbreplay.c (remote_open): Check error return from socket() call by
10235 its equality to -1 not by it being negative.
10236 * remote-utils.c (remote_open): Likewise.
10237
d23b6cb1
PA
102382010-05-23 Pedro Alves <pedro@codesourcery.com>
10239
10240 * config.h: Regenerate.
10241
28d3cf85
MK
102422010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10243
10244 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10245 doesn't provide PTRACE_GET_THREAD_AREA.
10246
fea36a59
MK
102472010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10248
10249 * linux-m68k-low.c: Include <asm/ptrace.h>
10250 (ps_get_thread_area): Implement.
10251
24b066ba
DE
102522010-05-03 Doug Evans <dje@google.com>
10253
10254 * event-loop.c (struct callback_event): New struct.
10255 (callback_list): New global.
10256 (append_callback_event, delete_callback_event): New functions.
10257 (process_callback): New function.
10258 (start_event_loop): Call it.
10259 * remote-utils.c (NOT_SCHEDULED): Define.
10260 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10261 moved out of readchar.
10262 (readchar): Rewrite. Call reschedule before returning.
10263 (reset_readchar): New function.
10264 (remote_close): Call it.
10265 (process_remaining, reschedule): New functions.
10266 * server.h (callback_handler_func): New typedef.
10267 (append_callback_event, delete_callback_event): Declare.
10268
9836d6ea
PA
102692010-05-03 Pedro Alves <pedro@codesourcery.com>
10270
10271 * proc-service.c (ps_pglobal_lookup): Use
10272 thread_db_look_up_one_symbol.
10273 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10274 parameter. Use it instead of all_symbols_looked_up.
10275 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10276 field.
10277 (all_symbols_looked_up): Don't declare.
10278 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10279 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10280 field.
10281 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10282 Set all_symbols_looked_up here.
10283 (thread_db_look_up_one_symbol): New.
10284 (thread_db_get_tls_address): Adjust.
10285 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10286 thread_db object on the heap, and tentatively set it in the
10287 process structure.
10288 (thread_db_init): Don't set all_symbols_looked_up here.
10289 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10290
7984d532
PA
102912010-05-03 Pedro Alves <pedro@codesourcery.com>
10292
10293 * linux-low.c (linux_kill, linux_detach): Adjust.
10294 (status_pending_p_callback): Remove redundant statement. Check
10295 for !TARGET_WAITIKIND_IGNORE, instead of
10296 TARGET_WAITKIND_STOPPED.
10297 (handle_tracepoints): Make sure LWP is locked. Adjust.
10298 (linux_wait_for_event_1): Adjust.
10299 (linux_cancel_breakpoints): New.
10300 (unsuspend_one_lwp): New.
10301 (unsuspend_all_lwps): New.
10302 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10303 (send_sigstop_callback): Change return type to int, add new
10304 `except' parameter and handle it.
10305 (suspend_and_send_sigstop_callback): New.
10306 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10307 pass them down. If SUSPEND, also increment the lwp's suspend
10308 count.
10309 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10310 (need_step_over_p): Don't consider suspended LWPs.
10311 (start_step_over): Adjust.
10312 (proceed_one_lwp): Change return type to int, add new `except'
10313 parameter and handle it.
10314 (unsuspend_and_proceed_one_lwp): New.
10315 (proceed_all_lwps): Use find_inferior instead of
10316 for_each_inferior.
10317 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10318 also decrement the suspend count of LWPs. Pass `except' down,
10319 instead of hacking its suspend count.
10320 (linux_pause_all): Add `freeze' parameter. Adjust.
10321 (linux_unpause_all): New.
10322 (linux_target_ops): Install linux_unpause_all.
10323 * server.c (handle_status): Adjust.
10324 * target.h (struct target_ops): New fields `unpause_all' and
10325 `cancel_breakpoints'. Add new parameter to `pause_all'.
10326 (pause_all): Add new `freeze' parameter.
10327 (unpause_all): New.
10328 (cancel_breakpoints): New.
10329 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10330 cancel breakpoints.
10331 (cmd_qtstart): Pause threads.
10332 (stop_tracing): Pause threads, and cancel breakpoints.
10333 * win32-low.c (win32_target_ops): Adjust.
10334
e471f25b
PA
103352010-05-03 Pedro Alves <pedro@codesourcery.com>
10336
10337 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10338 the inferior right away from here...
10339 (linux_wait_1): ... to here, and adjust to check the thread's
10340 last_resume_kind instead of the lwp's step or stop_expected flags.
10341
1915ef4f
PA
103422010-05-02 Pedro Alves <pedro@codesourcery.com>
10343
10344 * README: Use consistent `GDB' and `GDBserver' spellings.
10345
f9e39928
PA
103462010-05-02 Pedro Alves <pedro@codesourcery.com>
10347
10348 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10349 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10350 (linux_detach_one_lwp): Assume the lwp is stopped.
10351 (any_thread_of): Delete.
10352 (linux_detach): Stop all lwps here. Don't blindly delete all
10353 breakpoints.
10354 (delete_lwp_callback): New.
10355 (linux_mourn): Delete all lwps of the process that is gone.
10356 (linux_wait_1): Don't delete the last lwp of the process here.
10357 * mem-break.h (mark_breakpoints_out): Declare.
10358 * mem-break.c (mark_breakpoints_out): New.
10359 (free_all_breakpoints): Use it.
10360 * server.c (handle_target_event): If the process is gone, mark
10361 breakpoints out.
10362 * thread-db.c (struct thread_db) <create_bp>: New field.
10363 (thread_db_enable_reporting): Fix prototype. Store a thread event
10364 breakpoint reference in the thread_db struct.
10365 (thread_db_load_search): Clear the thread_db object.
10366 (try_thread_db_load_1): Ditto.
10367 (switch_to_process): New.
10368 (disable_thread_event_reporting): Use it.
10369 (remove_thread_event_breakpoints): New.
10370 (thread_db_detach, thread_db_mourn): Use it.
10371
1e7fc18c
PA
103722010-05-01 Pedro Alves <pedro@codesourcery.com>
10373
10374 * linux-low.c (linux_enable_event_reporting): New.
10375 (linux_wait_for_event_1, handle_extended_wait): Use it.
10376
02fc4de7
PA
103772010-04-30 Pedro Alves <pedro@codesourcery.com>
10378
10379 * linux-low.c (linux_kill_one_lwp, linux_kill)
10380 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10381 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10382 SIGSTOP even if the LWP is stopped.
10383 (send_sigstop_callback): New.
10384 (stop_all_lwps): Use send_sigstop_callback instead.
10385 (linux_resume_one_thread): Adjust.
10386 (proceed_one_lwp): Still proceed an LWP that the client has
10387 requested to stop, if we haven't reported it as stopped yet. Make
10388 sure that LWPs the client want stopped, have a pending SIGSTOP.
10389
bc3b5632
DE
103902010-04-26 Doug Evans <dje@google.com>
10391
ae1ada35
DE
10392 * server.c (handle_general_set): Make static.
10393
bc3b5632
DE
10394 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10395 Print received char after testing for error/eof instead of before.
10396 (input_interrupt): Tweak comment.
10397
65730243
DE
103982010-04-23 Doug Evans <dje@google.com>
10399
10400 * server.c (start_inferior): Print inferior argv if --debug.
10401
a8ae7dc0
AR
104022010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10403
10404 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10405 * nto-x86-low.c: Include server.h
10406
1c07cc19
PM
104072010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10408
10409 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10410 be consistent with other sources of this directory.
10411 (init_registers_amd64): Correct name of source file of this function
10412 in the comment.
10413
e0a61e09
PM
104142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10415
10416 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10417 64-bit executables.
10418
54709339
PM
104192010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10420
10421 * win32-i386-low.c: Add 64-bit support.
10422 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10423 (init_registers_amd64): Declare.
10424 (mappings): Add 64-bit version of array.
10425 (init_windows_x86): New function.
10426 (the_low_target): Change init_arch field to init_windows_x86.
10427
e8f0053d
PM
104282010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10429
10430 * win32-low.c: Adapt to support also 64-bit architecture.
10431 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10432 (get_image_name): Use SIZE_T type for local variable `done'.
10433 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10434 (toolhelp_get_dll_name): Idem.
10435 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10436 Use uintptr_t typecast to avoid warning.
10437 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10438 (handle_exception): Use phex_nz to avoid warning.
10439 (win32_wait): Remove unused local variable `process'.
10440
c481e77e
PM
104412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10442
10443 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10444 `amd64-avx.o'.
10445
12ea4b69
PM
104462010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10447
10448 * configure.ac: Use `ws2_32' library for srv_mingw.
10449 * configure: Regenerate.
10450 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10451 * remote-utils.c: Likewise.
10452
f6d1620c
L
104532010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10454
10455 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10456 if __x86_64__ is defined.
10457
8e642873
PM
104582010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10459
10460 * configure: Regenerate.
10461
711e434b
PM
104622010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10463
10464 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10465 * target.h (target_ops): New get_tib_address field.
10466 * win32-low.h (win32_thread_info): Add thread_local_base field.
10467 * win32-low.c (child_add_thread): Add tlb argument.
10468 Set thread_local_base field to TLB.
10469 (get_child_debug_event): Adapt to child_add_thread change.
10470 (win32_get_tib_address): New function.
10471 (win32_target_ops): Set get_tib_address field to
10472 win32_get_tib_address.
10473 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10474
505106cd
PA
104752010-04-12 Pedro Alves <pedro@codesourcery.com>
10476
505106cd
PA
10477 * linux-low.c (linux_mourn): Also remove the process.
10478 * server.c (handle_target_event): Don't remove the process here.
10479 * nto-low.c (nto_mourn): New.
10480 (nto_target_ops): Install it.
10481 * spu-low.c (spu_mourn): New.
10482 (spu_target_ops): Install it.
10483 * win32-low.c (win32_mourn): New.
10484 (win32_target_ops): Install it.
10485
e8470a06
PA
104862010-04-12 Pedro Alves <pedro@codesourcery.com>
10487
10488 * server.h (buffer_xml_printf): Remove redundant `;'.
10489
45ba0d02
PA
104902010-04-12 Pedro Alves <pedro@codesourcery.com>
10491
10492 * regcache.c (set_register_cache): Invalidate regcaches before
10493 changing the register cache layout.
10494 (regcache_invalidate_one): Allow a NULL regcache.
10495 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10496 regcaches before changing the register cache layout or the target
10497 regsets.
10498
59e04013
L
104992010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10500
10501 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10502 variable warning on Linux/x86-64.
10503
8336d594
PA
105042010-04-11 Pedro Alves <pedro@codesourcery.com>
10505
10506 GDBserver disconnected tracing support.
10507
10508 * linux-low.c (linux_remove_process): Delete.
10509 (add_lwp): Don't set last_resume_kind here.
10510 (linux_kill): Use `mourn'.
10511 (linux_detach): Use `thread_db_detach', and `mourn'.
10512 (linux_mourn): New.
10513 (linux_attach_lwp_1): Adjust comment.
10514 (linux_attach): last_resume_kind moved the thread_info; adjust.
10515 (status_pending_p_callback): Adjust.
10516 (linux_wait_for_event_1): Adjust.
10517 (count_events_callback, select_singlestep_lwp_callback)
10518 (select_event_lwp_callback, cancel_breakpoints_callback)
10519 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10520 (proceed_one_lwp): Adjust.
10521 (linux_async): Add debug output.
10522 (linux_thread_stopped): New.
10523 (linux_pause_all): New.
10524 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10525 linux_pause_all.
10526 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10527 (thread_db_free): Delete declaration.
10528 (thread_db_detach, thread_db_mourn): Declare.
10529 * thread-db.c (thread_db_init): Use thread_db_mourn.
10530 (thread_db_free): Delete, split in two.
10531 (disable_thread_event_reporting): New.
10532 (thread_db_detach): New.
10533 (thread_db_mourn): New.
10534
10535 * server.h (struct thread_info) <last_resume_kind>: New field.
10536 <attached>: Add comment.
10537 <gdb_detached>: New field.
10538 (handler_func): Change return type to int.
10539 (handle_serial_event, handle_target_event): Ditto.
10540 (gdb_connected): Declare.
10541 (tracing): Delete.
10542 (disconnected_tracing): Declare.
10543 (stop_tracing): Declare.
10544
10545 * server.c (handle_query) <qSupported>: Report support for
10546 disconnected tracing.
10547 (queue_stop_reply_callback): Account for running threads.
10548 (gdb_wants_thread_stopped): New.
10549 (gdb_wants_all_threads_stopped): New.
10550 (gdb_reattached_process): New.
10551 (handle_status): Clear the `gdb_detached' flag of all processes.
10552 In all-stop, stop all threads.
10553 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10554 (process_serial_event): If the remote connection breaks, or if an
10555 exit was forced with "monitor exit", force an event loop exit.
10556 Handle disconnected tracing on detach.
10557 (handle_serial_event): Adjust.
10558 (handle_target_event): If GDB isn't connected, forward events back
10559 to the inferior, unless the last process exited, in which case,
10560 exit gdbserver. Adjust interface.
10561
10562 * remote-utils.c (remote_open): Don't block in accept. Instead
10563 register an event loop source on the listen socket file
10564 descriptor. Refactor bits into ...
10565 (listen_desc): ... this new global.
10566 (gdb_connected): ... this new function.
10567 (enable_async_notification): ... this new function.
10568 (handle_accept_event): ... this new function.
10569 (remote_close): Clear remote_desc.
10570
10571 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10572
10573 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10574 New fields.
10575 (mourn_inferior): Define.
10576 (target_process_qsupported): Avoid the dangling else problem.
10577 (thread_stopped): Define.
10578 (pause_all): Define.
10579 (target_waitstatus_to_string): Declare.
10580 * target.c (target_waitstatus_to_string): New.
10581
10582 * tracepoint.c (tracing): Make extern.
10583 (disconnected_tracing): New.
10584 (stop_tracing): Make extern. Handle tracing stops due to GDB
10585 disconnecting.
10586 (cmd_qtdisconnected): New.
10587 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10588 (handle_tracepoint_general_set): Handle QTDisconnected.
10589
10590 * event-loop.c (event_handler_func): Change return type to int.
10591 (process_event): Bail out if the event handler wants the event
10592 loop to stop.
10593 (handle_file_event): Ditto.
10594 (start_event_loop): Bail out if the event handler wants the event
10595 loop to stop.
10596
10597 * nto-low.c (nto_target_ops): Adjust.
10598 * spu-low.c (spu_wait): Don't remove the process here.
10599 (spu_target_ops): Adjust.
10600 * win32-low.c (win32_wait): Don't remove the process here.
10601 (win32_target_ops): Adjust.
10602
5d267c4c
PA
106032010-04-11 Pedro Alves <pedro@codesourcery.com>
10604
10605 * regcache.c (realloc_register_cache): Invalidate inferior's
10606 regcache before recreating it.
10607
623ccd72
PA
106082010-04-09 Pedro Alves <pedro@codesourcery.com>
10609
10610 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10611
219f2f23
PA
106122010-04-09 Stan Shebs <stan@codesourcery.com>
10613 Pedro Alves <pedro@codesourcery.com>
10614
10615 * server.h (LONGEST): New.
10616 (struct thread_info) <while_stepping>: New field.
10617 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10618 Declare.
10619 (initialize_tracepoint, handle_tracepoint_general_set)
10620 (handle_tracepoint_query, tracepoint_finished_step)
10621 (tracepoint_was_hit, release_while_stepping_state_list):
10622 (current_traceframe): Declare.
10623 * server.c (handle_general_set): Handle tracepoint packets.
10624 (read_memory): New.
10625 (write_memory): New.
10626 (handle_search_memory_1): Use read_memory.
10627 (handle_query): Report support for conditional tracepoints, trace
10628 state variables, and tracepoint sources. Handle tracepoint
10629 queries.
10630 (main): Initialize the tracepoints module.
10631 (process_serial_event): Handle traceframe reads/writes.
10632
10633 * linux-low.c (handle_tracepoints): New.
10634 (linux_wait_1): Call it.
10635 (linux_resume_one_lwp): Handle while-stepping.
10636 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10637 (linux_target_ops): Install them.
10638 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10639 New field.
10640 * linux-x86-low.c (x86_supports_tracepoints): New.
10641 (the_low_target). Install it.
10642
10643 * mem-break.h (delete_breakpoint): Declare.
10644 * mem-break.c (delete_breakpoint): Make external.
10645
10646 * target.h (struct target_ops): Add `supports_tracepoints',
10647 `read_pc', and `write_pc' fields.
10648 (target_supports_tracepoints): Define.
10649 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10650 (phex_nz): New.
10651
10652 * regcache.h (struct regcache) <registers_owned>: New field.
10653 (init_register_cache, regcache_cpy): Declare.
10654 (regcache_read_pc, regcache_write_pc): Declare.
10655 (register_cache_size): Declare.
10656 (supply_regblock): Declare.
10657 * regcache.c (init_register_cache): New.
10658 (new_register_cache): Use it.
10659 (regcache_cpy): New.
10660 (register_cache_size): New.
10661 (supply_regblock): New.
10662 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10663
219f2f23
PA
10664 * tracepoint.c: New.
10665
10666 * Makefile.in (OBS): Add tracepoint.o.
10667 (tracepoint.o): New rule.
10668
3a13a53b
L
106692010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10670
10671 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10672 (i386-mmx.o): New.
10673 (i386-mmx.c): Likewise.
10674 (i386-mmx-linux.o): Likewise.
10675 (i386-mmx-linux.c): Likewise.
10676
10677 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10678 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10679 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10680 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10681
10682 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10683 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10684 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10685
1570b33e
L
106862010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10687
10688 * Makefile.in (clean): Updated.
10689 (i386-avx.o): New.
10690 (i386-avx.c): Likewise.
10691 (i386-avx-linux.o): Likewise.
10692 (i386-avx-linux.c): Likewise.
10693 (amd64-avx.o): Likewise.
10694 (amd64-avx.c): Likewise.
10695 (amd64-avx-linux.o): Likewise.
10696 (amd64-avx-linux.c): Likewise.
10697
10698 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10699 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10700 (srv_amd64_regobj): Add amd64-avx.o.
10701 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10702 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10703 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10704 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10705 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10706 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10707 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10708
10709 * i387-fp.c: Include "i386-xstate.h".
10710 (i387_xsave): New.
10711 (i387_cache_to_xsave): Likewise.
10712 (i387_xsave_to_cache): Likewise.
10713 (x86_xcr0): Likewise.
10714
10715 * i387-fp.h (i387_cache_to_xsave): Likewise.
10716 (i387_xsave_to_cache): Likewise.
10717 (x86_xcr0): Likewise.
10718
10719 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10720 * linux-crisv32-low.c (target_regsets): Likewise.
10721 * linux-m68k-low.c (target_regsets): Likewise.
10722 * linux-mips-low.c (target_regsets): Likewise.
10723 * linux-ppc-low.c (target_regsets): Likewise.
10724 * linux-s390-low.c (target_regsets): Likewise.
10725 * linux-sh-low.c (target_regsets): Likewise.
10726 * linux-sparc-low.c (target_regsets): Likewise.
10727 * linux-xtensa-low.c (target_regsets): Likewise.
10728
10729 * linux-low.c: Include <sys/uio.h>.
10730 (regsets_fetch_inferior_registers): Support nt_type.
10731 (regsets_store_inferior_registers): Likewise.
10732 (linux_process_qsupported): New.
10733 (linux_target_ops): Add linux_process_qsupported.
10734
10735 * linux-low.h (regset_info): Add nt_type.
10736 (linux_target_ops): Add process_qsupported.
10737
10738 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10739 and <sys/uio.h>.
10740 (init_registers_i386_avx_linux): New.
10741 (init_registers_amd64_avx_linux): Likewise.
10742 (xmltarget_i386_linux_no_xml): Likewise.
10743 (xmltarget_amd64_linux_no_xml): Likewise.
10744 (PTRACE_GETREGSET): Likewise.
10745 (PTRACE_SETREGSET): Likewise.
10746 (x86_fill_xstateregset): Likewise.
10747 (x86_store_xstateregset): Likewise.
10748 (use_xml): Likewise.
10749 (x86_linux_update_xmltarget): Likewise.
10750 (x86_linux_process_qsupported): Likewise.
10751 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10752 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10753 init_registers_i386_linux here. Call
10754 x86_linux_update_xmltarget.
10755 (the_low_target): Add x86_linux_process_qsupported.
10756
10757 * server.c (handle_query): Call target_process_qsupported.
10758
10759 * target.h (target_ops): Add process_qsupported.
10760 (target_process_qsupported): New.
10761
fc7238bb
PA
107622010-04-03 Pedro Alves <pedro@codesourcery.com>
10763
10764 * inferiors.c (add_thread): Set last_status kind to
10765 TARGET_WAITKIND_IGNORE.
10766 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10767 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10768 (linux_wait_1): Move `thread' local definition to block that uses
10769 it. Don't NULL initialize `event_child'.
10770 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10771 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10772 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10773
bdabb078
PA
107742010-04-01 Pedro Alves <pedro@codesourcery.com>
10775
10776 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10777 an extended waitstatus, or by a watchpoint.
10778 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10779 thread was stepping or has been stopped by a watchpoint.
10780
d3bbe7a0
PA
107812010-04-01 Pedro Alves <pedro@codesourcery.com>
10782
10783 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10784 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10785 of another, then delete the previous, and validate all
10786 breakpoints.
10787 (validate_inserted_breakpoint): New.
10788 (delete_disabled_breakpoints): New.
10789 (validate_breakpoints): New.
10790 (check_mem_read): Validate breakpoints before trusting their
10791 shadow. Delete disabled breakpoints.
10792 (check_mem_write): Validate breakpoints before trusting they
10793 should be inserted. Delete disabled breakpoints.
10794 * mem-break.h (validate_breakpoints):
10795 * server.c (handle_query): Validate breakpoints when we see a
10796 qSymbol query.
10797
8b07ae33
PA
107982010-04-01 Pedro Alves <pedro@codesourcery.com>
10799
10800 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10801 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10802 if we could tell there's a GDB breakpoint at stop_pc.
10803 (need_step_over_p): Don't do a step over if we find a GDB
10804 breakpoint at the resume PC.
10805
10806 * mem-break.c (struct raw_breakpoint): New.
10807 (enum bkpt_type): New type `gdb_breakpoint'.
10808 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10809 fields. New field `raw'.
10810 (find_raw_breakpoint_at): New.
10811 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10812 breakpoint instead.
10813 (set_breakpoint_at): Adjust.
10814 (delete_raw_breakpoint): New.
10815 (release_breakpoint): New.
10816 (delete_breakpoint): Rename to...
10817 (delete_breakpoint_1): ... this. Add proc parameter. Use
10818 release_breakpoint. Return ENOENT.
10819 (delete_breakpoint): Reimplement.
10820 (find_breakpoint_at): Delete.
10821 (find_gdb_breakpoint_at): New.
10822 (delete_breakpoint_at): Delete.
10823 (set_gdb_breakpoint_at): New.
10824 (delete_gdb_breakpoint_at): New.
10825 (gdb_breakpoint_here): New.
10826 (set_reinsert_breakpoint): Use release_breakpoint.
10827 (uninsert_breakpoint): Rename to ...
10828 (uninsert_raw_breakpoint): ... this.
10829 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10830 (reinsert_raw_breakpoint): Change parameter type to
10831 raw_breakpoint.
10832 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10833 instead.
10834 (check_breakpoints): Adjust. Use release_breakpoint.
10835 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10836 (breakpoint_inserted_here): Ditto.
10837 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10838 Don't trust the breakpoint's shadow if it is not inserted.
10839 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10840 (delete_all_breakpoints): Adjust.
10841 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10842 use delete_breakpoint_1.
10843
10844 * mem-break.h (breakpoints_supported): Delete declaration.
10845 (set_gdb_breakpoint_at): Declare.
10846 (gdb_breakpoint_here): Declare.
10847 (delete_breakpoint_at): Delete.
10848 (delete_gdb_breakpoint_at): Declare.
10849
10850 * server.h (struct raw_breakpoint): Forward declare.
10851 (struct process_info): New field `raw_breakpoints'.
10852
10853 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10854 breakpoints.
10855
6bf5e0ba
PA
108562010-03-24 Pedro Alves <pedro@codesourcery.com>
10857
10858 * linux-low.c (status_pending_p_callback): Fix comment.
10859 (linux_wait_for_event_1): Move most of the internal breakpoint
10860 handling from here...
10861 (linux_wait_1): ... to here.
10862 (count_events_callback): New.
10863 (select_singlestep_lwp_callback): New.
10864 (select_event_lwp_callback): New.
10865 (cancel_breakpoints_callback): New.
10866 (select_event_lwp): New.
10867 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10868 priority to all LWPs that have had events that should be reported
10869 to the client. Cancel breakpoints when about to reporting the
10870 event to the client, not while stopping lwps. No longer cancel
10871 finished single-steps here.
10872 (cancel_finished_single_step): Delete.
10873 (cancel_finished_single_steps): Delete.
10874
414a389f
PA
108752010-03-24 Pedro Alves <pedro@codesourcery.com>
10876
10877 * mem-break.c (enum bkpt_type): New.
10878 (struct breakpoint): New field `type'.
10879 (set_breakpoint_at): Change return type to struct breakpoint
10880 pointer. Set type to `other_breakpoint' by default.
10881 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10882 in the breakpoint list.
10883 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10884 (reinsert_breakpoint): Rename to ...
10885 (reinsert_raw_breakpoint): ... this.
10886 (reinsert_breakpoints_at): Adjust.
10887 * mem-break.h (struct breakpoint): Declare.
10888 (set_breakpoint_at): Change return type to struct breakpoint
10889 pointer.
10890
2280c721
PA
108912010-03-24 Pedro Alves <pedro@codesourcery.com>
10892
10893 * server.c (handle_query): Assign, not compare.
10894
d50171e4
PA
108952010-03-24 Pedro Alves <pedro@codesourcery.com>
10896
10897 Teach linux gdbserver to step-over-breakpoints.
10898
10899 * linux-low.c (can_hardware_single_step): New.
10900 (supports_breakpoints): New.
10901 (handle_extended_wait): If stopping threads, read the stop pc of
10902 the new cloned LWP.
10903 (get_pc): New.
10904 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10905 low target doesn't support retrieving the PC.
10906 (add_lwp): Set last_resume_kind to resume_continue.
10907 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10908 (linux_attach): Don't clear stop_expected. Set the lwp's
10909 last_resume_kind to resume_stop.
10910 (linux_detach_one_lwp): Don't check for removed breakpoints.
10911 (check_removed_breakpoint): Delete.
10912 (status_pending_p): Rename to ...
10913 (status_pending_p_callback): ... this. Don't check for removed
10914 breakpoints. Don't consider threads that are stopped from GDB's
10915 perspective.
10916 (linux_wait_for_lwp): Always read the stop_pc here.
10917 (cancel_breakpoint): New.
10918 (step_over_bkpt): New global.
10919 (linux_wait_for_event_1): Implement stepping over breakpoints.
10920 (gdb_wants_lwp_stopped): New.
10921 (gdb_wants_all_stopped): New.
10922 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10923 single-step traps here. Store the thread's last reported target
10924 wait status.
10925 (send_sigstop): Don't clear stop_expected. Always set it,
10926 instead.
10927 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10928 (cancel_finished_single_step): New.
10929 (cancel_finished_single_steps): New.
10930 (wait_for_sigstop): Don't cancel finished single-step traps here.
10931 (linux_resume_one_lwp): Don't check for removed breakpoints.
10932 Don't set `step' on non-hardware step archs.
10933 (linux_set_resume_request): Ignore resume_stop requests if already
10934 stopping or stopped. Set the lwp's last_resume_kind.
10935 (resume_status_pending_p): Don't check for removed breakpoints.
10936 (need_step_over_p): New.
10937 (start_step_over): New.
10938 (finish_step_over): New.
10939 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10940 requests. Clear the thread's last reported target waitstatus.
10941 Don't use the `suspended' flag. Don't consider pending breakpoints.
10942 (linux_resume): Start a step-over if necessary.
10943 (proceed_one_lwp): New.
10944 (proceed_all_lwps): New.
10945 (unstop_all_lwps): New.
10946 * linux-low.h (struct lwp_info): Rewrite comment for the
10947 `suspended' flag. Add the `stop_pc' field. Delete the
10948 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10949 Add `'last_resume_kind' and `need_step_over' fields.
10950 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10951 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10952 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10953 (set_raw_breakpoint_at): New.
10954 (set_breakpoint_at): Rewrite to use it.
10955 (reinsert_breakpoint_handler): Delete.
10956 (set_reinsert_breakpoint): New.
10957 (reinsert_breakpoint_by_bp): Delete.
10958 (delete_reinsert_breakpoints): New.
10959 (uninsert_breakpoint): Rewrite.
10960 (uninsert_breakpoints_at): New.
10961 (reinsert_breakpoint): Rewrite.
10962 (reinsert_breakpoints_at): New.
10963 (check_breakpoints): Rewrite.
10964 (breakpoint_here): New.
10965 (breakpoint_inserted_here): New.
10966 (check_mem_read): Adjust.
10967 * mem-break.h (breakpoints_supported, breakpoint_here)
10968 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10969 (reinsert_breakpoint_by_bp): Delete declaration.
10970 (delete_reinsert_breakpoints): Declare.
10971 (reinsert_breakpoint): Delete declaration.
10972 (reinsert_breakpoints_at): Declare.
10973 (uninsert_breakpoint): Delete declaration.
10974 (uninsert_breakpoints_at): Declare.
10975 (check_breakpoints): Adjust prototype.
10976 * server.h: Adjust include order.
10977 (struct thread_info): Declare here. Add a `last_status' field.
10978
30ba68cb
MS
109792010-03-23 Michael Snyder <msnyder@vmware.com>
10980
10981 * server.c (crc32): New function.
10982 (handle_query): Add handling for 'qCRC:' request.
10983
b9a881c2
PA
109842010-03-23 Pedro Alves <pedro@codesourcery.com>
10985
10986 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10987 lwp had been stopped by a watchpoint.
10988
e92d13d5
PA
109892010-03-16 Pedro Alves <pedro@codesourcery.com>
10990
10991 * server.h (internal_error): Declare.
10992 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10993 * utils.c (internal_error): New function.
10994
64daa791
AS
109952010-03-15 Andreas Schwab <schwab@redhat.com>
10996
10997 * configure.srv: Fix typo setting srv_regobj.
10998
f52cd8cd
PA
109992010-03-15 Pedro Alves <pedro@codesourcery.com>
11000
11001 * linux-low.c (fetch_register): Avoid passing a non string literal
11002 format to `error'.
11003 (usr_store_inferior_registers): Ditto.
11004
93ae6fdc
PA
110052010-03-14 Pedro Alves <pedro@codesourcery.com>
11006
11007 * linux-low.c (linux_write_memory): Bail out early if peeking
11008 memory failed.
11009
c3adc08c
PA
110102010-03-14 Pedro Alves <pedro@codesourcery.com>
11011
11012 * linux-low.h (struct lwp_info): New fields
11013 `stopped_by_watchpoint' and `stopped_data_address'.
11014 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11015 here, and cache them in the lwp object.
11016 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11017 directly.
11018 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11019 field.
11020 (linux_stopped_by_watchpoint): Rewrite.
11021 (linux_stopped_data_address): Rewrite.
11022
bce522a2
PA
110232010-03-06 Simo Melenius <simo.melenius@iki.fi>
11024
11025 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11026 switching the current inferior, not before.
11027
90884b2b
L
110282010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11029
11030 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11031 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11032 i386-linux.c and amd64-linux.c.
11033 (reg-i386.o): Removed.
11034 (reg-i386.c): Likewise.
11035 (reg-i386-linux.o): Likewise.
11036 (reg-i386-linux.c): Likewise.
11037 (reg-x86-64.o): Likewise.
11038 (reg-x86-64.c): Likewise.
11039 (reg-x86-64-linux.o): Likewise.
11040 (reg-x86-64-linux.c): Likewise.
11041 (i386.o): New.
11042 (i386.c): Likewise.
11043 (i386-linux.o): Likewise.
11044 (i386-linux.c): Likewise.
11045 (amd64.o): Likewise.
11046 (amd64.c): Likewise.
11047 (amd64-linux.o): Likewise.
11048 (amd64-linux.c): Likewise.
11049
11050 * configure.srv (srv_i386_regobj): New.
11051 (srv_i386_linux_regobj): Likewise.
11052 (srv_amd64_regobj): Likewise.
11053 (srv_amd64_linux_regobj): Likewise.
11054 (srv_i386_32bit_xmlfiles): Likewise.
11055 (srv_i386_64bit_xmlfiles): Likewise.
11056 (srv_i386_xmlfiles): Likewise.
11057 (srv_amd64_xmlfiles): Likewise.
11058 (srv_i386_linux_xmlfiles): Likewise.
11059 (srv_amd64_linux_xmlfiles): Likewise.
11060 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11061 srv_xmlfiles to $srv_i386_xmlfiles.
11062 (i[34567]86-*-mingw32ce*): Likewise.
11063 (i[34567]86-*-mingw*): Likewise.
11064 (i[34567]86-*-nto*): Likewise.
11065 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11066 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11067 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11068 (x86_64-*-linux*): Likewise.
11069
11070 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11071 (init_registers_amd64_linux): New.
11072 (x86_arch_setup): Replace init_registers_x86_64_linux with
11073 init_registers_amd64_linux.
11074
193f13e6
MK
110752010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11076
11077 * configure.ac: Check for libdl. If it is not available link against
11078 static libthread_db.
11079 * configure: Regenerate.
11080
85d721b8
PA
110812010-02-22 Pedro Alves <pedro@codesourcery.com>
11082
11083 PR9605
11084
11085 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11086 handing a read watchpoint.
11087 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11088
6076632b
DE
110892010-02-12 Doug Evans <dje@google.com>
11090
11091 * linux-low.c (linux_supports_tracefork_flag): Document.
11092 (linux_look_up_symbols): Add comment.
11093
3327ccf7
L
110942010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11095
11096 * regcache.c (supply_register): Clear regcache if buf is NULL.
11097
0718675c 110982010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11099 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11100
11101 * inferiors.c (find_inferior): Add function documentation.
11102 (unloaded_dll): Handle the case where the unloaded dll has not
11103 been previously registered in the dll list.
11104
177321bd
DJ
111052010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11106
11107 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11108 (thumb2_breakpoint): New.
11109 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11110
2b009048
DJ
111112010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11112
11113 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11114 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11115 breakpoints.
11116
3be029c7
PA
111172010-01-21 Pedro Alves <pedro@codesourcery.com>
11118
11119 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11120
18f5de3b
JK
111212010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11122
11123 * linux-s390-low.c (s390_collect_ptrace_register)
11124 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11125
3743bb4f
DE
111262010-01-21 Doug Evans <dje@google.com>
11127
14ce3065
DE
11128 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11129 (PTRACE_ARG4_TYPE): New macro.
11130 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11131 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11132 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11133 (usr_store_inferior_registers): Ditto.
11134 (linux_read_memory, linux_write_memory): Ditto.
11135 (linux_test_for_tracefork): Ditto.
11136
3743bb4f
DE
11137 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11138 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11139
8b315be5
PA
111402010-01-21 Pedro Alves <pedro@codesourcery.com>
11141
11142 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11143 target.
11144
85492558
PA
111452010-01-21 Pedro Alves <pedro@codesourcery.com>
11146
11147 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11148 prototype to take a regcache. Adjust.
11149
442ea881
PA
111502010-01-20 Pedro Alves <pedro@codesourcery.com>
11151
11152 * regcache.h (struct thread_info): Forward declare.
11153 (struct regcache): New.
11154 (new_register_cache): Adjust prototype.
11155 (get_thread_regcache): Declare.
11156 (free_register_cache): Adjust prototype.
11157 (registers_to_string, registers_from_string): Ditto.
11158 (supply_register, supply_register_by_name, collect_register)
11159 (collect_register_as_string, collect_register_by_name): Ditto.
11160 * regcache.c (struct inferior_regcache_data): Delete.
11161 (get_regcache): Rename to ...
11162 (get_thread_regcache): ... this. Adjust. Switch inferior before
11163 fetching registers.
11164 (regcache_invalidate_one): Adjust.
11165 (regcache_invalidate): Fix prototype.
11166 (new_register_cache): Return the new register cache.
11167 (free_register_cache): Change prototype.
11168 (realloc_register_cache): Adjust.
11169 (registers_to_string): Change prototype to take a regcache. Adjust.
11170 (registers_from_string): Ditto.
11171 (register_data): Ditto.
11172 (supply_register): Ditto.
11173 (supply_register_by_name): Ditto.
11174 (collect_register): Ditto.
11175 (collect_register_as_string): Ditto.
11176 (collect_register_by_name): Ditto.
11177 * server.c (process_serial_event): Adjust.
11178 * linux-low.h (regset_fill_func, regset_store_func): Change
11179 prototype.
11180 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11181 Change prototype.
11182 * linux-low.c (get_stop_pc): Adjust.
11183 (check_removed_breakpoint): Adjust.
11184 (linux_wait_for_event): Adjust.
11185 (linux_resume_one_lwp): Adjust.
11186 (fetch_register): Add regcache parameter. Adjust.
11187 (usr_store_inferior_registers): Ditto.
11188 (regsets_fetch_inferior_registers): Ditto.
11189 (regsets_store_inferior_registers): Ditto.
11190 (linux_fetch_registers, linux_store_registers): Ditto.
11191 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11192 regcache. Adjust.
43aaf8b6
PA
11193 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11194 Ditto.
442ea881
PA
11195 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11196 prototype to take a regcache.
11197 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11198 * remote-utils.c (convert_ascii_to_int, outreg)
11199 (prepare_resume_reply): Change prototype to take a regcache.
11200 Adjust.
11201 * target.h (struct target_ops) <fetch_registers, store_registers>:
11202 Change prototype to take a regcache.
11203 (fetch_inferior_registers, store_inferior_registers): Change
11204 prototype to take a regcache. Adjust.
11205 * proc-service.c (ps_lgetregs): Adjust.
11206 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11207 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11208 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11209 take a regcache. Adjust.
11210 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11211 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11212 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11213 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11214 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11215 (cris_cannot_fetch_register):
11216 (cris_breakpoint_at): Change prototype to take a regcache.
11217 Adjust.
11218 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11219 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11220 to take a regcache. Adjust.
11221 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11222 Adjust.
11223 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11224 take a regcache. Adjust.
11225 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11226 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11227 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11228 * linux-mips-low.c (mips_get_pc):
11229 (mips_set_pc): Change prototype to take a regcache. Adjust.
11230 (mips_reinsert_addr): Adjust.
11231 (mips_collect_register): Change prototype to take a regcache.
11232 Adjust.
11233 (mips_supply_register):
11234 (mips_collect_register_32bit, mips_supply_register_32bit)
11235 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11236 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11237 * linux-ppc-low.c (ppc_supply_ptrace_register)
11238 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11239 (parse_spufs_run): Adjust.
11240 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11241 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11242 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11243 take a regcache. Adjust.
11244 * linux-s390-low.c (s390_collect_ptrace_register)
11245 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11246 (s390_set_pc): Change prototype to take a regcache. Adjust.
11247 (s390_arch_setup): Adjust.
11248 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11249 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11250 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11251 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11252 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11253 regcache. Adjust.
11254 (sparc_breakpoint_at): Adjust.
11255 * linux-xtensa-low.c (xtensa_fill_gregset):
11256 (xtensa_store_gregset):
11257 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11258 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11259 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11260 prototype to take a regcache. Adjust.
11261 * win32-arm-low.c (arm_fetch_inferior_register)
11262 (arm_store_inferior_register): Change prototype to take a
11263 regcache. Adjust.
11264 * win32-i386-low.c (i386_fetch_inferior_register)
11265 (i386_store_inferior_register): Change prototype to take a
11266 regcache. Adjust.
11267 * win32-low.c (child_fetch_inferior_registers)
11268 (child_store_inferior_registers): Change prototype to take a
11269 regcache. Adjust.
11270 (win32_wait): Adjust.
11271 (win32_fetch_inferior_registers): Change prototype to take a
11272 regcache. Adjust.
11273 (win32_store_inferior_registers): Adjust.
11274 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11275 store_inferior_register>: Change prototype to take a regcache.
11276
60c3d7b0
DE
112772010-01-20 Doug Evans <dje@google.com>
11278
11279 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11280 #ifdef.
11281 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11282 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11283
dc146f7c
VP
112842010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11285
11286 * linux-low.c (linux_core_of_thread): New.
11287 (compare_ints, show_process, list_threads): New.
11288 (linux_qxfer_osdata): Report threads and cores.
11289 (linux_target_op): Register linux_core_of_thread.
11290 * remote-utils.c (prepare_resume_reply): Report the core.
11291 (buffer_xml_printf): Support %d specifier.
11292 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11293 New.
11294 (handle_query): Handle qXfer:threads. Announce availability
11295 thereof.
11296 * target.h (struct target_ops): New field core_of_thread.
11297
7803799a
UW
112982010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11299
11300 * Makefile.in (clean): Remove new generated files.
11301 (reg-s390.o, reg-s390.c): Remove rules.
11302 (reg-s390x.o, reg-s390x.c): Likewise.
11303 (s390-linux32.o, s390-linux32.c): Add rules.
11304 (s390-linux64.o, s390-linux64.c): Likewise.
11305 (s390x-linux64.o, s390x-linux64.c): Likewise.
11306 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11307 * linux-s390-low.c: Include <elf.h>.
11308 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11309 (init_registers_s390): Remove prototype.
11310 (init_registers_s390x): Likewise.
11311 (init_registers_s390_linux32): Add prototype.
11312 (init_registers_s390_linux64): Likewise.
11313 (init_registers_s390x_linux64): Likewise.
11314 (s390_num_regs_3264): New define.
11315 (s390_regmap_3264): New global variable.
11316 (s390_cannot_fetch_register): Remove obsolete check.
11317 (s390_cannot_store_register): Likewise.
11318 (s390_collect_ptrace_register): Handle upper/lower register halves.
11319 (s390_supply_ptrace_register): Likewise.
11320 (s390_fill_gregset): Update to register number changes.
11321 (s390_get_hwcap): New routine.
11322 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11323 Install appropriate regmap and register set.
11324
6e7ffa39
JB
113252010-01-01 Joel Brobecker <brobecker@adacore.com>
11326
11327 * server.c (gdbserver_version): Update copyright year to 2010.
11328 * gdbreplay.c (gdbreplay_version): Likewise.
11329
957f3f49
DE
113302009-12-28 Doug Evans <dje@google.com>
11331
11332 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11333 elf/external.h. Include <elf.h> instead but only if necessary.
11334
ca5c370d
PA
113352009-12-28 Pedro Alves <pedro@codesourcery.com>
11336
11337 * linux-low.c (linux_remove_process): Remove `detaching'
11338 parameter. Don't release/detach from thread_db here.
11339 (linux_kill): Release/detach from thread_db here, ...
11340 (linux_detach): ... and here, before actually detaching.
11341 (linux_wait_1): ... and here, when a process exits.
11342 * thread-db.c (any_thread_of): New.
11343 (thread_db_free): Switch the current inferior to a thread of the
11344 passed in process.
11345
4ee62156
DE
113462009-12-21 Doug Evans <dje@google.com>
11347
d90e6a88
DE
11348 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11349
c5f62d5f
DE
11350 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11351 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11352 warning ifndef __NR_tkill. Move setting of errno there too.
11353 Delete unnecessary resetting of errno after syscall.
11354 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11355
10e86dd7
DE
11356 * configure.ac: Check for dladdr.
11357 * config.in: Regenerate.
11358 * configure: Regenerate.
11359 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11360 (try_thread_db_load): Update.
11361
4ee62156
DE
11362 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11363
00f515da
DE
113642009-12-18 Doug Evans <dje@google.com>
11365
e9464885
DE
11366 * event-loop.c: Include unistd.h if it exists.
11367
07d4f67e
DE
11368 * linux-low.c (my_waitpid): Move definition away from being in
11369 between linux_tracefork_child/linux_test_for_tracefork.
11370
00f515da
DE
11371 * gdb_proc_service.h (psaddr_t): Fix type.
11372 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11373 signature to match glibc.
11374
1de1badb
DE
113752009-12-16 Doug Evans <dje@google.com>
11376
11377 * linux-low.c (linux_read_memory): Fix argument to read.
11378
aeeb81d1
PA
113792009-11-26 Pedro Alves <pedro@codesourcery.com>
11380
11381 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11382 events, don't leave current_inferior pointing at null.
11383
10357975
PA
113842009-11-26 Pedro Alves <pedro@codesourcery.com>
11385
11386 * win32-low.c (LOG): Delete.
11387 (OUTMSG): Output to stderr.
11388 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11389 on compile time LOG macro.
11390 (win32_wait): Fix debug output.
11391
cf6e3471
PA
113922009-11-26 Pedro Alves <pedro@codesourcery.com>
11393
11394 * win32-low.c (win32_add_one_solib): If the dll name is
11395 "ntdll.dll", prepend the system directory to the dll path.
11396
0c85e18e
MK
113972009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11398
11399 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11400
9ac544ce 114012009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11402 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11403
11404 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11405 * configure.ac: Check for __mcoldfire__ and set
11406 gdb_cv_m68k_is_coldfire.
11407 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11408 reg-cf.o and reg-m68k.o.
11409 * configure: Regenerated.
11410
fd7dd3e6
PA
114112009-11-16 Pedro Alves <pedro@codesourcery.com>
11412
11413 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11414 Pass it to thread_db_free.
11415 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11416 proper `detaching' argument to linux_remove_process.
11417 * linux-low.h (thread_db_free): Add `detaching' parameter.
11418 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11419 to thread_db_free.
11420 (thread_db_free): Add `detaching' parameter. Only
11421 call td_ta_clear_event if detaching from process.
11422
75aa492e
MK
114232009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11424
11425 * thread-db.c (thread_db_free): Fix typo.
11426
21e1bee4
PP
114272009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11428
11429 PR gdb/10838
11430 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11431
8838b45e
NS
114322009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11433
11434 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11435 with an i686 compiler.
11436 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11437 needed.
11438 * configure: Rebuilt.
11439
8a35fb51
SL
114402009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11441
11442 PR gdb/10783
11443
11444 * server.c (handle_search_memory_1): Correct read_addr initialization
11445 in loop for searching subsequent chunks.
11446
96f15937
PP
114472009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11448
11449 * configure.ac: New --with-libthread-db option.
11450 * thread-db.c: Allow direct dependence on libthread_db.
11451 (thread_db_free): Adjust.
11452 * config.in: Regenerate.
11453 * configure: Likewise.
889bf7c5 11454
5f7d1694
PP
114552009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11456
11457 PR gdb/10757
11458 * thread-db.c (attach_thread): New function.
11459 (maybe_attach_thread): Return success/failure.
11460 (find_new_threads_callback): Adjust.
889bf7c5
PA
11461 (thread_db_find_new_threads): Loop until no new threads.
11462
88e3b899
PA
114632009-10-13 Pedro Alves <pedro@codesourcery.com>
11464
11465 * proc-service.c (ps_lgetregs): Formatting.
11466
cdbfd419
PP
114672009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11468
11469 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11470 * configure.ac: Adjust.
11471 * linux-low.h (struct process_info_private): Move members to struct
11472 thread_db.
11473 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11474 * linux-low.c (linux_remove_process): Adjust.
11475 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11476 * server.c (handle_query): Move code ...
11477 (handle_monitor_command): ... here. New function.
11478 * target.h (struct target_ops): New member.
11479 * thread-db.c (struct thread_db): New.
11480 (libthread_db_search_path): New variable.
11481 (thread_db_create_event, thread_db_enable_reporting)
11482 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11483 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11484 (try_thread_db_load_1, dladdr_to_soname): New functions.
11485 (try_thread_db_load, thread_db_load_search): New functions.
11486 (thread_db_init): Search for libthread_db.
11487 (thread_db_free): New function.
11488 (thread_db_handle_monitor_command): Likewise.
11489 * config.in: Regenerate.
11490 * configure: Regenerate.
889bf7c5 11491
4168d2d6
UW
114922009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11493
11494 * spu-low.c (spu_kill): Wait for inferior to terminate.
11495 Call clear_inferiors.
11496 (spu_detach): Call clear_inferiors.
11497
81ecdfbb
RW
114982009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11499
11500 * aclocal.m4: Regenerate.
11501 * config.in: Likewise.
11502 * configure: Likewise.
11503
0b9ff2c0
UW
115042009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11505
11506 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11507 (parse_spufs_run): New function.
11508 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11509 (ppc_breakpoint_at): Handle SPU breakpoints.
11510
efcbbd14
UW
115112009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11512
11513 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11514 (SPUFS_MAGIC): Define.
11515 (spu_enumerate_spu_ids): New function.
11516 (linux_qxfer_spu): New function.
11517 (linux_target_ops): Install linux_qxfer_spu.
11518
f4d9bade
UW
115192009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11520
11521 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11522 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11523 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11524 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11525 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11526 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11527 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11528 (init_registers_powerpc_cell32l): Add prototype.
11529 (init_registers_powerpc_cell64l): Likewise.
11530 (ppc_arch_setup): Detect Cell/B.E. architecture.
11531
96e946ca
RW
115322009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11533
11534 * Makefile.in (datarootdir): New variable.
11535
58d6951d
DJ
115362009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11537
11538 * linux-low.c (linux_write_memory): Update debugging output.
11539 * Makefile.in (clean): Add new descriptions.
11540 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11541 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11542 * configure.srv: Add new files for arm*-*-linux*.
11543 * linux-arm-low.c: Add new declarations.
11544 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11545 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11546 (HWCAP_VFPv3D16): New.
11547 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11548 instead of __IWMMXT__.
11549 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11550 (arm_arch_setup): New.
11551 (target_regsets): Remove #ifdef. Add VFP regset.
11552 (the_low_target): Use arm_arch_setup.
11553
12b42a12
DJ
115542009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11555
11556 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11557 the main thread again.
11558
ac8c974e
AR
115592009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11560
11561 Adding Neutrino gdbserver.
11562 * configure: Regenerated.
11563 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11564 * configure.srv (i[34567]86-*-nto*): New target.
11565 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11566 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11567 (nto_comctrl) [__QNX__]: New function.
11568 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11569
4424e0c3 115702009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11571
11572 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11573 srv_tgtobj.
11574
912cf4ba
PA
115752009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11576 Pedro Alves <pedro@codesourcery.com>
11577
11578 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11579 don't support CONTEXT_EXTENDED_REGISTERS.
11580 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11581 (the_low_target): Install them.
11582 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11583 failing with ERROR_PIPE_NOT_CONNECTED.
11584
aa5ca48f
DE
115852009-06-30 Doug Evans <dje@google.com>
11586 Pierre Muller <muller@ics.u-strasbg.fr>
11587
11588 Add h/w watchpoint support to x86-linux, win32-i386.
11589 * Makefile.in (SFILES): Add i386-low.c
11590 (i386_low_h): Define.
11591 (i386-low.o): Add dependencies.
11592 (linux-x86-low.o): Add i386-low.h dependency.
11593 (win32-i386-low.o): Ditto.
11594 * i386-low.c: New file.
11595 * i386-low.h: New file.
11596 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11597 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11598 * linux-low.c (linux_add_process): Initialize arch_private.
11599 (linux_remove_process): Free arch_private.
11600 (add_lwp): Initialize arch_private.
11601 (delete_lwp): Free arch_private.
11602 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11603 provided.
11604 * linux-low.h (process_info_private): New member arch_private.
11605 (lwp_info): New member arch_private.
11606 (linux_target_ops): New members new_process, new_thread,
11607 prepare_to_resume.
11608 (ptid_of): New macro.
11609 * linux-x86-low.c: Include stddef.h, i386-low.h.
11610 (arch_process_info): New struct.
11611 (arch_lwp_info): New struct.
11612 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11613 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11614 (i386_dr_low_get_status): New function.
11615 (x86_insert_point, x86_remove_point): New functions.
11616 (x86_stopped_by_watchpoint): New function.
11617 (x86_stopped_data_address): New function.
11618 (x86_linux_new_process, x86_linux_new_thread): New functions.
11619 (x86_linux_prepare_to_resume): New function.
11620 (the_low_target): Add entries for insert_point, remove_point,
11621 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11622 prepare_to_resume.
11623 * server.c (debug_hw_points): New global.
11624 (monitor_show_help): Document set debug-hw-points.
11625 (handle_query): Process "set debug-hw-points".
11626 * server.h (debug_hw_points): Declare.
11627 (paddress): Declare.
11628 * utils.c (NUMCELLS, CELLSIZE): New macros.
11629 (get_sell, xsnprintf, paddress): New functions.
11630 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11631 remove_point, stopped_by_watchpoint, stopped_data_address.
11632 * win32-i386-low.c: Include i386-low.h.
11633 (debug_reg_state): Replaces dr.
11634 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11635 (i386_dr_low_get_status): New function.
11636 (i386_insert_point, i386_remove_point): New functions.
11637 (i386_stopped_by_watchpoint): New function.
11638 (i386_stopped_data_address): New function.
11639 (i386_initial_stuff): Update.
11640 (get_thread_context,set_thread_context,i386_thread_added): Update.
11641 (the_low_target): Add entries for insert_point,
11642 remove_point, stopped_by_watchpoint, stopped_data_address.
11643 * win32-low.c (win32_insert_watchpoint): New function.
11644 (win32_remove_watchpoint): New function.
11645 (win32_stopped_by_watchpoint): New function.
11646 (win32_stopped_data_address): New function.
11647 (win32_target_ops): Add entries for insert_watchpoint,
11648 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11649 * win32-low.h (win32_target_ops): New members insert_point,
11650 remove_point, stopped_by_watchpoint, stopped_data_address.
11651
d993e290
PA
116522009-06-25 Pedro Alves <pedro@codesourcery.com>
11653
11654 * server.c (process_serial_event): Re-return unsupported, not
11655 error, if the type isn't recognized. Re-allow supporting only
11656 insert or remove packets. Also call require_running for
11657 breakpoints. Add missing break statement to default case. Tidy.
11658 * target.h (struct target_ops): Rename insert_watchpoint to
11659 insert_point, and remove_watchpoint to remove_point.
11660
11661 * linux-low.h (struct linux_target_ops): Likewise.
11662 * linux-low.c (linux_insert_watchpoint): Rename to ...
11663 (linux_insert_point): ... this. Adjust.
11664 (linux_remove_watchpoint): Rename to ...
11665 (linux_remove_point): ... this. Adjust.
11666 (linux_target_ops): Adjust.
11667 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11668 (cris_insert_point): ... this.
11669 (cris_remove_watchpoint): Rename to ...
11670 (cris_remove_point): ... this.
11671 (the_low_target): Adjust.
11672
0f54c268
PM
116732009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11674
11675 * server.c (handle_v_kill): Pass signal_pid to
11676 kill_inferior if multi_process is zero.
11677
c6314022
AR
116782009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11679
11680 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11681 * target.h (target_ops): Comment for *_watchpoint to make it clear
11682 the functions can get types '0' and '1'.
11683
4463ce24
AR
116842009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11685
11686 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11687 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11688 * regcache.c (get_regcache): Likewise.
11689 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11690 * win32-low.c (child_fetch_inferior_registers): Remove check for
11691 regno 0.
11692
cf8fd78b
PA
116932009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11694 Pedro Alves <pedro@codesourcery.com>
11695
11696 * target.h (struct target_ops) <supports_multi_process>: New
11697 callback.
11698 (target_supports_multi_process): New.
11699 * server.c (handle_query): Even if GDB reports support, only
11700 enable multi-process if the target also supports it. Report
11701 multi-process support only if the target backend supports it.
11702 * linux-low.c (linux_supports_multi_process): New function.
11703 (linux_target_ops): Install it as target_supports_multi_process
11704 callback.
11705
47c0c975
DE
117062009-05-24 Doug Evans <dje@google.com>
11707
e09875d4
DE
11708 Global renaming of find_thread_pid to find_thread_ptid.
11709 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11710 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11711 All callers updated.
11712
e27d73f6
DE
11713 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11714 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11715 directly.
11716
47c0c975
DE
11717 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11718 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11719 (linux_resume_one_lwp): Ditto.
11720
2acc282a
DE
117212009-05-23 Doug Evans <dje@google.com>
11722
11723 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11724 from struct inferior_list_entry * to struct lwp_info *.
11725 All callers updated.
11726
9f1036c1
DE
117272009-05-13 Doug Evans <dje@google.com>
11728
11729 * linux-x86-low.c: Don't include assert.h.
11730 (x86_siginfo_fixup): Use fatal, not assert.
11731 (x86_arch_setup): Fix comment.
11732
d0722149
DE
117332009-05-12 Doug Evans <dje@google.com>
11734
11735 Biarch support for i386/amd64 gdbserver.
11736 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11737 Add linux-x86-low.c.
11738 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11739 (linux-x86-low.o): Add.
11740 * linux-x86-64-low.c: Delete.
11741 * linux-i386-low.c: Delete.
11742 * linux-x86-low.c: New file.
11743 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11744 linux-x86-low.o.
11745 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11746 linux-x86-low.o.
11747 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11748 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11749 (linux_child_pid_to_exec_file): New function.
11750 (elf_64_header_p, elf_64_file_p): New functions.
11751 (siginfo_fixup): New function.
11752 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11753 give target a chance to convert layout.
11754 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11755 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11756
fdeb2a12
DE
117572009-05-07 Doug Evans <dje@google.com>
11758
11759 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11760 (regsets_store_inferior_registers): Ditto.
11761
a6dbe5df
PA
117622009-05-06 Pedro Alves <pedro@codesourcery.com>
11763
11764 PR server/10048
11765
11766 * linux-low.c (must_set_ptrace_flags): Delete.
11767 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11768 of the global.
11769 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11770 `lwp->must_set_ptrace_flags' instead.
ba42693b 11771 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11772 (linux_wait_1): ... not here.
11773
5091eb23
DE
117742009-04-30 Doug Evans <dje@google.com>
11775
9f767825
DE
11776 * inferiors.c (started_inferior_callback): New function.
11777 (attached_inferior_callback): New function.
11778 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11779 * server.c (print_started_pid, print_attached_pid): New functions.
11780 (detach_or_kill_for_exit): New function.
11781 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11782 * server.h (have_started_inferiors_p): Declare.
11783 (have_attached_inferiors_p): Declare.
11784
5091eb23
DE
11785 * inferiors.c (remove_process): Fix memory leak, free process.
11786 * linux-low.c (linux_remove_process): New function.
11787 (linux_kill): Call it instead of remove_process.
11788 (linux_detach, linux_wait_1): Ditto.
11789
155c8968
PA
117902009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11791
11792 * configure.srv: Add x86 Windows CE target.
11793
7fe519cb
UW
117942009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11795
11796 * inferiors.c (get_thread_process): Make global.
11797 * server.h (get_thread_process): Add prototype.
11798 * thread-db.c (find_one_thread): Use get_thread_process
11799 instead of current_process.
11800 (thread_db_get_tls_address): Do not crash if called when
11801 thread layer is not yet initialized.
11802
5472f405
UW
118032009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11804
11805 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11806 * spu-low.c (current_tid): Rename to ...
11807 (current_ptid): ... this.
11808 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11809 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11810 ptid_get_lwp (current_ptid) instead of current_tid.
11811 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11812 instead of current_tid. Use find_process_pid to verify pid
11813 argument is valid. Pass proper argument to remove_process.
11814 (spu_thread_alive): Compare current_ptid instead of current_tid.
11815 (spu_resume): Likewise.
11816
55ac2b99
PA
118172009-04-02 Pedro Alves <pedro@codesourcery.com>
11818
11819 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11820 variable.
11821
95954743
PA
118222009-04-01 Pedro Alves <pedro@codesourcery.com>
11823
11824 Implement the multiprocess extensions, and add linux multiprocess
11825 support.
11826
11827 * server.h (ULONGEST): Declare.
11828 (struct ptid, ptid_t): New.
11829 (minus_one_ptid, null_ptid): Declare.
11830 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11831 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11832 (struct inferior_list_entry): Change `id' type from unsigned from
11833 to ptid_t.
11834 (struct sym_cache, struct breakpoint, struct
11835 process_info_private): Forward declare.
11836 (struct process_info): Declare.
11837 (current_process): Declare.
11838 (all_processes): Declare.
11839 (initialize_inferiors): Declare.
11840 (add_thread): Adjust to use ptid_t.
11841 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11842 (add_process, remove_process, find_thread_pid): Declare.
11843 (find_inferior_id): Adjust to use ptid_t.
11844 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11845 (multi_process): Declare.
11846 (push_event): Adjust to use ptid_t.
11847 (read_ptid, write_ptid): Declare.
11848 (prepare_resume_reply): Adjust to use ptid_t.
11849 (clear_symbol_cache): Declare.
11850 * inferiors.c (all_processes): New.
11851 (null_ptid, minus_one_ptid): New.
11852 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11853 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11854 (add_thread): Change unsigned long to ptid. Remove gdb_id
11855 parameter. Adjust.
11856 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11857 (gdb_id_to_thread): Rename to ...
11858 (find_thread_pid): ... this. Change unsigned long to ptid.
11859 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11860 (loaded_dll, pull_pid_from_list): Adjust.
11861 (add_process, remove_process, find_process_pid)
11862 (get_thread_process, current_process, initialize_inferiors): New.
11863 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11864 (struct target_waitstatus) <related_pid>: Ditto.
11865 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11866 return type to int.
11867 (struct target_ops) <join>: Add `pid' argument.
11868 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11869 (struct target_ops) <wait>: Add `ptid' field. Change return type
11870 to ptid.
11871 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11872 (mywait): Add `ptid' argument. Change return type to ptid_t.
11873 (target_pid_to_str): Declare.
11874 * target.c (set_desired_inferior): Adjust to use ptids.
11875 (mywait): Add new `ptid' argument. Adjust.
11876 (target_pid_to_str): New.
11877 * mem-break.h (free_all_breakpoints): Declare.
11878 * mem-break.c (breakpoints): Delelete.
11879 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11880 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11881 to use per-process breakpoint list.
11882 (free_all_breakpoints): New.
11883 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11884 (symbol_cache, all_symbols_looked_up): Delete.
11885 (hexchars): New.
11886 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11887 read_ptid): New.
11888 (prepare_resume_reply): Change ptid argument's type from unsigned
11889 long to ptid_t. Adjust. Implement W;process and X;process.
11890 (free_sym_cache, clear_symbol_cache): New.
11891 (look_up_one_symbol): Adjust to per-process symbol cache. *
11892 * server.c (cont_thread, general_thread, step_thread): Change type
11893 to ptid_t.
11894 (attached): Delete.
11895 (multi_process): New.
11896 (last_ptid): Change type to ptid_t.
11897 (struct vstop_notif) <ptid>: Change type to ptid_t.
11898 (queue_stop_reply, push_event): Change `ptid' argument's type to
11899 ptid_t.
11900 (discard_queued_stop_replies): Add `pid' argument.
11901 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11902 changes. Don't reference the `attached' global.
11903 (attach_inferior): Adjust to mywait interface changes.
11904 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11905 features. Handle and report "multiprocess+". Handle
11906 "qAttached:PID".
11907 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11908 changes.
11909 (handle_v_kill): New.
11910 (handle_v_stopped): Adjust to use target_pid_to_str.
11911 (handle_v_requests): Allow multiple attaches and runs when
11912 multiprocess extensions are in effect. Handle "vKill".
11913 (myresume): Adjust to use ptids.
11914 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11915 (handle_status): Adjust to discard_queued_stop_replies interface
11916 change.
11917 (first_thread_of, kill_inferior_callback)
11918 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11919 (main): Call initialize_inferiors. Adjust to use ptids, killing
11920 and detaching from all inferiors. Handle multiprocess packet
11921 variants.
11922 * linux-low.h: Include gdb_proc_service.h.
11923 (struct process_info_private): New.
11924 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11925 <lwpid_of>: Use ptid_get_lwp.
11926 (get_lwp_thread): Adjust.
11927 (struct lwp_info): Add `dead' member.
11928 (find_lwp_pid): Declare.
11929 * linux-low.c (thread_db_active): Delete.
11930 (new_inferior): Adjust comment.
11931 (inferior_pid): Delete.
11932 (linux_add_process): New.
11933 (handle_extended_wait): Adjust.
11934 (add_lwp): Change unsigned long to ptid.
11935 (linux_create_inferior): Add process to processes table. Adjust
11936 to use ptids. Don't set new_inferior here.
11937 (linux_attach_lwp): Rename to ...
11938 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11939 it. Adjust to use ptids.
11940 (linux_attach_lwp): New.
11941 (linux_attach): Add process to processes table. Don't set
11942 new_inferior here.
11943 (struct counter): New.
11944 (second_thread_of_pid_p, last_thread_of_process_p): New.
11945 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11946 multiple processes.
11947 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11948 processes. Remove process from process table.
11949 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11950 to multiple processes.
11951 (any_thread_of): New.
11952 (linux_detach): Add `pid' argument, and handle it. Remove process
11953 from processes table.
11954 (linux_join): Add `pid' argument. Handle it.
11955 (linux_thread_alive): Change unsighed long argument to ptid_t.
11956 Consider dead lwps as not being alive.
11957 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11958 threads we're not interested in.
11959 (same_lwp, find_lwp_pid): New.
11960 (linux_wait_for_lwp): Change `pid' argument's type from int to
11961 ptid_t. Adjust.
11962 (linux_wait_for_event): Rename to ...
11963 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11964 from int to ptid_t. Adjust.
11965 (linux_wait_for_event): New.
11966 (linux_wait_1): Add `ptid' argument. Change return type to
11967 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11968 that exit from the process table.
11969 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11970 Adjust.
11971 (mark_lwp_dead): New.
11972 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11973 stopping all threads, mark its main lwp as dead.
11974 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11975 ptids.
11976 (fetch_register, usr_store_inferior_registers)
11977 (regsets_fetch_inferior_registers)
11978 (regsets_store_inferior_registers, linux_read_memory)
11979 (linux_write_memory): Inline `inferior_pid'.
11980 (linux_look_up_symbols): Adjust to use per-process
11981 `thread_db_active'.
11982 (linux_request_interrupt): Adjust to use ptids.
11983 (linux_read_auxv): Inline `inferior_pid'.
11984 (initialize_low): Don't reference thread_db_active.
11985 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11986 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11987 (ps_getpid): Return the pid of the current inferior.
11988 * thread-db.c (proc_handle, thread_agent): Delete.
11989 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11990 per-process data.
11991 (find_one_thread): Change argument type to ptid_t. Adjust to
11992 per-process data.
11993 (maybe_attach_thread): Adjust to per-process data and ptids.
11994 (thread_db_find_new_threads): Ditto.
11995 (thread_db_init): Ditto.
11996 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11997 processes table. Adjust to use ptids.
11998 (spu_kill, spu_detach): Adjust interface. Remove process from
11999 processes table.
12000 (spu_join, spu_thread_alive): Adjust interface.
12001 (spu_wait): Adjust interface. Remove process from processes
12002 table. Adjust to use ptids.
12003 * win32-low.c (current_inferior_tid): Delete.
12004 (current_inferior_ptid): New.
12005 (debug_event_ptid): New.
12006 (thread_rec): Take a ptid. Adjust.
12007 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12008 (child_delete_thread): Ditto.
12009 (do_initial_child_stuff): Add `attached' argument. Add process to
12010 processes table.
12011 (child_fetch_inferior_registers, child_store_inferior_registers):
12012 Adjust.
12013 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12014 (win32_attach): Pass 1 to do_initial_child_stuff.
12015 (win32_kill): Adjust interface. Remove process from processes
12016 table.
12017 (win32_detach): Ditto.
12018 (win32_join): Adjust interface.
12019 (win32_thread_alive): Take a ptid.
12020 (win32_resume): Adjust to use ptids.
12021 (get_child_debug_event): Ditto.
12022 (win32_wait): Adjust interface. Remove exiting process from
12023 processes table.
12024
bd99dc85
PA
120252009-04-01 Pedro Alves <pedro@codesourcery.com>
12026
12027 Non-stop mode support.
12028
12029 * server.h (non_stop): Declare.
12030 (gdb_client_data, handler_func): Declare.
12031 (delete_file_handler, add_file_handler, start_event_loop):
12032 Declare.
12033 (handle_serial_event, handle_target_event, push_event)
12034 (putpkt_notif): Declare.
12035 * target.h (enum resume_kind): New.
12036 (struct thread_resume): Replace `step' field by `kind' field.
12037 (TARGET_WNOHANG): Define.
12038 (struct target_ops) <wait>: Add `options' argument.
12039 <supports_non_stop, async, start_non_stop>: New fields.
12040 (target_supports_non_stop, target_async): New.
12041 (start_non_stop): Declare.
12042 (mywait): Add `options' argument.
12043 * target.c (mywait): Add `options' argument. Print child exit
12044 notifications here.
12045 (start_non_stop): New.
12046 * server.c (non_stop, own_buf, mem_buf): New globals.
12047 (struct vstop_notif): New.
12048 (notif_queue): New global.
12049 (queue_stop_reply, push_event, discard_queued_stop_replies)
12050 (send_next_stop_reply): New.
12051 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12052 interface changes.
12053 (attach_inferior): In non-stop mode, don't wait for the target
12054 here.
12055 (handle_general_set): Handle QNonStop.
12056 (handle_query): When handling qC, return the current general
12057 thread, instead of the first thread of the list.
12058 (handle_query): If the backend supports non-stop mode, include
12059 QNonStop+ in the qSupported query response.
12060 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12061 and non-stop mode.
12062 (handle_v_attach, handle_v_run): Handle non-stop mode.
12063 (handle_v_stopped): New.
12064 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12065 (myresume): Adjust to use resume_kind. Handle non-stop.
12066 (queue_stop_reply_callback): New.
12067 (handle_status): Handle non-stop mode.
12068 (main): Clear non_stop flag on reconnection. Use the event-loop.
12069 Refactor serial protocol handling from here ...
12070 (process_serial_event): ... to this new function. When GDB
12071 selects any thread, select one here. In non-stop mode, wait until
12072 GDB acks all pending events before exiting.
12073 (handle_serial_event, handle_target_event): New.
12074 * remote-utils.c (remote_open): Install remote_desc in the event
12075 loop.
12076 (remote_close): Remove remote_desc from the event loop.
12077 (putpkt_binary): Rename to...
12078 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12079 (putpkt_binary): New as wrapper around putpkt_binary_1.
12080 (putpkt_notif): New.
12081 (prepare_resume_reply): In non-stop mode, don't change the
12082 general_thread.
12083 * event-loop.c: New.
12084 * Makefile.in (OBJ): Add event-loop.o.
12085 (event-loop.o): New rule.
12086
12087 * linux-low.h (pid_of): Moved here.
12088 (lwpid_of): New.
12089 (get_lwp_thread): Use lwpid_of.
12090 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12091 * linux-low.c (pid_of): Delete.
12092 (inferior_pid): Use lwpid_of.
12093 (linux_event_pipe): New.
12094 (target_is_async_p): New.
12095 (delete_lwp): New.
12096 (handle_extended_wait): Use lwpid_of.
12097 (add_lwp): Don't set lwpid field.
12098 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12099 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12100 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12101 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12102 first. Adjust to linux_wait_for_event interface changes. Use
12103 lwpid_of.
12104 (linux_detach): Don't delete the main lwp here.
12105 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12106 (status_pending_p): Don't consider explicitly suspended lwps.
12107 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12108 pointer. Add OPTIONS argument. Change return type to int. Use
12109 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12110 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12111 pointer. Add status pointer argument. Return a pid instead of a
12112 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12113 changes. In non-stop mode, don't switch to a random thread.
12114 (linux_wait): Rename to...
12115 (linux_wait_1): ... this. Add target_options argument, and handle
12116 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12117 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12118 clean exit and signal exit code. Don't stop all threads in
12119 non-stop mode. In all-stop mode, only stop all threads when
12120 reporting a stop to GDB. Handle explicit thread stop requests.
12121 (async_file_flush, async_file_mark): New.
12122 (linux_wait): New.
12123 (send_sigstop): Use lwpid_of.
12124 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12125 interface changes. In non-stop mode, don't switch to a random
12126 thread.
12127 (linux_resume_one_lwp): Use lwpid_of.
12128 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12129 (linux_resume_one_thread): ... this. Handle resume_stop. In
12130 non-stop mode, don't look for pending flag in all threads.
12131 (resume_status_pending_p): Don't consider explicitly suspended
12132 threads.
12133 (my_waitpid): Reimplement. Emulate __WALL.
12134 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12135 Use lwpid_of.
12136 (sigchld_handler, linux_supports_non_stop, linux_async)
12137 (linux_start_non_stop): New.
12138 (linux_target_ops): Register linux_supports_non_stop, linux_async
12139 and linux_start_non_stop.
12140 (initialize_low): Install SIGCHLD handler.
12141 * thread-db.c (thread_db_create_event, find_one_thread)
12142 (thread_db_get_tls_address): Use lwpid_of.
12143 * win32-low.c (win32_detach): Adjust to use resume_kind.
12144 (win32_wait): Add `options' argument.
12145 * spu-low.c (spu_resume): Adjust to use resume_kind.
12146 (spu_wait): Add `options' argument.
12147
5b1c542e
PA
121482009-04-01 Pedro Alves <pedro@codesourcery.com>
12149
12150 Decouple target code from remote protocol.
12151
12152 * target.h (enum target_waitkind): New.
12153 (struct target_waitstatus): New.
12154 (struct target_ops) <wait>: Return an unsigned long. Take a
12155 target_waitstatus pointer instead of a char pointer.
12156 (mywait): Likewise.
12157 * target.c (mywait): Change prototype to return an unsigned long.
12158 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12159 * server.h (thread_from_wait, old_thread_from_wait): Delete
12160 declarations.
12161 (prepare_resume_reply): Change prototype to take a
12162 target_waitstatus.
12163 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12164 (last_status, last_ptid): New.
12165 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12166 pid instead of a signal.
12167 (attach_inferior): Remove "status" and "signal" parameters.
12168 Adjust.
12169 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12170 not as an address.
12171 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12172 (handle_v_requests, myresume): Remove "status" and "signal"
12173 parameters. Adjust.
12174 (handle_status): New.
12175 (main): Delete local `status'. Adjust.
12176 * remote-utils.c: Include target.h.
12177 (prepare_resume_reply): Change prototype to take a
12178 target_waitstatus. Adjust.
12179
12180 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12181 interface.
12182 * spu-low.c (spu_wait): Adjust.
12183 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12184 Delete.
12185 (win32_wait): Adjust.
12186
2bd7c093
PA
121872009-04-01 Pedro Alves <pedro@codesourcery.com>
12188
12189 * target.h (struct thread_resume): Delete leave_stopped member.
12190 (struct target_ops): Add a `n' argument to the `resume' callback.
12191 * server.c (start_inferior): Adjust.
12192 (handle_v_cont, myresume): Adjust.
12193 * linux-low.c (check_removed_breakpoint): Adjust to resume
12194 interface change, and to removed leave_stopped field.
12195 (resume_ptr): Delete.
12196 (struct thread_resume_array): New.
12197 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12198 resume interface change.
12199 (linux_continue_one_thread, linux_queue_one_thread)
12200 (resume_status_pending_p): Check if the resume field is NULL
12201 instead of checking the leave_stopped member.
12202 (linux_resume): Adjust to the target resume interface change.
12203 * spu-low.c (spu_resume): Adjust to the target resume interface
12204 change.
12205 * win32-low.c (win32_detach, win32_resume): Ditto.
12206
c35fafde
PA
122072009-04-01 Pedro Alves <pedro@codesourcery.com>
12208
12209 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12210 flag.
12211 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12212 pending.
12213 (linux_continue_one_thread): Only preserve the stepping flag if
12214 there's a pending breakpoint.
12215
0a59d50b
PA
122162009-03-31 Pedro Alves <pedro@codesourcery.com>
12217
12218 * server.c (main): After the inferior having exited, call
12219 remote_close before exiting gdbserver.
12220
f04c6d38
TJB
122212009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12222
12223 Fix size of FPSCR in Power 7 processors.
12224 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12225 (PPC_FEATURE_HAS_DFP): New #define.
12226 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12227 size of the FPSCR.
12228
78e5cee6
PA
122292009-03-23 Pedro Alves <pedro@codesourcery.com>
12230
12231 * server.c (handle_query) Whitespace and formatting.
12232
1b3f6016
PA
122332009-03-22 Pedro Alves <pedro@codesourcery.com>
12234
12235 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12236 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12237 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12238 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12239 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12240 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12241 Makefile.in, configure.ac: Fix whitespace throughout.
12242 * configure: Regenerate.
12243
a07b2135
PA
122442009-03-22 Pedro Alves <pedro@codesourcery.com>
12245
12246 * inferiors.c (find_inferior): Make it safe for the callback
12247 function to delete the currently iterated inferior.
12248
67cc2626
PA
122492009-03-22 Pedro Alves <pedro@codesourcery.com>
12250
12251 * Makefile.in (linuw_low_h): Move higher.
12252 (thread-db.o): Depend on $(linux_low_h).
12253
54a0b537
PA
122542009-03-17 Pedro Alves <pedro@codesourcery.com>
12255
12256 Rename "process" to "lwp" throughout.
12257
12258 * linux-low.c (all_processes): Rename to...
12259 (all_lwps): ... this.
12260 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12261 (add_process): Rename to ...
12262 (add_lwp): ... this. Adjust.
12263 (linux_create_inferior): Adjust.
12264 (linux_attach_lwp): Adjust.
12265 (linux_attach): Adjust.
12266 (linux_kill_one_process): Rename to ...
12267 (linux_kill_one_lwp): ... this. Adjust.
12268 (linux_kill): Adjust.
12269 (linux_detach_one_process): Rename to ...
12270 (linux_detach_one_lwp): ... this. Adjust.
12271 (linux_detach): Adjust.
12272 (check_removed_breakpoint): Adjust.
12273 (status_pending_p): Adjust.
12274 (linux_wait_for_process): Rename to ...
12275 (linux_wait_for_lwp): ... this. Adjust.
12276 (linux_wait_for_event): Adjust.
12277 (send_sigstop): Adjust.
12278 (wait_for_sigstop): Adjust.
12279 (stop_all_processes): Rename to ...
12280 (stop_all_lwps): ... this.
12281 (linux_resume_one_process): Rename to ...
12282 (linux_resume_one_lwp): ... this. Adjust.
12283 (linux_set_resume_request, linux_continue_one_thread)
12284 (linux_queue_one_thread, resume_status_pending_p)
12285 (usr_store_inferior_registers, regsets_store_inferior_registers)
12286 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12287 Adjust.
12288 * linux-low.h (get_process): Rename to ...
12289 (get_lwp): ... this. Adjust.
12290 (get_thread_process): Rename to ...
12291 (get_thread_lwp): ... this. Adjust.
12292 (get_process_thread): Rename to ...
12293 (get_lwp_thread): ... this. Adjust.
12294 (struct process_info): Rename to ...
12295 (struct lwp_info): ... this.
12296 (all_processes): Rename to ...
12297 (all_lwps): ... this.
12298 * proc-service.c (ps_lgetregs): Adjust.
12299 * thread-db.c (thread_db_create_event, find_one_thread)
12300 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12301
0b16c5cf
PA
123022009-03-14 Pedro Alves <pedro@codesourcery.com>
12303
12304 * server.c (handle_query): Handle "qAttached".
12305
32de4b9d
NS
123062009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12307
12308 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12309 GPLv3, update license URL.
12310
2aecd87f
DE
123112009-03-01 Doug Evans <dje@google.com>
12312
93efd302 12313 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12314 (server_h): Add gdb_signals.h.
12315 (signals.o): Update.
12316 * server.h (target_signal_from_host,target_signal_to_host_p)
12317 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12318
86b1f9c5
PM
123192009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12320
12321 * remote-utils.c (getpkt): Also generate remote-debug
12322 information if noack_mode is set.
12323
4aa995e1
PA
123242009-02-06 Pedro Alves <pedro@codesourcery.com>
12325
12326 * server.c (handle_query): Report qXfer:siginfo:read and
12327 qXfer:siginfo:write as supported and handle them.
12328 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12329 * linux-low.c (linux_xfer_siginfo): New.
12330 (linux_target_ops): Set it.
12331
62709adf
PA
123322009-01-26 Pedro Alves <pedro@codesourcery.com>
12333
12334 * server.c (gdbserver_usage): Mention --remote-debug.
12335 (main): Accept '--remote-debug' switch.
12336
aef93bd7
DE
123372009-01-18 Doug Evans <dje@google.com>
12338
12339 * regcache.c (new_register_cache): No need to check result of xcalloc.
12340 * server.c (handle_search_memory): Back out calls to xmalloc,
12341 result is checked and error is returned to user upon failure.
12342 (handle_query): Ditto. Add more checks for result of malloc.
12343 (handle_v_cont): Check result of malloc, report error back to
12344 user upon failure.
12345 (handle_v_run): Ditto. Call freeargv.
12346 * server.h (freeargv): Declare.
12347 * utils.c (freeargv): New fn.
12348
54363045
DE
123492009-01-15 Doug Evans <dje@google.com>
12350
f626972c
DE
12351 * gdbreplay.c (perror_with_name): Make arg const char *.
12352 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12353 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12354 * utils.c (perror_with_name): Make arg const char *.
54363045 12355
18aae699
PA
123562009-01-14 Pedro Alves <pedro@codesourcery.com>
12357
12358 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12359 when handling a EXIT_PROCESS_DEBUG_EVENT.
12360
ff703abe
JB
123612009-01-06 Joel Brobecker <brobecker@adacore.com>
12362
12363 * gdbreplay.c (gdbreplay_version): Update copyright year.
12364 * server.c (gdbserver_version): Likewise.
12365
f21cc1a2 123662009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12367
12368 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12369 (handle_extended_wait): Improve comment.
0e21c1ec 12370
bca929d3
DE
123712008-12-13 Doug Evans <dje@google.com>
12372
12373 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12374 * server.h (ATTR_MALLOC): New macro.
12375 (xmalloc,xcalloc,xstrdup): Declare.
12376 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12377 * inferiors.c: Ditto.
12378 * linux-low.c: Ditto.
12379 * mem-break.c: Ditto.
12380 * regcache.c: Ditto.
12381 * remote-utils.c: Ditto.
12382 * server.c: Ditto.
12383 * target.c: Ditto.
12384 * win32-low.c: Ditto.
12385
97438e3f
DE
123862008-12-12 Doug Evans <dje@google.com>
12387
896c7fbb
DE
12388 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12389 in debugging printf.
12390
97438e3f
DE
12391 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12392
e3b886f8
DE
123932008-12-09 Doug Evans <dje@google.com>
12394
12395 * linux-low.h (struct process_info): Delete member tid, unused.
12396 * thread-db.c (find_one_thread): Update.
12397 (maybe_attach_thread): Update.
12398
07e059b5
VP
123992008-12-02 Pedro Alves <pedro@codesourcery.com>
12400
889bf7c5
PA
12401 * target.h (struct target_ops): Add qxfer_osdata member.
12402 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12403 and dirent.h.
12404 (linux_qxfer_osdata): New functions.
12405 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12406 callback.
12407 * server.c (handle_query): Handle "qXfer:osdata:read:".
12408 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12409 (buffer_xml_printf): New functions.
12410 * server.h (struct buffer): New.
12411 (buffer_grow_str, buffer_grow_str0): New macros.
12412 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12413 (buffer_xml_printf): Declare.
07e059b5 12414
4cab47ab
DE
124152008-11-24 Doug Evans <dje@google.com>
12416
12417 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12418
f142445f
DJ
124192008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12420
12421 * server.c (handle_v_run): Always use the supplied argument list.
12422
d0107bb6 124232008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12424
d0107bb6
BW
12425 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12426 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12427
2c4ad781
TJB
124282008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12429
12430 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12431 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12432 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12433 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12434 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12435 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12436 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12437 XML target descriptions.
12438 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12439 when inferior is running on an ISA 2.05 or later processor. Add
12440 special case to return offset for full 64-bit slot of FPSCR when
12441 in 32-bits.
12442
dfb64f85
DJ
124432008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12444
12445 * Makefile.in (SFILES, clean): Added sparc64 files.
12446 (reg-sparc64.o, reg-sparc64.c): New.
12447 * configure.srv (sparc*-*-linux*): New configuration.
12448 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12449 syscall arguments for SPARC.
12450 (regsets_store_inferior_registers): Likewise.
12451 * linux-sparc-low.c: New file.
12452
66b6e1dd
DE
124532008-10-21 Doug Evans <dje@google.com>
12454
12455 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12456 (READLINE_DIR,READLINE_DEP): Delete.
12457 (INTERNAL_CFLAGS): Update.
12458 (LINTFLAGS): Update.
12459
9b710a42
PA
124602008-10-10 Pedro Alves <pedro@codesourcery.com>
12461
12462 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12463 whole argv from the last run, not just argv[0].
12464
5822d809
PA
124652008-09-08 Pedro Alves <pedro@codesourcery.com>
12466
12467 * regcache.c (new_register_cache): Return NULL if the register
12468 cache size isn't known yet.
12469 (free_register_cache): Avoid dereferencing a NULL regcache.
12470
74aac56f
DJ
124712008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12472
12473 * configure.srv: Merge MIPS and MIPS64.
12474
400b20f5
MR
124752008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12476
12477 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12478
677c5bb1
LM
124792008-08-18 Luis Machado <luisgpm@br.ibm.com>
12480
12481 * Makefile.in: Add required vsx dependencies.
12482
12483 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12484 Declare init_registers_powerpc_vsx32l.
12485 Declare init_registers_powerpc_vsx64l.
12486 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12487 (ppc_arch_setup): Check for VSX in hwcap.
12488 (ppc_fill_vsxregset): New function.
12489 (ppc_store_vsxregset): New function.
12490 Add new VSX entry in regset_info target_regsets.
12491
12492 * configure.srv: Add new VSX dependencies.
12493
a6f3e723
SL
124942008-08-12 Pedro Alves <pedro@codesourcery.com>
12495
12496 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12497 (remote_open): Set or clear transport_is_reliable.
12498 (putpkt_binary): Don't expect acks in noack mode.
12499 (getpkt): Don't send ack/nac in noack mode.
12500 * server.c (handle_general_set): Handle QStartNoAckMode.
12501 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12502 qSupported.
12503 (main): Reset noack_mode on every connection.
12504 * server.h (noack_mode): Declare.
12505
a417dc56
RW
125062008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12507
12508 * Makefile.in (GDBREPLAY_OBS): New variable.
12509 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12510
3221518c
UW
125112008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12512 Daniel Jacobowitz <dan@codesourcery.com>
12513
12514 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12515 (usr_store_inferior_registers): Likewise.
12516 (regsets_store_inferior_registers): Likewise.
12517
ec56be1b
PA
125182008-07-31 Rolf Jansen <rj@surtec.com>
12519 Pedro Alves <pedro@codesourcery.com>
12520
12521 * configure.ac: Check for memmem declaration.
12522 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12523 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12524 (disable_packet_qfThreadInfo): Unconditionally compile.
12525 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12526 * configure, config.in: Regenerate.
12527
2fe5e3ff
DE
125282008-07-28 Doug Kwan <dougkwan@google.com>
12529
12530 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12531 (linux_write_memory): Remove declaration of errno.
12532
836acd6d
UW
125332008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12534
12535 * linux-low.c (handle_extended_wait): Do not use "status"
12536 variable uninitialized.
12537
aeba519e
PA
125382008-07-07 Pedro Alves <pedro@codesourcery.com>
12539
12540 * server.c (handle_v_attach): Inhibit reporting dll changes.
12541
db42f210
PA
125422008-06-27 Pedro Alves <pedro@codesourcery.com>
12543
12544 * remote-utils.c (prepare_resume_reply): If requested, don't
12545 output "thread:TID" in the T stop reply.
12546
12547 * server.c (disable_packet_vCont, disable_packet_Tthread)
12548 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12549 (handle_query): If requested, disable support for qC, qfThreadInfo
12550 and qsThreadInfo.
12551 (handle_v_requests): If requested, disable support for vCont.
12552 (gdbserver_show_disableable): New.
12553 (main): Handle --disable-packet and --disable-packet=LIST.
12554
12555 * server.h (disable_packet_vCont, disable_packet_Tthread)
12556 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12557
8e4c5421
CD
125582008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12559
12560 * server.c (gdbserver_usage): Mention --version.
12561
6e23a804
DJ
125622008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12563
12564 * Makefile.in (gdbreplay.o): New rule.
12565
90aa6a40
JM
125662008-06-06 Joseph Myers <joseph@codesourcery.com>
12567
12568 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12569 message, not gdbserver.
12570
c16158bc 125712008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12572 Nathan Sidwell <nathan@codesourcery.com>
12573 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12574
12575 * acinclude.m4: Include ../../config/acx.m4.
12576 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12577 * configure, config.in: Regenerate.
12578 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12579 * server.c (gdbserver_version): Print PKGVERSION.
12580 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12581 (main): Adjust gdbserver_usage calls.
12582 * gdbreplay.c (version, host_name): Add declarations.
12583 (gdbreplay_version, gdbreplay_usage): New.
12584 (main): Accept --version and --help options.
12585
aeb75bf5
DJ
125862008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12587
12588 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12589 (arm_breakpoint_at): Handle Thumb.
12590 (the_low_target): Add comment.
12591
76b233dd
UW
125922008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12593
12594 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12595
08388c79
DE
125962008-05-09 Doug Evans <dje@google.com>
12597
a3c83fae
DE
12598 * server.h (decode_search_memory_packet): Declare.
12599 * remote-utils.c (decode_search_memory_packet): New fn.
12600 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12601 (handle_search_memory): New fn.
12602 (handle_query): Process qSearch:memory packets.
12603
bb9c3d36
UW
126042008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12605
12606 * regcache.c (registers_length): Remove.
12607 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12608 full register packet.
12609 * regcache.h (registers_length): Remove prototype.
12610 * server.h (PBUFSIZ): Define to 16384.
12611
7284e1be
UW
126122008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12613
12614 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12615 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12616 powerpc-64l.o, and powerpc-altivec64l.o.
12617 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12618 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12619 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12620 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12621 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12622 to srv_xmlfiles.
12623
12624 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12625 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12626 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12627 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12628 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12629 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12630 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12631 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12632 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12633 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12634 (clean): Update.
12635
12636 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12637 (init_registers_powerpc_32l): ... this new prototype.
12638 (init_registers_powerpc_32): Remove, replace by ...
12639 (init_registers_powerpc_altivec32l): ... this new prototype.
12640 (init_registers_powerpc_e500): Remove, replace by ...
12641 (init_registers_powerpc_e500l): ... this new prototype.
12642 (init_registers_ppc64): Remove, replace by ...
12643 (init_registers_powerpc_64l): ... this new prototype.
12644 (init_registers_powerpc_64): Remove, replace by ...
12645 (init_registers_powerpc_altivec64l): ... this new prototype.
12646 (ppc_num_regs): Set to 73.
12647 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12648 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12649 (ppc_cannot_store_register): Handle orig_r3 and trap.
12650 (ppc_arch_setup): Update init_registers_... calls.
12651 (ppc_fill_gregset): Handle orig_r3 and trap.
12652
12653 * inferiors.c (clear_inferiors): Reset current_inferior.
12654
fdc59709
PB
126552008-04-23 Paolo Bonzini <bonzini@gnu.org>
12656
889bf7c5
PA
12657 * acinclude.m4: Add override.m4.
12658 * configure: Regenerate.
fdc59709 12659
c9b2f845
UW
126602008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12661
12662 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12663 initial call to init_register_ppc64.
12664
550512b8
UW
126652008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12666
43aaf8b6
PA
12667 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12668 single powerpc*-*-linux* case.
550512b8
UW
12669 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12670
b6430ec3
UW
126712008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12672
12673 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12674 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12675 from reg_xmlfiles.
12676 * linux-ppc-low.c: Include <elf.h>.
12677 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12678 (ppc_hwcap): New global variable.
12679 (ppc_regmap): Remove __SPE__ #ifdef sections.
12680 (ppc_regmap_e500): New global variable.
12681 (ppc_cannot_store_register): Update __SPE__ special case.
12682 (ppc_get_hwcap): New function.
12683 (ppc_arch_setup): Use it to determine whether inferior supports
12684 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12685 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12686 Do not access registers if target does not support AltiVec.
12687 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12688 Do not access registers if target does not support SPE.
12689 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12690
52fa2412
UW
126912008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12692
12693 * linux-low.c (disabled_regsets, num_regsets): New.
12694 (use_regsets_p): Delete.
12695 (linux_wait_for_process): Clear disabled_regsets.
12696 (regsets_fetch_inferior_registers): Check and set it.
12697 (regsets_store_inferior_registers): Likewise.
12698 (linux_fetch_registers, linux_store_registers): Do not use
12699 use_regsets_p.
12700 (initialize_low): Allocate disabled_regsets.
12701
e28b3332
DJ
127022008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12703
12704 * Makefile.in (LIBOBJS): New.
12705 (OBS): Use LIBOBJS.
12706 (memmem.o): New rule.
12707 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12708 * configure: Regenerated.
12709
4536995d
UW
127102008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12711
12712 * server.c (handle_query): Never return "unsupported" for
12713 qXfer:features:read queries.
12714
221c031f
UW
127152008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12716
12717 * server.c (get_features_xml): Fix inverted condition.
12718 (handle_query): Always support qXfer:feature:read.
12719
ccd213ac
DJ
127202008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12721
12722 * server.c (wrapper_argv): New.
12723 (start_inferior): Handle wrapper_argv. If set, expect an extra
12724 trap.
12725 (gdbserver_usage): Document --wrapper.
12726 (main): Parse --wrapper.
12727
6fe305f7
UW
127282008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12729
12730 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12731 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12732 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12733 (ppc_set_pc): Likewise.
12734 (ppc_arch_setup): New function.
12735 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12736 of collect_register.
889bf7c5 12737 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12738
5b0a002e
UW
127392008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12740
12741 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12742 instead of linux-ppc64-low.o.
12743 * linux-ppc64-low.c: Remove file.
12744 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12745 (linux-ppc64-low.o): Remove rule.
12746
12747 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12748 (init_registers_powerpc_64): Likewise.
12749 (ppc_regmap): Conditionally define depending on __powerpc64__.
12750 (ppc_cannot_store_register): Do not special-case "fpscr" when
12751 compiled on __powerpc64__.
12752 (ppc_collect_ptrace_register): New function.
12753 (ppc_supply_ptrace_register): New function.
12754 (ppc_breakpoint): Change type to "unsigned int".
12755 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12756 (the_low_target): Conditionally provide initializers for the
889bf7c5 12757 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12758 collect_ptrace_register and supply_ptrace_register members.
12759
9b4b61c8
UW
127602008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12761
12762 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12763 * server.c (gdbserver_xmltarget): Define.
12764 (get_features_xml): Use it to replace "target.xml" and arch_string.
12765
12766 * configure.srv: Remove srv_xmltarget. Add XML files that were
12767 mentioned there to srv_xmlfiles instead. Remove conditional tests
12768 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12769 srv_xmlfiles and srv_regobj to include all possible choices.
12770 * configure.ac (srv_xmltarget): Remove.
12771 (srv_xmlfiles): Do not add "target.xml".
12772 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12773 checks for supplementary target information.
12774 * configure: Regenerate.
12775 * Makefile.in (XML_TARGET): Remove.
12776 (target.xml): Remove rule.
12777 (clean): Do not clean up target.xml.
12778 (.PRECIOUS): Do not mention target.xml.
12779
12780 * target.h (struct target_ops): Remove arch_string member.
12781 * linux-low.c (linux_arch_string): Remove.
12782 (linux_target_ops): Remove arch_string initializer.
12783 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12784 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12785 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12786 * spu-low.c (spu_arch_string): Remove.
12787 (spu_target_ops): Remove arch_string initializer.
12788 * win32-low.c (win32_arch_string): Remove.
12789 (win32_target_ops): Remove arch_string initializer.
12790 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12791 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12792 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12793
ee1a7ae4
UW
127942008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12795
12796 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12797 by collect_ptrace_register and supply_ptrace_register hooks.
12798 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12799 instead of checking for the_low_target.left_pad_xfer.
12800 (usr_store_inferior_registers): Use collect_ptrace_register callback
12801 instead of checking for the_low_target.left_pad_xfer.
12802
12803 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12804 (s390_supply_ptrace_register): Likewise.
12805 (s390_fill_gregset): Call s390_collect_ptrace_register.
12806 (the_low_target): Update.
12807
12808 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12809 (ppc_supply_ptrace_register): Likewise.
12810 (the_low_target): Update.
12811
12812 * linux-i386-low.c (the_low_target): Update.
12813 * linux-x86-64-low.c (the_low_target): Update.
12814
d61ddec4
UW
128152008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12816
12817 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12818 reg-s390.o and reg-s390x.o.
12819
12820 * linux-low.c (new_inferior): New global variable.
12821 (linux_create_inferior, linux_attach): Set it.
12822 (linux_wait_for_process): Call the_low_target.arch_setup after the
12823 target has stopped for the first time.
12824 (initialize_low): Do not call the_low_target.arch_setup.
12825
12826 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12827 (s390_set_pc): Likewise.
12828 (s390_arch_setup): New function.
12829 (the_low_target): Use s390_arch_setup as arch_setup routine.
12830
12831 * regcache.c (realloc_register_cache): New function.
12832 (set_register_cache): Call it for each existing regcache.
12833
d05b4ac3
UW
128342008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12835
12836 * server.h (init_registers): Remove prototype.
12837
12838 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12839 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12840 instead of init_registers ().
12841 * linux-arm-low.c (init_registers_arm): Add prototype.
12842 (init_registers_arm_with_iwmmxt): Likewise.
12843 (the_low_target): Add initializer for arch_setup field.
12844 * linux-cris-low.c (init_registers_cris): Add prototype.
12845 (the_low_target): Add initializer for arch_setup field.
12846 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12847 (the_low_target): Add initializer for arch_setup field.
12848 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12849 (the_low_target): Add initializer for arch_setup field.
12850 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12851 (the_low_target): Add initializer for arch_setup field.
12852 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12853 (the_low_target): Add initializer for arch_setup field.
12854 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12855 (the_low_target): Add initializer for arch_setup field.
12856 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12857 (init_registers_mips64_linux): Likewise.
12858 (the_low_target): Add initializer for arch_setup field.
12859 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12860 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12861 (the_low_target): Add initializer for arch_setup field.
12862 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12863 (init_registers_powerpc_64): Likewise.
12864 (the_low_target): Add initializer for arch_setup field.
12865 * linux-s390-low.c (init_registers_s390): Add prototype.
12866 (init_registers_s390x): Likewise.
12867 (the_low_target): Add initializer for arch_setup field.
12868 * linux-sh-low.c (init_registers_sh): Add prototype.
12869 (the_low_target): Add initializer for arch_setup field.
12870 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12871 (the_low_target): Add initializer for arch_setup field.
12872 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12873 (the_low_target): Add initializer for arch_setup field.
12874
12875 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12876 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12877 instead of init_registers ().
12878 * win32-arm-low.c (init_registers_arm): Add prototype.
12879 (the_low_target): Add initializer for arch_setup field.
12880 * win32-i386-low.c (init_registers_i386): Add prototype.
12881 (the_low_target): Add initializer for arch_setup field.
12882
12883 * spu-low.c (init_registers_spu): Add prototype.
12884 (initialize_low): Call initialie_registers_spu () instead of
12885 initialize_registers ().
12886
fd96d250
PA
128872008-02-19 Pedro Alves <pedro@codesourcery.com>
12888
12889 * server.c (handle_v_requests): When handling the vRun and vAttach
12890 packets, if already debugging a process, don't kill it. Return an
12891 error instead.
12892
d41b6bb4
DJ
128932008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12894
12895 * server.c (handle_query): Correct length check.
12896
5ac588cf
PA
128972008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12898
12899 * win32-low.c (do_initial_child_stuff): Add process handle
12900 parameter. Set current_process_handle and current_process_id from the
12901 parameters. Clear globals.
12902 (win32_create_inferior): Don't set current_process_handle and
12903 current_process_id here. Instead pass them on the call to
12904 do_initial_child_stuff.
12905 (win32_attach): Likewise.
12906 (win32_clear_inferiors): New.
12907 (win32_kill): Don't close the current process handle or the
12908 current thread handle here. Instead call win32_clear_inferiors.
12909 (win32_detach): Don't open a new handle to the process. Call
12910 win32_clear_inferiors.
12911 (win32_join): Don't rely on current_process_handle; open a new
12912 handle using the process id.
12913 (win32_wait): Call win32_clear_inferiors when the inferior process
12914 has exited.
12915
ecd7ecbc
DJ
129162008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12917
12918 * server.c (monitor_show_help): Add "exit".
12919
1525d545
MG
129202008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12921
ecd7ecbc 12922 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12923 (clean): Add reg-xtensa.c.
12924 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12925 * configure.srv (xtensa*-*-linux*) New target.
12926 * linux-xtensa-low.c: New.
12927 * xtensa-xtregs.c: New.
1525d545 12928
59a016f0
PA
129292008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12930
12931 * hostio.c: Don't include errno.h.
12932 (errno_to_fileio_errno): Move to hostio-errno.
12933 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12934 error number outputting to the target->hostio_last_error callback.
12935 (hostio_packet_error): Use FILEIO_EINVAL directly.
12936 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12937 calls to hostio_error.
12938 * hostio-errno.c: New.
12939 * server.h (hostio_last_error_from_errno): Declare.
12940 * target.h (target_ops): Add hostio_last_error member.
12941 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12942 as hostio_last_error handler.
889bf7c5 12943 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12944 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12945 (wince_hostio_last_error): New functions.
12946 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12947 as hostio_last_error handler.
12948 (win32_target_ops) [!_WIN32_WCE]: Register
12949 hostio_last_error_from_errno as hostio_last_error handler.
12950 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12951 (hostio-errno.o): New rule.
12952 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12953 * configure.srv (srv_hostio_err_objs): New variable. Default to
12954 hostio-errno.o.
12955 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12956 * configure: Regenerate.
12957
2d717e4f
DJ
129582008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12959
12960 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12961 (linux_kill, linux_detach): Clean up the process list.
12962 * remote-utils.c (remote_open): Improve port number parsing.
12963 (putpkt_binary, input_interrupt): Only send interrupts if the target
12964 is running.
12965 * server.c (extended_protocol): Make static.
12966 (attached): Define earlier.
12967 (exit_requested, response_needed, program_argv): New variables.
12968 (target_running): New.
12969 (start_inferior): Clear attached here.
12970 (attach_inferior): Set attached here.
12971 (require_running): Define.
12972 (handle_query): Use require_running and target_running. Implement
12973 "monitor exit".
12974 (handle_v_attach, handle_v_run): New.
12975 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12976 (gdbserver_usage): Update.
12977 (main): Redo argument parsing. Handle --debug and --multi. Handle
12978 --attach along with other options or after the port. Save
12979 program_argv. Support no initial program. Resynchronize
12980 communication with GDB after an error. Handle "monitor exit".
12981 Use require_running and target_running. Always allow the extended
12982 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12983 restart in extended mode.
12984 * README: Refer to the GDB manual. Update --attach usage.
12985
7407e2de
AS
129862007-12-20 Andreas Schwab <schwab@suse.de>
12987
12988 * linux-low.c (STACK_SIZE): Define.
12989 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12990 (linux_test_for_tracefork): Likewise.
12991
b65d95c5
DJ
129922007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12993
12994 * linux-low.c (linux_wait_for_event): Update messages. Do not
12995 reinsert auto-delete breakpoints.
12996 * mem-break.c (struct breakpoint): Change return type of handler to
12997 int.
12998 (set_breakpoint_at): Update handler type.
12999 (reinsert_breakpoint_handler): Return 1 instead of calling
13000 delete_breakpoint.
13001 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13002 setting a new one.
13003 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13004 * mem-break.h (set_breakpoint_at): Update handler type.
13005 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13006 * win32-low.c (auto_delete_breakpoint): New.
13007 (get_child_debug_event): Use it.
13008
4e799345
DJ
130092007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13010
13011 * configure.ac: Check for pread and pwrite.
13012 * hostio.c (handle_pread): Fall back to lseek and read.
13013 (handle_pwrite): Fall back to lseek and write.
13014 * config.in, configure: Regenerated.
13015
27524b67
DJ
130162007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13017
13018 * server.c (myresume): Add own_buf argument.
13019 (main): Update calls.
13020
a20d5e98
DJ
130212007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13022
13023 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13024 * remote-utils.c (remote_open): Do not call disable_async_io.
13025 (block_async_io): Delete.
13026 (unblock_async_io): Make static.
13027 (initialize_async_io): New.
13028 * server.c (handle_v_cont): Handle async I/O here.
13029 (myresume): Likewise. Move other common resume tasks here...
13030 (main): ... from here. Call initialize_async_io. Disable async
13031 I/O before the main loop.
13032 * server.h (initialize_async_io): Declare.
13033 (block_async_io, unblock_async_io): Delete prototypes.
13034 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13035
b79d787e
DJ
130362007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13037
13038 * remote-utils.c (readchar): Allow binary data in received messages.
13039
d97903b2
PA
130402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13041
13042 * win32-low.c (attaching): New global.
13043 (win32_create_inferior): Clear the `attaching' global.
13044 (win32_attach): Set the `attaching' global.
13045 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13046 attaching. Only set a breakpoint at the entry point if not
13047 attaching.
13048
311de423
PA
130492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13050
13051 * server.c (main): Don't report dll events on the initial
13052 connection on attaches.
13053
6c2d16d2
PA
130542007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13055
13056 * server.c (main): Relax numerical bases supported for the pid of
13057 the --attach command line argument.
13058
5ca906e6
PA
130592007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13060
13061 * win32-low.c (win32_attach): Call OpenProcess before
13062 DebugActiveProcess, not after. Add last error output to error
13063 call.
13064
9c6c8194
PA
130652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13066
13067 * win32-low.c (win32_get_thread_context)
13068 (win32_set_thread_context): New functions.
13069 (thread_rec): Use win32_get_thread_context.
13070 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13071 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13072 field.
13073
4d5d1aaa
PA
130742007-12-03 Leo Zayas
13075 Pedro Alves <pedro_alves@portugalmail.pt>
13076
13077 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13078 global variables.
13079 (child_add_thread): Minor cleanup.
13080 (child_continue): Resume artificially suspended threads before
13081 calling ContinueDebugEvent.
13082 (suspend_one_thread): New.
13083 (fake_breakpoint_event): New.
13084 (get_child_debug_event): Change return type to int. Check here if
13085 gdb sent an interrupt request. If a soft interrupt was requested,
13086 fake a breakpoint event. Return 0 if there is no event to handle,
13087 and 1 otherwise.
13088 (win32_wait): Don't check here if gdb sent an interrupt request.
13089 Ensure there is a valid event to handle.
13090 (win32_request_interrupt): Add soft interruption method as last
13091 resort.
13092
c436e841
PA
130932007-12-03 Leo Zayas
13094 Pedro Alves <pedro_alves@portugalmail.pt>
13095
13096 * win32-low.h (win32_thread_info): Add descriptions to the
13097 structure members. Replace `suspend_count' counter by a
13098 `suspended' flag.
13099 * win32-low.c (thread_rec): Update condition of when to get the
13100 context from the inferior. Rely on ContextFlags being set if it
13101 has already been retrieved. Only suspend the inferior thread if
13102 we haven't already. Warn if that fails.
13103 (continue_one_thread): s/suspend_count/suspended/. Only call
13104 ResumeThread once. Warn if that fails.
13105
e7b5fa67
PA
131062007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13107
13108 * win32-low.c (win32_wait): Don't read from the inferior when it
13109 has already exited.
13110
a385171d
PA
131112007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13112
13113 * Makefile.in (win32_low_h): New variable.
13114 (win32-low.o): Add dependency on $(win32_low_h).
13115 (win32-arm-low.o, win32-i386-low.o): New rules.
13116
f80c84b3
DJ
131172007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13118
13119 * hostio.c: Correct copyright year.
13120
a6b151f1
DJ
131212007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13122
13123 * Makefile.in (OBS): Add hostio.o.
13124 (hostio.o): New rule.
13125 * server.h (handle_vFile): Declare.
13126 * hostio.c: New file.
13127 * server.c (handle_v_requests): Take packet_len and new_packet_len
13128 for binary packets. Call handle_vFile.
13129 (main): Update call to handle_v_requests.
13130
f9387fc3
DJ
131312007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13132
13133 * linux-low.c: Include <sched.h>.
13134
51c2684e
DJ
131352007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13136
13137 * linux-low.c (linux_tracefork_grandchild): New.
13138 (linux_tracefork_child): Use clone.
13139 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13140
75f83163
JB
131412007-10-31 Joel Brobecker <brobecker@adacore.com>
13142
13143 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13144
da5898ce
DJ
131452007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13146
13147 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13148
24a09b5f
DJ
131492007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13150
13151 * inferiors.c (change_inferior_id): Delete.
13152 (add_pid_to_list, pull_pid_from_list): New.
13153 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13154 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13155 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13156 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13157 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13158 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13159 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13160 (using_threads): Always set to 1.
13161 (handle_extended_wait): New.
13162 (add_process): Do not set TID.
13163 (linux_create_inferior): Set must_set_ptrace_flags.
13164 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13165 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13166 (linux_thread_alive): Rename TID argument to LWPID.
13167 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13168 (linux_wait_for_event): Do not use TID or check using_threads. Update
13169 call to dead_thread_notify. Call handle_extended_wait.
13170 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13171 (send_sigstop): Delete sigstop_sent.
13172 (wait_for_sigstop): Avoid TID.
13173 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13174 (linux_test_for_tracefork): New.
13175 (linux_lookup_signals): Use thread_db_active and
13176 linux_supports_tracefork_flag.
13177 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13178 * linux-low.h (get_process_thread): Avoid TID.
13179 (struct process_ifo): Move thread_known and tid to the end. Remove
13180 sigstop_sent.
13181 (linux_attach_lwp, thread_db_init): Update prototypes.
13182 * server.h (change_inferior_id): Delete prototype.
13183 (add_pid_to_list, pull_pid_from_list): New prototypes.
13184 * thread-db.c (thread_db_use_events): New.
13185 (find_first_thread): Rename to...
13186 (find_one_thread): ...this. Update callers and messages. Do not
13187 call fatal. Check thread_db_use_events. Do not call
13188 change_inferior_id or new_thread_notify.
13189 (maybe_attach_thread): Update. Do not call new_thread_notify.
13190 (thread_db_init): Set thread_db_use_events. Check use_events.
13191 * utils.c (fatal, warning): Correct message prefix.
13192
30ed0a8f
DJ
131932007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13194
13195 * Makefile.in (clean): Remove new files.
13196 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13197 (powerpc-64.o, powerpc-64.c): New rules.
13198 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13199 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13200 with SPE.
13201 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13202 SPE targets.
13203 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13204 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13205 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13206 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13207 (target_regsets): Add AltiVec and SPE register sets.
13208 * configure.ac: Check for AltiVec and SPE.
13209 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13210 (ppc_fill_vrregset, ppc_store_vrregset): New.
13211 (target_regsets): Add AltiVec register set.
13212 * configure: Regenerated.
13213
fd462a61
DJ
132142007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13215
13216 * linux-low.c (O_LARGEFILE): Define.
13217 (linux_read_memory): Use /proc/PID/mem.
13218 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13219 * configure, config.in: Regenerated.
13220
69f223ed
DJ
132212007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13222
13223 * linux-low.c (linux_wait_for_event): Do not pass signals while
13224 single-stepping.
13225
aec18585
PA
132262007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13227
13228 * win32-low.c (create_process): New.
13229 (win32_create_inferior): Use create_process instead of
13230 CreateProcess. If create_process failed retry appending an ".exe"
13231 suffix. Store the GetLastError result immediatelly after
13232 create_process calls and use it on the call to error.
13233
34d86ddd
PA
132342007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13235
13236 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13237
5a0e3bd0
JB
132382007-08-23 Joel Brobecker <brobecker@adacore.com>
13239
13240 * configure.ac: Switch license to GPLv3.
13241
f88c79e6
MS
132422007-08-01 Michael Snyder <msnyder@access-company.com>
13243
13244 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13245
6b3d9b83
PA
132462007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13247
13248 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13249 typedef.
13250 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13251 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13252 CloseToolhelp32Snapshot.
13253 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13254 CloseToolhelp32Snapshot.
13255
c588c53c
MS
132562007-07-27 Michael Snyder <michael.snyder@access-company.com>
13257
13258 * server.c (main): Check for inferior exit before main loop.
13259
aa0403d9
PA
132602007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13261
13262 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13263 instead of on tmp_desc.
13264
255e7678
DJ
132652007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13266 Daniel Jacobowitz <dan@codesourcery.com>
13267
13268 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13269 (add_thread): Minor cleanups.
13270 (clear_inferiors): Move lower in the file. Clear the DLL
13271 list.
13272 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13273 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13274 (xml_escape_text): New.
13275 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13276 for qSupported.
13277 (handle_v_cont): Report errors.
13278 (gdbserver_version): Update.
13279 (main): Correct size of own_buf. Do not report initial DLL events.
13280 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13281 (unloaded_dll, xml_escape_text): New.
13282 * win32-low.c (enum target_waitkind): Update comments.
13283 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13284 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13285 (win32_EnumProcessModules, win32_GetModuleInformation)
13286 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13287 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13288 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13289 (win32_Module32First, win32_Module32Next, load_toolhelp)
13290 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13291 (get_child_debug_event): Handle DLL events.
13292 (win32_wait): Likewise.
13293
0d37add9
DJ
132942007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13295
13296 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13297 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13298
45e2715e
PA
132992007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13300
13301 * win32-low.c (handle_output_debug_string): Ignore event if not
13302 waiting.
13303
c5674cf1
PA
133042007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13305
13306 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13307
2bbe3cc1
DJ
133082007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13309
13310 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13311
ae13219e
DJ
133122007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13313
13314 * inferiors.c (change_inferior_id): Add comment.
13315 * linux-low.c (check_removed_breakpoint): Add an early
13316 prototype. Improve debug output.
13317 (linux_attach): Doc update.
13318 (linux_detach_one_process, linux_detach): Clean up before releasing
13319 each process.
13320 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13321 * linux-low.h (struct process_info): Doc improvement.
13322 * mem-break.c (delete_all_breakpoints): New.
13323 * mem-break.h (delete_all_breakpoints): New prototype.
13324 * thread-db.c (find_first_thread): New.
13325 (thread_db_create_event): Call it instead of
13326 thread_db_find_new_threads. Clean up unused variables.
13327 (maybe_attach_thread): Remove first thread handling.
13328 (thread_db_find_new_threads): Use find_first_thread.
13329 (thread_db_get_tls_address): Likewise.
13330
4105de34
DJ
133312007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13332
13333 * thread-db.c (thread_db_find_new_threads): Add prototype.
13334 (thread_db_create_event): Check for the main thread before adding
13335 a new thread.
13336 (maybe_attach_thread): Only enable event reporting if TID == 0.
13337 (thread_db_get_tls_address): Check for new threads.
13338
2b876972
DJ
133392007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13340
13341 * linux-low.c (linux_create_inferior): Try execv before execvp.
13342 * spu-low.c (spu_create_inferior): Likewise.
13343
7a245884
DJ
133442007-06-13 Mike Frysinger <vapier@gentoo.org>
13345
13346 * linux-low.c (linux_create_inferior): Change execv to execvp.
13347 * spu-low.c (spu_create_inferior): Likewies.
13348
117ce543
DJ
133492007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13350
13351 * Makefile.in (clean): Clean new files instead of deleted ones.
13352 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13353 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13354 rules.
13355 * configure.srv: Specify XML files and new regformats for MIPS and
13356 MIPS64 GNU/Linux.
13357 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13358 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13359 an entry for the restart register.
13360 (mips_cannot_fetch_register, mips_cannot_store_register)
13361 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13362 register names to match the XML descriptions.
13363 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13364 restart register instead of $0.
13365
0e7f50da
UW
133662007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13367 Markus Deuling <deuling@de.ibm.com>
13368
13369 * remote-utils.c (decode_xfer_write): New function.
13370 * server.h (decode_xfer_write): Add prototype.
13371 * server.c (handle_query): Add PACKET_LEN argument. Support
13372 qXfer:spu:read and qXfer:spu:write packets.
13373 (main): Pass packet_len to handle_query.
13374 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13375 * target.h (target_ops): Add qxfer_spu.
13376
374c1d38
UW
133772007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13378
13379 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13380 accessing non-seekable spufs files.
13381
bb63802a
UW
133822007-05-16 Markus Deuling <deuling@de.ibm.com>
13383
889bf7c5 13384 * server.c (handle_query): Add reply for qC packet.
bb63802a 13385
7390519e
PA
133862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13387 Leo Zayas <lerele@champenstudios@com>
13388
13389 * server.h (check_remote_input_interrupt_request): New function.
13390 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13391 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13392 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13393 (check_remote_input_interrupt_request): New function.
13394 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13395 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13396 winapi_GenerateConsoleCtrlEvent): New typedefs.
13397 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13398 to 250 ms.
13399 (win32_wait): Check for remote interrupt request
13400 with check_remote_input_interrupt_request.
13401 (win32_request_interrupt): New function.
13402 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13403
34b34921
PA
134042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13405
13406 * win32-low.c (debug_registers_changed,
13407 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13408 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13409 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13410 (thread_rec): Get context using the low target.
13411 (child_add_thread): Call thread_added on the low target,
13412 which does the same thing.
13413 (regptr): Delete.
13414 (do_initial_child_stuff): Remove debug registers references.
13415 Set context using the low target. Resume threads after
13416 setting the contexts.
13417 (child_continue): Remove dead variable. Remove debug
13418 registers references.
13419 (child_fetch_inferior_registers): Go through the low target.
13420 (do_child_store_inferior_registers): Remove.
13421 (child_store_inferior_registers): Go through the low target.
13422 (win32_resume): Remove debug registers references.
13423 Set context using the low target.
13424 (handle_exception): Change return type to void. Don't record
13425 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13426 first chance exception.
889bf7c5 13427 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13428 goto loop. Always return after waiting for debug event.
13429 (win32_wait): Convert to switch statement. Handle spurious
13430 events.
13431
13432 * win32-i386-low.c (debug_registers_changed,
13433 debug_registers_used): New.
13434 (initial_stuff): Rename to ...
13435 (i386_initial_stuff): ... this. Clear debug registers
13436 state variables.
13437 (store_debug_registers): Delete.
13438 (i386_get_thread_context): New.
13439 (load_debug_registers): Delete.
13440 (i386_set_thread_context): New.
13441 (i386_thread_added): New.
13442 (single_step): Rename to ...
13443 (i386_single_step): ... this.
13444 (do_fetch_inferior_registers): Rename to ...
13445 (i386_fetch_inferior_register): ... this.
13446 (i386_store_inferior_register): New.
13447 (the_low_target): Adapt to new interface.
13448
13449 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13450 (arm_get_thread_context): New.
13451 (arm_set_thread_context): New.
13452 (regptr): New.
13453 (do_fetch_inferior_registers): Rename to ...
13454 (arm_fetch_inferior_register): ... this.
13455 (arm_store_inferior_register): New.
13456 (arm_wince_breakpoint): Reimplement as unsigned long.
13457 (arm_wince_breakpoint_len): Define.
13458 (the_low_target): Adapt to new interface.
13459
13460 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13461 load_debug_registers. Add get_thread_context, set_thread_context,
13462 thread_added and store_inferior_register. Rename
13463 fetch_inferior_registers to fetch_inferior_register.
13464 (regptr): Remove declaration.
13465
dd6953e1
PA
134662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13467
13468 * linux-low.c (linux_detach): Change return type to int. Return 0.
13469 * spu-low.c (spu_detach): Likewise.
13470
444d6139
PA
134712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13472
13473 * target.h (target_ops): Change return type of detach to int.
13474 Add join.
13475 (join_inferior): New.
13476 * server.c (main): Don't skip detach support on mingw32.
13477 If the inferior doesn't support detaching return error.
13478 Call join_inferior instead of using waitpid.
13479 * linux-low.c (linux_join): New.
13480 (linux_target_op): Add linux_join.
13481 * spu-low.c (spu_join): New.
13482 (spu_target_ops): Add spu_join.
13483 * win32-low.c (win32_detach): Adapt to new interface.
13484 Reopen current_process_handle before detaching. Issue a child
13485 resume before detaching.
13486 (win32_join): New.
13487 (win32_target_op): Add win32_join.
13488
1d5315fe
PA
134892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13490
13491 * win32-low.c (win32-attach): Fix return value.
13492 * target.h (target_ops): Describe ATTACH return values.
13493
bf914831
PA
134942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13495
13496 * win32-low.c (GETPROCADDRESS): Define.
13497 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13498 (winapi_DebugSetProcessKillOnExit): Likewise.
13499 (win32_create_inferior): Force usage of ansi CreateProcessA.
13500 (win32_attach): Use GETPROCADDRESS.
13501 (win32_detach): Likewise.
13502
f72f3e60
PA
135032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13504
13505 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13506
ed50f18f
PA
135072007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13508
13509 * win32-low.c: Commit leftover changes from 2007-03-29.
13510
0c2ead7e
DJ
135112007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13512
13513 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13514 fields short instead of int. Add explicit padding.
13515 (i387_cache_to_fsave): Remove unnecessary casts.
13516 (i387_fsave_to_cache): Doc fix.
13517 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13518
73725ff3
DJ
135192007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13520
13521 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13522 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13523
d99f33d8
PA
135242007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13525
13526 * configure.srv (arm*-*-mingw32ce*): Move near the other
13527 arm targets.
13528
68070c10
PA
135292007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13530
2482afc6 13531 * configure.ac: Add errno checking.
68070c10
PA
13532 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13533 sys/file.h and malloc.h.
13534 (AC_CHECK_DECLS): Add perror.
13535 (srv_mingwce): Handle.
2482afc6 13536 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13537 win32-i386-low.o to srv_tgtobj.
13538 (i[34567]86-*-mingw*): Likewise.
13539 (arm*-*-mingw32ce*): Add case.
13540 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13541 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13542 [__MINGW32CE__] (strerror): New function.
13543 [__MINGW32CE__] (errno): Define to GetLastError.
13544 [__MINGW32CE__] (COUNTOF): New macro.
13545 (remote_open): Remove extra close call.
13546 * mem-break.c (delete_breakpoint_at): New function.
13547 * mem-break.h (delete_breakpoint_at): Declare.
13548 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13549 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13550 [USE_WIN32API] (read, write): Add char* casts.
13551 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13552 * server.h: Include wincecompat.h on Windows CE.
13553 [HAVE_ERRNO_H]: Check.
13554 (perror): Declare if not declared.
13555 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13556 (perror_with_name): Remove errno declaration.
13557 * wincecompat.h: New.
13558 * wincecompat.c: New.
13559 * win32-low.h: New.
13560 * win32-arm-low.c: New.
13561 * win32-i386-low.c: New.
13562 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13563 (OUTMSG2): Make it safe.
13564 (_T): New macro.
13565 (COUNTOF): New macro.
13566 (NUM_REGS): Get it from the low target.
13567 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13568 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13569 (thread_rec): Let low target handle debug registers.
13570 (child_add_thread): Likewise.
13571 (child_init_thread_list): Likewise.
13572 (continue_one_thread): Likewise.
13573 (regptr): New.
13574 (do_child_fetch_inferior_registers): Move to ...
13575 * win32-i386-low.c: ... here, and rename to ...
13576 (do_fetch_inferior_registers): ... this.
889bf7c5 13577 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13578 Go through the low target.
13579 (do_child_store_inferior_registers): Use regptr.
13580 (strwinerror): New function.
13581 (win32_create_inferior): Handle Windows CE.
13582 Use strwinerror instead of strerror on Windows error
13583 codes. Add program to the error output.
13584 Don't close the main thread handle on Windows CE.
13585 (win32_attach): Use coredll.dll on Windows CE.
13586 (win32_kill): Close current process and current
13587 thread handles.
13588 (win32_detach): Use coredll.dll on Windows CE.
13589 (win32_resume): Let low target handle debug registers, and
13590 step request.
13591 (handle_exception): Add/Remove initial breakpoint. Avoid
13592 non-existant WSTOPSIG on Windows CE.
13593 (win32_read_inferior_memory): Cast to remove warning.
13594 (win32_arch_string): Go through the low target.
13595 (initialize_low): Call set_breakpoint_data with the low
13596 target's breakpoint.
13597 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13598 FOP_REGNUM, mappings): Move to ...
13599 * win32-i386-low.c: ... here.
13600 * win32-low.c (win32_thread_info): Move to ...
13601 * win32-low.h: ... here.
13602 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13603 win32-arm-low.c and wincecompat.c.
13604 (all:): Add $EXEEXT.
13605 (install-only:): Likewise.
13606 (gdbserver:): Likewise.
13607 (gdbreplay:): Likewise.
13608 * config.in: Regenerate.
13609 * configure: Regenerate.
13610
41093d81
PA
136112007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13612
13613 * win32-low.c: Rename typedef thread_info to
13614 win32_thread_info throughout.
13615
544afa54
PA
136162007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13617
13618 * win32-i386-low.c: Rename to ...
13619 * win32-low.c: ... this.
13620 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13621 * Makefile.in: Likewise.
13622
bce7165d
PA
136232007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13624
13625 * remote-utils.c (monitor_output): Constify msg parameter.
13626 * server.h (monitor_output): Likewise.
13627 * win32-i386-low.c (handle_output_debug_string): New.
13628 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13629 handle_output_debug_string.
13630 (get_child_debug_event): Likewise.
13631
506c7aa0
DJ
136322007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13633
13634 * server.c (main): Correct strtoul check.
13635
42c81e2a
DJ
136362007-03-27 Jon Ringle <jon@ringle.org>
13637
13638 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13639
9453113a
DJ
136402007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13641
13642 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13643
64a69107
DJ
136442007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13645
13646 * terminal.h: Check HAVE_SGTTY_H.
13647
136482007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13649
13650 * remote-utils.c (remote_open): Print out the assigned port number.
13651
c74d0ad8
DJ
136522007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13653
13654 * remote-utils.c (monitor_output): New function.
13655 * server.c (debug_threads): Define here.
13656 (monitor_show_help): New function.
13657 (handle_query): Handle qRcmd.
13658 (main): Do not handle 'd' packet.
13659 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13660 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13661 of debug_threads.
13662
de7c3b4a
PA
136632007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13664
13665 * Makefile.in (EXEEXT): New.
13666 (clean): Use $(EXEEXT).
13667
ef57601b
PA
136682007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13669
13670 * target.h (target_ops): Rename send_signal to request_interrupt,
13671 and remove enum target_signal parameter.
13672 * linux-low.c (linux_request_interrupt): Rename from
13673 linux_send_signal, and always send SIGINT.
13674 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13675 and always send SIGINT.
13676 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13677 of send_signal.
13678 (input_interrupt): Likewise.
13679
820f2bda
PA
136802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13681
13682 * server.c (get_features_xml): Check if target implemented
13683 arch_string.
13684 * win32-i386-low.c (win32_arch_string): New.
13685 (win32_target_ops): Add win32_arch_string as arch_string member.
13686
ab39bf24
UW
136872007-02-22 Markus Deuling <deuling@de.ibm.com>
13688
13689 * spu-low.c (spu_arch_string): New.
13690 (spu_target_ops): Add spu_arch_string.
13691
61ff6e04
DJ
136922007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13693
13694 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13695 * configure.ac: Do not check for terminal.h.
13696 * configure, config.in: Regenerated.
13697
fb1e4ffc
DJ
136982007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13699
13700 * Makefile.in (OBS): Add $(XML_BUILTIN).
13701 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13702 (clean): Update.
13703 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13704 (arm-with-iwmmxt.c): New.
13705 * config.in, configure: Regenerate.
13706 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13707 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13708 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13709 (arm*-*-linux*): Add iWMMXt and regset support.
13710 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13711 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13712 (arm_store_wmmxregset, target_regsets): New.
13713 * server.c (get_features_xml): Take annex argument. Check builtin
13714 XML documents.
13715 (handle_query): Handle multiple annexes.
13716
0f48aa01
DJ
137172007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13718
13719 * remote-utils.c [USE_WIN32API] (read, write): Define.
13720 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13721 write.
13722
23181151
DJ
137232007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13724
13725 * linux-i386-low.c (the_low_target): Set arch_string.
13726 * linux-x86-64-low.c (the_low_target): Likewise.
13727 * linux-low.c (linux_arch_string): New.
13728 (linux_target_ops): Add it.
13729 * linux-low.h (struct linux_target_ops): Add arch_string.
13730 * server.c (write_qxfer_response): Use const void * for DATA.
13731 (get_features_xml): New.
13732 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13733 * target.h (struct target_ops): Add arch_string method.
13734
9d606399
DJ
137352007-01-03 Denis Pilat <denis.pilat@st.com>
13736 Daniel Jacobowitz <dan@codesourcery.com>
13737
13738 * linux-low.c (linux_kill): Handle being called with no threads.
13739 * win32-i386-low.c (win32_kill): Likewise.
13740 (get_child_debug_event): Clear current_process_handle.
13741
137422006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13743 Daniel Jacobowitz <dan@codesourcery.com>
13744
13745 * remote-utils.c (remote_open): Check the type of specified
13746 serial port devices before opening them.
13747 * server.c (main): Kill the inferior if an error occurs during
13748 the first remote_open.
13749
a5e13d24
DJ
137502006-12-05 Markus Deuling <deuling@de.ibm.com>
13751
13752 * README: Update supported targets.
13753
186947f7
DJ
137542006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13755
13756 * Makefile.in (clean): Remove reg-mips64.c.
13757 (reg-mips64.c, reg-mips64.o): New rules.
13758 * configure.srv: Handle mips64. Include regset support for mips.
13759 * linux-mips-low.c (union mips_register): New.
13760 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13761 (mips_breakpoint, mips_breakpoint_at): Use int.
13762 (mips_collect_register, mips_supply_register)
13763 (mips_collect_register_32bit, mips_supply_register_32bit)
13764 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13765 (mips_store_fpregset, target_regsets): New.
13766 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13767
a13e2c95
UW
137682006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13769
13770 * configure.srv: Add target "spu*-*-*".
13771 * Makefile.in (clean): Remove reg-spu.c.
13772 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13773 * spu-low.c: New file.
13774
cb7283db
DJ
137752006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13776
13777 * configure.ac: Correct td_thr_tls_get_addr test.
13778 * configure: Regenerated.
13779
89be2091
DJ
137802006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13781
13782 * linux-low.c (linux_wait_for_event): Reformat. Use the
13783 pass_signals array.
13784 * remote-utils.c (decode_address_to_semicolon): New.
13785 * server.c (pass_signals, handle_general_set): New.
13786 (handle_query): Mention QPassSignals for qSupported.
13787 (main): Call handle_general_set.
13788 * server.h (pass_signals, decode_address_to_semicolon): New.
13789
000ef4f0
DJ
137902006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13791
13792 * server.c (handle_query): Correct error handling for read_auxv.
13793
b7149293
UW
137942005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13795
13796 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13797 and srv_linux_thread_db to yes.
13798 * linux-s390-low.c (s390_fill_gregset): New function.
13799 (target_regsets): Define data structure.
13800
dae5f5cf
DJ
138012006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13802
13803 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13804 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13805 * config.in, configure: Regenerated.
13806 * inferiors.c (gdb_id_to_thread): New function.
13807 (gdb_id_to_thread_id): Use it.
13808 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13809 * linux-low.h (struct process_info): Add th member.
13810 (thread_db_get_tls_address): New prototype.
13811 * remote-utils.c (decode_address): Make non-static.
13812 * server.c (handle_query): Handle qGetTLSAddr.
13813 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13814 * target.h (struct target_ops): Add get_tls_address.
13815 * thread-db.c (maybe_attach_thread): Save the thread handle.
13816 (thread_db_get_tls_address): New.
13817
32ca6d61
DJ
138182006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13819
13820 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13821 (linux_resume_one_process): Take a siginfo_t *. Update all
13822 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13823 (struct pending_signals): Add a siginfo_t.
13824 (linux_wait_for_process): Always set last_status.
13825 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13826 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13827 * linux-low.h (struct process_info): Add last_status.
13828
5ffff7c1
DJ
138292006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13830
13831 * remote-utils.c (try_rle): New function.
13832 (putpkt_binary): Use it.
13833
8695c747
DJ
138342006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13835
13836 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13837 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13838 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13839 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13840 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13841 point registers.
13842
290fadea
RS
138432006-08-08 Richard Sandiford <richard@codesourcery.com>
13844
13845 * server.c (terminal_fd): New variable.
13846 (old_foreground_pgrp): Likewise.
13847 (restore_old_foreground_pgrp): New function.
13848 (start_inferior): Record the terminal file descriptor in terminal_fd
13849 and its original foreground group in old_foreground_pgrp. Register
13850 restore_old_foreground_pgrp with atexit().
13851
9f2e1e63
DJ
138522006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13853
13854 * server.c (handle_query): Correct qPart to qXfer.
13855
b80864fb
DJ
138562006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13857
13858 * configure.ac: Check for more headers which are missing on
13859 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13860 * configure.srv: Add Cygwin and mingw32.
13861 * remote-utils.c: Don't include headers unconditionally which
13862 are missing on mingw32. Include <winsock.h> for mingw32.
13863 (remote_open): Adjust for mingw32 support. Flush
13864 standard error after writing to it.
13865 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13866 (unblock_async_io, enable_async_io, disable_async_io)
13867 (readchar, getpkt): Update for Winsock support.
13868 (prepare_resume_reply): Expect a protocol signal number.
13869 * server.c: Disable <sys/wait.h> on mingw32.
13870 (start_inferior): Adjust for mingw32 support. Flush
13871 standard error after writing to it.
13872 (attach_inferior): Likewise. Use protocol signal
13873 numbers.
13874 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13875 and names.
13876 * win32-i386-low.c: New file.
13877 * Makefile.in (XM_CLIBS): Set.
13878 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13879 (win32-i386-low.o): New dependency rule.
13880 * linux-low.c (linux_wait): Use target signal numbers.
13881 * target.h (struct target_ops): Doc fix.
13882 * server.h (target_signal_to_name): New prototype.
13883 * gdbreplay.c: Don't include headers unconditionally which
13884 are missing on mingw32. Include <winsock.h> for mingw32.
13885 (remote_close, remote_open): Adjust for Winsock support.
13886 * configure, config.in: Regenerated.
13887
0876f84a
DJ
138882006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13889
13890 * server.c (decode_xfer_read, write_qxfer_response): New.
13891 (handle_query): Take a packet length argument. Handle
13892 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13893 the qSupported response.
13894 (main): Update call to handle_query.
13895
01f9e8fa
DJ
138962006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13897
13898 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13899 (putpkt_binary): Renamed from putpkt and adjusted for binary
13900 data.
13901 (putpkt): New wrapper for putpkt_binary.
13902 (readchar): Don't mask off the high bit.
13903 (decode_X_packet): New function.
13904 * server.c (main): Call putpkt_binary if a handler sets the packet
13905 length. Save the length of the incoming packet. Handle 'X'.
13906 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13907
be2a5f71
DJ
139082006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13909
13910 * server.c (handle_query): Handle qSupported.
13911
ea025f5f
DJ
139122006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13913
13914 * remote-utils.c (all_symbols_looked_up): New variable.
13915 (look_up_one_symbol): Check it.
13916 * server.h (look_up_one_symbol): New declaration.
13917 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13918
9308fc88
DJ
139192006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13920
13921 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13922 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13923 (PTRACE_GET_THREAD_AREA): Define.
13924 (ps_get_thread_area): New function.
13925
52fb6437
NS
139262006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13927
13928 * configure.srv (m68k*-*-uclinux*): New target.
13929 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13930 (linux_resume_one_process): Remove extraneous cast.
13931 (linux_read_offsets): New.
13932 (linux_target_op): Add linux_read_offsets on mmuless systems.
13933 * server.c (handle_query): Add qOffsets logic.
13934 * target.h (struct target_ops): Add read_offsets.
13935
21b0f40c
DJ
139362006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13937
13938 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13939 (PTRACE_GET_THREAD_AREA): Define.
13940 (ps_get_thread_area): New function.
13941 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13942 (linux-x86-64-low.o): Update.
13943
0050a760
DJ
139442006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13945
13946 * configure.ac: Remove checks for prfpregset_t.
13947 * gdb_proc_service.h: New file.
13948 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13949 new "gdb_proc_service.h".
13950 * proc-service.c: Likewise.
13951 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13952 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13953 * Makefile.in (gdb_proc_service_h): Updated.
13954 * configure, config.in: Regenerated.
13955
b92a518e
DJ
139562006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13957
13958 * remote-utils.c (prepare_resume_reply): Move declaration
13959 of gdb_id_from_wait to the top of the block.
13960
545587ee
DJ
139612006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13962
13963 * linux-low.c (regsets_store_inferior_registers): Read the regset
13964 from the target before filling it.
13965
9db87ebd
DJ
139662006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13967
13968 * server.c (attach_inferior): Return SIGTRAP for a successful
13969 attach.
13970
dd24457d
DJ
139712006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13972
13973 * Makefile.in (OBS): Add version.o.
13974 (STAGESTUFF): Delete.
13975 (version.o): Add dependencies.
13976 (version.c): Replace rule.
13977 (clean): Remove version.c.
13978 * server.c (gdbserver_version): New.
13979 (gdbserver_usage): Use printf.
13980 (main): Handle --version and --help.
13981 * server.h (version, host_name): Add declarations.
13982
6f0f660e
EZ
139832005-12-23 Eli Zaretskii <eliz@gnu.org>
13984
889bf7c5
PA
13985 * linux-arm-low.c:
13986 * linux-arm-low.c:
13987 * inferiors.c:
13988 * i387-fp.h:
13989 * i387-fp.c:
13990 * gdbreplay.c:
13991 * regcache.c:
13992 * proc-service.c:
13993 * mem-break.h:
13994 * mem-break.c:
13995 * linux-x86-64-low.c:
13996 * linux-sh-low.c:
13997 * linux-s390-low.c:
13998 * linux-ppc64-low.c:
13999 * linux-ppc-low.c:
14000 * linux-mips-low.c:
14001 * linux-m68k-low.c:
14002 * linux-m32r-low.c:
14003 * linux-low.h:
14004 * linux-low.c:
14005 * linux-ia64-low.c:
14006 * linux-i386-low.c:
14007 * linux-crisv32-low.c:
14008 * thread-db.c:
14009 * terminal.h:
14010 * target.h:
14011 * target.c:
14012 * server.h:
14013 * server.c:
14014 * remote-utils.c:
14015 * regcache.h:
14016 * utils.c:
14017 * Makefile.in:
14018 * configure.ac:
6f0f660e
EZ
14019 * gdbserver.1: Add (C) after Copyright. Update the FSF
14020 address.
14021
9d1fb177
DJ
140222005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14023
14024 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14025 (arm_breakpoint_at): Recognize both breakpoints.
14026 (the_low_target): Use the correct breakpoint instruction.
14027
011a70c2
DJ
140282005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14031 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14032 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14033 (the_low_target): Update.
14034
7fb85e41
AS
140352005-10-25 Andreas Schwab <schwab@suse.de>
14036
14037 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14038
14039 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14040 (ia64_num_regs): Reduce to 462.
14041
3db0444b
DJ
140422005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14043
14044 * acinclude.m4: Correct quoting.
14045 * aclocal.m4: Regenerated.
14046
14047 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14048 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14049 (thread_db_init): Call thread_db_err_str.
14050 * configure.ac: Check for TD_VERSION.
14051 * config.in, configure: Regenerated.
14052
bee0189a
DJ
140532005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14054
14055 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14056
e9d25b98
DJ
140572005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14058
14059 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14060 is not available. Define HAVE_PTRACE_GETREGS if it is.
14061 * config.in, configure: Regenerated.
14062 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14063 * linux-i386-low.c, linux-m68k-low.c: Update to use
14064 HAVE_PTRACE_GETREGS.
14065 * linux-low.c (regsets_fetch_inferior_registers)
14066 (regsets_store_inferior_registers): Only return 0 if we processed
14067 GENERAL_REGS.
14068 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14069 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14070
a06660f7
DJ
140712005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14072
14073 * inferiors.c (struct thread_info): Add gdb_id.
14074 (add_thread): Add gdb_id argument.
14075 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14076 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14077 calls to add_thread.
14078 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14079 * server.c (handle_query): Use thread_to_gdb_id.
14080 (handle_v_cont, main): Use gdb_id_to_thread_id.
14081 * server.h (add_thread): Update prototype.
14082 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14083 prototypes.
14084
5a1f5858
DJ
140852005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14086
14087 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14088 left-padded registers.
14089 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14090 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14091
e122f1f5
SE
140922005-07-01 Steve Ellcey <sje@cup.hp.com>
14093
14094 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14095 * configure: Regenerate.
14096 * config.in: Regenerate.
14097 * server.h (NEED_DECLARATION_STRERROR):
14098 Replace with !HAVE_DECL_STRERROR.
14099
d592fa2f
DJ
141002005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14101
14102 * linux-low.c (linux_wait, linux_send_signal): Don't test
14103 an unsigned long variable for > 0 if it could be MAX_ULONG.
14104 * server.c (myresume): Likewise.
14105 * target.c (set_desired_inferior): Likewise.
14106
ccbd4912
MK
141072005-06-13 Mark Kettenis <kettenis@gnu.org>
14108
14109 * configure.ac: Simplify and improve check for socklen_t.
14110 * configure, config.in: Regenerate.
14111
f450004a
DJ
141122005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14113
14114 * acconfig.h: Remove.
14115 * configure.ac: Add a test for socklen_t. Use three-argument
14116 AC_DEFINE throughout.
14117 * config.in: Regenerated using autoheader 2.59.
14118 * configure: Regenerated.
14119
14120 * gdbreplay.c (socklen_t): Provide a default.
14121 (remote_open): Use socklen_t.
14122 * remote-utils.c (socklen_t): Provide a default.
14123 (remote_open): Use socklen_t.
14124 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14125 unsigned char.
14126
14127 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14128 char for buffers.
14129 * linux-low.c (linux_read_memory, linux_write_memory)
14130 (linux_read_auxv): Likewise.
14131 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14132 (check_mem_write): Likewise.
14133 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14134 Likewise.
14135 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14136 (registers_from_string, register_data): Likewise.
14137 * server.c (handle_query, main): Likewise.
14138 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14139 (decode_M_packet): Likewise.
14140 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14141 * target.h (struct target_ops): Update read_memory, write_memory,
14142 and read_auxv.
14143 (read_inferior_memory, write_inferior_memory): Update.
14144 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14145 to unsigned char *.
14146 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14147 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14148 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14149 linux-s390-low.c, linux-sh-low.c: Update for changes in
14150 read_inferior_memory and the_low_target->breakpoint.
14151
eee84df1
DJ
141522005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14153
14154 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14155 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14156 * configure.srv: Add powerpc64-*-linux*.
14157 * linux-ppc64-low.c: New file.
14158
45b134e5
OF
141592005-05-23 Orjan Friberg <orjanf@axis.com>
14160
14161 * linux-cris-low.c: New file with support for CRIS.
14162 * linux-crisv32-low.c: Ditto for CRISv32.
14163 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14164 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14165 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14166 reg-crisv32.o, and reg-crisv32.c to make rules.
14167 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14168 recognized targets.
14169
48d93c75
UW
141702005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14171
14172 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14173 of sizeof (PTRACE_XFER_TYPE).
14174 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14175
e013ee27
OF
141762005-05-12 Orjan Friberg <orjanf@axis.com>
14177
889bf7c5 14178 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14179 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14180 pointers for hardware watchpoint support.
14181 * linux-low.h (struct linux_target_ops): Ditto.
14182 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14183 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14184 to linux_target_ops.
14185 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14186 reply packet.
14187 * server.c (main): Recognize 'Z' and 'z' packets.
14188
b0ded00b
UW
141892005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14190
14191 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14192 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14193 (the_low_target): Add new members.
14194
8643e2ad
DJ
141952005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14196
14197 * proc-service.c (ps_lgetregs): Search all_processes instead of
14198 all_threads.
14199
fc620387
DJ
142002005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14201
14202 * server.c (start_inferior): Change return type to int.
14203 (attach_inferior): Change sigptr to int *.
14204 (handle_v_cont, handle_v_requests): Change signal to int *.
14205 (main): Change signal to int.
14206
142072005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14208
14209 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14210 * configure.srv: Add m32r*-*-linux*.
14211 * linux-m32r-low.c: New file.
14212
e0e76420
DJ
142132005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14214
14215 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14216
a1928bad
DJ
142172005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14218
14219 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14220 Take unsigned long arguments for PIDs.
14221 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14222 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14223 (wait_for_sigstop, linux_resume_one_process)
14224 (regsets_fetch_inferior_registers, linux_send_signal)
14225 (linux_read_auxv): Likewise. Update the types of variables holding
14226 PIDs. Update format string specifiers.
14227 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14228 * remote-utils.c (prepare_resume_reply): Likewise.
14229 * server.c (cont_thread, general_thread, step_thread)
14230 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14231 unsigned long.
14232 (handle_query): Update format specifiers.
14233 (handle_v_cont, main): Use strtoul for thread IDs.
14234 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14235 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14236 (general_thread, step_thread, thread_from_wait)
14237 (old_thread_from_wait): Update.
14238 * target.h (struct thread_resume): Use unsigned long for THREAD.
14239 (struct target_ops): Use unsigned long for arguments to attach and
14240 thread_alive.
14241
dcdb98d2
DJ
142422005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14243
14244 * acinclude.m4: Include bfd/bfd.m4 directly.
14245 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14246 <agriffis@toolchain.org>.
14247 * aclocal.m4, configure: Regenerated.
14248
bec39cab
AC
142492005-01-07 Andrew Cagney <cagney@gnu.org>
14250
14251 * configure.ac: Rename configure.in, require autoconf 2.59.
14252 * configure: Re-generate.
14253
434c4c77
DJ
142542004-12-08 Daniel Jacobowitz <dan@debian.org>
14255
14256 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14257 LIBS when finished.
14258 * aclocal.m4: Regenerated.
14259 * configure: Regenerated.
14260
db1d3e1b
AS
142612004-11-21 Andreas Schwab <schwab@suse.de>
14262
14263 * linux-m68k-low.c (m68k_num_gregs): Define.
14264 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14265 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14266 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14267 (m68k_breakpoint_at): New. Add to the_low_target.
14268
14269 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14270 srv_linux_thread_db to yes.
14271
43360365
JB
142722004-10-20 Joel Brobecker <brobecker@gnat.com>
14273
14274 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14275 (ARCH_SET_FS): Likewise.
14276 (ARCH_GET_FS): Likewise.
14277 (ARCH_GET_GS): Likewise.
14278
fd500816
DJ
142792004-10-16 Daniel Jacobowitz <dan@debian.org>
14280
14281 * linux-i386-low.c (ps_get_thread_area): New.
14282 * linux-x86-64-low.c (ps_get_thread_area): New.
14283 * linux-low.c: Include <sys/syscall.h>.
14284 (linux_kill_one_process): Don't kill the first thread here.
14285 (linux_kill): Kill the first thread here.
14286 (kill_lwp): New function.
14287 (send_sigstop, linux_send_signal): Use it.
14288 * proc-service.c: Clean up #ifdefs.
14289 (fpregset_info): Delete.
14290 (ps_lgetregs): Update and enable implementation.
14291 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14292 implementations.
14293 * remote-utils.c (struct sym_cache, symbol_cache): New.
14294 (input_interrupt): Print a clearer message.
14295 (async_io_enabled): New variable.
14296 (enable_async_io, disable_async_io): Use it. Update comments.
14297 (look_up_one_symbol): Use the symbol cache.
14298 * thread-db.c (thread_db_look_up_symbols): New function.
14299 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14300
f6de3c42
DJ
143012004-10-16 Daniel Jacobowitz <dan@debian.org>
14302
14303 * configure.in: Test for -rdynamic.
14304 * configure: Regenerated.
14305 * Makefile (INTERNAL_LDFLAGS): New.
14306 (gdbserver, gdbreplay): Use it.
14307
2c0fc042
AC
143082004-09-02 Andrew Cagney <cagney@gnu.org>
14309
14310 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14311
075b3282
DJ
143122004-03-23 Daniel Jacobowitz <drow@mvista.com>
14313
14314 * linux-low.c (linux_wait): Clear all_processes list also.
14315
fa6a77dc
DJ
143162004-03-12 Daniel Jacobowitz <drow@mvista.com>
14317
14318 * linux-low.c: Include <errno.h>. Remove extern declaration of
14319 errno.
14320
6d782a97
DJ
143212004-03-12 Daniel Jacobowitz <drow@mvista.com>
14322
14323 * gdbreplay.c, server.h, utils.c: Update copyright years.
14324
3a7fb99b
DJ
143252004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14326
14327 * server.c (main): Print child status or termination signal from
14328 variable 'signal', not 'sig'.
14329
c3e735a6
DJ
143302004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14331
14332 * linux-low.c (linux_read_memory): Change return type to
14333 int. Check for and return error from ptrace().
14334 * target.c (read_inferior_memory): Change return type to int. Pass
14335 back return status from the_target->read_memory().
14336 * target.h (struct target_ops): Adapt *read_memory() prototype.
14337 Update comment.
14338 (read_inferior_memory): Adapt prototype.
14339 * server.c (main): Return an error packet if
14340 read_inferior_memory() returns an error.
14341
a59d1c82
DJ
143422004-03-04 Daniel Jacobowitz <drow@mvista.com>
14343
14344 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14345 Unify with other clean targets.
14346
dc3f8883
DJ
143472004-02-29 Daniel Jacobowitz <drow@mvista.com>
14348
14349 * server.c (handle_v_cont): Call set_desired_inferior.
14350
89a208da
DJ
143512004-02-29 Daniel Jacobowitz <drow@mvista.com>
14352
14353 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14354
62ea82f5
DJ
143552004-02-29 Daniel Jacobowitz <drow@mvista.com>
14356
14357 * linux-low.c (linux_wait): Unblock async I/O.
14358 (linux_resume): Block and enable async I/O.
14359 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14360 * server.h (block_async_io, unblock_async_io): Add prototypes.
14361
6910d122
DJ
143622004-02-29 Daniel Jacobowitz <drow@mvista.com>
14363
14364 * remote-utils.c (remote_open): Print a status notice after
14365 opening a TCP port.
14366 * server.c (attach_inferior): Print a status notice after
14367 attaching.
14368
143692004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14370
14371 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14372
c89dc5d4
DJ
143732004-02-26 Daniel Jacobowitz <drow@mvista.com>
14374
14375 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14376 error packet.
14377 * server.c, target.h: Update copyright years.
14378
4b8dad4a
RM
143792004-02-25 Roland McGrath <roland@redhat.com>
14380
14381 * target.h (struct target_ops): New member `read_auxv'.
14382 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14383 * linux-low.c (linux_read_auxv): New function.
14384 (linux_target_ops): Initialize `read_auxv' member to that.
14385
d7446758
JB
143862004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14387
14388 Committed by Jim Blandy <jimb@redhat.com>.
14389
14390 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14391 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14392 instead of GPR_SIZE to distiguish s390 and s390x targets.
14393
5544ad89
DJ
143942004-01-31 Daniel Jacobowitz <drow@mvista.com>
14395
14396 * linux-low.c: Update copyright year.
14397 (check_removed_breakpoint): Clear pending_is_breakpoint.
14398 (linux_set_resume_request, linux_queue_one_thread)
14399 (resume_status_pending_p): New functions.
14400 (linux_continue_one_thread): Use process->resume.
14401 (linux_resume): Only resume threads if there are no pending events.
14402 * linux-low.h (struct process_info): Add resume request
14403 pointer.
14404
2a68b70e
DJ
144052004-01-30 Daniel Jacobowitz <drow@mvista.com>
14406
14407 * regcache.c (new_register_cache): Clear the allocated register
14408 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14409
64386c31
DJ
144102003-10-13 Daniel Jacobowitz <drow@mvista.com>
14411
14412 * linux-low.c (linux_resume): Take a struct thread_resume *
14413 argument.
14414 (linux_wait): Update call.
14415 (resume_ptr): New static variable.
14416 (linux_continue_one_thread): Renamed from
14417 linux_continue_one_process. Use resume_ptr.
14418 (linux_resume): Use linux_continue_one_thread.
14419 * server.c (handle_v_cont, handle_v_requests): New functions.
14420 (myresume): New function.
14421 (main): Handle 'v' case.
14422 * target.h (struct thread_resume): New type.
14423 (struct target_ops): Change argument of "resume" to struct
14424 thread_resume *.
14425 (myresume): Delete macro.
14426
c938e9b0
L
144272003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14428
14429 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14430 (uninstall): Support DESTDIR.
14431
7f313d07
BC
14432Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14433
14434 * configure.srv: Add xscale*linux copy of arm*linux entry.
14435
3b2fc2ea
DJ
144362003-07-24 Daniel Jacobowitz <drow@mvista.com>
14437
14438 * linux-arm-low.c (arm_reinsert_addr): New function.
14439 (the_low_target): Add arm_reinsert_addr.
14440
1c0a559e
MK
144412003-07-08 Mark Kettenis <kettenis@gnu.org>
14442
14443 * mem-break.c: Remove whitespace at end of file.
14444
43d5792c
DJ
144452003-06-28 Daniel Jacobowitz <drow@mvista.com>
14446
14447 * configure.in: Check whether we need to prototype strerror.
14448 * server.h: Optionally prototype strerror.
14449 * gdbreplay.c (perror_with_name): Use strerror.
14450 * linux-low.c (linux_attach_lwp): Use strerror.
14451 * utils.c (perror_with_name): Use strerror.
14452 * config.in, configure: Regenerated.
14453
c8a86edf
DJ
144542003-06-28 Daniel Jacobowitz <drow@mvista.com>
14455
14456 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14457 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14458
73d37363
DJ
144592003-06-20 Daniel Jacobowitz <drow@mvista.com>
14460
14461 * Makefile.in (SFILES): Update.
14462 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14463 low-sun3.c: Remove files.
14464
6ad8ae5c
DJ
144652003-06-17 Daniel Jacobowitz <drow@mvista.com>
14466
14467 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14468 (linux_detach_one_process, linux_detach): New functions.
14469 (linux_target_ops): Add linux_detach.
14470 * server.c (main): Handle 'D' packet.
14471 * target.h (struct target_ops): Add "detach" member.
14472 (detach_inferior): Define.
14473
1581182a
MK
144742003-06-13 Mark Kettenis <kettenis@gnu.org>
14475
14476 From Kelley Cook <kelleycook@wideopenwest.com>:
14477 * configure.srv: Accept i[34567]86 variants.
14478
e5379b03
DJ
144792003-06-05 Daniel Jacobowitz <drow@mvista.com>
14480
14481 * linux-low.c (linux_wait_for_event): Correct comment typos.
14482 (linux_resume_one_process): Call check_removed_breakpoint.
14483 (linux_send_signal): New function.
14484 (linux_target_ops): Add linux_send_signal.
14485 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14486 of kill.
14487 * target.h (struct target_ops): Add send_signal.
14488
2ff29de4
JB
144892003-05-29 Jim Blandy <jimb@redhat.com>
14490
14491 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14492 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14493 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14494 away part of the register's value.
14495
254787d4
DJ
144962003-03-26 Daniel Jacobowitz <drow@mvista.com>
14497
14498 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14499 (linux_wait_for_event, linux_init_signals): Likewise.
14500
94e10508
DJ
145012003-03-17 Daniel Jacobowitz <drow@mvista.com>
14502
14503 * configure.in: Check for stdlib.h.
14504 * configure: Regenerated.
14505 * config.in: Regenerated.
14506
4c0711e0
DJ
145072003-01-04 Andreas Schwab <schwab@suse.de>
14508
14509 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14510
ef66e766
AC
145112003-01-02 Andrew Cagney <ac131313@redhat.com>
14512
14513 * Makefile.in: Remove obsolete code.
14514
a1358604
DJ
145152002-11-20 Daniel Jacobowitz <drow@mvista.com>
14516
14517 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14518 defined(PT_FPR0_HI).
14519
23ce3b1c
DJ
145202002-11-17 Stuart Hughes <seh@zee2.com>
14521
14522 * linux-arm-low.c (arm_num_regs): Increase.
14523 (arm_regmap): Include status register.
14524
145252002-11-17 Daniel Jacobowitz <drow@mvista.com>
14526
14527 * linux-low.c (register_addr): Remove incorrect -1 check.
14528
a9fa9f7d
DJ
145292002-08-29 Daniel Jacobowitz <drow@mvista.com>
14530
14531 * linux-low.c (linux_create_inferior): Call setpgid. Return
14532 the new PID.
14533 (unstopped_p, linux_signal_pid): Remove.
14534 (linux_target_ops): Remove linux_signal_pid.
14535 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14536 global instead of target method.
14537 * target.h (struct target_ops): Remove signal_pid. Update comment
14538 for create_inferior.
14539 * server.c (signal_pid): New variable.
14540 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14541 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14542 (attach_inferior): Set signal_pid.
14543
17574093
DJ
145442002-08-23 Daniel Jacobowitz <drow@mvista.com>
14545
14546 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14547
145482002-08-20 Jim Blandy <jimb@redhat.com>
14549
14550 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14551 default for this.
14552
145532002-08-01 Andrew Cagney <cagney@redhat.com>
14554
14555 * Makefile.in: Make chill references obsolete.
14556
145572002-07-24 Kevin Buettner <kevinb@redhat.com>
14558
14559 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14560 * configure: Regenerate.
14561 * config.in: Regenerate.
14562
145632002-07-09 David O'Brien <obrien@FreeBSD.org>
14564
14565 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14566 (perror_with_name, remote_close, remote_open, expect, play): Static.
14567
145682002-07-04 Michal Ludvig <mludvig@suse.cz>
14569
4b8dad4a 14570 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14571 byte offsets instead of an array of indexes.
14572 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14573
145742002-06-13 Daniel Jacobowitz <drow@mvista.com>
14575
14576 * regcache.c: Add comment.
14577
145782002-06-11 Daniel Jacobowitz <drow@mvista.com>
14579
14580 * thread-db.c: New file.
14581 * proc-service.c: New file.
14582 * acinclude.m4: New file.
14583 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14584 proc-service.o, and thread-db.o.
14585 (linux-low.o): Add USE_THREAD_DB.
14586 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14587 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14588 * aclocal.m4: Regenerated.
14589 * config.in: Regenerated.
14590 * configure: Regenerated.
14591 * configure.in: Check for proc_service.h, sys/procfs.h,
14592 thread_db.h, and linux/elf.h headrs.
14593 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14594 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14595 Check for -lthread_db and thread support.
14596 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14597 PowerPC, and SuperH.
14598 * i387-fp.c: Constify arguments.
14599 * i387-fp.h: Likewise.
14600 * inferiors.c: (struct thread_info): Renamed from
14601 `struct inferior_info'. Remove PID member. Use generic inferior
14602 list header. All uses updated.
14603 (inferiors, signal_pid): Removed.
14604 (all_threads): New variable.
14605 (get_thread): Define.
14606 (add_inferior_to_list): New function.
14607 (for_each_inferior): New function.
14608 (change_inferior_id): New function.
14609 (add_inferior): Removed.
14610 (remove_inferior): New function.
14611 (add_thread): New function.
14612 (free_one_thread): New function.
14613 (remove_thread): New function.
14614 (clear_inferiors): Use for_each_inferior and free_one_thread.
14615 (find_inferior): New function.
14616 (find_inferior_id): New function.
14617 (inferior_target_data): Update argument type.
14618 (set_inferior_target_data): Likewise.
14619 (inferior_regcache_data): Likewise.
14620 (set_inferior_regcache_data): Likewise.
14621 * linux-low.c (linux_bp_reinsert): Remove.
14622 (all_processes, stopping_threads, using_thrads)
14623 (struct pending_signals, debug_threads, pid_of): New.
14624 (inferior_pid): Replace with macro.
14625 (struct inferior_linux_data): Remove.
14626 (get_stop_pc, add_process): New functions.
14627 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14628 Use add_process and add_thread.
14629 (linux_attach_lwp): New function, based on old linux_attach. Use
14630 add_process and add_thread. Set stop_expected for new threads.
14631 (linux_attach): New function.
14632 (linux_kill_one_process): New function.
14633 (linux_kill): Kill all LWPs.
14634 (linux_thread_alive): Use find_inferior_id.
14635 (check_removed_breakpoints, status_pending_p): New functions.
14636 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14637 Update. Use WNOHANG. Wait for cloned processes also. Update process
14638 struct for the found process.
14639 (linux_wait_for_event): New function.
14640 (linux_wait): Use it. Support LWPs.
14641 (send_sigstop, wait_for_sigstop, stop_all_processes)
14642 (linux_resume_one_process, linux_continue_one_process): New functions.
14643 (linux_resume): Support LWPs.
14644 (REGISTER_RAW_SIZE): Remove.
14645 (fetch_register): Use register_size instead. Call supply_register.
14646 (usr_store_inferior_registers): Likewise. Call collect_register.
14647 Fix recursive case.
14648 (regsets_fetch_inferior_registers): Improve error message.
14649 (regsets_store_inferior_registers): Add debugging.
14650 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14651 (unstopped_p, linux_signal_pid): New functions.
14652 (linux_target_ops): Add linux_signal_pid.
14653 (linux_init_signals): New function.
14654 (initialize_low): Call it. Initialize using_threads.
14655 * regcache.c (inferior_regcache_data): Add valid
14656 flag.
14657 (get_regcache): Fetch registers lazily. Add fetch argument
14658 and update all callers.
14659 (regcache_invalidate_one, regcache_invalidate): New
14660 functions.
14661 (new_register_cache): Renamed from create_register_cache.
14662 Return the new regcache.
14663 (free_register_cache): Change argument to a void *.
14664 (registers_to_string, registers_from_string): Call get_regcache
14665 with fetch flag set.
14666 (register_data): Make static. Pass fetch flag to get_regcache.
14667 (supply_register): Call get_regcache with fetch flag clear.
14668 (collect_register): Call get_regcache with fetch flag set.
14669 (collect_register_as_string): New function.
14670 * regcache.h: Update.
14671 * remote-utils.c (putpkt): Flush after debug output and use
14672 stderr.
14673 Handle input interrupts while waiting for an ACK.
14674 (input_interrupt): Use signal_pid method.
14675 (getpkt): Flush after debug output and use stderr.
14676 (outreg): Use collect_register_as_string.
14677 (new_thread_notify, dead_thread_notify): New functions.
14678 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14679 and general_thread.
14680 (look_up_one_symbol): Flush after debug output.
14681 * server.c (step_thread, server_waiting): New variables.
14682 (start_inferior): Don't use signal_pid. Update call to mywait.
14683 (attach_inferior): Update call to mywait.
14684 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14685 (main): Don't fetch/store registers explicitly. Use
14686 set_desired_inferior. Support proposed ``Hs'' packet. Update
14687 calls to mywait.
14688 * server.h: Update.
14689 (struct inferior_list, struct_inferior_list_entry): New.
14690 * target.c (set_desired_inferior): New.
14691 (write_inferior_memory): Constify.
14692 (mywait): New function.
14693 * target.h: Update.
14694 (struct target_ops): New signal_pid method.
14695 (mywait): Removed macro, added prototype.
14696
14697 * linux-low.h (regset_func): Removed.
14698 (regset_fill_func, regset_store_func): New.
14699 (enum regset_type): New.
14700 (struct regset_info): Add type field. Use new operation types.
14701 (struct linux_target_ops): stop_pc renamed to get_pc.
14702 Add decr_pc_after_break and breakpoint_at.
14703 (get_process, get_thread_proess, get_process_thread)
14704 (strut process_info, all_processes, linux_attach_lwp)
14705 (thread_db_init): New.
14706
14707 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14708 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14709 (the_low_target): Add new members.
14710 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14711 (i386_store_fpxregset): Constify.
14712 (target_regsets): Add new kind identifier.
14713 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14714 (i386_set_pc): Add debugging.
14715 (i386_breakpoint_at): New function.
14716 (the_low_target): Add new members.
14717 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14718 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14719 (mips_breakpoint_at): New.
14720 (the_low_target): Add new members.
14721 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14722 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14723 (the_low_target): Add new members.
14724 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14725 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14726 (the_low_target): Add new members.
14727 * linux-x86-64-low.c (target_regsets): Add new kind
14728 identifier.
14729
147302002-05-15 Daniel Jacobowitz <drow@mvista.com>
14731
14732 From Martin Pool <mbp@samba.org>:
14733 * server.c (gdbserver_usage): New function.
14734 (main): Call it.
14735
147362002-05-14 Daniel Jacobowitz <drow@mvista.com>
14737
14738 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14739 stop_at -> stop_pc.
14740
147412002-05-04 Andrew Cagney <ac131313@redhat.com>
14742
14743 * Makefile.in: Remove obsolete code.
14744
147452002-04-24 Michal Ludvig <mludvig@suse.cz>
14746
14747 * linux-low.c (regsets_fetch_inferior_registers),
14748 (regsets_store_inferior_registers): Removed cast to int from
14749 ptrace() calls.
14750 * regcache.h: Added declaration of struct inferior_info.
14751
147522002-04-20 Daniel Jacobowitz <drow@mvista.com>
14753
14754 * inferiors.c (struct inferior_info): Add regcache_data.
14755 (add_inferior): Call create_register_cache.
14756 (clear_inferiors): Call free_register_cache.
14757 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14758 * regcache.c (struct inferior_regcache_data): New.
14759 (registers): Remove.
14760 (get_regcache): New function.
14761 (create_register_cache, free_register_cache): New functions.
14762 (set_register_cache): Don't initialize the register cache here.
14763 (registers_to_string, registers_from_string, register_data): Call
14764 get_regcache.
14765 * regcache.h: Add prototypes.
14766 * server.h: Likewise.
14767
147682002-04-20 Daniel Jacobowitz <drow@mvista.com>
14769
14770 * mem-break.c: New file.
14771 * mem-break.h: New file.
14772 * Makefile.in: Add mem-break.o rule; update server.h
14773 dependencies.
14774 * inferiors.c (struct inferior_info): Add target_data
14775 member.
14776 (clear_inferiors): Free target_data member if set.
14777 (inferior_target_data, set_inferior_target_data): New functions.
14778 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14779 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14780 * linux-low.c (linux_bp_reinsert): New variable.
14781 (struct inferior_linux_data): New.
14782 (linux_create_inferior): Use set_inferior_target_data.
14783 (linux_attach): Likewise. Call add_inferior.
14784 (linux_wait_for_one_inferior): New function.
14785 (linux_wait): Call it.
14786 (linux_write_memory): Add const.
14787 (initialize_low): Call set_breakpoint_data.
14788 * linux-low.h (struct linux_target_ops): Add breakpoint
14789 handling members.
14790 * server.c (attach_inferior): Remove extra add_inferior
14791 call.
14792 * server.h: Include mem-break.h. Update inferior.c
14793 prototypes.
14794 * target.c (read_inferior_memory)
14795 (write_inferior_memory): New functions.
14796 * target.h (read_inferior_memory)
14797 (write_inferior_memory): Change macros to prototypes.
14798 (struct target_ops): Update comments. Add const to write_memory
14799 definition.
14800
148012002-04-11 Daniel Jacobowitz <drow@mvista.com>
14802
14803 * linux-low.c (usr_store_inferior_registers): Support
14804 registers which are allowed to fail to store.
14805 * linux-low.h (linux_target_ops): Likewise.
14806 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14807 (ppc_cannot_store_register): FPSCR may not be storable.
14808
148092002-04-09 Daniel Jacobowitz <drow@mvista.com>
14810
14811 * server.h: Include <string.h> if HAVE_STRING_H.
14812 * ChangeLog: Correct paths in last ChangeLog entry.
14813
148142002-04-09 Daniel Jacobowitz <drow@mvista.com>
14815
14816 * linux-low.h: Remove obsolete prototypes.
14817 (struct linux_target_ops): New.
14818 (extern the_low_target): New.
14819 * linux-low.c (num_regs, regmap): Remove declarations.
14820 (register_addr): Use the_low_target explicitly.
14821 (fetch_register): Likewise.
14822 (usr_fetch_inferior_registers): Likewise.
14823 (usr_store_inferior_registers): Likewise.
14824 * linux-arm-low.c (num_regs): Remove.
14825 (arm_num_regs): Define.
14826 (arm_regmap): Renamed from regmap, made static.
14827 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14828 made static.
14829 (arm_cannot_store_register): Renamed from cannot_store_register,
14830 made static.
14831 (the_low_target): New.
14832 * linux-i386-low.c (num_regs): Remove.
14833 (i386_num_regs): Define.
14834 (i386_regmap): Renamed from regmap, made static.
14835 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14836 made static.
14837 (i386_cannot_store_register): Renamed from cannot_store_register,
14838 made static.
14839 (the_low_target): New.
14840 * linux-ia64-low.c (num_regs): Remove.
14841 (ia64_num_regs): Define.
14842 (ia64_regmap): Renamed from regmap, made static.
14843 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14844 made static.
14845 (ia64_cannot_store_register): Renamed from cannot_store_register,
14846 made static.
14847 (the_low_target): New.
14848 * linux-m68k-low.c (num_regs): Remove.
14849 (m68k_num_regs): Define.
14850 (m68k_regmap): Renamed from regmap, made static.
14851 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14852 made static.
14853 (m68k_cannot_store_register): Renamed from cannot_store_register,
14854 made static.
14855 (the_low_target): New.
14856 * linux-mips-low.c (num_regs): Remove.
14857 (mips_num_regs): Define.
14858 (mips_regmap): Renamed from regmap, made static.
14859 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14860 made static.
14861 (mips_cannot_store_register): Renamed from cannot_store_register,
14862 made static.
14863 (the_low_target): New.
14864 * linux-ppc-low.c (num_regs): Remove.
14865 (ppc_num_regs): Define.
14866 (ppc_regmap): Renamed from regmap, made static.
14867 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14868 made static.
14869 (ppc_cannot_store_register): Renamed from cannot_store_register,
14870 made static.
14871 (the_low_target): New.
14872 * linux-s390-low.c (num_regs): Remove.
14873 (s390_num_regs): Define.
14874 (s390_regmap): Renamed from regmap, made static.
14875 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14876 made static.
14877 (s390_cannot_store_register): Renamed from cannot_store_register,
14878 made static.
14879 (the_low_target): New.
14880 * linux-sh-low.c (num_regs): Remove.
14881 (sh_num_regs): Define.
14882 (sh_regmap): Renamed from regmap, made static.
14883 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14884 made static.
14885 (sh_cannot_store_register): Renamed from cannot_store_register,
14886 made static.
14887 (the_low_target): New.
14888 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14889 (the_low_target): New.
14890
148912002-04-09 Daniel Jacobowitz <drow@mvista.com>
14892
14893 * Makefile.in: Add stamp-h target.
14894 * configure.in: Create stamp-h.
14895 * configure: Regenerated.
14896
148972002-04-09 Daniel Jacobowitz <drow@mvista.com>
14898
14899 * inferiors.c: New file.
14900 * target.c: New file.
14901 * target.h: New file.
14902 * Makefile.in: Add target.o and inferiors.o. Update
14903 dependencies.
14904 * linux-low.c (inferior_pid): New static variable,
14905 moved from server.c.
14906 (linux_create_inferior): Renamed from create_inferior.
14907 Call add_inferior. Return 0 on success instead of a PID.
14908 (linux_attach): Renamed from myattach.
14909 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14910 (linux_thread_alive): Renamed from mythread_alive.
14911 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14912 child dies.
14913 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14914 (regsets_store_inferior_registers): Correct error message.
14915 Add missing ``return 0''.
14916 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14917 (linux_store_registers): Renamed from store_inferior_registers.
14918 (linux_read_memory): Renamed from read_inferior_memory.
14919 (linux_write_memory): Renamed from write_inferior_memory.
14920 (linux_target_ops): New structure.
14921 (initialize_low): Call set_target_ops ().
14922 * remote-utils.c (unhexify): New function.
14923 (hexify): New function.
14924 (input_interrupt): Send signals to ``signal_pid''.
14925 * server.c (inferior_pid): Remove.
14926 (start_inferior): Update create_inferior call.
14927 (attach_inferior): Call add_inferior.
14928 (handle_query): New function.
14929 (main): Call handle_query for `q' packets.
14930 * server.h: Include "target.h". Remove obsolete prototypes.
14931 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14932
149332002-04-09 Daniel Jacobowitz <drow@mvista.com>
14934
14935 * Makefile.in: Add WARN_CFLAGS. Update configury
14936 dependencies.
14937 * configure.in: Check for <string.h>
14938 * configure: Regenerate.
14939 * config.in: Regenerate.
14940 * gdbreplay.c: Include needed system headers.
14941 (remote_open): Remove strchr prototype.
14942 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14943 * regcache.c (supply_register): Change buf argument to const void *.
14944 (supply_register_by_name): Likewise.
14945 (collect_register): Change buf argument to void *.
14946 (collect_register_by_name): Likewise.
14947 * regcache.h: Add missing prototypes.
14948 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14949 * server.c (handle_query): New function.
14950 (attached): New static variable, moved out of main.
14951 (main): Quiet longjmp clobber warnings.
14952 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14953 * utils.c (error): Remove NORETURN.
14954 (fatal): Likewise.
This page took 1.858156 seconds and 4 git commands to generate.