gdbserver: Use pattern rule for IPA objects from common/
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
36bc18a8
SM
12017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4 (print-utils-ipa.o: ../common/print-utils.c): Remove.
5 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
6 (errors-ipa.o: ../common/errors.c): Remove.
7 (format-ipa.o: ../common/format.c): Remove.
8 (common-utils-ipa.o: ../common/common-utils.c): Remove.
9
a8ebe3d5
SM
102017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11
12 * Makefile.in (%-ipa.o: %.c): New rule.
13 (tracepoint-ipa.o: tracepoint.c): Remove.
14 (utils-ipa.o: utils.c): Remove.
15 (remote-utils-ipa.o: remote-utils.c): Remove.
16 (regcache-ipa.o: regcache.c): Remove.
17 (i386-linux-ipa.o: i386-linux.c): Remove.
18 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
19 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
20 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
21 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
22 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
23 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
24 (amd64-linux-ipa.o: amd64-linux.c): Remove.
25 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
26 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
27 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
28 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
29 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
30 (aarch64-ipa.o: aarch64.c): Remove.
31 (s390-linux32-ipa.o: s390-linux32.c): Remove.
32 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
33 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
34 (s390-linux64-ipa.o: s390-linux64.c): Remove.
35 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
36 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
37 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
38 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
39 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
40 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
41 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
42 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
43 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
44 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
45 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
46 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
47 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
48 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
49 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
50 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
51 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
52 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
53 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
54 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
55 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
56 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
57 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
58 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
59 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
60 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
61 (tdesc-ipa.o: tdesc.c): Remove.
62 (x32-linux-ipa.o: x32-linux.c): Remove.
63 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
64 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
65
50cfacb7
SM
662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
67
68 * Makefile.in (%.o: ../arch/%.c): New rule.
69 (arm.o: ../arch/arm.c): Remove.
70 (arm-linux.o: ../arch/arm-linux.c): Remove.
71 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
72 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
73
c5a22423
SM
742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
75
76 * Makefile.in (%.o: ../nat/%.c): New rule.
77 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
78 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
79 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
80 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
81 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
82 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
83 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
84 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
85 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
86 (linux-personality.o: ../nat/linux-personality.c): Remove.
87 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
88 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
89 (x86-linux.o: ../nat/x86-linux.c): Remove.
90 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
91 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
92
6bda016b
SM
932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
94
95 * Makefile.in (%.o: ../common/%.c): New rule.
96 (signals.o: ../common/signals.c): Remove.
97 (print-utils.o: ../common/print-utils.c): Remove.
98 (rsp-low.o: ../common/rsp-low.c): Remove.
99 (common-utils.o: ../common/common-utils.c): Remove.
100 (posix-strerror.o: ../common/posix-strerror.c): Remove.
101 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
102 (vec.o: ../common/vec.c): Remove.
103 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
104 (xml-utils.o: ../common/xml-utils.c): Remove.
105 (ptid.o: ../common/ptid.c): Remove.
106 (buffer.o: ../common/buffer.c): Remove.
107 (format.o: ../common/format.c): Remove.
108 (filestuff.o: ../common/filestuff.c): Remove.
109 (agent.o: ../common/agent.c): Remove.
110 (errors.o: ../common/errors.c): Remove.
111 (environ.o: ../common/environ.c): Remove.
112 (common-debug.o: ../common/common-debug.c): Remove.
113 (cleanups.o: ../common/cleanups.c): Remove.
114 (common-exceptions.o: ../common/common-exceptions.c): Remove.
115 (fileio.o: ../common/fileio.c): Remove.
116 (common-regcache.o: ../common/common-regcache.c): Remove.
117 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
118 (new-op.o: ../common/new-op.c): Remove.
119 (btrace-common.o: ../common/btrace-common.c): Remove.
120
21122961
SM
1212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
122
123 * Makefile.in (%.o: ../target/%.c): New rule.
124 (waitstatus.o: ../target/waitstatus.c): Remove.
125
c362e621
SM
1262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
127
128 * Makefile.in
129 (%.c: ../regformats/%.dat,
130 (%.c: ../regformats/arm/%.dat,
131 (%.c: ../regformats/i386/%.dat,
132 (%.c: ../regformats/rs6000/%.dat): New rules.
133 (aarch64.c): Remove.
134 (reg-arm.c): Remove.
135 (arm-with-iwmmxt.c): Remove.
136 (arm-with-vfpv2.c): Remove.
137 (arm-with-vfpv3.c): Remove.
138 (arm-with-neon.c): Remove.
139 (reg-bfin.c): Remove.
140 (reg-cris.c): Remove.
141 (reg-crisv32.c): Remove.
142 (i386.c): Remove.
143 (i386-linux.c): Remove.
144 (i386-avx.c): Remove.
145 (i386-avx-linux.c): Remove.
146 (i386-avx-avx512.c): Remove.
147 (i386-avx-avx512-linux.c): Remove.
148 (i386-mpx.c): Remove.
149 (i386-mpx-linux.c): Remove.
150 (i386-avx-mpx-avx512-pku.c): Remove.
151 (i386-avx-mpx-avx512-pku-linux.c): Remove.
152 (i386-avx-mpx.c): Remove.
153 (i386-avx-mpx-linux.c): Remove.
154 (i386-mmx.c): Remove.
155 (i386-mmx-linux.c): Remove.
156 (reg-ia64.c): Remove.
157 (reg-m32r.c): Remove.
158 (reg-m68k.c): Remove.
159 (reg-cf.c): Remove.
160 (mips-linux.c): Remove.
161 (mips-dsp-linux.c): Remove.
162 (mips64-linux.c): Remove.
163 (mips64-dsp-linux.c): Remove.
164 (nios2-linux.c): Remove.
165 (powerpc-32.c): Remove.
166 (powerpc-32l.c): Remove.
167 (powerpc-altivec32l.c): Remove.
168 (powerpc-cell32l.c): Remove.
169 (powerpc-vsx32l.c): Remove.
170 (powerpc-isa205-32l.c): Remove.
171 (powerpc-isa205-altivec32l.c): Remove.
172 (powerpc-isa205-vsx32l.c): Remove.
173 (powerpc-e500l.c): Remove.
174 (powerpc-64l.c): Remove.
175 (powerpc-altivec64l.c): Remove.
176 (powerpc-cell64l.c): Remove.
177 (powerpc-vsx64l.c): Remove.
178 (powerpc-isa205-64l.c): Remove.
179 (powerpc-isa205-altivec64l.c): Remove.
180 (powerpc-isa205-vsx64l.c): Remove.
181 (s390-linux32.c): Remove.
182 (s390-linux32v1.c): Remove.
183 (s390-linux32v2.c): Remove.
184 (s390-linux64.c): Remove.
185 (s390-linux64v1.c): Remove.
186 (s390-linux64v2.c): Remove.
187 (s390-te-linux64.c): Remove.
188 (s390-vx-linux64.c): Remove.
189 (s390-tevx-linux64.c): Remove.
190 (s390x-linux64.c): Remove.
191 (s390x-linux64v1.c): Remove.
192 (s390x-linux64v2.c): Remove.
193 (s390x-te-linux64.c): Remove.
194 (s390x-vx-linux64.c): Remove.
195 (s390x-tevx-linux64.c): Remove.
196 (tic6x-c64xp-linux.c): Remove.
197 (tic6x-c64x-linux.c): Remove.
198 (tic6x-c62x-linux.c): Remove.
199 (reg-sh.c): Remove.
200 (reg-sparc64.c): Remove.
201 (reg-spu.c): Remove.
202 (amd64.c): Remove.
203 (amd64-linux.c): Remove.
204 (amd64-avx.c): Remove.
205 (amd64-avx-linux.c): Remove.
206 (amd64-avx-avx512.c): Remove.
207 (amd64-avx-avx512-linux.c): Remove.
208 (amd64-mpx.c): Remove.
209 (amd64-mpx-linux.c): Remove.
210 (amd64-avx-mpx-avx512-pku.c): Remove.
211 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
212 (amd64-avx-mpx.c): Remove.
213 (amd64-avx-mpx-linux.c): Remove.
214 (x32.c): Remove.
215 (x32-linux.c): Remove.
216 (x32-avx.c): Remove.
217 (x32-avx-linux.c): Remove.
218 (x32-avx-avx512.c): Remove.
219 (x32-avx-avx512-linux.c): Remove.
220 (reg-xtensa.c): Remove.
221 (reg-tilegx.c): Remove.
222 (reg-tilegx32.c): Remove.
223
1672e0d9
SDJ
2242017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
225
226 * Makefile.in (SFILES): Add "common/environ.c".
227 (OBJS): Add "common/environ.h".
228
239b6d10
WT
2292017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
230
231 * configure.ac: Check if the fs_base and gs_base members of
232 `struct user_regs_struct' exist.
233 * config.in: Regenerated.
234 * configure: Likewise.
235
694b382c
AT
2362017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
237
238 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
239 target_read_memory.
240 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
241 (get_next_pcs_syscall_next_pc): Likewise.
242
7dc53023
LM
2432016-12-23 Luis Machado <lgustavo@codesourcery.com>
244
245 * win32-i386-low.c: Fix incorrect reference to a couple source files.
246 * nto-x86-low.c: Likewise.
247
ad02e4fe
SM
2482016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
249
250 * Makefile.in: Include disable-implicit-rules.mk.
251
dcb07cfa
PA
2522016-11-23 Pedro Alves <palves@redhat.com>
253
254 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
255 (debug_vprintf): Use std::chrono::steady_clock instead of
256 gettimeofday. Use '.' instead of ':'.
257 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
258 (get_timestamp): Use std::chrono::steady_clock instead of
259 gettimeofday.
260
8629c02c
SM
2612016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
262
263 * Makefile.in: Fix whitespace formatting.
264
b593ecca
SM
2652016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
266
267 * Makefile.in (SFILES, OBS): Flatten list and order
268 alphabetically.
269
9986ba08
PA
2702016-11-23 Pedro Alves <palves@redhat.com>
271
272 * event-loop.c (handle_file_event): Use warning.
273 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
274 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
275 Use warning.
276
4eefa7bc
PA
2772016-11-23 Pedro Alves <palves@redhat.com>
278
279 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
280 output.
281 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
282 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
283 debug_printf and debug_flush for debug output.
284 * server.c (handle_general_set): Likewise.
285 * thread-db.c (try_thread_db_load): Use debug_printf for debug
286 output.
287
5443506e
SM
2882016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
289
290 * Makefile.in (.c.o): Replace rule with ...
291 (%.o: %.c): ... this one.
292
3b165252
SM
2932016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
294
295 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
296 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
297 make.
298 * configure.ac: Remove checks for the make program.
299 * configure: Re-generate.
300
0bcda685
PA
3012016-10-28 Pedro Alves <palves@redhat.com>
302
303 * Makefile.in (CXX_DIALECT): Get from configure.
304 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
305 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
306 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
307 * config.in: Regenerate.
308 * configure: Regenerate.
309
c3805894
YQ
3102016-10-27 Yao Qi <yao.qi@linaro.org>
311
312 * linux-low.c (linux_supports_range_stepping): Return true if
313 can_software_single_step return true.
314
89342618
YQ
3152016-10-27 Yao Qi <yao.qi@linaro.org>
316
317 * inferiors.c (find_inferior_in_random): New function.
318 * inferiors.h (find_inferior_in_random): Declare.
319 * linux-low.c (linux_wait_for_event_filtered): Call
320 find_inferior_in_random instead of find_inferior.
321
e3652c84
YQ
3222016-10-27 Yao Qi <yao.qi@linaro.org>
323
324 * linux-low.c (linux_wait_1): If single-step breakpoints are
325 inserted, remove them.
326
5a04c4cf
PA
3272016-10-26 Pedro Alves <palves@redhat.com>
328
329 * linux-low.c (handle_extended_wait): Link parent/child fork
330 threads.
331 (linux_wait_1): Unlink them.
332 (linux_set_resume_request): Ignore resume requests for
333 already-resumed and unhandled fork child threads.
334 * linux-low.h (struct lwp_info) <fork_relative>: New field.
335 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
336 New functions.
337 (handle_v_requests) <vCont>: Don't call require_running.
338 * server.h (in_queued_stop_replies): New declaration.
339
cb93dc7f
YQ
3402016-10-24 Yao Qi <yao.qi@linaro.org>
341
342 PR server/20733
343 * linux-aarch64-low.c (append_insns): Cast the return value to
344 'uint32_t *'.
345
a1078bea
YQ
3462016-10-10 Yao Qi <yao.qi@linaro.org>
347
348 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
349
1fb77080
SDJ
3502016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
351
352 * target.c (target_supports_multi_process): New function, moved
353 from...
354 * target.h (target_supports_multi_process): ... here. Remove
355 macro.
356
39b5a3b9
TT
3572016-10-05 Tom Tromey <tom@tromey.com>
358
359 PR remote/20655:
360 * tracepoint.c (handle_tracepoint_bkpts): Check
361 ipa_error_tracepoint, not ipa_stopping_tracepoint.
362
c1d0b70a
YQ
3632016-10-05 Yao Qi <yao.qi@linaro.org>
364
365 * configure.srv: Update the path of arm-*.xml files.
366
0a69eedb
YQ
3672016-10-05 Terry Guo <terry.guo@arm.com>
368 Yao Qi <yao.qi@linaro.org>
369
370 * Makefile.in: Adjust the path of rules.
371 * configure.srv: Update the path of xml files.
372 * regformats/arm-with-iwmmxt.dat: Regenerated.
373 * regformats/arm-with-neon.dat: Likewise.
374 * regformats/arm-with-vfpv2.dat: Likewise.
375 * regformats/arm-with-vfpv3.dat Likewise.
376
17e16485
YQ
3772016-09-30 Yao Qi <yao.qi@linaro.org>
378
379 PR gdbserver/20627
380 * target.c (target_stop_and_wait): Don't call
381 target_continue_no_signal, use resume_stop instead.
382
edeeb602
YQ
3832016-09-26 Yao Qi <yao.qi@linaro.org>
384
385 * linux-low.c (linux_wait_1): Call debug_exit.
386
503b1c39
PA
3872016-09-23 Pedro Alves <palves@redhat.com>
388
389 * Makefile.in (SFILES): Add common/new-op.c.
390 (OBS): Add common/new-op.o.
391 (new-op.o): New rule.
392
74172ecf
SM
3932016-09-21 Simon Marchi <simon.marchi@ericsson.com>
394
395 * .gitinore: Ignore more files.
396
fc6cda2e
YQ
3972016-09-21 Yao Qi <yao.qi@linaro.org>
398
399 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
400 23.
401
bc1e6c81
SDJ
4022016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
403
404 * server.c (start_inferior): Call target_mourn_inferior instead of
405 mourn_inferior; pass ptid_t argument to it.
406 (resume): Likewise.
407 (handle_target_event): Likewise.
408 * target.c (target_mourn_inferior): New function.
409 * target.h (mourn_inferior): Delete macro.
410
0e00e962
AA
4112016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
412
413 * linux-low.c (lwp_is_stepping): New function.
414
1d8cb77d
CL
4152016-09-06 Carl Love <cel@us.ibm.com>
416
417 * server.c (start_inferior): Fixed comment, requested comment change
418 didn't get updated correctly. Removed reference to ptrace () call as
419 it is only true on Linux systems.
420
7313bced
CL
4212016-09-06 Carl Love <cel@us.ibm.com>
422
423 * server.c (start_inferior): Do not call
424 function target_post_create_inferior () if the
425 inferior process has already exited.
426
cf6de44d
PA
4272016-09-05 Pedro Alves <palves@redhat.com>
428
429 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
430 (COMPILE.pre, CC_LD): Use CXX directly.
431 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
432 * acinclude.m4: Don't include build-with-cxx.m4.
433 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
434 * configure: Regenerate.
435
c1da6748
AT
4362016-09-02 Akash Trehan <akash.trehan123@gmail.com>
437
438 PR gdb/19495
439 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
440 call writing data to own_buf.
441
f2b9e3df
SDJ
4422016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
443
444 * target.c (mywait): Call target_wait instead of
445 the_target->wait.
446 (target_wait): New function.
447
049a8570
SDJ
4482016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
449
450 * server.c (start_inferior): New variable 'ptid'. Replace calls
451 to the_target->resume by target_continue{,_no_signal}, depending
452 on the case.
453 * target.c (target_stop_and_wait): Call target_continue_no_signal
454 instead of the_target->resume.
455 (target_continue): New function.
456
3aa5cfa0
AT
4572016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
458
459 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
460
754653a7
AZ
4612016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
462
463 PR server/20491
464 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
465 ps_prochandle.
466 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
467 * linux-arm-low.c (ps_get_thread_area): Likewise.
468 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
469 * linux-m68k-low.c (ps_get_thread_area): Likewise.
470 * linux-mips-low.c (ps_get_thread_area): Likewise.
471 * linux-nios2-low.c (ps_get_thread_area): Likewise.
472 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
473 * linux-x86-low.c (ps_get_thread_area): Likewise.
474 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
475
ed036b40
PA
4762016-08-19 Pedro Alves <palves@redhat.com>
477
478 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
479
c8ef42ee
PA
4802016-08-19 Pedro Alves <palves@redhat.com>
481
482 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
483 comment. Use memcpy instead of casting through unsigned long.
484
9c235a72
PA
4852016-08-19 Pedro Alves <palves@redhat.com>
486
487 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
488 allocating around 0x80000000.
489
201506da
PA
4902016-08-19 Pedro Alves <palves@redhat.com>
491
492 PR gdb/20415
493 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
494 (x32-avx512-linux-ipa.o): New rules.
495 * configure.ac (x86_64-*-linux*): New x32 check.
496 * configure.srv (ipa_x32_linux_regobj): New.
497 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
498 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
499 descriptions.
500 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
501 descriptions.
502 * configure: Regenerate.
503
f348d89a
PA
5042016-08-09 Pedro Alves <palves@redhat.com>
505
506 PR gdb/18653
507 * Makefile.in (OBS): Add signals-state-save-restore.o.
508 (signals-state-save-restore.o): New rule.
509 * config.in: Regenerate.
510 * configure: Regenerate.
511 * linux-low.c: Include "signals-state-save-restore.h".
512 (linux_create_inferior): Call
513 restore_original_signals_state.
514 * server.c: Include "dispositions-save-restore.h".
515 (captured_main): Call save_original_signals_state.
516
1baf5149
PA
5172016-08-05 Pedro Alves <palves@redhat.com>
518
519 * configure: Regenerate.
520
fcd4a73d
YQ
5212016-08-04 Yao Qi <yao.qi@linaro.org>
522
523 * linux-low.c (regsets_fetch_inferior_registers): Check
524 errno is ESRCH or not.
525
979659d0
YQ
5262016-08-02 Yao Qi <yao.qi@linaro.org>
527
528 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
529 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
530 (thread_db_load_search): Update.
531 (try_thread_db_load_1): Don't look for td_ta_event_addr,
532 td_ta_set_event and td_ta_event_getmsg.
533
6598661d
PA
5342016-07-26 Pedro Alves <palves@redhat.com>
535
536 PR server/20414
537 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
538 of unsigned long for 64-bit registers and use uint32_t instead of
539 unsigned int for 32-bit registers.
540
9cf12d57
PA
5412016-07-26 Pedro Alves <palves@redhat.com>
542
543 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
544 to 'ptrace'.
545
305450ed
TT
5462016-07-21 Tom Tromey <tom@tromey.com>
547
548 * configure: Rebuild.
549
2583da7c
YQ
5502016-07-21 Yao Qi <yao.qi@linaro.org>
551
552 * mem-break.c (find_gdb_breakpoint): Cast bp to
553 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
554
21536b36
YQ
5552016-07-21 Yao Qi <yao.qi@linaro.org>
556
557 * server.c (handle_v_requests): Support s and S actions
558 if target_supports_software_single_step return true.
559
8901d193
YQ
5602016-07-21 Yao Qi <yao.qi@linaro.org>
561
562 * linux-low.c (resume_stopped_resumed_lwps): If resume request
563 is resume_step, call maybe_hw_step.
564 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
565 and unstop them.
566 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
567 breakpoints or not.
568 (proceed_one_lwp): If resume request is resume_step, install
569 reinsert breakpoints and call maybe_hw_step.
570
0e9a339e
YQ
5712016-07-21 Yao Qi <yao.qi@linaro.org>
572
573 * linux-low.c (proceed_one_lwp): Declare.
574 (linux_resume_one_thread): Remove local variable 'step'.
575 Lift code enqueue signal. Call proceed_one_lwp instead of
576 linux_resume_one_lwp.
577
4281b351
YQ
5782016-07-21 Yao Qi <yao.qi@linaro.org>
579
580 * linux-low.c (linux_resume_one_thread): Call
581 enqueue_pending_signal.
582
984a2c04
YQ
5832016-07-21 Yao Qi <yao.qi@linaro.org>
584
585 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
586 * inferiors.c (do_restore_current_thread_cleanup): New function.
587 (make_cleanup_restore_current_thread): Likewise.
588 * linux-low.c (install_software_single_step_breakpoints): Call
589 make_cleanup_restore_current_thread. Switch current_thread to
590 thread.
591
bec903c9
YQ
5922016-07-21 Yao Qi <yao.qi@linaro.org>
593
594 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
595 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
596 (clone_one_breakpoint): Likewise.
597 (delete_reinsert_breakpoints): Change parameter to thread.
598 Callers updated.
599 (has_reinsert_breakpoints): Likewise.
600 (uninsert_reinsert_breakpoints): Likewise.
601 (reinsert_reinsert_breakpoints): Likewise.
602 * mem-break.h (set_reinsert_breakpoint): Update declaration.
603 (delete_reinsert_breakpoints): Likewise.
604 (reinsert_reinsert_breakpoints): Likewise.
605 (uninsert_reinsert_breakpoints): Likewise.
606 (has_reinsert_breakpoints): Likewise.
607
63c40ec7
YQ
6082016-07-21 Yao Qi <yao.qi@linaro.org>
609
610 * inferiors.c (get_thread_process): Make parameter const.
611 * inferiors.h (get_thread_process): Update declaration.
612 * mem-break.c (clone_all_breakpoints): Remove all parameters.
613 Add new parameters child_thread and parent_thread. Callers
614 updated.
615 * mem-break.h (clone_all_breakpoints): Update declaration.
616
9aa76cd0
YQ
6172016-07-21 Yao Qi <yao.qi@linaro.org>
618
619 * mem-break.c (struct breakpoint) <cond_list>: Remove.
620 <command_list, handler>: Remove.
621 (struct gdb_breakpoint): New.
622 (struct other_breakpoint): New.
623 (struct reinsert_breakpoint): New.
624 (is_gdb_breakpoint): New function.
625 (any_persistent_commands): Update command_list if
626 is_gdb_breakpoint returns true.
627 (set_breakpoint): Create breakpoints according to their types.
628 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
629 (set_gdb_breakpoint_1): Likewise.
630 (set_gdb_breakpoint): Likewise.
631 (clear_breakpoint_conditions): Change parameter type to
632 'struct gdb_breakpoint *'.
633 (clear_breakpoint_commands): Likewise.
634 (clear_breakpoint_conditions_and_commands): Likewise.
635 (add_condition_to_breakpoint): Likewise.
636 (add_breakpoint_condition): Likewise.
637 (add_commands_to_breakpoint): Likewise.
638 (check_breakpoints): Check other_breakpoint.
639 (clone_one_breakpoint): Clone breakpopint according to its type.
640 * mem-break.h (struct gdb_breakpoint): Declare.
641 (set_gdb_breakpoint): Update declaration.
642 (clear_breakpoint_conditions_and_commands): Likewise.
643 (add_breakpoint_condition): Likewise.
644 (add_breakpoint_commands): Likewise.
645 * server.c (process_point_options): Change parameter type to
646 'struct gdb_breakpoint *'.
647
811f8301
YQ
6482016-07-21 Yao Qi <yao.qi@linaro.org>
649
650 * mem-break.c (set_breakpoint_at): Rename it to ...
651 (set_breakpoint_type_at): ... it.
652 (set_breakpoint_at): Call set_breakpoint_type_at.
653 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
654 * mem-break.h (set_breakpoint_at): Update comments.
655
b1c51e36
CLT
6562016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
657
658 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
659 to buf parameter.
660 (nios2_store_gregset): Likewise.
661
ced2dffb
PA
6622016-07-01 Pedro Alves <palves@redhat.com>
663 Antoine Tremblay <antoine.tremblay@ericsson.com>
664
665 * linux-low.c: Change interface to take the target lwp_info
666 pointer directly and return void. Handle detaching from a zombie
667 thread.
668 (linux_detach_lwp_callback): New function.
669 (linux_detach): Detach from the leader thread after detaching from
670 the clone threads.
671
2ac09a5b
YQ
6722016-06-28 Yao Qi <yao.qi@linaro.org>
673
674 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
675 for variable new_offset.
676 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
677 (aarch64_ftrace_insn_reloc_cb): Likewise.
678 (aarch64_ftrace_insn_reloc_tb): Likewise.
679 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
680 PRIx64 instead of PRIx32.
681
79e7fd4f
YQ
6822016-06-28 Yao Qi <yao.qi@linaro.org>
683
684 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
685 (the_low_target): Install arm_get_syscall_trapinfo.
686
061fc021
YQ
6872016-06-28 Yao Qi <yao.qi@linaro.org>
688
689 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
690 function.
691 (the_low_target): Install aarch64_get_syscall_trapinfo.
692
4cc32bec
YQ
6932016-06-28 Yao Qi <yao.qi@linaro.org>
694
695 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
696 Callers updated.
697 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
698 Remove parameter sysno.
699 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
700 sysret.
701
782c1122
AA
7022016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
703
704 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
705 (s390_emit_ne_goto): Likewise.
706 (s390_emit_lt_goto): Likewise.
707 (s390_emit_le_goto): Likewise.
708 (s390_emit_gt_goto): Likewise.
709 (s390_emit_ge_goto): Likewise.
710 (s390x_emit_eq_goto): Likewise.
711 (s390x_emit_ne_goto): Likewise.
712 (s390x_emit_lt_goto): Likewise.
713 (s390x_emit_le_goto): Likewise.
714 (s390x_emit_gt_goto): Likewise.
715 (s390x_emit_ge_goto): Likewise.
716 (s390_emit_ops_impl): Mark variable static.
717 (s390x_emit_ops): Likewise.
718
2e7b624b
YQ
7192016-06-17 Yao Qi <yao.qi@linaro.org>
720
721 * linux-low.c (handle_extended_wait): Call
722 uninsert_reinsert_breakpoints for the parent process. Remove
723 reinsert breakpoints from the child process. Reinsert them to
724 the parent process when vfork is done.
725 * mem-break.c (uninsert_reinsert_breakpoints): New function.
726 (reinsert_reinsert_breakpoints): New function.
727 * mem-break.h (uninsert_reinsert_breakpoints): Declare
728 (reinsert_reinsert_breakpoints): Declare.
729
8a81c5d7
YQ
7302016-06-17 Yao Qi <yao.qi@linaro.org>
731
732 * linux-low.c (handle_extended_wait): If the parent is doing
733 step-over, remove the reinsert breakpoints from the forked child.
734
f50bf8e5
YQ
7352016-06-17 Yao Qi <yao.qi@linaro.org>
736
737 * linux-low.c (unsuspend_all_lwps): Declare.
738 (linux_low_filter_event): If thread exited, call finish_step_over.
739 If step-over is finished, unsuspend other threads.
740
8376a3cb
YQ
7412016-06-17 Yao Qi <yao.qi@linaro.org>
742
743 * linux-low.c (linux_resume_one_lwp_throw): Assert
744 has_reinsert_breakpoints returns false.
745 * mem-break.c (delete_disabled_breakpoints): Assert
746 bp type isn't reinsert_breakpoint.
747
f79b145d
YQ
7482016-06-17 Yao Qi <yao.qi@linaro.org>
749
750 * linux-low.c (maybe_hw_step): New function.
751 (linux_resume_one_lwp_throw): Call maybe_hw_step.
752 (finish_step_over): Switch current_thread to lwp temporarily,
753 and assert has_reinsert_breakpoints returns true.
754 (proceed_one_lwp): Call maybe_hw_step.
755 * mem-break.c (has_reinsert_breakpoints): New function.
756 * mem-break.h (has_reinsert_breakpoints): Declare.
757
0ae534d2
JT
7582016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
759
760 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
761
fcdad592
YQ
7622016-05-17 Yao Qi <yao.qi@linaro.org>
763
764 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
765 instead of find_inferior.
766
9e784964
YQ
7672016-05-05 Yao Qi <yao.qi@linaro.org>
768
769 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
770 Initialize res to zero.
771
cf2ebb6e
YQ
7722016-05-05 Yao Qi <yao.qi@linaro.org>
773
774 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
775 to uint32_t.
776
c1aebf87
UW
7772016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
778
779 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
780 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
781 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
782
35fd2deb 7832016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 784 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
785
786 * tracepoint.c (write_inferior_int8): New function.
787 (cmd_qtenable_disable): Write enable flag using
788 write_inferior_int8.
789
484b3c32
YQ
7902016-04-25 Yao Qi <yao.qi@linaro.org>
791
792 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
793 (need_step_over_p): Return zero if the LWP has pending signals
794 can be delivered on software single step target.
795
85ba7d86
YQ
7962016-04-25 Yao Qi <yao.qi@linaro.org>
797
798 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
799 return instead of error.
800
3539aa13
YQ
8012016-04-22 Yao Qi <yao.qi@linaro.org>
802
803 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
804 to 23.
805
5b061e98
YQ
8062016-04-22 Yao Qi <yao.qi@linaro.org>
807
808 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
809 signal when stepping over breakpoint with software single
810 step.
811
3451269c
PA
8122016-04-21 Pedro Alves <palves@redhat.com>
813
814 * linux-s390-low.c (s390_collect_ptrace_register)
815 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
816 add casts.
817 (s390_check_regset): Use void * instead of gdb_byte *.
818
a2358508
PA
8192016-04-20 Pedro Alves <palves@redhat.com>
820
821 * configure: Renegerate.
822
6885166d
YQ
8232016-04-20 Yao Qi <yao.qi@linaro.org>
824
825 * linux-aarch32-low.c: Include "arch/arm-linux.h".
826 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
827 number 16.
828 (arm_store_gregset): Likewise.
829
2b863f51
WT
8302016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
831
832 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
833 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
834 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
835 (amd64-avx-mpx-linux.c): New rules.
836 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
837 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
838 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
839 (srv_amd64_regobj): Add amd64-avx-mpx.o.
840 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
841 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
842 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
843 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
844 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
845 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
846 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
847 * linux-x86-low.c (x86_linux_read_description): Add case for
848 X86_XSTATE_AVX_MPX_MASK.
849 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
850 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
851 init_registers_i386_avx_mpx_linux.
852 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
853 (initialize_low_tracepoint): Call
854 init_registers_i386_avx_mpx_linux.
855 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
856 (initialize_low_tracepoint): Call
857 init_registers_amd64_avx_mpx_linux.
858 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
859 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
860 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
861 declarations.
862
9b30624b
PA
8632016-04-18 Pedro Alves <palves@redhat.com>
864
865 * configure: Regenerate.
866
45e3745e
AT
8672016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
868
869 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
870 (aarch64_emit_sub): Likewise.
871
2afc13ff
PA
8722016-04-12 Pedro Alves <palves@redhat.com>
873
874 * utils.c (prepare_to_throw_exception): Delete.
875
6e774b13
SM
8762016-04-05 Simon Marchi <simon.marchi@ericsson.com>
877
878 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
879
4dca19f8
MK
8802016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
881
882 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
883
d0a9981f
MK
8842016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
885
886 * linux-aarch64-ipa.c: Add <elf.h> include.
887 * linux-ppc-ipa.c: Add <elf.h> include.
888 * linux-s390-ipa.c: Add <elf.h> include.
889
252db07e
MK
8902016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
891
892 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
893 (get_raw_reg_ptr): Likewise.
894 (get_trace_state_variable_value_ptr): Likewise.
895 (set_trace_state_variable_value_ptr): Likewise.
896 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
897 char *.
898
14e2b6d9
MK
8992016-03-31 Wei-cheng Wang <cole945@gmail.com>
900 Marcin Kościelnicki <koriakin@0x04.net>
901
902 PR/17221
903 * linux-ppc-low.c (emit_insns): New function.
904 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
905 (ppc_emit_prologue): New function.
906 (ppc_emit_epilogue): New function.
907 (ppc_emit_add): New function.
908 (ppc_emit_sub): New function.
909 (ppc_emit_mul): New function.
910 (ppc_emit_lsh): New function.
911 (ppc_emit_rsh_signed): New function.
912 (ppc_emit_rsh_unsigned): New function.
913 (ppc_emit_ext): New function.
914 (ppc_emit_zero_ext): New function.
915 (ppc_emit_log_not): New function.
916 (ppc_emit_bit_and): New function.
917 (ppc_emit_bit_or): New function.
918 (ppc_emit_bit_xor): New function.
919 (ppc_emit_bit_not): New function.
920 (ppc_emit_equal): New function.
921 (ppc_emit_less_signed): New function.
922 (ppc_emit_less_unsigned): New function.
923 (ppc_emit_ref): New function.
924 (ppc_emit_const): New function.
925 (ppc_emit_reg): New function.
926 (ppc_emit_pop): New function.
927 (ppc_emit_stack_flush): New function.
928 (ppc_emit_swap): New function.
929 (ppc_emit_stack_adjust): New function.
930 (ppc_emit_call): New function.
931 (ppc_emit_int_call_1): New function.
932 (ppc_emit_void_call_2): New function.
933 (ppc_emit_if_goto): New function.
934 (ppc_emit_goto): New function.
935 (ppc_emit_eq_goto): New function.
936 (ppc_emit_ne_goto): New function.
937 (ppc_emit_lt_goto): New function.
938 (ppc_emit_le_goto): New function.
939 (ppc_emit_gt_goto): New function.
940 (ppc_emit_ge_goto): New function.
941 (ppc_write_goto_address): New function.
942 (ppc_emit_ops_impl): New static variable.
943 (ppc64v1_emit_prologue): New function.
944 (ppc64v2_emit_prologue): New function.
945 (ppc64_emit_epilogue): New function.
946 (ppc64_emit_add): New function.
947 (ppc64_emit_sub): New function.
948 (ppc64_emit_mul): New function.
949 (ppc64_emit_lsh): New function.
950 (ppc64_emit_rsh_signed): New function.
951 (ppc64_emit_rsh_unsigned): New function.
952 (ppc64_emit_ext): New function.
953 (ppc64_emit_zero_ext): New function.
954 (ppc64_emit_log_not): New function.
955 (ppc64_emit_bit_and): New function.
956 (ppc64_emit_bit_or): New function.
957 (ppc64_emit_bit_xor): New function.
958 (ppc64_emit_bit_not): New function.
959 (ppc64_emit_equal): New function.
960 (ppc64_emit_less_signed): New function.
961 (ppc64_emit_less_unsigned): New function.
962 (ppc64_emit_ref): New function.
963 (ppc64_emit_const): New function.
964 (ppc64v1_emit_reg): New function.
965 (ppc64v2_emit_reg): New function.
966 (ppc64_emit_pop): New function.
967 (ppc64_emit_stack_flush): New function.
968 (ppc64_emit_swap): New function.
969 (ppc64v1_emit_call): New function.
970 (ppc64v2_emit_call): New function.
971 (ppc64v1_emit_int_call_1): New function.
972 (ppc64v2_emit_int_call_1): New function.
973 (ppc64v1_emit_void_call_2): New function.
974 (ppc64v2_emit_void_call_2): New function.
975 (ppc64_emit_if_goto): New function.
976 (ppc64_emit_eq_goto): New function.
977 (ppc64_emit_ne_goto): New function.
978 (ppc64_emit_lt_goto): New function.
979 (ppc64_emit_le_goto): New function.
980 (ppc64_emit_gt_goto): New function.
981 (ppc64_emit_ge_goto): New function.
982 (ppc64v1_emit_ops_impl): New static variable.
983 (ppc64v2_emit_ops_impl): New static variable.
984 (ppc_emit_ops): New function.
985 (linux_low_target): Wire in ppc_emit_ops.
986
a2174ba4
MK
9872016-03-31 Wei-cheng Wang <cole945@gmail.com>
988 Marcin Kościelnicki <koriakin@0x04.net>
989
990 PR/17221
991 * Makefile.in: Add powerpc-*-ipa.o
992 * configure.srv: Add ipa_obj for powerpc*-linux.
993 * linux-ppc-ipa.c: New file.
994 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
995 includes.
996 (PPC_FIELD): New macro.
997 (PPC_SEXT): New macro.
998 (PPC_OP6): New macro.
999 (PPC_BO): New macro.
1000 (PPC_LI): New macro.
1001 (PPC_BD): New macro.
1002 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1003 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1004 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1005 (ppc_get_thread_area): New function.
1006 (is_elfv2_inferior): New function.
1007 (gen_ds_form): New function.
1008 (GEN_STD): New macro.
1009 (GEN_STDU): New macro.
1010 (GEN_LD): New macro.
1011 (GEN_LDU): New macro.
1012 (gen_d_form): New function.
1013 (GEN_ADDI): New macro.
1014 (GEN_ADDIS): New macro.
1015 (GEN_LI): New macro.
1016 (GEN_LIS): New macro.
1017 (GEN_ORI): New macro.
1018 (GEN_ORIS): New macro.
1019 (GEN_LWZ): New macro.
1020 (GEN_STW): New macro.
1021 (GEN_STWU): New macro.
1022 (gen_xfx_form): New function.
1023 (GEN_MFSPR): New macro.
1024 (GEN_MTSPR): New macro.
1025 (GEN_MFCR): New macro.
1026 (GEN_MTCR): New macro.
1027 (GEN_SYNC): New macro.
1028 (GEN_LWSYNC): New macro.
1029 (gen_x_form): New function.
1030 (GEN_OR): New macro.
1031 (GEN_MR): New macro.
1032 (GEN_LWARX): New macro.
1033 (GEN_STWCX): New macro.
1034 (GEN_CMPW): New macro.
1035 (gen_md_form): New function.
1036 (GEN_RLDICL): New macro.
1037 (GEN_RLDICR): New macro.
1038 (gen_i_form): New function.
1039 (GEN_B): New macro.
1040 (GEN_BL): New macro.
1041 (gen_b_form): New function.
1042 (GEN_BNE): New macro.
1043 (GEN_LOAD): New macro.
1044 (GEN_STORE): New macro.
1045 (gen_limm): New function.
1046 (gen_atomic_xchg): New function.
1047 (gen_call): New function.
1048 (ppc_relocate_instruction): New function.
1049 (ppc_install_fast_tracepoint_jump_pad): New function.
1050 (ppc_get_min_fast_tracepoint_insn_len): New function.
1051 (ppc_get_ipa_tdesc_idx): New function.
1052 (the_low_target): Wire in the new functions.
1053 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1054 tdescs.
1055 * linux-ppc-tdesc.h: New file.
1056
a13c4696
MK
10572016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1058
1059 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1060 (alloc_jump_pad_buffer): New function.
1061 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1062 (alloc_jump_pad_buffer): New function.
1063 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1064 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1065 (alloc_jump_pad_buffer): New function.
1066 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1067 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1068 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1069 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1070
1cda1512
MK
10712016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1072
1073 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1074 * linux-amd64-ipa.c: Likewise.
1075 * linux-i386-ipa.c: Likewise.
1076 * linux-s390-ipa.c: Likewise.
1077 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1078 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1079 set_trace_state_variable_value_ptr.
1080 (struct ipa_sym_addresses): Likewise.
1081 (symbol_list): Likewise.
1082 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1083 accessing gdb_collect directly.
1084 (gdb_collect_ptr_type): New typedef.
1085 (get_raw_reg_ptr_type): New typedef.
1086 (get_trace_state_variable_value_ptr_type): New typedef.
1087 (set_trace_state_variable_value_ptr_type): New typedef.
1088 (gdb_collect_ptr): New global.
1089 (get_raw_reg_ptr): New global.
1090 (get_trace_state_variable_value_ptr): New global.
1091 (set_trace_state_variable_value_ptr): New global.
1092 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1093 accessing get_raw_reg directly.
1094 (get_get_tsv_func_addr): Likewise for
1095 get_trace_state_variable_value_ptr.
1096 (get_set_tsv_func_addr): Likewise for
1097 set_trace_state_variable_value_ptr.
1098 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1099
72fb5488
SM
11002016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1101
1102 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1103
28170b88
MK
11042016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1105
1106 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1107 packets.
1108 (relocate_instruction): Remove own_buf.
1109 * server.c (own_buf): Make global.
1110 (handle_v_requests): Make global.
1111 * server.h (own_buf): New declaration.
1112 (handle_v_requests): New prototype.
1113
f39e8743
MK
11142016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1115
1116 PR 18377
1117 * linux-s390-low.c (add_insns): New function.
1118 (s390_emit_prologue): New function.
1119 (s390_emit_epilogue): New function.
1120 (s390_emit_add): New function.
1121 (s390_emit_sub): New function.
1122 (s390_emit_mul): New function.
1123 (s390_emit_lsh): New function.
1124 (s390_emit_rsh_signed): New function.
1125 (s390_emit_rsh_unsigned): New function.
1126 (s390_emit_ext): New function.
1127 (s390_emit_log_not): New function.
1128 (s390_emit_bit_and): New function.
1129 (s390_emit_bit_or): New function.
1130 (s390_emit_bit_xor): New function.
1131 (s390_emit_bit_not): New function.
1132 (s390_emit_equal): New function.
1133 (s390_emit_less_signed): New function.
1134 (s390_emit_less_unsigned): New function.
1135 (s390_emit_ref): New function.
1136 (s390_emit_if_goto): New function.
1137 (s390_emit_goto): New function.
1138 (s390_write_goto_address): New function.
1139 (s390_emit_litpool): New function.
1140 (s390_emit_const): New function.
1141 (s390_emit_call): New function.
1142 (s390_emit_reg): New function.
1143 (s390_emit_pop): New function.
1144 (s390_emit_stack_flush): New function.
1145 (s390_emit_zero_ext): New function.
1146 (s390_emit_swap): New function.
1147 (s390_emit_stack_adjust): New function.
1148 (s390_emit_set_r2): New function.
1149 (s390_emit_int_call_1): New function.
1150 (s390_emit_void_call_2): New function.
1151 (s390_emit_eq_goto): New function.
1152 (s390_emit_ne_goto): New function.
1153 (s390_emit_lt_goto): New function.
1154 (s390_emit_le_goto): New function.
1155 (s390_emit_gt_goto): New function.
1156 (s390_emit_ge_goto): New function.
1157 (s390x_emit_prologue): New function.
1158 (s390x_emit_epilogue): New function.
1159 (s390x_emit_add): New function.
1160 (s390x_emit_sub): New function.
1161 (s390x_emit_mul): New function.
1162 (s390x_emit_lsh): New function.
1163 (s390x_emit_rsh_signed): New function.
1164 (s390x_emit_rsh_unsigned): New function.
1165 (s390x_emit_ext): New function.
1166 (s390x_emit_log_not): New function.
1167 (s390x_emit_bit_and): New function.
1168 (s390x_emit_bit_or): New function.
1169 (s390x_emit_bit_xor): New function.
1170 (s390x_emit_bit_not): New function.
1171 (s390x_emit_equal): New function.
1172 (s390x_emit_less_signed): New function.
1173 (s390x_emit_less_unsigned): New function.
1174 (s390x_emit_ref): New function.
1175 (s390x_emit_if_goto): New function.
1176 (s390x_emit_const): New function.
1177 (s390x_emit_call): New function.
1178 (s390x_emit_reg): New function.
1179 (s390x_emit_pop): New function.
1180 (s390x_emit_stack_flush): New function.
1181 (s390x_emit_zero_ext): New function.
1182 (s390x_emit_swap): New function.
1183 (s390x_emit_stack_adjust): New function.
1184 (s390x_emit_int_call_1): New function.
1185 (s390x_emit_void_call_2): New function.
1186 (s390x_emit_eq_goto): New function.
1187 (s390x_emit_ne_goto): New function.
1188 (s390x_emit_lt_goto): New function.
1189 (s390x_emit_le_goto): New function.
1190 (s390x_emit_gt_goto): New function.
1191 (s390x_emit_ge_goto): New function.
1192 (s390_emit_ops): New function.
1193 (struct linux_target_ops): Fill in emit_ops hook.
1194
abd9baf9
MK
11952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1196
1197 PR 18377
1198 * Makefile.in: Add s390 IPA files.
1199 * configure.srv: Build IPA for s390.
1200 * linux-s390-ipa.c: New file.
1201 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1202 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1203 (tdesc_s390_linux32): Likewise.
1204 (init_registers_s390_linux32v1): Likewise.
1205 (tdesc_s390_linux32v1): Likewise.
1206 (init_registers_s390_linux32v2): Likewise.
1207 (tdesc_s390_linux32v2): Likewise.
1208 (init_registers_s390_linux64): Likewise.
1209 (tdesc_s390_linux64): Likewise.
1210 (init_registers_s390_linux64v1): Likewise.
1211 (tdesc_s390_linux64v1): Likewise.
1212 (init_registers_s390_linux64v2): Likewise.
1213 (tdesc_s390_linux64v2): Likewise.
1214 (init_registers_s390_te_linux64): Likewise.
1215 (tdesc_s390_te_linux64): Likewise.
1216 (init_registers_s390_vx_linux64): Likewise.
1217 (tdesc_s390_vx_linux64): Likewise.
1218 (init_registers_s390_tevx_linux64): Likewise.
1219 (tdesc_s390_tevx_linux64): Likewise.
1220 (init_registers_s390x_linux64): Likewise.
1221 (tdesc_s390x_linux64): Likewise.
1222 (init_registers_s390x_linux64v1): Likewise.
1223 (tdesc_s390x_linux64v1): Likewise.
1224 (init_registers_s390x_linux64v2): Likewise.
1225 (tdesc_s390x_linux64v2): Likewise.
1226 (init_registers_s390x_te_linux64): Likewise.
1227 (tdesc_s390x_te_linux64): Likewise.
1228 (init_registers_s390x_vx_linux64): Likewise.
1229 (tdesc_s390x_vx_linux64): Likewise.
1230 (init_registers_s390x_tevx_linux64): Likewise.
1231 (tdesc_s390x_tevx_linux64): Likewise.
1232 (have_hwcap_s390_vx): New static variable.
1233 (s390_arch_setup): Fill have_hwcap_s390_vx.
1234 (s390_get_thread_area): New function.
1235 (s390_ft_entry_gpr_esa): New const.
1236 (s390_ft_entry_gpr_zarch): New const.
1237 (s390_ft_entry_misc): New const.
1238 (s390_ft_entry_fr): New const.
1239 (s390_ft_entry_vr): New const.
1240 (s390_ft_main_31): New const.
1241 (s390_ft_main_64): New const.
1242 (s390_ft_exit_fr): New const.
1243 (s390_ft_exit_vr): New const.
1244 (s390_ft_exit_misc): New const.
1245 (s390_ft_exit_gpr_esa): New const.
1246 (s390_ft_exit_gpr_zarch): New const.
1247 (append_insns): New function.
1248 (s390_relocate_instruction): New function.
1249 (s390_install_fast_tracepoint_jump_pad): New function.
1250 (s390_get_min_fast_tracepoint_insn_len): New function.
1251 (s390_get_ipa_tdesc_idx): New function.
1252 (struct linux_target_ops): Wire in the above functions.
1253 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1254 * linux-s390-tdesc.h: New file.
1255
a4105d04
MK
12562016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1257
1258 * linux-s390-low.c (s390_supports_tracepoints): New function.
1259 (struct linux_target_ops): Fill supports_tracepoints hook.
1260
35ac8b3e
YQ
12612016-03-18 Yao Qi <yao.qi@linaro.org>
1262
1263 * linux-low.c (lwp_signal_can_be_delivered): New function.
1264 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1265
94610ec4
YQ
12662016-03-18 Yao Qi <yao.qi@linaro.org>
1267
1268 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1269 0 if signal is enqueued. Remove 'signal' from one debugging
1270 message. Move one debugging message to some lines below.
1271 Remove code setting 'signal' to 0.
1272
80aea927
YQ
12732016-03-18 Yao Qi <yao.qi@linaro.org>
1274
1275 * linux-low.c (linux_low_filter_event): Remove redundant
1276 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1277
b04fd3be
MK
12782016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1279
1280 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1281 (struct linux_target_ops): Wire in the above.
1282
c40c8d4b
YQ
12832016-03-03 Yao Qi <yao.qi@linaro.org>
1284
1285 * linux-low.c: Update comments to start_step_over.
1286
0f8288ae
YQ
12872016-03-03 Yao Qi <yao.qi@linaro.org>
1288
1289 PR server/19736
1290 * linux-low.c (handle_extended_wait): Set child suspended
1291 if event_lwp->bp_reinsert isn't zero.
1292
fdbd04a8
YQ
12932016-03-02 Yao Qi <yao.qi@linaro.org>
1294
1295 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1296 enqueue_pending_signal.
1297
6896a8fa
MK
12982016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1299
1300 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1301 is actually loaded.
1302
ab503087
MK
13032016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1304
1305 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1306 (s390_regmap_3264) [!__s390x__]: New global.
1307 (s390_collect_ptrace_register): Skip map entries containing -1.
1308 (s390_supply_ptrace_register): Ditto.
1309 (s390_fill_gprs_high): New function.
1310 (s390_store_gprs_high): New function.
1311 (s390_regsets): Add NT_S390_HIGH_GPRS.
1312 (s390_get_hwcap): Enable on 31-bit.
1313 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1314 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1315 Detect NT_S390_HIGH_GPRS.
1316 (s390_usrregs_info_3264): Enable on 31-bit.
1317 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1318 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1319
ae91f625
MK
13202016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1321
1322 PR gdb/13808
1323 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1324 * configure.srv: Ditto.
1325 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1326 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1327 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1328 (init_registers_amd64_linux): Remove prototype.
1329 (tdesc_amd64_linux): Remove declaration.
1330 (get_ipa_tdesc): New function.
1331 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1332 initialize remaining tdescs.
1333 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1334 (init_registers_i386_linux): Remove prototype.
1335 (tdesc_i386_linux): Remove declaration.
1336 (get_ipa_tdesc): New function.
1337 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1338 initialize remaining tdescs.
1339 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1340 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1341 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1342 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1343 (x86_get_ipa_tdesc_idx): New function.
1344 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1345 * linux-x86-tdesc.h: New file.
1346 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1347 (target_get_ipa_tdesc_idx): New macro.
1348 * tracepoint.c (ipa_tdesc_idx): New macro.
1349 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1350 (symbol_list): Add ipa_tdesc_idx.
1351 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1352 (ipa_tdesc): Remove.
1353 (ipa_tdesc_idx): New variable.
1354 (get_context_regcache): Use get_ipa_tdesc.
1355 (gdb_collect): Ditto.
1356 (gdb_probe): Ditto.
1357 * tracepoint.h (get_ipa_tdesc): New prototype.
1358 (ipa_tdesc): Remove.
1359
e7ad2f14
PA
13602016-02-24 Pedro Alves <palves@redhat.com>
1361
1362 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1363 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1364 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1365 Factor out common code between the USE_SIGTRAP_SIGINFO and
1366 !USE_SIGTRAP_SIGINFO blocks.
1367 (linux_low_filter_event): Call save_stop_reason instead of
1368 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1369 Update comments.
1370 (linux_wait_1): Update comments.
1371
657f9cde
WW
13722016-02-24 Wei-cheng Wang <cole945@gmail.com>
1373
1374 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1375 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1376 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1377 ppc_insert_point, ppc_remove_point.
1378
b00b61e1
MK
13792016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1380
1381 * linux-s390-low.c (s390_supports_z_point_type): New function.
1382 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1383
553cb527
YQ
13842016-02-16 Yao Qi <yao.qi@linaro.org>
1385
1386 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1387 PC. Get pc from regcache_read_pc.
1388
a5652c21
YQ
13892016-02-12 Yao Qi <yao.qi@linaro.org>
1390
1391 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1392 or linux_get_pc_32bit.
1393 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1394
ed443b61
YQ
13952016-02-12 Yao Qi <yao.qi@linaro.org>
1396
1397 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1398 arm_linux_get_next_pcs_fixup.
1399
020ecd38
MK
14002016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1401
1402 * tracepoint.c (x_tracepoint_action_download): Change
1403 write_inferior_data_ptr to write_inferior_data_pointer.
1404 (cmd_qtstart): Likewise.
1405 (write_inferior_data_ptr): Remove.
1406 (download_agent_expr): Change write_inferior_data_ptr to
1407 write_inferior_data_pointer.
1408 (download_tracepoint_1): Likewise.
1409 (download_tracepoint): Likewise.
1410 (download_trace_state_variables): Likewise.
1411
7cae9051
WW
14122016-02-11 Wei-cheng Wang <cole945@gmail.com>
1413 Marcin Kościelnicki <koriakin@0x04.net>
1414
1415 * tracepoint.c (struct tracepoint_action_ops): Remove.
1416 (struct tracepoint_action): Remove ops.
1417 (m_tracepoint_action_download, r_tracepoint_action_download)
1418 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1419 size and offset accordingly.
1420 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1421 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1422 (tracepoint_action_send, tracepoint_action_download): New functions.
1423 Helpers for trace action handlers.
1424 (add_tracepoint_action): Remove setup actions ops.
1425 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1426
9f6a71b4
YQ
14272016-02-10 Yao Qi <yao.qi@linaro.org>
1428
1429 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1430
1e94266c
SM
14312016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1432
1433 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1434 to AC_OUTPUT.
1435 * configure: Regenerate.
1436
8adce034
SM
14372016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1438
1439 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1440 void * to gdb_byte *.
1441 * linux-low.c (siginfo_fixup): Likewise.
1442 (linux_xfer_siginfo): Likewise.
1443 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1444 Likewise.
1445 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1446
93813b37
WT
14472016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1448
1449 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1450 to srv_tgtobj.
1451 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1452 to srv_tgtobj.
1453 * linux-x86-low.c [__x86_64__]: Include
1454 "nat/amd64-linux-siginfo.h".
1455 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1456 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1457 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1458 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1459 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1460 (cpt_si_fd, si_timerid, si_overrun): Move from
1461 nat/amd64-linux-siginfo.c.
1462 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1463
8424cc97
SM
14642016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1465
1466 * server.c (skip_to_semicolon): Remove.
1467 (process_point_options): Use strchrnul instead of
1468 skip_to_semicolon.
1469
4d18591b
YQ
14702016-01-26 Yao Qi <yao.qi@linaro.org>
1471
1472 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1473 * linux-low.c (install_software_single_step_breakpoints): Don't
1474 call regcache_read_pc.
1475 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1476 argument pc.
1477
d8020970
YQ
14782016-01-26 Yao Qi <yao.qi@linaro.org>
1479
1480 * linux-low.c (install_software_single_step_breakpoints): Call
1481 regcache_read_pc instead of get_pc.
1482
8b207339
YQ
14832016-01-26 Yao Qi <yao.qi@linaro.org>
1484
1485 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1486 (unblock_async_io): Rename to ...
1487 (block_unblock_async_io): ... it. New function.
1488 (enable_async_io): Don't install SIGIO handler. Unblock it
1489 instead.
1490 (disable_async_io): Don't ignore SIGIO. Block it instead.
1491 (initialize_async_io): Install SIGIO handler. Don't call
1492 unblock_async_io.
1493
18879fef
YQ
14942016-01-26 Yao Qi <yao.qi@linaro.org>
1495
1496 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1497 first character is '\003', call *the_target->request_interrupt.
1498
a0f8e08a
YQ
14992016-01-25 Yao Qi <yao.qi@linaro.org>
1500
1501 * remote-utils.c (new_thread_notify): Remove.
1502 (dead_thread_notify): Likewise.
1503 * remote-utils.h (new_thread_notify): Remove declaration.
1504 (dead_thread_notify): Likewise.
1505
cc5fd9ab
MK
15062016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1507
1508 * gdb.trace/pending.exp: Fix expected message on continue.
1509
99e8eb11
MK
15102016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1511
1512 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1513 it works properly on big-endian machines where sizeof (CORE_ADDR)
1514 != sizeof (void *).
1515
a994041d
PA
15162016-01-21 Pedro Alves <palves@redhat.com>
1517
1518 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1519 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1520 * configure: Regenerate.
1521
f7a6a40d
YQ
15222016-01-21 Yao Qi <yao.qi@linaro.org>
1523
1524 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1525 is_thumb and set it according to CPSR saved on the stack.
1526 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1527 arm_sigreturn_next_pc.
1528
6f69e520
YQ
15292016-01-18 Yao Qi <yao.qi@linaro.org>
1530
1531 * linux-low.c (linux_set_pc_64bit): New function.
1532 (linux_get_pc_64bit): New function.
1533 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1534 Declare.
1535 * linux-sparc-low.c (debug_threads): Remove declaration.
1536 (sparc_get_pc): Remove.
1537 (the_low_target): Use linux_get_pc_64bit instead of
1538 sparc_get_pc.
1539 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1540 (the_low_target): Use linux_get_pc_64bit and
1541 linux_set_pc_64bit.
1542
276d4552
YQ
15432016-01-18 Yao Qi <yao.qi@linaro.org>
1544
1545 * linux-arm-low.c (debug_threads): Remove declaration.
1546 (arm_get_pc, arm_set_pc): Remove.
1547 (the_low_target): Use linux_get_pc_32bit and
1548 linux_set_pc_32bit.
1549 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1550 (the_low_target): Use linux_get_pc_32bit and
1551 linux_set_pc_32bit.
1552 * linux-cris-low.c (debug_threads): Remove declaration.
1553 (cris_get_pc, cris_set_pc,): Remove.
1554 (the_low_target): Use linux_get_pc_32bit and
1555 linux_set_pc_32bit.
1556 * linux-crisv32-low.c (debug_threads): Remove declaration.
1557 (cris_get_pc, cris_set_pc): Remove.
1558 (the_low_target): Use linux_get_pc_32bit and
1559 linux_set_pc_32bit.
1560 * linux-low.c: Include inttypes.h.
1561 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1562 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1563 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1564 (the_low_target): Use linux_get_pc_32bit and
1565 linux_set_pc_32bit.
1566 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1567 (the_low_target): Use linux_get_pc_32bit and
1568 linux_set_pc_32bit.
1569 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1570 (the_low_target): Use linux_get_pc_32bit and
1571 linux_set_pc_32bit.
1572 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1573 (the_low_target): Use linux_get_pc_32bit and
1574 linux_set_pc_32bit.
1575 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1576 (the_low_target): Use linux_get_pc_32bit and
1577 linux_set_pc_32bit.
1578
eb0edac8
GB
15792016-01-18 Gary Benson <gbenson@redhat.com>
1580
1581 * configure.ac (AC_FUNC_FORK): New check.
1582 * config.in: Regenerate.
1583 * configure: Likewise.
1584
1b451dda
YQ
15852016-01-14 Yao Qi <yao.qi@linaro.org>
1586
1587 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1588 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1589 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1590 arm_get_next_pcs_ctor.
1591
82075af2
JS
15922016-01-12 Josh Stone <jistone@redhat.com>
1593 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1594
1595 * inferiors.h: Include "gdb_vecs.h".
1596 (struct process_info): Add syscalls_to_catch.
1597 * inferiors.c (remove_process): Free syscalls_to_catch.
1598 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1599 syscall_return stops.
1600 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1601 * server.c (handle_general_set): Handle QCatchSyscalls.
1602 (handle_query): Report support for QCatchSyscalls.
1603 * target.h (struct target_ops): Add supports_catch_syscall.
1604 (target_supports_catch_syscall): New macro.
1605 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1606 (struct lwp_info): Add syscall_state.
1607 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1608 Maintain syscall_state and syscalls_to_catch across exec.
1609 (get_syscall_trapinfo): New function, proxy to the_low_target.
1610 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1611 (linux_low_filter_event): Toggle syscall_state entry/return for
1612 syscall traps, and set it ignored for all others.
1613 (gdb_catching_syscalls_p): New function.
1614 (gdb_catch_this_syscall_p): New function.
1615 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1616 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1617 (linux_supports_catch_syscall): New function.
1618 (linux_target_ops): Install it.
1619 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1620 (the_low_target): Install it.
1621
8f13a3ce
MF
16222016-01-12 Mike Frysinger <vapier@gentoo.org>
1623
1624 * acinclude.m4: Include new ../warning.m4 file.
1625 * configure: Regenerated.
1626 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1627
5b3da067
MF
16282016-01-12 Mike Frysinger <vapier@gentoo.org>
1629
1630 * ax.c (is_goto_target): Mark static.
1631 * linux-low.c (register_addr): Likewise.
1632 (linux_fetch_registers, linux_store_registers): Likewise.
1633 * mem-break.c (any_persistent_commands): Fix old prototype.
1634 (add_commands_to_breakpoint): Mark static.
1635 * regcache.c (find_register_by_name): Delete unused func.
1636 * remote-utils.c (hex_or_minus_one): Mark static.
1637 * server.c (monitor_show_help): Mark static.
1638 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1639 handle_v_requests): Likewise.
1640
bc504a31
PA
16412016-01-12 Pedro Alves <palves@redhat.com>
1642
1643 Remove use of the registered trademark symbol throughout.
1644
5a0dd67a
YQ
16452016-01-08 Yao Qi <yao.qi@linaro.org>
1646
1647 * remote-utils.c (getpkt): If c is '\003', call target hook
1648 request_interrupt.
1649
b2ca446f
YQ
16502016-01-06 Yao Qi <yao.qi@linaro.org>
1651
1652 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1653 linux-aarch32-low.c.
1654 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1655 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1656 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1657 (thumb2_breakpoint): Declare.
1658 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1659 linux-aarch32-low.h.
1660 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1661 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1662 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1663
edd88788
JB
16642016-01-01 Joel Brobecker <brobecker@adacore.com>
1665
1666 * gdbreplay.c (gdbreplay_version): Change copyright year in
1667 version message.
1668 * server.c (gdbserver_version): Likewise.
1669
65da7f14
PP
16702015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1671
1672 * server.c (crc32_table): Delete.
1673 (crc32): Use libiberty's xcrc32 function.
1674
4abd5ed2
JB
16752015-12-22 Joel Brobecker <brobecker@adacore.com>
1676
1677 * lynx-low.c (lynx_delete_thread_callback): New function.
1678 (lynx_mourn): Properly delete our process and all of its
1679 threads. Remove call to clear_inferiors.
1680
0e50fe5c
JB
16812015-12-22 Joel Brobecker <brobecker@adacore.com>
1682
1683 * target.c (thread_search_callback): Add check that
1684 the thread_stopped target callback is not NULL before
1685 calling it.
1686
35adc03f
YQ
16872015-12-21 Yao Qi <yao.qi@linaro.org>
1688
1689 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1690 arm breakpoint.
1691
bd2b2909
AT
16922015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1693
1694 * server.c (handle_query): Call target_supports_software_single_step.
1695
7fe5e27e
AT
16962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1697
1698 * linux-low.c (single_step): New function.
1699 (linux_resume_one_lwp_throw): Call single_step.
1700 (start_step_over): Likewise.
1701
d9311bfa
AT
17022015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1703
1704 * Makefile.in (SFILES): Append arch/arm-linux.c,
1705 arch/arm-get-next-pcs.c.
1706 (arm-linux.o): New rule.
1707 (arm-get-next-pcs.o): New rule.
1708 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1709 arm-linux.o.
1710 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1711 to linux-aarch32-low.c.
1712 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1713 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1714 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1715 (thumb2_breakpoint_len): Likewise.
1716 (arm_is_thumb_mode): Make non-static.
1717 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1718 from linux-aarch32-low.c.
1719 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1720 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1721 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1722 (thumb2_breakpoint_len): Likewise.
1723 (arm_is_thumb_mode): New declaration.
1724 * linux-arm-low.c: Include arch/arm-linux.h
1725 aarch/arm-get-next-pcs.h, sys/syscall.h.
1726 (get_next_pcs_ops): New struct.
1727 (get_next_pcs_addr_bits_remove): New function.
1728 (get_next_pcs_is_thumb): New function.
1729 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1730 (arm_sigreturn_next_pc): Likewise.
1731 (get_next_pcs_syscall_next_pc): Likewise.
1732 (arm_gdbserver_get_next_pcs): Likewise.
1733 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1734 Initialize.
1735 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1736 * server.h: Include gdb_vecs.h.
1737
68ce2059
AT
17382015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1739
1740 * Makefile.in (SFILES): Append common/common-regcache.c.
1741 (OBS): Append common-regcache.o.
1742 (common-regcache.o): New rule.
1743 * regcache.c (init_register_cache): Initialize cache to
1744 REG_UNAVAILABLE.
1745 (regcache_raw_read_unsigned): New function.
1746 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1747 register_status enum.
1748
fa5308bd
AT
17492015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1750
1751 * linux-aarch64-low.c (the_low_targets): Rename
1752 breakpoint_reinsert_addr to get_next_pcs.
1753 * linux-arm-low.c (the_low_targets): Likewise.
1754 * linux-bfin-low.c (the_low_targets): Likewise.
1755 * linux-cris-low.c (the_low_targets): Likewise.
1756 * linux-crisv32-low.c (the_low_targets): Likewise.
1757 * linux-low.c (can_software_single_step): Likewise.
1758 (install_software_single_step_breakpoints): New function.
1759 (start_step_over): Use install_software_single_step_breakpoints.
1760 * linux-low.h: New CORE_ADDR vector.
1761 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1762 get_next_pcs.
1763 * linux-mips-low.c (the_low_targets): Likewise.
1764 * linux-nios2-low.c (the_low_targets): Likewise.
1765 * linux-sparc-low.c (the_low_targets): Likewise.
1766
4a6ed09b
PA
17672015-12-17 Pedro Alves <palves@redhat.com>
1768
1769 * linux-low.c (linux_kill_one_lwp): Remove references to
1770 LinuxThreads.
1771 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1772 to 'kill'.
1773 (linux_init_signals): Delete.
1774 (initialize_low): Adjust.
1775 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1776
7544db95
PA
17772015-12-16 Pedro Alves <palves@redhat.com>
1778
1779 * configure.ac (compiler warning flags): When testing a
1780 -Wno-foo option, check whether -Wfoo works instead.
1781 * configure: Regenerate.
1782
8020350c
DB
17832015-12-11 Don Breazeal <donb@codesourcery.com>
1784
1785 * server.c (process_serial_event): Don't exit from gdbserver
1786 in remote mode if there are still active inferiors.
1787
db91f502
YQ
17882015-12-11 Yao Qi <yao.qi@linaro.org>
1789
1790 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1791 arm_breakpoint_at if the process is 32-bit.
1792
b37a6290
YQ
17932015-12-11 Yao Qi <yao.qi@linaro.org>
1794
1795 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1796 arm breakpoint.
1797
17b1509a
YQ
17982015-12-07 Yao Qi <yao.qi@linaro.org>
1799
1800 * configure.srv: Append arm.o to srv_tgtobj for
1801 aarch64*-*-linux* target.
1802 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1803 from linux-arm-low.c.
1804 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1805 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1806 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1807 (thumb2_breakpoint_len): Likewise.
1808 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1809 (arm_breakpoint_kinds): Likewise.
1810 (arm_breakpoint_kind_from_pc): Likewise.
1811 (arm_sw_breakpoint_from_kind): Likewise.
1812 (arm_breakpoint_kind_from_current_state): Likewise.
1813 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1814 (arm_sw_breakpoint_from_kind): Declare.
1815 (arm_breakpoint_kind_from_current_state): Declare.
1816 (arm_breakpoint_at): Declare.
1817 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1818 arm_sw_breakpoint_from_kind if process is 32-bit.
1819 (aarch64_breakpoint_kind_from_pc): New function.
1820 (aarch64_breakpoint_kind_from_current_state): New function.
1821 (the_low_target): Initialize fields breakpoint_kind_from_pc
1822 and breakpoint_kind_from_current_state.
1823 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1824 linux-aarch32-low.c.
1825 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1826 (arm_breakpoint, arm_breakpoint_len): Likewise.
1827 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1828 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1829 (arm_is_thumb_mode): Likewise.
1830 (arm_breakpoint_at): Likewise.
1831 (arm_breakpoint_kind_from_pc): Likewise.
1832 (arm_sw_breakpoint_from_kind): Likewise.
1833 (arm_breakpoint_kind_from_current_state): Likewise.
1834
1835 Revert:
1836 2015-08-04 Yao Qi <yao.qi@linaro.org>
1837
1838 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1839 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1840 * server.c (extended_protocol): Remove "static".
1841 * server.h (extended_protocol): Declare it.
1842
ece66d65
JS
18432015-12-04 Josh Stone <jistone@redhat.com>
1844
1845 * target.h (struct target_ops) <arch_setup>: Rename to ...
1846 (struct target_ops) <post_create_inferior>: ... this.
1847 (target_arch_setup): Rename to ...
1848 (target_post_create_inferior): ... this, calling post_create_inferior.
1849 * server.c (start_inferior): Update target_arch_setup calls to
1850 target_post_create_inferior.
1851 * linux-low.c (linux_low_ptrace_options): Forward declare.
1852 (linux_arch_setup): Update its comment for general use.
1853 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1854 (struct linux_target_ops): Use linux_post_create_inferior.
1855 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1856 to post_create_inferior.
1857 * nto-low.c (struct nto_target_ops): Likewise.
1858 * spu-low.c (struct spu_target_ops): Likewise.
1859 * win32-low.c (struct win32_target_ops): Likewise.
1860
e58c48b4
AT
18612015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1862
1863 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1864
fbec8956
AT
18652015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1866
1867 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1868 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1869 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1870 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1871 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1872 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1873 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1874 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1875 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1876 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1877 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1878 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1879
9b4c5f87
AT
18802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1881
1882 * linux-low.c (linux_look_up_symbols): Don't call
1883 linux_supports_traceclone.
1884 * linux-low.h (thread_db_init): Remove use_events argument.
1885 * thread-db.c (thread_db_use_event): Remove global variable.
1886 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1887 (struct thread_db) <td_create_bp>: Remove field.
1888 (thread_db_create_event): Remove function.
1889 (thread_db_enable_reporting): Likewise.
1890 (find_one_thread): Don't check for thread_db_use_events.
1891 (attach_thread): Likewise.
1892 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1893 (try_thread_db_load_1): Don't check for thread_db_use_events.
1894 (thread_db_init): Remove use_events argument and thread events
1895 handling.
1896 (remove_thread_event_breakpoints): Remove function.
1897 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1898
7d00775e
AT
18992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1900
1901 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1902 New function.
1903 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1904 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1905 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1906 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1907 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1908 Initialize.
1909 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1910 New function.
1911 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1912 * linux-low.c (can_hardware_single_step): Use
1913 supports_hardware_single_step.
1914 (can_software_single_step): New function.
1915 (start_step_over): Call can_software_single_step.
1916 (linux_supports_hardware_single_step): New function.
1917 (struct target_ops) <supports_software_single_step>: Initialize.
1918 * linux-low.h (struct linux_target_ops)
1919 <supports_hardware_single_step>: Initialize.
1920 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1921 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1922 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1923 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1924 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1925 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1926 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1927 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1928 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1929 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1930 Initialize.
1931 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1932 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1933 Initialize.
1934 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1935 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1936 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1937 New function.
1938 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1939 * target.h (struct target_ops): <supports_software_single_step>:
1940 New field.
1941 (target_supports_software_single_step): New macro.
1942
2d97cd35
AT
19432015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1944
1945 * linux-low.c (linux_wait_1): Fix pc advance condition.
1946 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1947 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1948
769ef81f
AT
19492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1950
1951 * linux-arm-low.c (arm_is_thumb_mode): New function.
1952 (arm_breakpoint_at): Use arm_is_thumb_mode.
1953 (arm_breakpoint_kind_from_current_state): New function.
1954 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1955 Initialize.
1956 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1957 (linux_breakpoint_kind_from_current_state): New function.
1958 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1959 * linux-low.h (struct linux_target_ops)
1960 <breakpoint_kind_from_current_state>: New field.
1961 * target.h (struct target_ops): Likewise.
1962 (target_breakpoint_kind_from_current_state): New macro.
1963
1bebeeca
PA
19642015-11-30 Pedro Alves <palves@redhat.com>
1965
1966 * linux-low.c (linux_resume): Wake up the event loop before
1967 returning.
1968
a67a9fae
PA
19692015-11-30 Pedro Alves <palves@redhat.com>
1970
1971 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1972 check.
1973 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1974 to -1.
1975 * target.c (struct thread_search): New structure.
1976 (thread_search_callback): New function.
1977 (prev_general_thread): New global.
1978 (prepare_to_access_memory, done_accessing_memory): New functions.
1979 * target.h (prepare_to_access_memory, done_accessing_memory):
1980 Replace macros with function declarations.
1981
f2faf941
PA
19822015-11-30 Pedro Alves <palves@redhat.com>
1983
1984 PR 14618
1985 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1986 report TARGET_WAITKIND_NO_RESUMED.
1987 * remote-utils.c (prepare_resume_reply): Handle
1988 TARGET_WAITKIND_NO_RESUMED.
1989 * server.c (report_no_resumed): New global.
1990 (handle_query) <qSupported>: Handle "no-resumed+". Report
1991 "no-resumed+" support.
1992 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1993 return error if the client doesn't support no-resumed events.
1994 (push_stop_notification): New function.
1995 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1996 events if the client supports them.
1997
a681f9c9
PA
19982015-11-30 Pedro Alves <palves@redhat.com>
1999
2000 * linux-low.c (thread_still_has_status_pending_p): Don't check
2001 vCont;t here.
2002 (lwp_resumed): New function.
2003 (status_pending_p_callback): Return early if the LWP is not
2004 supposed to be resumed.
2005
65706a29
PA
20062015-11-30 Pedro Alves <palves@redhat.com>
2007
2008 * linux-low.c (handle_extended_wait): Assert that the LWP's
2009 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2010 thread create events, leave the new child's status pending.
2011 (linux_low_filter_event): If GDB wants to hear about thread exit
2012 events, leave the LWP marked dead and don't delete it.
2013 (linux_wait_for_event_filtered): Don't check for thread exit.
2014 (filter_exit_event): New function.
2015 (linux_wait_1): Use it, when returning an exit event.
2016 (linux_resume_one_lwp_throw): Assert that the LWP's
2017 waitstatus is TARGET_WAITKIND_IGNORE.
2018 * remote-utils.c (prepare_resume_reply): Handle
2019 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2020 * server.c (report_thread_events): New global.
2021 (handle_general_set): Handle QThreadEvents.
2022 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2023 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2024 TARGET_WAITKIND_THREAD_EXITED.
2025 * server.h (report_thread_events): Declare.
2026
56cf4bed
PA
20272015-11-30 Pedro Alves <palves@redhat.com>
2028
2029 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2030 the thread's last_resume_kind was resume_stop.
2031
500c1d85
PA
20322015-11-30 Pedro Alves <palves@redhat.com>
2033
2034 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2035 before returning.
2036
de979965
PA
20372015-11-30 Pedro Alves <palves@redhat.com>
2038
2039 * server.c (handle_v_requests): Handle vCtrlC.
2040
34c65914
PA
20412015-11-30 Pedro Alves <palves@redhat.com>
2042
2043 * gdbthread.h (find_any_thread_of_pid): Declare.
2044 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2045 functions.
2046 * server.c (handle_query): If current_thread is NULL, look for
2047 another thread of the selected process.
2048
79efa585 20492015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2050 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2051
2052 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2053 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2054 name in reply.
2055 * target.h (struct target_ops) <thread_name>: New field.
2056 (target_thread_name): New macro.
2057
80d82c19
JB
20582015-11-23 Joel Brobecker <brobecker@adacore.com>
2059
2060 * regcache.h (regcache_invalidate_pid): Add declaration.
2061 * regcache.c (regcache_invalidate_pid): New function, extracted
2062 from regcache_invalidate.
2063 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2064 Add trivial documentation comment.
2065 * lynx-low.c: Use regcache_invalidate_pid instead of
2066 regcache_invalidate.
2067
64da5dd5
JB
20682015-11-23 Joel Brobecker <brobecker@adacore.com>
2069
2070 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2071 and Elf64_auxv_t if the target is Android.
2072
37ce4055
DE
20732015-11-22 Doug Evans <xdje42@gmail.com>
2074
2075 * target.h: #include <sys/types.h>.
2076
06e03fff
PA
20772015-11-19 Pedro Alves <palves@redhat.com>
2078
2079 * linux-low.c (linux_process_qsupported): Change prototype.
2080 Adjust.
2081 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2082 Change prototype.
2083 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2084 and adjust to loop over all features.
2085 * server.c (handle_query) <qSupported>: Adjust to call
2086 target_process_qsupported once, passing it a vector of unprocessed
2087 features.
2088 * target.h (struct target_ops) <process_qsupported>: Change
2089 prototype.
2090 (target_process_qsupported): Adjust.
2091
9a084706
PA
20922015-11-19 Pedro Alves <palves@redhat.com>
2093
2094 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2095 mode.
2096 * configure: Regenerate.
2097
dad44a1f
PA
20982015-11-19 Pedro Alves <palves@redhat.com>
2099
2100 * configure: Regenerate.
2101
231c0592
YQ
21022015-11-19 Yao Qi <yao.qi@linaro.org>
2103
2104 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2105 type to uint32_t.
2106
6c1c9a8b
YQ
21072015-11-19 Yao Qi <yao.qi@linaro.org>
2108
2109 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2110 (struct aarch64_operand): Move enum out.
2111
9caa3311
YQ
21122015-11-19 Yao Qi <yao.qi@linaro.org>
2113
2114 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2115 struct user_fpsimd_state *.
2116 (aarch64_store_fpregset): Likewise.
2117
6a69a054
YQ
21182015-11-19 Yao Qi <yao.qi@linaro.org>
2119
2120 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2121 struct user_pt_regs *.
2122 (aarch64_store_gregset): Likewise.
2123
1798301e
PA
21242015-11-18 Pedro Alves <palves@redhat.com>
2125
2126 * Makefile.in (all_object_files): Add $IPA_OBJS.
2127
ce7715e2
PA
21282015-11-17 Pedro Alves <palves@redhat.com>
2129
2130 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2131 GDB_SIGNAL_0 and gdb_signal_to_string.
2132
c0879059
PA
21332015-11-17 Pedro Alves <palves@redhat.com>
2134
2135 * win32-low.c (handle_output_debug_string): Remove parameter.
2136 (win32_kill): Remove our_status local and adjust call to
2137 handle_output_debug_string.
2138 (get_child_debug_event): Adjust call to
2139 handle_output_debug_string.
2140
1996e237
SM
21412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2142
2143 * linux-mips-low.c (mips_fill_gregset): Add cast.
2144 (mips_store_gregset): Likewise.
2145 (mips_fill_fpregset): Likewise.
2146 (mips_store_fpregset): Likewise.
2147
cbec665b
SM
21482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2149
2150 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2151 priv.
2152
eb3e3c67
SM
21532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2154
2155 * linux-mips-low.c (mips_linux_new_thread): Change type of
2156 watch_type to enum target_hw_bp_type.
2157
171de4b8
SM
21582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2159
2160 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2161 Change return type to arm_hwbp_type.
2162
04248ead
SM
21632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2164
2165 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2166 (arm_store_gregset): Likewise.
2167 * linux-arm-low.c (arm_get_hwcap): Likewise.
2168 (arm_read_description): Likewise.
2169
04b3479c
SM
21702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2171
2172 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2173
2bc84e8a
SM
21742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2175
2176 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2177 (ppc_fill_vsxregset): Likewise.
2178 (ppc_store_vsxregset): Likewise.
2179 (ppc_fill_vrregset): Likewise.
2180 (ppc_store_vrregset): Likewise.
2181 (ppc_fill_evrregset): Likewise.
2182 (ppc_store_evrregset): Likewise.
2183
e6c5bb05
SM
21842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2185
2186 * linux-ppc-low.c (ppc_usrregs_info): Remove
2187 forward-declaration.
2188 (ppc_arch_setup): Move lower in file.
2189
7ea45d72
SM
21902015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2191
2192 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2193 (ps_pdwrite): Likewise.
2194
69291610
HW
21952015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2196
2197 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2198 to after assert checks.
2199
b42945fd
SM
22002015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2201
2202 * proc-service.c (ps_pdread): Add/adjust casts.
2203 (ps_pdwrite): Add/adjust casts.
2204
d6f85c84
SM
22052015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2206
2207 * server.c (handle_search_memory_1): Cast return value of
2208 memmem.
2209
f98cd059
SM
22102015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2211
2212 * server.c (write_qxfer_response): Change type of data to
2213 gdb_byte *.
2214
d2412fa5
PA
22152015-10-29 Pedro Alves <palves@redhat.com>
2216
2217 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2218
c17414a2
PA
22192015-10-29 Pedro Alves <palves@redhat.com>
2220
2221 * tracepoint.c (clear_installed_tracepoints): Add casts.
2222
e053fbc4
PA
22232015-10-29 Pedro Alves <palves@redhat.com>
2224
2225 * server.c (handle_v_cont, process_serial_event): Add enum
2226 gdb_signal casts to signal parsing code.
2227
add67df8
PA
22282015-10-29 Pedro Alves <palves@redhat.com>
2229
2230 * linux-low.h (NULL_REGSET): Define.
2231 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2232 * linux-arm-low.c (arm_regsets): Likewise.
2233 * linux-crisv32-low.c (cris_regsets): Likewise.
2234 * linux-m68k-low.c (m68k_regsets): Likewise.
2235 * linux-mips-low.c (mips_regsets): Likewise.
2236 * linux-nios2-low.c (nios2_regsets): Likewise.
2237 * linux-ppc-low.c (ppc_regsets): Likewise.
2238 * linux-s390-low.c (s390_regsets): Likewise.
2239 * linux-sh-low.c (sh_regsets): Likewise.
2240 * linux-sparc-low.c (sparc_regsets): Likewise.
2241 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2242 * linux-tile-low.c (tile_regsets): Likewise.
2243 * linux-x86-low.c (x86_regsets): Likewise.
2244 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2245
50bc912a
PA
22462015-10-29 Pedro Alves <palves@redhat.com>
2247
2248 * linux-low.h (NULL_REGSET): Define.
2249 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2250 * linux-arm-low.c (arm_regsets): Likewise.
2251 * linux-crisv32-low.c (cris_regsets): Likewise.
2252 * linux-m68k-low.c (m68k_regsets): Likewise.
2253 * linux-mips-low.c (mips_regsets): Likewise.
2254 * linux-nios2-low.c (nios2_regsets): Likewise.
2255 * linux-ppc-low.c (ppc_regsets): Likewise.
2256 * linux-s390-low.c (s390_regsets): Likewise.
2257 * linux-sh-low.c (sh_regsets): Likewise.
2258 * linux-sparc-low.c (sparc_regsets): Likewise.
2259 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2260 * linux-tile-low.c (tile_regsets): Likewise.
2261 * linux-x86-low.c (x86_regsets): Likewise.
2262 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2263
682b2546
DE
22642015-10-26 Doug Evans <dje@google.com>
2265
2266 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2267
963843d4
DE
22682015-10-26 Doug Evans <dje@google.com>
2269
2270 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2271
d41401ac
DE
22722015-10-26 Doug Evans <dje@google.com>
2273
2274 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2275 for debug_printf.
2276 (attach_thread, find_new_threads_callback): Ditto.
2277
3db28855
AT
22782015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2279
2280 * mem-break.h (set_breakpoint_data): Remove.
2281
fb78e89c
AT
22822015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2283
2284 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2285 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2286 (initialize_low): Remove set_breakpoint_data call.
2287 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2288 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2289 (initialize_low): Remove set_breakpoint_data call.
2290 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2291 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2292 (initialize_low): Remove set_breakpoint_data call.
2293
2e6ee069
AT
22942015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2295
2296 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2297 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2298 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2299 * target.h (target_breakpoint_kind_from_pc): New macro.
2300
1652a986
AT
23012015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2302
2303 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2304 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2305 the default breakpoint kind.
2306
abeead09
AT
23072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2308
2309 * linux-arm-low.c (arm_supports_z_point_type): Add software
2310 breakpoint support.
2311
b0b4b501
AT
23122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2313
2314 * linux-arm-low.c: Refactor breakpoint definitions.
2315 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2316 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2317
8689682c
AT
23182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2319
2320 * Makefile.in: Add arm.c/o.
2321 * configure.srv: Likewise.
2322 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2323 (arm_breakpoint_kind_from_pc): New function.
2324 (arm_sw_breakpoint_from_kind): Return proper kind.
2325 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2326
27165294
AT
23272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2328
2329 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2330 removal.
2331 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2332 (struct raw_breakpoint) <size>: Remove.
2333 (struct raw_breakpoint) <kind>: Add.
2334 (bp_size): New function.
2335 (bp_opcode): Likewise.
2336 (find_raw_breakpoint_at): Adjust for kind.
2337 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2338 (remove_memory_breakpoint): Adjust for kind call bp_size.
2339 (set_raw_breakpoint_at): Adjust for kind.
2340 (set_breakpoint): Likewise.
2341 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2342 (delete_raw_breakpoint): Adjust for kind.
2343 (delete_breakpoint): Likewise.
2344 (find_gdb_breakpoint): Likewise.
2345 (set_gdb_breakpoint_1): Likewise.
2346 (set_gdb_breakpoint): Likewise.
2347 (delete_gdb_breakpoint_1): Likewise.
2348 (delete_gdb_breakpoint): Likewise.
2349 (uninsert_raw_breakpoint): Likewise.
2350 (reinsert_raw_breakpoint): Likewise.
2351 (set_breakpoint_data): Remove.
2352 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2353 (check_mem_read): Adjust for kind call bp_size.
2354 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2355 (clone_one_breakpoint): Adjust for kind.
2356 * mem-break.h (set_gdb_breakpoint): Likewise.
2357 (delete_gdb_breakpoint): Likewise.
2358 * server.c (process_serial_event): Likewise.
2359
dd373349
AT
23602015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2361
2362 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2363 (struct linux_target_ops) <breakpoint>: Remove.
2364 (struct linux_target_ops) <breakpoint_len>: Remove.
2365 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2366 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2367 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2368 (arm_sw_breakpoint_from_kind): New function.
2369 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2370 (struct linux_target_ops) <breakpoint>: Remove.
2371 (struct linux_target_ops) <breakpoint_len>: Remove.
2372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2374 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2375 (struct linux_target_ops) <breakpoint>: Remove.
2376 (struct linux_target_ops) <breakpoint_len>: Remove.
2377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2379 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2380 (struct linux_target_ops) <breakpoint>: Remove.
2381 (struct linux_target_ops) <breakpoint_len>: Remove.
2382 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2383 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2384 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2385 and sw_breakpoint_from_kind to increment the pc.
2386 (linux_breakpoint_kind_from_pc): New function.
2387 (linux_sw_breakpoint_from_kind): New function.
2388 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2389 (initialize_low): Call breakpoint_kind_from_pc and
2390 sw_breakpoint_from_kind to replace breakpoint_data/len.
2391 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2392 New field.
2393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2394 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2395 (struct linux_target_ops) <breakpoint>: Remove.
2396 (struct linux_target_ops) <breakpoint_len>: Remove.
2397 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2398 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2399 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2400 (struct linux_target_ops) <breakpoint>: Remove.
2401 (struct linux_target_ops) <breakpoint_len>: Remove.
2402 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2403 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2404 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2405 (struct linux_target_ops) <breakpoint>: Remove.
2406 (struct linux_target_ops) <breakpoint_len>: Remove.
2407 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2408 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2409 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2410 (struct linux_target_ops) <breakpoint>: Remove.
2411 (struct linux_target_ops) <breakpoint_len>: Remove.
2412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2414 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2415 (struct linux_target_ops) <breakpoint>: Remove.
2416 (struct linux_target_ops) <breakpoint_len>: Remove.
2417 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2418 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2419 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2420 (struct linux_target_ops) <breakpoint>: Remove.
2421 (struct linux_target_ops) <breakpoint_len>: Remove.
2422 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2423 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2424 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2425 (struct linux_target_ops) <breakpoint>: Remove.
2426 (struct linux_target_ops) <breakpoint_len>: Remove.
2427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2429 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2430 (struct linux_target_ops) <breakpoint>: Remove.
2431 (struct linux_target_ops) <breakpoint_len>: Remove.
2432 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2434 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2435 (struct linux_target_ops) <breakpoint>: Remove.
2436 (struct linux_target_ops) <breakpoint_len>: Remove.
2437 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2438 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2439 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2440 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2441 (struct linux_target_ops) <breakpoint>: Remove.
2442 (struct linux_target_ops) <breakpoint_len>: Remove.
2443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2445 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2446 (struct linux_target_ops) <breakpoint>: Remove.
2447 (struct linux_target_ops) <breakpoint_len>: Remove.
2448 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2450
4cd98a19
AT
24512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2452
2453 * linux-cris-low.c (cris_get_pc): Remove void arg.
2454
774ee6d2
AR
24552015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2456
2457 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2458 variable name.
2459
833dcd29
AR
24602015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2461
2462 * inferiors.c (thread_pid_matches_callback): New function.
2463 (find_thread_process): New function.
2464 (remove_thread): Reset current_thread.
2465 (remove_process): Assert threads have been removed first.
2466
8d689ee5
YQ
24672015-10-15 Yao Qi <yao.qi@linaro.org>
2468
2469 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2470 if it is 3.
2471 (aarch64_remove_point): Likewise.
2472 * regcache.c (regcache_register_size): New function.
2473
1c2e1515
YQ
24742015-10-12 Yao Qi <yao.qi@linaro.org>
2475
2476 * linux-aarch64-low.c: Update all callers as emit_load_store
2477 is renamed to aarch64_emit_load_store.
2478
e1c587c3
YQ
24792015-10-12 Yao Qi <yao.qi@linaro.org>
2480
2481 * linux-aarch64-low.c: Update all callers of function renaming
2482 from emit_insn to aarch64_emit_insn.
2483
b6542f81
YQ
24842015-10-12 Yao Qi <yao.qi@linaro.org>
2485
2486 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2487 arch/aarch64-insn.h.
2488 (struct aarch64_memory_operand): Likewise.
2489 (ENCODE): Likewise.
2490 (emit_insn): Move to arch/aarch64-insn.c.
2491 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2492 (emit_load_store): Move to arch/aarch64-insn.c.
2493 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2494 (can_encode_int32): Remove.
2495
246994ce
YQ
24962015-10-12 Yao Qi <yao.qi@linaro.org>
2497
2498 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2499 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2500 (aarch64_relocate_instruction): Likewise.
2501 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2502 (struct aarch64_insn_visitor): Likewise.
2503
0badd99f
YQ
25042015-10-12 Yao Qi <yao.qi@linaro.org>
2505
2506 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2507 (struct aarch64_insn_visitor): New.
2508 (struct aarch64_insn_relocation_data): New.
2509 (aarch64_ftrace_insn_reloc_b): New function.
2510 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2511 (aarch64_ftrace_insn_reloc_cb): Likewise.
2512 (aarch64_ftrace_insn_reloc_tb): Likewise.
2513 (aarch64_ftrace_insn_reloc_adr): Likewise.
2514 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2515 (aarch64_ftrace_insn_reloc_others): Likewise.
2516 (visitor): New.
2517 (aarch64_relocate_instruction): Use visitor.
2518
dfaffe9d
YQ
25192015-10-12 Yao Qi <yao.qi@linaro.org>
2520
2521 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2522 int. Add argument buf.
2523 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2524 aarch64_relocate_instruction.
2525
70b439f0
YQ
25262015-10-12 Yao Qi <yao.qi@linaro.org>
2527
2528 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2529 argument insn. Remove local variable insn. Don't call
2530 target_read_uint32.
2531 (aarch64_install_fast_tracepoint_jump_pad): Call
2532 target_read_uint32.
2533
7781c06f
YQ
25342015-09-30 Yao Qi <yao.qi@linaro.org>
2535
2536 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2537 (emit_load_store_pair): Likewise.
2538
9a3c8263
SM
25392015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2540
2541 * dll.c (match_dll): Add cast(s).
2542 (unloaded_dll): Likewise.
2543 * linux-low.c (second_thread_of_pid_p): Likewise.
2544 (delete_lwp_callback): Likewise.
2545 (count_events_callback): Likewise.
2546 (select_event_lwp_callback): Likewise.
2547 (linux_set_resume_request): Likewise.
2548 * server.c (accumulate_file_name_length): Likewise.
2549 (emit_dll_description): Likewise.
2550 (handle_qxfer_threads_worker): Likewise.
2551 (visit_actioned_threads): Likewise.
2552 * thread-db.c (any_thread_of): Likewise.
2553 * tracepoint.c (same_process_p): Likewise.
2554 (match_blocktype): Likewise.
2555 (build_traceframe_info_xml): Likewise.
2556
224c3ddb
SM
25572015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2558
2559 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2560 assignment.
2561 (gdb_unparse_agent_expr): Likewise.
2562 * hostio.c (require_data): Likewise.
2563 (handle_pread): Likewise.
2564 * linux-low.c (disable_regset): Likewise.
2565 (fetch_register): Likewise.
2566 (store_register): Likewise.
2567 (get_dynamic): Likewise.
2568 (linux_qxfer_libraries_svr4): Likewise.
2569 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2570 (set_fast_tracepoint_jump): Likewise.
2571 (uninsert_fast_tracepoint_jumps_at): Likewise.
2572 (reinsert_fast_tracepoint_jumps_at): Likewise.
2573 (validate_inserted_breakpoint): Likewise.
2574 (clone_agent_expr): Likewise.
2575 * regcache.c (init_register_cache): Likewise.
2576 * remote-utils.c (putpkt_binary_1): Likewise.
2577 (decode_M_packet): Likewise.
2578 (decode_X_packet): Likewise.
2579 (look_up_one_symbol): Likewise.
2580 (relocate_instruction): Likewise.
2581 (monitor_output): Likewise.
2582 * server.c (handle_search_memory): Likewise.
2583 (handle_qxfer_exec_file): Likewise.
2584 (handle_qxfer_libraries): Likewise.
2585 (handle_qxfer): Likewise.
2586 (handle_query): Likewise.
2587 (handle_v_cont): Likewise.
2588 (handle_v_run): Likewise.
2589 (captured_main): Likewise.
2590 * target.c (write_inferior_memory): Likewise.
2591 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2592 * tracepoint.c (init_trace_buffer): Likewise.
2593 (add_tracepoint_action): Likewise.
2594 (add_traceframe): Likewise.
2595 (add_traceframe_block): Likewise.
2596 (cmd_qtdpsrc): Likewise.
2597 (cmd_qtdv): Likewise.
2598 (cmd_qtstatus): Likewise.
2599 (response_source): Likewise.
2600 (response_tsv): Likewise.
2601 (cmd_qtnotes): Likewise.
2602 (gdb_collect): Likewise.
2603 (initialize_tracepoint): Likewise.
2604
afbe19f8
PL
26052015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2606
2607 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2608 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2609 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2610 <NOP>: New.
2611 (enum aarch64_condition_codes): New enum.
2612 (w0): New static global.
2613 (fp): Likewise.
2614 (lr): Likewise.
2615 (struct aarch64_memory_operand) <type>: New
2616 MEMORY_OPERAND_POSTINDEX type.
2617 (postindex_memory_operand): New helper function.
2618 (emit_ret): New function.
2619 (emit_load_store_pair): New function, factored out of emit_stp
2620 with support for MEMORY_OPERAND_POSTINDEX.
2621 (emit_stp): Rewrite using emit_load_store_pair.
2622 (emit_ldp): New function.
2623 (emit_load_store): Likewise.
2624 (emit_ldr): Mention post-index instruction in comment.
2625 (emit_ldrh): New function.
2626 (emit_ldrb): New function.
2627 (emit_ldrsw): Mention post-index instruction in comment.
2628 (emit_str): Likewise.
2629 (emit_subs): New function.
2630 (emit_cmp): Likewise.
2631 (emit_and): Likewise.
2632 (emit_orr): Likewise.
2633 (emit_orn): Likewise.
2634 (emit_eor): Likewise.
2635 (emit_mvn): Likewise.
2636 (emit_lslv): Likewise.
2637 (emit_lsrv): Likewise.
2638 (emit_asrv): Likewise.
2639 (emit_mul): Likewise.
2640 (emit_sbfm): Likewise.
2641 (emit_sbfx): Likewise.
2642 (emit_ubfm): Likewise.
2643 (emit_ubfx): Likewise.
2644 (emit_csinc): Likewise.
2645 (emit_cset): Likewise.
2646 (emit_nop): Likewise.
2647 (emit_ops_insns): New helper function.
2648 (emit_pop): Likewise.
2649 (emit_push): Likewise.
2650 (aarch64_emit_prologue): New function.
2651 (aarch64_emit_epilogue): Likewise.
2652 (aarch64_emit_add): Likewise.
2653 (aarch64_emit_sub): Likewise.
2654 (aarch64_emit_mul): Likewise.
2655 (aarch64_emit_lsh): Likewise.
2656 (aarch64_emit_rsh_signed): Likewise.
2657 (aarch64_emit_rsh_unsigned): Likewise.
2658 (aarch64_emit_ext): Likewise.
2659 (aarch64_emit_log_not): Likewise.
2660 (aarch64_emit_bit_and): Likewise.
2661 (aarch64_emit_bit_or): Likewise.
2662 (aarch64_emit_bit_xor): Likewise.
2663 (aarch64_emit_bit_not): Likewise.
2664 (aarch64_emit_equal): Likewise.
2665 (aarch64_emit_less_signed): Likewise.
2666 (aarch64_emit_less_unsigned): Likewise.
2667 (aarch64_emit_ref): Likewise.
2668 (aarch64_emit_if_goto): Likewise.
2669 (aarch64_emit_goto): Likewise.
2670 (aarch64_write_goto_address): Likewise.
2671 (aarch64_emit_const): Likewise.
2672 (aarch64_emit_call): Likewise.
2673 (aarch64_emit_reg): Likewise.
2674 (aarch64_emit_pop): Likewise.
2675 (aarch64_emit_stack_flush): Likewise.
2676 (aarch64_emit_zero_ext): Likewise.
2677 (aarch64_emit_swap): Likewise.
2678 (aarch64_emit_stack_adjust): Likewise.
2679 (aarch64_emit_int_call_1): Likewise.
2680 (aarch64_emit_void_call_2): Likewise.
2681 (aarch64_emit_eq_goto): Likewise.
2682 (aarch64_emit_ne_goto): Likewise.
2683 (aarch64_emit_lt_goto): Likewise.
2684 (aarch64_emit_le_goto): Likewise.
2685 (aarch64_emit_gt_goto): Likewise.
2686 (aarch64_emit_ge_got): Likewise.
2687 (aarch64_emit_ops_impl): New static global variable.
2688 (aarch64_emit_ops): New target function, return
2689 &aarch64_emit_ops_impl.
2690 (struct linux_target_ops): Install it.
2691
bb903df0
PL
26922015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2693
2694 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2695 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2696 aarch64-ipa.o.
2697 * linux-aarch64-ipa.c: New file.
2698 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2699 and endian.h.
2700 (aarch64_get_thread_area): New target method.
2701 (extract_signed_bitfield): New helper function.
2702 (aarch64_decode_ldr_literal): New function.
2703 (enum aarch64_opcodes): New enum.
2704 (struct aarch64_register): New struct.
2705 (struct aarch64_operand): New struct.
2706 (x0): New static global.
2707 (x1): Likewise.
2708 (x2): Likewise.
2709 (x3): Likewise.
2710 (x4): Likewise.
2711 (w2): Likewise.
2712 (ip0): Likewise.
2713 (sp): Likewise.
2714 (xzr): Likewise.
2715 (aarch64_register): New helper function.
2716 (register_operand): Likewise.
2717 (immediate_operand): Likewise.
2718 (struct aarch64_memory_operand): New struct.
2719 (offset_memory_operand): New helper function.
2720 (preindex_memory_operand): Likewise.
2721 (enum aarch64_system_control_registers): New enum.
2722 (ENCODE): New macro.
2723 (emit_insn): New helper function.
2724 (emit_b): New function.
2725 (emit_bcond): Likewise.
2726 (emit_cb): Likewise.
2727 (emit_tb): Likewise.
2728 (emit_blr): Likewise.
2729 (emit_stp): Likewise.
2730 (emit_ldp_q_offset): Likewise.
2731 (emit_stp_q_offset): Likewise.
2732 (emit_load_store): Likewise.
2733 (emit_ldr): Likewise.
2734 (emit_ldrsw): Likewise.
2735 (emit_str): Likewise.
2736 (emit_ldaxr): Likewise.
2737 (emit_stxr): Likewise.
2738 (emit_stlr): Likewise.
2739 (emit_data_processing_reg): Likewise.
2740 (emit_data_processing): Likewise.
2741 (emit_add): Likewise.
2742 (emit_sub): Likewise.
2743 (emit_mov): Likewise.
2744 (emit_movk): Likewise.
2745 (emit_mov_addr): Likewise.
2746 (emit_mrs): Likewise.
2747 (emit_msr): Likewise.
2748 (emit_sevl): Likewise.
2749 (emit_wfe): Likewise.
2750 (append_insns): Likewise.
2751 (can_encode_int32_in): New helper function.
2752 (aarch64_relocate_instruction): New function.
2753 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2754 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2755 (struct linux_target_ops): Install aarch64_get_thread_area,
2756 aarch64_install_fast_tracepoint_jump_pad and
2757 aarch64_get_min_fast_tracepoint_insn_len.
2758
787749ea
PL
27592015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2760
2761 * Makefile.in (aarch64-insn.o): New rule.
2762 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2763
9812b2e6
YQ
27642015-09-21 Yao Qi <yao.qi@linaro.org>
2765
2766 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2767
18fe412b
YQ
27682015-09-21 Yao Qi <yao.qi@linaro.org>
2769
2770 * tracepoint.c (max_jump_pad_size): Remove.
2771
a0cc84cd
YQ
27722015-09-18 Yao Qi <yao.qi@linaro.org>
2773
2774 * linux-aarch64-low.c: Don't include sys/uio.h.
2775 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2776
d78908cf
WW
27772015-09-16 Wei-cheng Wang <cole945@gmail.com>
2778
2779 * tracepoint.c (eval_result_type): Change prototype.
2780 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2781
d57e0d50
PA
27822015-09-15 Pedro Alves <palves@redhat.com>
2783
2784 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2785 Check whether to report exec events instead of checking whether
2786 multiprocess is enabled.
2787
5a676acc
PA
27882015-09-15 Pedro Alves <palves@redhat.com>
2789
2790 PR remote/18965
2791 * remote-utils.c (prepare_resume_reply): Merge
2792 TARGET_WAITKIND_VFORK_DONE switch case with the
2793 TARGET_WAITKIND_FORKED case.
2794
7c5d0fad
YQ
27952015-09-15 Yao Qi <yao.qi@linaro.org>
2796
2797 * server.c (handle_query): Check string comparison using
2798 "else if" instead of "if".
2799
750ce8d1
YQ
28002015-09-15 Yao Qi <yao.qi@linaro.org>
2801
2802 * server.c (vCont_supported): New global variable.
2803 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2804 matches. Append ";vContSupported+" to own_buf.
2805 (handle_v_requests): Append ";s;S" to own_buf if target supports
2806 hardware single step or vCont_supported is false.
2807 (capture_main): Set vCont_supported to zero.
2808
70b90b91
YQ
28092015-09-15 Yao Qi <yao.qi@linaro.org>
2810
2811 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2812 it to ...
2813 (linux_supports_hardware_single_step): ... New function.
2814 (linux_target_ops): Update.
2815 * lynx-low.c (lynx_target_ops): Set field
2816 supports_hardware_single_step to target_can_do_hardware_single_step.
2817 * nto-low.c (nto_target_ops): Likewise.
2818 * spu-low.c (spu_target_ops): Likewise.
2819 * win32-low.c (win32_target_ops): Likewise.
2820 * target.c (target_can_do_hardware_single_step): New function.
2821 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2822 Remove. <supports_hardware_single_step>: New field.
2823 (target_supports_conditional_breakpoints): Remove.
2824 (target_supports_hardware_single_step): New macro.
2825 (target_can_do_hardware_single_step): Declare.
2826 * server.c (handle_query): Use target_supports_hardware_single_step
2827 instead of target_supports_conditional_breakpoints.
2828
ade90bde
YQ
28292015-09-15 Yao Qi <yao.qi@linaro.org>
2830
2831 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2832 function.
2833 (struct linux_target_ops the_low_target): Install
2834 aarch64_linux_siginfo_fixup.
2835
94585166
DB
28362015-09-11 Don Breazeal <donb@codesourcery.com>
2837 Luis Machado <lgustavo@codesourcery.com>
2838
2839 * linux-low.c (linux_mourn): Static declaration.
2840 (linux_arch_setup): Move in front of
2841 handle_extended_wait.
2842 (linux_arch_setup_thread): New function.
2843 (handle_extended_wait): Handle exec events. Call
2844 linux_arch_setup_thread. Make event_lwp argument a
2845 pointer-to-a-pointer.
2846 (check_zombie_leaders): Do not check stopped threads.
2847 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2848 (linux_low_filter_event): Add lwp and thread for exec'ing
2849 non-leader thread if leader thread has been deleted.
2850 Refactor code into linux_arch_setup_thread and call it.
2851 Pass child lwp pointer by reference to handle_extended_wait.
2852 (linux_wait_for_event_filtered): Update comment.
2853 (linux_wait_1): Prevent clobbering exec event status.
2854 (linux_supports_exec_events): New function.
2855 (linux_target_ops) <supports_exec_events>: Initialize new member.
2856 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2857 new member.
2858 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2859 * server.c (report_exec_events): New global variable.
2860 (handle_query): Handle qSupported query for exec-events feature.
2861 (captured_main): Initialize report_exec_events.
2862 * server.h (report_exec_events): Declare new global variable.
2863 * target.h (struct target_ops) <supports_exec_events>: New
2864 member.
2865 (target_supports_exec_events): New macro.
2866 * win32-low.c (win32_target_ops) <supports_exec_events>:
2867 Initialize new member.
2868
0568462b
MM
28692015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2870
2871 * linux-low.c (linux_low_enable_btrace): Remove.
2872 (linux_target_ops): Replace linux_low_enable_btrace with
2873 linux_enable_btrace.
2874
39edd165
YQ
28752015-09-03 Yao Qi <yao.qi@linaro.org>
2876
2877 * linux-aarch64-low.c (aarch64_insert_point): Call
2878 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2879 returns true.
2880
1db33b5a
UW
28812015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2882
2883 * linux-low.c (check_stopped_by_breakpoint): Use
2884 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2885
ab290430
PA
28862015-08-27 Pedro Alves <palves@redhat.com>
2887
2888 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2889
8d749320
SM
28902015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2891
6711b7f8
SM
2892 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2893 the XNEW-family equivalent.
8d749320
SM
2894 (compile_bytecodes): Likewise.
2895 * dll.c (loaded_dll): Likewise.
2896 * event-loop.c (append_callback_event): Likewise.
2897 (create_file_handler): Likewise.
2898 (create_file_event): Likewise.
2899 * hostio.c (handle_open): Likewise.
2900 * inferiors.c (add_thread): Likewise.
2901 (add_process): Likewise.
2902 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2903 * linux-arm-low.c (arm_new_process): Likewise.
2904 (arm_new_thread): Likewise.
2905 * linux-low.c (add_to_pid_list): Likewise.
2906 (linux_add_process): Likewise.
2907 (handle_extended_wait): Likewise.
2908 (add_lwp): Likewise.
2909 (enqueue_one_deferred_signal): Likewise.
2910 (enqueue_pending_signal): Likewise.
2911 (linux_resume_one_lwp_throw): Likewise.
2912 (linux_resume_one_thread): Likewise.
2913 (linux_read_memory): Likewise.
2914 (linux_write_memory): Likewise.
2915 * linux-mips-low.c (mips_linux_new_process): Likewise.
2916 (mips_linux_new_thread): Likewise.
2917 (mips_add_watchpoint): Likewise.
2918 * linux-x86-low.c (initialize_low_arch): Likewise.
2919 * lynx-low.c (lynx_add_process): Likewise.
2920 * mem-break.c (set_raw_breakpoint_at): Likewise.
2921 (set_breakpoint): Likewise.
2922 (add_condition_to_breakpoint): Likewise.
2923 (add_commands_to_breakpoint): Likewise.
2924 (clone_agent_expr): Likewise.
2925 (clone_one_breakpoint): Likewise.
2926 * regcache.c (new_register_cache): Likewise.
2927 * remote-utils.c (look_up_one_symbol): Likewise.
2928 * server.c (queue_stop_reply): Likewise.
2929 (start_inferior): Likewise.
2930 (queue_stop_reply_callback): Likewise.
2931 (handle_target_event): Likewise.
2932 * spu-low.c (fetch_ppc_memory): Likewise.
2933 (store_ppc_memory): Likewise.
2934 * target.c (set_target_ops): Likewise.
2935 * thread-db.c (thread_db_load_search): Likewise.
2936 (try_thread_db_load_1): Likewise.
2937 * tracepoint.c (add_tracepoint): Likewise.
2938 (add_tracepoint_action): Likewise.
2939 (create_trace_state_variable): Likewise.
2940 (cmd_qtdpsrc): Likewise.
2941 (cmd_qtro): Likewise.
2942 (add_while_stepping_state): Likewise.
2943 * win32-low.c (child_add_thread): Likewise.
2944 (get_image_name): Likewise.
2945
ed8b7b42
YQ
29462015-08-25 Yao Qi <yao.qi@linaro.org>
2947
2948 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2949
db3cb7cb
YQ
29502015-08-25 Yao Qi <yao.qi@linaro.org>
2951
2952 * Makefile.in (aarch64-linux.o): New rule.
2953 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2954 srv_tgtobj.
2955 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2956 (aarch64_init_debug_reg_state): Make it extern.
2957 (aarch64_linux_prepare_to_resume): Remove.
2958
f6011a1c
YQ
29592015-08-25 Yao Qi <yao.qi@linaro.org>
2960
2961 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2962 lwp_arch_private_info and ptid_of_lwp.
2963
88e2cf7e
YQ
29642015-08-25 Yao Qi <yao.qi@linaro.org>
2965
2966 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2967 Find proc_info by find_process_pid. All callers updated.
2968
5e35436e
YQ
29692015-08-25 Yao Qi <yao.qi@linaro.org>
2970
2971 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2972 Remove.
2973 (debug_reg_change_callback): Remove.
2974 (aarch64_notify_debug_reg_change): Remove.
2975
4a8a7965
YQ
29762015-08-25 Yao Qi <yao.qi@linaro.org>
2977
2978 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2979 Call current_lwp_ptid.
2980
32a271ee
YQ
29812015-08-25 Yao Qi <yao.qi@linaro.org>
2982
2983 * linux-aarch64-low.c (debug_reg_change_callback): Use
2984 debug_printf.
2985
0d51c8d7
YQ
29862015-08-25 Yao Qi <yao.qi@linaro.org>
2987
2988 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2989
31a43dd5
YQ
29902015-08-25 Yao Qi <yao.qi@linaro.org>
2991
2992 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2993
8ee52567
YQ
29942015-08-25 Yao Qi <yao.qi@linaro.org>
2995
2996 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2997 the code.
2998
ff3f0f45
YQ
29992015-08-25 Yao Qi <yao.qi@linaro.org>
3000
3001 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3002 Remove.
3003 (debug_reg_change_callback): Remove argument entry and add argument
3004 lwp. Remove local variable thread. Don't print thread id in the
3005 debugging output. Don't check whether pid of thread equals to pid.
3006 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3007 iterate_over_lwps instead find_inferior.
3008
3d40fbb5
PA
30092015-08-24 Pedro Alves <palves@redhat.com>
3010
3011 * inferiors.c (get_first_process): New function.
3012 * inferiors.h (get_first_process): New declaration.
3013 * remote-utils.c (read_ptid): Default to the first process in the
3014 list, instead of to the current thread's process.
3015
438e1e42
PA
30162015-08-24 Pedro Alves <palves@redhat.com>
3017
3018 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3019 * event-loop.c: Likewise.
3020 * remote-utils.c: Likewise.
3021 * tracepoint.c: Likewise.
3022
a8c6d4fc
PA
30232015-08-24 Pedro Alves <palves@redhat.com>
3024
3025 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3026 ptid_get_lwp.
3027
99b0bb12
PA
30282015-08-21 Pedro Alves <palves@redhat.com>
3029
3030 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3031 instead of literal 1.
3032
f8904751
PA
30332015-08-21 Pedro Alves <palves@redhat.com>
3034
3035 * tdesc.c (default_description): Explicitly zero-initialize.
3036
465a859e
PA
30372015-08-21 Pedro Alves <palves@redhat.com>
3038
3039 PR gdb/18749
3040 * inferiors.c (remove_thread): Discard any pending stop reply for
3041 this thread.
3042 * server.c (remove_all_on_match_pid): Rename to ...
3043 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3044 instead of a pid.
3045 (discard_queued_stop_replies): Change parameter to a ptid. Now
3046 extern.
3047 (handle_v_kill, kill_inferior_callback, captured_main)
3048 (process_serial_event): Adjust.
3049 * server.h (discard_queued_stop_replies): Declare.
3050
f0db101d
PA
30512015-08-21 Pedro Alves <palves@redhat.com>
3052
3053 * linux-low.c (wait_for_sigstop): Always switch to no thread
3054 selected if the previously current thread dies.
3055 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3056 process instead of the current thread's.
3057 * remote-utils.c (input_interrupt): Don't check if there's no
3058 current thread.
3059 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3060 current thread to the general thread fails, error out.
3061 (handle_qxfer_auxv, handle_qxfer_libraries)
3062 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3063 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3064 (handle_query): Check if there's a thread selected instead of
3065 checking whether there's any thread in the thread list.
3066 (handle_qxfer_threads, handle_qxfer_btrace)
3067 (handle_qxfer_btrace_conf): Don't error out early if there's no
3068 thread in the thread list.
3069 (handle_v_cont, myresume): Don't set the current thread to the
3070 continue thread.
3071 (process_serial_event) <Hg handling>: Also set thread_id if the
3072 previous general thread is still alive.
3073 (process_serial_event) <g/G handling>: If setting the current
3074 thread to the general thread fails, error out.
3075 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3076 thread's lwp instead of the current thread's.
3077 * target.c (set_desired_thread): If the desired thread was not
3078 found, leave the current thread pointing to NULL. Return an int
3079 (boolean) indicating success.
3080 * target.h (set_desired_thread): Change return type to int.
3081
40045d91
MF
30822015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3083
3084 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3085 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3086 #includes.
3087 (ps_get_thread_area): New function.
3088
45face3b
GB
30892015-08-19 Gary Benson <gbenson@redhat.com>
3090
3091 * hostio.c (handle_pread): Do not attempt to read more data
3092 than hostio_reply_with_data can fit in a packet.
3093
16d5f642
JB
30942015-08-18 Joel Brobecker <brobecker@adacore.com>
3095
3096 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3097
a738da3a
MF
30982015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3099
3100 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3101
33ebda9d
PA
31022015-08-06 Pedro Alves <palves@redhat.com>
3103
3104 * tracepoint.c (expr_eval_result): Now an int.
3105
a44892be
PA
31062015-08-06 Pedro Alves <palves@redhat.com>
3107
3108 * gdbthread.h (struct regcache): Forward declare.
3109 (struct thread_info) <regcache_data>: Now a struct regcache
3110 pointer.
3111 * inferiors.c (inferior_regcache_data)
3112 (set_inferior_regcache_data): Now work with struct regcache
3113 pointers.
3114 * inferiors.h (struct regcache): Forward declare.
3115 (inferior_regcache_data, set_inferior_regcache_data): Now work
3116 with struct regcache pointers.
3117 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3118 (free_register_cache_thread): Remove struct regcache pointer
3119 casts.
3120
608a1e46
PA
31212015-08-06 Pedro Alves <palves@redhat.com>
3122
3123 * server.c (captured_main): On error, print the exception message
3124 to stderr, and if run_once is set, throw a quit.
3125
f0ce0d3a
PA
31262015-08-06 Pedro Alves <palves@redhat.com>
3127
3128 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3129 the current thread.
3130
bf47e248
PA
31312015-08-06 Pedro Alves <palves@redhat.com>
3132
3133 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3134 reading beyond the passed in buffer length.
3135
b6b9ffcc
PL
31362015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3137
3138 * tracepoint.c (symbol_list) <required>: Remove.
3139
863d01bd
PA
31402015-08-06 Pedro Alves <palves@redhat.com>
3141
3142 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3143 count if stopping and suspending threads.
3144 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3145 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3146 (linux_detach): Complete an ongoing step-over.
3147 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3148 throughout.
3149 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3150 (linux_wait_1): If passing a signal to the inferior after
3151 finishing a step-over, unsuspend and re-resume all lwps. If we
3152 see a single-step event but the thread should be continuing, don't
3153 pass the trap to gdb.
3154 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3155 internal_error instead of gdb_assert.
3156 (enqueue_pending_signal): New function.
3157 (check_ptrace_stopped_lwp_gone): Add debug output.
3158 (start_step_over): Use internal_error instead of gdb_assert.
3159 (complete_ongoing_step_over): New function.
3160 (linux_resume_one_thread): Don't resume a suspended thread.
3161 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3162 it stepping.
3163
00db26fa
PA
31642015-08-06 Pedro Alves <palves@redhat.com>
3165
3166 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3167 (linux_thread_alive): Use lwp_is_marked_dead.
3168 (extended_event_reported): Delete.
3169 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3170 instead of extended_event_reported.
3171 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3172 as well.
3173 (lwp_is_marked_dead): New function.
3174 (lwp_running): Use lwp_is_marked_dead.
3175 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3176 comment.
3177
ad071a30
PA
31782015-08-06 Pedro Alves <palves@redhat.com>
3179
3180 * linux-low.c (linux_wait_1): Move fork event output out of the
3181 !report_to_gdb check. Pass event_child->waitstatus to
3182 target_waitstatus_to_string instead of ourstatus.
3183
524b57e6
YQ
31842015-08-04 Yao Qi <yao.qi@linaro.org>
3185
3186 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3187 if current_thread is 32 bit.
3188
6085d6f6
YQ
31892015-08-04 Yao Qi <yao.qi@linaro.org>
3190
3191 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3192 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3193 * server.c (extended_protocol): Remove "static".
3194 * server.h (extended_protocol): Declare it.
3195
8a7e4587
YQ
31962015-08-04 Yao Qi <yao.qi@linaro.org>
3197
3198 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3199 both aarch64 and aarch32.
3200 (aarch64_set_pc): Likewise.
3201
3b53ae99
YQ
32022015-08-04 Yao Qi <yao.qi@linaro.org>
3203
3204 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3205 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3206 arm-with-neon.xml to srv_xmlfiles.
3207 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3208 (is_64bit_tdesc): New function.
3209 (aarch64_linux_read_description): New function.
3210 (aarch64_arch_setup): Call aarch64_linux_read_description.
3211 (regs_info): Rename to regs_info_aarch64.
3212 (aarch64_regs_info): Return right regs_info.
3213 (initialize_low_arch): Call initialize_low_arch_aarch32.
3214
bd9e6534
YQ
32152015-08-04 Yao Qi <yao.qi@linaro.org>
3216
3217 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3218 * linux-aarch32-low.c: New file.
3219 * linux-aarch32-low.h: New file.
3220 * linux-arm-low.c (arm_fill_gregset): Move it to
3221 linux-aarch32-low.c.
3222 (arm_store_gregset): Likewise.
3223 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3224 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3225 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3226 (regs_info): Rename to regs_info_arm.
3227 (arm_regs_info): Return regs_info_aarch32 if
3228 have_ptrace_getregset is 1 and target description is
3229 arm_with_neon or arm_with_vfpv3.
3230 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3231 Call initialize_low_arch_aarch32 instead.
3232
ded48a5e
YQ
32332015-08-04 Yao Qi <yao.qi@linaro.org>
3234
3235 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3236 * linux-low.c: ... here.
3237 * linux-low.h (have_ptrace_getregset): Declare it.
3238
96e9210f
PA
32392015-08-04 Pedro Alves <palves@redhat.com>
3240
3241 * thread-db.c (struct thread_db): Use new typedefs.
3242 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3243 CHK calls.
3244 (disable_thread_event_reporting): Cast result of dlsym to
3245 destination function pointer type.
3246 (thread_db_mourn): Use td_ta_delete_ftype.
3247
af60a1ef
SL
32482015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3249
3250 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3251 arch variant.
3252 (CDX_BREAKPOINT): Define for R2.
3253 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3254 (the_low_target): Add comments.
3255
e8b41681
YQ
32562015-07-30 Yao Qi <yao.qi@linaro.org>
3257
3258 * linux-arm-low.c (arm_hwcap): Remove it.
3259 (arm_read_description): New local variable arm_hwcap. Don't
3260 set arm_hwcap to zero.
3261
89abb039
YQ
32622015-07-30 Yao Qi <yao.qi@linaro.org>
3263
3264 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3265 Use regcache->tdesc instead.
3266 (arm_store_wmmxregset): Likewise.
3267 (arm_fill_vfpregset): Likewise.
3268 (arm_store_vfpregset): Likewise.
3269
deca266c
YQ
32702015-07-30 Yao Qi <yao.qi@linaro.org>
3271
3272 * linux-arm-low.c: Include arch/arm.h.
3273 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3274 (arm_store_gregset): Likewise.
3275
aa58a496
SM
32762015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3277
3278 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3279 ptrace's 4th parameter.
3280
50904b25
YQ
32812015-07-27 Yao Qi <yao.qi@linaro.org>
3282
3283 * configure.srv (case aarch64*-*-linux*): Don't set
3284 srv_linux_usrregs.
3285
5826e159
PA
32862015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3287
3288 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3289 sys/ptrace.h.
3290 * linux-arm-low.c: Likewise.
3291 * linux-cris-low.c: Likewise.
3292 * linux-crisv32-low.c: Likewise.
3293 * linux-low.c: Likewise.
3294 * linux-m68k-low.c: Likewise.
3295 * linux-mips-low.c: Likewise.
3296 * linux-nios2-low.c: Likewise.
3297 * linux-s390-low.c: Likewise.
3298 * linux-sparc-low.c: Likewise.
3299 * linux-tic6x-low.c: Likewise.
3300 * linux-tile-low.c: Likewise.
3301 * linux-x86-low.c: Likewise.
3302
54019719
PA
33032015-07-24 Pedro Alves <palves@redhat.com>
3304
3305 * config.in: Regenerate.
3306 * configure: Regenerate.
3307
eb7aa561
PA
33082015-07-24 Pedro Alves <palves@redhat.com>
3309
3310 * acinclude.m4: Include ../ptrace.m4.
3311 * configure.ac: Call GDB_AC_PTRACE.
3312 * config.in, configure: Regenerate.
3313
55d7b841
YQ
33142015-07-24 Yao Qi <yao.qi@linaro.org>
3315
3316 * linux-low.c (linux_create_inferior): Remove setting to
3317 proc->priv->new_inferior.
3318 (linux_attach): Likewise.
3319 (linux_low_filter_event): Likewise.
3320 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3321
c06cbd92
YQ
33222015-07-24 Yao Qi <yao.qi@linaro.org>
3323
3324 * linux-low.c (linux_arch_setup): New function.
3325 (linux_low_filter_event): If proc->tdesc is NULL and
3326 proc->attached is true, call the_low_target.arch_setup.
3327 Otherwise, keep status pending, and return.
3328 (linux_resume_one_lwp_throw): Don't call get_pc if
3329 thread->while_stepping isn't NULL. Don't call
3330 get_thread_regcache if proc->tdesc is NULL.
3331 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3332 (linux_target_ops): Install arch_setup.
3333 * server.c (start_inferior): Call the_target->arch_setup.
3334 * target.h (struct target_ops) <arch_setup>: New field.
3335 (target_arch_setup): New marco.
3336 * lynx-low.c (lynx_target_ops): Update.
3337 * nto-low.c (nto_target_ops): Update.
3338 * spu-low.c (spu_target_ops): Update.
3339 * win32-low.c (win32_target_ops): Update.
3340
5ae3ebba
YQ
33412015-07-24 Yao Qi <yao.qi@linaro.org>
3342
3343 * linux-low.c (linux_add_process): Don't set
3344 proc->priv->new_inferior.
3345 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3346 (linux_attach): Likewise.
3347
eb97750b
YQ
33482015-07-24 Yao Qi <yao.qi@linaro.org>
3349
3350 * server.c (start_inferior): Code refactor.
3351
51aee833
YQ
33522015-07-24 Yao Qi <yao.qi@linaro.org>
3353
3354 * server.c (process_serial_event): Set general_thread.
3355
af1b22f3
YQ
33562015-07-21 Yao Qi <yao.qi@linaro.org>
3357
3358 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3359 aarch64_linux_get_debug_reg_capacity.
3360
554717a3
YQ
33612015-07-17 Yao Qi <yao.qi@linaro.org>
3362
3363 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3364 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3365 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3366 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3367 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3368 (AARCH64_HWP_ALIGNMENT): Likewise.
3369 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3370 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3371 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3372 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3373 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3374 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3375 (struct aarch64_debug_reg_state): Likewise.
3376 (struct arch_lwp_info): Likewise.
3377 (aarch64_align_watchpoint): Likewise.
3378 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3379 (aarch64_watchpoint_length): Likewise.
3380 (aarch64_point_encode_ctrl_reg): Likewise
3381 (aarch64_point_is_aligned): Likewise.
3382 (aarch64_align_watchpoint): Likewise.
3383 (aarch64_linux_set_debug_regs):
3384 (aarch64_dr_state_insert_one_point): Likewise.
3385 (aarch64_dr_state_remove_one_point): Likewise.
3386 (aarch64_handle_breakpoint): Likewise.
3387 (aarch64_handle_aligned_watchpoint): Likewise.
3388 (aarch64_handle_unaligned_watchpoint): Likewise.
3389 (aarch64_handle_watchpoint): Likewise.
3390
c67ca4de
YQ
33912015-07-17 Yao Qi <yao.qi@linaro.org>
3392
3393 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3394 and don't aarch64_get_debug_reg_state. All callers update.
3395 (aarch64_handle_aligned_watchpoint): Likewise.
3396 (aarch64_handle_unaligned_watchpoint): Likewise.
3397 (aarch64_handle_watchpoint): Likewise.
3398 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3399 (aarch64_remove_point): Likewise.
3400
25abf979
YQ
34012015-07-17 Yao Qi <yao.qi@linaro.org>
3402
3403 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3404 debug_printf.
3405 (aarch64_handle_unaligned_watchpoint): Likewise.
3406
db1ff28b
JK
34072015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3408
3409 Revert the previous 3 commits:
3410 Move gdb_regex* to common/
3411 Move linux_find_memory_regions_full & co.
3412 gdbserver build-id attribute generator
3413
700ca40f
JK
34142015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3415 Jan Kratochvil <jan.kratochvil@redhat.com>
3416
3417 gdbserver build-id attribute generator.
3418 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3419 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3420 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3421 (find_phdr): New.
3422 (get_dynamic): Use find_pdhr to traverse program headers.
3423 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3424 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3425 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3426 (get_hex_build_id): New.
3427 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3428 to reply XML document.
3429
9904185c
JK
34302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3431 Jan Kratochvil <jan.kratochvil@redhat.com>
3432
3433 * target.c: Include target/target-utils.h and fcntl.h.
3434 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3435 (target_fileio_read_stralloc): New functions.
3436
6e5b4429
JK
34372015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3438
3439 * Makefile.in (OBS): Add gdb_regex.o.
3440 (gdb_regex.o): New.
3441 * config.in: Rebuilt.
3442 * configure: Rebuilt.
3443
ddc98fbf
JK
34442015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3445 Jan Kratochvil <jan.kratochvil@redhat.com>
3446
3447 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3448 * Makefile.in (OBS): Add target-utils.o.
3449 (linux-maps.o, target-utils.o): New.
3450 * configure.srv (srv_linux_obj): Add linux-maps.o.
3451
e57bb7a0
PL
34522015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3453
3454 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3455 function, return 1.
3456 (the_low_target): Install it.
3457
586b02a9
PA
34582015-07-14 Pedro Alves <palves@redhat.com>
3459
3460 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3461 Instead, ignore ECHILD, and throw an error for other errnos.
3462
58c1b36c
PA
34632015-07-10 Pedro Alves <palves@redhat.com>
3464
3465 * event-loop.c (struct callback_event) <data>: Change type to
3466 gdb_client_data instance instead of gdb_client_data pointer.
3467 (append_callback_event): Adjust.
3468
421530db
PL
34692015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3470
3471 * linux-aarch64-low.c: Add comments for each linux_target_ops
3472 method. Remove comments already covered in target_ops and
3473 linux_target_ops definitions.
3474 (the_low_target): Add comments for each unimplemented method.
3475
c2d65f38
YQ
34762015-07-09 Yao Qi <yao.qi@linaro.org>
3477
3478 * linux-aarch64-low.c (aarch64_regmap): Remove.
3479 (aarch64_usrregs_info): Remove.
3480 (regs_info): Set field usrregs to NULL.
3481
b20a6524
MM
34822015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3483
3484 * linux-low.c: Include "rsp-low.h"
3485 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3486 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3487 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3488 (handle_btrace_enable_pt): New.
3489 (handle_btrace_general_set): Support "pt".
3490 (handle_btrace_conf_general_set): Support "pt:size".
3491
96c97461
PL
34922015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3493
3494 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3495 Z_PACKET_SW_BP.
3496
37d66942
PL
34972015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3498
3499 * linux-aarch64-low.c: Remove comment about endianness.
3500 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3501 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3502 memcmp.
3503
dc06243f
GB
35042015-06-24 Gary Benson <gbenson@redhat.com>
3505
3506 * linux-i386-ipa.c (stdint.h): Do not include.
3507 * lynx-i386-low.c (stdint.h): Likewise.
3508 * lynx-ppc-low.c (stdint.h): Likewise.
3509 * mem-break.c (stdint.h): Likewise.
3510 * thread-db.c (stdint.h): Likewise.
3511 * tracepoint.c (stdint.h): Likewise.
3512 * win32-low.c (stdint.h): Likewise.
3513
124e13d9
SM
35142015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3515
3516 * server.c (write_qxfer_response): Update call to
3517 remote_escape_output.
3518
909c2cda
JK
35192015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3520 Jan Kratochvil <jan.kratochvil@redhat.com>
3521
3522 Merge multiple hex conversions.
3523 * gdbreplay.c (tohex): Rename to 'fromhex'.
3524 (logchar): Use fromhex.
3525
24c05f46
JK
35262015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3527
3528 * server.c (handle_qxfer_libraries): Set `version' attribute for
3529 <library-list>.
3530
14d2069a
GB
35312015-06-10 Gary Benson <gbenson@redhat.com>
3532
3533 * target.h (struct target_ops) <multifs_open>: New field.
3534 <multifs_unlink>: Likewise.
3535 <multifs_readlink>: Likewise.
3536 * linux-low.c (nat/linux-namespaces.h): New include.
3537 (linux_target_ops): Initialize the_target->multifs_open,
3538 the_target->multifs_unlink and the_target->multifs_readlink.
3539 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3540 * hostio.c (hostio_fs_pid): New static variable.
3541 (hostio_handle_new_gdb_connection): New function.
3542 (handle_setfs): Likewise.
3543 (handle_open): Use the_target->multifs_open as appropriate.
3544 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3545 (handle_readlink): Use the_target->multifs_readlink as
3546 appropriate.
3547 (handle_vFile): Handle vFile:setfs packets.
3548 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3549 after target_handle_new_gdb_connection.
3550
4b8b5e72
GB
35512015-06-10 Gary Benson <gbenson@redhat.com>
3552
3553 * configure.ac (AC_CHECK_FUNCS): Add setns.
3554 * config.in: Regenerate.
3555 * configure: Likewise.
3556 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3557 (linux-namespaces.o): New rule.
3558 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3559
3ac2e371
GB
35602015-06-09 Gary Benson <gbenson@redhat.com>
3561
3562 * hostio.c (handle_open): Process mode argument with
3563 fileio_to_host_mode.
3564
ca9b78ce
YQ
35652015-06-01 Yao Qi <yao.qi@linaro.org>
3566
3567 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3568 * linux-x86-low.c: Likewise.
3569
bfacd19d
DB
35702015-05-28 Don Breazeal <donb@codesourcery.com>
3571
3572 * linux-low.c (handle_extended_wait): Initialize
3573 thread_info.last_resume_kind for new fork children.
3574
452003ef
PA
35752015-05-15 Pedro Alves <palves@redhat.com>
3576
3577 * target.h (target_handle_new_gdb_connection): Rewrite using if
3578 wrapped in do/while.
3579
1041a03c
JB
35802015-05-14 Joel Brobecker <brobecker@adacore.com>
3581
3582 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3583 * configure, config.in: Regenerate.
3584 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3585 Declare typedef.
3586
c269dbdb
DB
35872015-05-12 Don Breazeal <donb@codesourcery.com>
3588
3589 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3590 PTRACE_EVENT_VFORK_DONE.
3591 (linux_low_ptrace_options, extended_event_reported): Add vfork
3592 events.
3593 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3594 and "vforkdone" for RSP 'T' Stop Reply Packet.
3595 * server.h (report_vfork_events): Declare
3596 global variable.
3597
3a8a0396
DB
35982015-05-12 Don Breazeal <donb@codesourcery.com>
3599
3600 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3601 (the_low_target) <new_fork>: Initialize new member.
3602 * linux-arm-low.c (arm_new_fork): New function.
3603 (the_low_target) <new_fork>: Initialize new member.
3604 * linux-low.c (handle_extended_wait): Call new target function
3605 new_fork.
3606 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3607 * linux-mips-low.c (mips_add_watchpoint): New function
3608 extracted from mips_insert_point.
3609 (the_low_target) <new_fork>: Initialize new member.
3610 (mips_linux_new_fork): New function.
3611 (mips_insert_point): Call mips_add_watchpoint.
3612 * linux-x86-low.c (x86_linux_new_fork): New function.
3613 (the_low_target) <new_fork>: Initialize new member.
3614
de0d863e
DB
36152015-05-12 Don Breazeal <donb@codesourcery.com>
3616
3617 * linux-low.c (handle_extended_wait): Implement return value,
3618 rename argument 'event_child' to 'event_lwp', handle
3619 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3620 (linux_low_ptrace_options): New function.
3621 (linux_low_filter_event): Call linux_low_ptrace_options,
3622 use different argument fo linux_enable_event_reporting,
3623 use return value from handle_extended_wait.
3624 (extended_event_reported): New function.
3625 (linux_wait_1): Call extended_event_reported and set
3626 status to report fork events.
3627 (linux_write_memory): Add pid to debug message.
3628 (reset_lwp_ptrace_options_callback): New function.
3629 (linux_handle_new_gdb_connection): New function.
3630 (linux_target_ops): Initialize new structure member.
3631 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3632 * lynx-low.c: Initialize new structure member.
3633 * remote-utils.c (prepare_resume_reply): Implement stop reason
3634 "fork" for "T" stop message.
3635 * server.c (handle_query): Call handle_new_gdb_connection.
3636 * server.h (report_fork_events): Declare global flag.
3637 * target.h (struct target_ops) <handle_new_gdb_connection>:
3638 New member.
3639 (target_handle_new_gdb_connection): New macro.
3640 * win32-low.c: Initialize new structure member.
3641
ddcbc397
DB
36422015-05-12 Don Breazeal <donb@codesourcery.com>
3643
3644 * mem-break.c (APPEND_TO_LIST): Define macro.
3645 (clone_agent_expr): New function.
3646 (clone_one_breakpoint): New function.
3647 (clone_all_breakpoints): New function.
3648 * mem-break.h: Declare new functions.
3649
89245bc0
DB
36502015-05-12 Don Breazeal <donb@codesourcery.com>
3651
3652 * linux-low.c (linux_supports_fork_events): New function.
3653 (linux_supports_vfork_events): New function.
3654 (linux_target_ops): Initialize new structure members.
3655 (initialize_low): Call linux_check_ptrace_features.
3656 * lynx-low.c (lynx_target_ops): Initialize new structure
3657 members.
3658 * server.c (report_fork_events, report_vfork_events):
3659 New global flags.
3660 (handle_query): Add new features to qSupported packet and
3661 response.
3662 (captured_main): Initialize new global variables.
3663 * target.h (struct target_ops) <supports_fork_events>:
3664 New member.
3665 <supports_vfork_events>: New member.
3666 (target_supports_fork_events): New macro.
3667 (target_supports_vfork_events): New macro.
3668 * win32-low.c (win32_target_ops): Initialize new structure
3669 members.
3670
835205d0
GB
36712015-05-12 Gary Benson <gbenson@redhat.com>
3672
3673 * server.c (handle_qxfer_exec_file): Use current process
3674 if annex is empty.
3675
21e94bd9
SL
36762015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3677
3678 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3679 Remove HAVE_PTRACE_GETREGS conditionals.
3680 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3681 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3682
45614f15
YQ
36832015-05-08 Yao Qi <yao.qi@linaro.org>
3684
3685 * linux-low.c (linux_supports_conditional_breakpoints): New
3686 function.
3687 (linux_target_ops): Install new target method.
3688 * lynx-low.c (lynx_target_ops): Install NULL hook for
3689 supports_conditional_breakpoints.
3690 * nto-low.c (nto_target_ops): Likewise.
3691 * spu-low.c (spu_target_ops): Likewise.
3692 * win32-low.c (win32_target_ops): Likewise.
3693 * server.c (handle_query): Check
3694 target_supports_conditional_breakpoints.
3695 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3696 New field.
3697 (target_supports_conditional_breakpoints): New macro.
3698
80ad801e
PA
36992015-05-06 Pedro Alves <palves@redhat.com>
3700
3701 PR server/18081
3702 * server.c (start_inferior): If the process exits, mourn it.
3703
819843c7
GB
37042015-04-21 Gary Benson <gbenson@redhat.com>
3705
3706 * hostio.c (fileio_open_flags_to_host): Factored out to
3707 fileio_to_host_openflags in common/fileio.c. Single use
3708 updated.
3709
a2d5a9d7
MF
37102015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3711
3712 * linux-xtensa-low.c (xtensa_fill_gregset)
3713 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3714 XCHAL_HAVE_LOOP.
3715
deb44829
MF
37162015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3717
3718 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3719 (regs_info): Replace usrregs pointer with NULL.
3720
e57f1de3
GB
37212015-04-17 Gary Benson <gbenson@redhat.com>
3722
3723 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3724 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3725 * server.c (handle_qxfer_exec_file): New function.
3726 (qxfer_packets): Add exec-file entry.
3727 (handle_query): Report qXfer:exec-file:read as supported packet.
3728
62828379
RN
37292015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3730
3731 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3732
b88bb450
GB
37332015-04-09 Gary Benson <gbenson@redhat.com>
3734
3735 * hostio-errno.c (errno_to_fileio_error): Remove function.
3736 Update caller to use remote_fileio_to_fio_error.
3737
c8f4bfdd
YQ
37382015-04-09 Yao Qi <yao.qi@linaro.org>
3739
3740 * linux-low.c (linux_insert_point): Call
3741 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3742 (linux_remove_point): Call remove_memory_breakpoint if type is
3743 raw_bkpt_type_sw.
3744 * linux-x86-low.c (x86_insert_point): Don't call
3745 insert_memory_breakpoint.
3746 (x86_remove_point): Don't call remove_memory_breakpoint.
3747
41f98f02
PA
37482015-04-01 Pedro Alves <palves@redhat.com>
3749 Cleber Rosa <crosa@redhat.com>
3750
3751 * server.c (gdbserver_usage): Reorganize and extend the usage
3752 message.
3753
2bf6fb9d
PA
37542015-03-24 Pedro Alves <palves@redhat.com>
3755
3756 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3757 output. Also dump TRAP_TRACE.
3758 (linux_low_filter_event): In debug output, distinguish a
3759 resume_stop SIGSTOP from a delayed SIGSTOP.
3760
369f6daa
GB
37612015-03-24 Gary Benson <gbenson@redhat.com>
3762
3763 * linux-x86-low.c (x86_linux_new_thread): Moved to
3764 nat/x86-linux.c.
3765 (x86_linux_prepare_to_resume): Likewise.
3766
8e5d4070
GB
37672015-03-24 Gary Benson <gbenson@redhat.com>
3768
3769 * Makefile.in (x86-linux-dregs.o): New rule.
3770 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3771 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3772 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3773 (x86_linux_dr_get): Likewise.
3774 (x86_linux_dr_set): Likewise.
3775 (update_debug_registers_callback): Likewise.
3776 (x86_linux_dr_set_addr): Likewise.
3777 (x86_linux_dr_get_addr): Likewise.
3778 (x86_linux_dr_set_control): Likewise.
3779 (x86_linux_dr_get_control): Likewise.
3780 (x86_linux_dr_get_status): Likewise.
3781 (x86_linux_update_debug_registers): Likewise.
3782
2b95d440
GB
37832015-03-24 Gary Benson <gbenson@redhat.com>
3784
3785 * linux-x86-low.c (x86_linux_update_debug_registers):
3786 New function, factored out from...
3787 (x86_linux_prepare_to_resume): ...this.
3788
14b0bc68
GB
37892015-03-24 Gary Benson <gbenson@redhat.com>
3790
3791 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3792 (x86_linux_dr_set): Likewise.
3793 (update_debug_registers_callback): Likewise.
3794 (x86_linux_dr_set_addr): Likewise.
3795 (x86_linux_dr_get_addr): Likewise.
3796 (x86_linux_dr_set_control): Likewise.
3797 (x86_linux_dr_get_control): Likewise.
3798 (x86_linux_dr_get_status): Likewise.
3799 (x86_linux_prepare_to_resume): Likewise.
3800
5dfe6ca8
GB
38012015-03-24 Gary Benson <gbenson@redhat.com>
3802
3803 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3804 Use perror_with_name. Pass string through gettext.
3805 (x86_linux_dr_set): Likewise.
3806
d33472ad
GB
38072015-03-24 Gary Benson <gbenson@redhat.com>
3808
3809 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3810 (x86_linux_dr_set_addr): ...this.
3811 (x86_dr_low_get_addr): Rename to...
3812 (x86_linux_dr_get_addr): ...this.
3813 (x86_dr_low_set_control): Rename to...
3814 (x86_linux_dr_set_control): ...this.
3815 (x86_dr_low_get_control): Rename to...
3816 (x86_linux_dr_get_control): ...this.
3817 (x86_dr_low_get_status): Rename to...
3818 (x86_linux_dr_get_status): ...this.
3819 (x86_dr_low): Update with new function names.
3820
4b134ca1
GB
38212015-03-24 Gary Benson <gbenson@redhat.com>
3822
3823 * Makefile.in (x86-linux.o): New rule.
3824 * configure.srv: Add x86-linux.o to relevant targets.
3825 * linux-low.c (lwp_set_arch_private_info): New function.
3826 (lwp_arch_private_info): Likewise.
3827 * linux-x86-low.c: Include nat/x86-linux.h.
3828 (arch_lwp_info): Removed structure.
3829 (update_debug_registers_callback):
3830 Use lwp_set_debug_registers_changed.
3831 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3832 and lwp_set_debug_registers_changed.
3833 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3834
34c703da
GB
38352015-03-24 Gary Benson <gbenson@redhat.com>
3836
3837 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3838 * linux-arm-low.c (arm_new_thread): Likewise.
3839 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3840 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3841 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3842 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3843
cff068da
GB
38442015-03-24 Gary Benson <gbenson@redhat.com>
3845
3846 * linux-low.c (ptid_of_lwp): New function.
3847 (lwp_is_stopped): Likewise.
3848 (lwp_stop_reason): Likewise.
3849 * linux-x86-low.c (update_debug_registers_callback):
3850 Use lwp_is_stopped.
3851 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3852 lwp_stop_reason.
3853
b2f7c7e8
GB
38542015-03-24 Gary Benson <gbenson@redhat.com>
3855
3856 * linux-low.h (linux_stop_lwp): Remove declaration.
3857
6d4ee8c6
GB
38582015-03-24 Gary Benson <gbenson@redhat.com>
3859
3860 * linux-low.h: Include nat/linux-nat.h.
3861 * linux-low.c (iterate_over_lwps_args): New structure.
3862 (iterate_over_lwps_filter): New function.
3863 (iterate_over_lwps): Likewise.
3864 * linux-x86-low.c (update_debug_registers_callback):
3865 Update signature to what iterate_over_lwps expects.
3866 Remove PID check that iterate_over_lwps now performs.
3867 (x86_dr_low_set_addr): Use iterate_over_lwps.
3868 (x86_dr_low_set_control): Likewise.
3869
70a0bb6b
GB
38702015-03-24 Gary Benson <gbenson@redhat.com>
3871
3872 * linux-x86-low.c (x86_debug_reg_state): New function.
3873 (x86_linux_prepare_to_resume): Use the above.
3874
7b669087
GB
38752015-03-24 Gary Benson <gbenson@redhat.com>
3876
3877 * linux-low.c (current_lwp_ptid): New function.
3878 * linux-x86-low.c: Include nat/linux-nat.h.
3879 (x86_dr_low_get_addr): Use current_lwp_ptid.
3880 (x86_dr_low_get_control): Likewise.
3881 (x86_dr_low_get_status): Likewise.
3882
eef49a3d
PA
38832015-03-20 Pedro Alves <palves@redhat.com>
3884
3885 * tracepoint.c (cmd_qtstatus): Make "str" const.
3886
b2333d22
PA
38872015-03-20 Pedro Alves <palves@redhat.com>
3888
3889 * server.c (handle_general_set): Make "req_str" const.
3890
23f238d3
PA
38912015-03-19 Pedro Alves <palves@redhat.com>
3892
3893 * linux-low.c (linux_resume_one_lwp): Rename to ...
3894 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3895 instead call perror_with_name.
3896 (check_ptrace_stopped_lwp_gone): New function.
3897 (linux_resume_one_lwp): Reimplement as wrapper around
3898 linux_resume_one_lwp_throw that swallows errors if the LWP is
3899 gone.
3900
91baf43f
PA
39012015-03-19 Pedro Alves <palves@redhat.com>
3902
3903 * linux-low.c (count_events_callback, select_event_lwp_callback):
3904 No longer check whether the thread has resume_stop as last resume
3905 kind.
3906
8bf3b159
PA
39072015-03-19 Pedro Alves <palves@redhat.com>
3908
3909 * linux-low.c (count_events_callback, select_event_lwp_callback):
3910 Use the lwp's status_pending_p field, not the thread's.
3911
b90fc188
PA
39122015-03-19 Pedro Alves <palves@redhat.com>
3913
3914 * linux-low.c (select_event_lwp_callback): Update comments to
3915 no longer mention SIGTRAP.
3916
464b0089
GB
39172015-03-18 Gary Benson <gbenson@redhat.com>
3918
3919 * server.c (handle_query): Do not report vFile:fstat as supported.
3920
aa9e327f
GB
39212015-03-11 Gary Benson <gbenson@redhat.com>
3922
3923 * hostio.c (sys/types.h): New include.
3924 (sys/stat.h): Likewise.
3925 (common-remote-fileio.h): Likewise.
3926 (handle_fstat): New function.
3927 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3928
791c0056
GB
39292015-03-11 Gary Benson <gbenson@redhat.com>
3930
3931 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3932 struct stat.st_blocks and struct stat.st_blksize.
3933 * configure: Regenerate.
3934 * config.in: Likewise.
3935 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3936 (OBS): Add common-remote-fileio.o.
3937 (common-remote-fileio.o): New rule.
3938
9a9df970
PA
39392015-03-09 Pedro Alves <palves@redhat.com>
3940
3941 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3942 'struct sockaddr' pointer in 'accept' call.
3943
9eb1356e
PA
39442015-03-09 Pedro Alves <palves@redhat.com>
3945
3946 Revert:
3947 2015-03-07 Pedro Alves <palves@redhat.com>
3948 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3949 or <winsock2.h> here. Instead include "gdb_socket.h".
3950 (remote_open): Use union gdb_sockaddr_u.
3951 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3952 or <winsock2.h> here. Instead include "gdb_socket.h".
3953 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3954 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3955 or <sys/un.h>.
3956 (init_named_socket, gdb_agent_helper_thread): Use union
3957 gdb_sockaddr_u.
3958
aac331e4
PA
39592015-03-07 Pedro Alves <palves@redhat.com>
3960
3961 * configure.ac (build_warnings): Move
3962 -Wdeclaration-after-statement to the C-specific set.
3963 * configure: Regenerate.
3964
366c75fc
PA
39652015-03-07 Pedro Alves <palves@redhat.com>
3966
3967 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3968 or <winsock2.h> here. Instead include "gdb_socket.h".
3969 (remote_open): Use union gdb_sockaddr_u.
3970 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3971 or <winsock2.h> here. Instead include "gdb_socket.h".
3972 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3973 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3974 or <sys/un.h>.
3975 (init_named_socket, gdb_agent_helper_thread): Use union
3976 gdb_sockaddr_u.
3977
492d29ea
PA
39782015-03-07 Pedro Alves <palves@redhat.com>
3979
3980 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3981 instead.
3982
60a191ed
YQ
39832015-03-06 Yao Qi <yao.qi@linaro.org>
3984
3985 * linux-aarch64-low.c (aarch64_insert_point): Use
3986 show_debug_regs as a boolean.
3987 (aarch64_remove_point): Likewise.
3988
f5771b1d
PA
39892015-03-05 Pedro Alves <palves@redhat.com>
3990
3991 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3992 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3993 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3994 * nto-low.c (nto_target_ops): Likewise.
3995 * spu-low.c (spu_target_ops): Likewise.
3996 * win32-low.c (win32_target_ops): Likewise.
3997
3e572f71
PA
39982015-03-04 Pedro Alves <palves@redhat.com>
3999
72f4393d 4000 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4001 Decide whether a breakpoint triggered based on the SIGTRAP's
4002 siginfo.si_code.
72f4393d
L
4003 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4004 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4005 (linux_low_filter_event): Check for breakpoints before checking
4006 watchpoints.
4007 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4008 siginfo.si_code.
72f4393d
L
4009 (linux_stopped_by_sw_breakpoint)
4010 (linux_supports_stopped_by_sw_breakpoint)
4011 (linux_stopped_by_hw_breakpoint)
4012 (linux_supports_stopped_by_hw_breakpoint): New functions.
4013 (linux_target_ops): Install new target methods.
3e572f71 4014
1ec68e26
PA
40152015-03-04 Pedro Alves <palves@redhat.com>
4016
4017 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4018 * server.c (swbreak_feature, hwbreak_feature): New globals.
4019 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4020 (captured_main): Clear swbreak_feature and hwbreak_feature.
4021 * server.h (swbreak_feature, hwbreak_feature): Declare.
4022 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4023 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4024 supports_stopped_by_hw_breakpoint>: New fields.
4025 (target_supports_stopped_by_sw_breakpoint)
4026 (target_stopped_by_sw_breakpoint)
4027 (target_supports_stopped_by_hw_breakpoint)
4028 (target_stopped_by_hw_breakpoint): Declare.
4029
15c66dd6
PA
40302015-03-04 Pedro Alves <palves@redhat.com>
4031
4032 enum lwp_stop_reason -> enum target_stop_reason
4033 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4034 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4035 (linux_wait_1, stuck_in_jump_pad_callback)
4036 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4037 (linux_stopped_by_watchpoint):
4038 * linux-low.h (enum lwp_stop_reason): Delete.
4039 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4040 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4041
98fc70d6
YQ
40422015-03-04 Yao Qi <yao.qi@linaro.org>
4043
4044 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4045
dd2ac174
GB
40462015-03-03 Gary Benson <gbenson@redhat.com>
4047
4048 * hostio.c (handle_vFile): Fix prefix lengths.
4049
d68e53f4
MM
40502015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4051
4052 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4053 ptr_bits.
4054
bf2d68ab
AA
40552015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4056
4057 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4058 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4059 (clean): Add "rm -f" for above C files.
4060 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4061 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4062 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4063 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4064 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4065 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4066 (init_registers_s390x_vx_linux64)
4067 (init_registers_s390x_tevx_linux64)
4068 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4069 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4070 declarations.
4071 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4072 (s390_store_vxrs_high): New functions.
4073 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4074 NT_S390_VXRS_HIGH.
4075 (s390_arch_setup): Add logic for selecting one of the new target
4076 descriptions. Activate the new vector regsets if applicable.
4077 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4078 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4079 and init_registers_s390x_tevx_linux64.
4080
c966a859
PA
40812015-03-01 Pedro Alves <palves@redhat.com>
4082
4083 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4084 parameter.
4085
4180215b
PA
40862015-02-27 Pedro Alves <palves@redhat.com>
4087
4088 * linux-x86-low.c (u_debugreg_offset): New function.
4089 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4090
749bab01
PA
40912015-02-27 Pedro Alves <palves@redhat.com>
4092
4093 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4094 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4095 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4096 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4097 (ps_lsetfpregs, ps_getpid)
4098 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4099 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4100 (ps_lsetxregs, ps_plog): Declare.
4101
3c14e5a3
PA
41022015-02-27 Pedro Alves <palves@redhat.com>
4103
4104 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4105 IP_AGENT_EXPORT_FUNC.
4106 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4107 IP_AGENT_EXPORT_FUNC.
4108 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4109 (IP_AGENT_EXPORT): Delete.
4110 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4111 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4112 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4113 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4114 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4115 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4116 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4117 (traceframe_read_count, traceframe_write_count)
4118 (traceframes_created, trace_state_variables, get_raw_reg)
4119 (get_trace_state_variable_value, set_trace_state_variable_value)
4120 (ust_loaded, helper_thread_id, cmd_buf): Use
4121 IPA_SYM_EXPORTED_NAME.
4122 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4123 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4124 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4125 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4126 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4127 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4128 EXTERN_C_PUSH/EXTERN_C_POP.
4129 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4130 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4131 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4132 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4133 (traceframe_write_count, traceframe_read_count)
4134 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4135 (about_to_request_buffer_space, get_trace_state_variable_value)
4136 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4137 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4138 EXTERN_C_PUSH/EXTERN_C_POP.
4139 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4140 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4141 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4142 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4143 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4144 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4145 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4146 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4147 Define.
4148 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4149 (IP_AGENT_EXPORT_VAR_DECL): Define.
4150 (tracing): Declare.
4151 (gdb_agent_get_raw_reg): Declare.
4152
fe978cb0
PA
41532015-02-27 Tom Tromey <tromey@redhat.com>
4154 Pedro Alves <palves@redhat.com>
4155
4156 Rename symbols whose names are reserved C++ keywords throughout.
4157
3bc3d82a
PA
41582015-02-27 Pedro Alves <palves@redhat.com>
4159
4160 * Makefile.in (COMPILER): New, get it from autoconf.
4161 (CXX): Get from autoconf instead.
4162 (COMPILE.pre): Use COMPILER.
4163 (CC-LD): Rename to ...
4164 (CC_LD): ... this. Use COMPILER.
4165 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4166 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4167 * acinclude.m4: Include build-with-cxx.m4.
4168 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4169 Disable -Werror by default if building in C++ mode.
4170 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4171 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4172 the C++ compiler. Save/restore CXXFLAGS too.
4173 * configure: Regenerate.
4174
07697489
PA
41752015-02-27 Pedro Alves <palves@redhat.com>
4176
4177 * acinclude.m4: Include libiberty.m4.
4178 * configure.ac: Call libiberty_INIT.
4179 * config.in, configure: Regenerate.
4180
9beb7c4e
PA
41812015-02-26 Pedro Alves <palves@redhat.com>
4182
4183 * linux-low.c (linux_wait_1): When incrementing the PC past a
4184 program breakpoint always use the_low_target.breakpoint_len as
4185 increment, rather than the maximum between that and
4186 the_low_target.decr_pc_after_break.
4187
8090aef2
PA
41882015-02-23 Pedro Alves <palves@redhat.com>
4189
4190 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4191 thread was doing a step-over; always adjust the PC if
4192 we stepped over a permanent breakpoint.
4193 (linux_wait_1): If we stepped over breakpoint that was on top of a
4194 permanent breakpoint, manually advance the PC past it.
4195
bc9540e8
PA
41962015-02-23 Pedro Alves <palves@redhat.com>
4197
4198 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4199 modes.
4200 (x86_fill_gregset, x86_store_gregset): Use it when handling
4201 $orig_eax.
4202
2db9a427
PA
42032015-02-20 Pedro Alves <palves@redhat.com>
4204
4205 * thread-db.c: Include "nat/linux-procfs.h".
4206 (thread_db_init): Skip listing new threads if the kernel supports
4207 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4208
afa8d396
PA
42092015-02-20 Pedro Alves <palves@redhat.com>
4210
4211 * linux-low.c (status_pending_p_callback): Use ptid_match.
4212
c9587f88
AT
42132015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4214
4215 PR breakpoints/16812
4216 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4217 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4218 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4219
b05ec7a5
AT
42202015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4221
4222 PR breakpoints/15956
4223 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4224
d33501a5
MM
42252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4226
4227 * linux-low.c (linux_low_btrace_conf): Print size.
4228 * server.c (handle_btrace_conf_general_set): New.
4229 (hanle_general_set): Call handle_btrace_conf_general_set.
4230 (handle_query): Report Qbtrace-conf:bts:size as supported.
4231
f4abbc16
MM
42322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4233
4234 * linux-low.c (linux_low_enable_btrace): Update parameters.
4235 (linux_low_btrace_conf): New.
4236 (linux_target_ops)<to_btrace_conf>: Initialize.
4237 * server.c (current_btrace_conf): New.
4238 (handle_btrace_enable): Rename to ...
4239 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4240 to target_enable_btrace. Update comment. Update users.
4241 (handle_qxfer_btrace_conf): New.
4242 (qxfer_packets): Add btrace-conf entry.
4243 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4244 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4245 (target_ops)<read_btrace_conf>: New.
4246 (target_enable_btrace): Update parameters.
4247 (target_read_btrace_conf): New.
4248
043c3577
MM
42492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4250
4251 * server.c (handle_btrace_general_set): Remove call to
4252 target_supports_btrace.
4253 (supported_btrace_packets): New.
4254 (handle_query): Call supported_btrace_packets.
4255 * target.h: include btrace-common.h.
4256 (btrace_target_info): Removed.
4257 (supports_btrace, target_supports_btrace): Update parameters.
4258
734b0e4b
MM
42592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4260
4261 * Makefile.in (SFILES): Add common/btrace-common.c.
4262 (OBS): Add common/btrace-common.o.
4263 (btrace-common.o): Add build rules.
4264 * linux-low: Include btrace-common.h.
4265 (linux_low_read_btrace): Use struct btrace_data. Call
4266 btrace_data_init and btrace_data_fini.
4267
d6c146e9
PA
42682015-02-06 Pedro Alves <palves@redhat.com>
4269
4270 * thread-db.c (find_new_threads_callback): Add debug output.
4271
20ba1ce6
PA
42722015-02-04 Pedro Alves <palves@redhat.com>
4273
4274 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4275 (resume_stopped_resumed_lwps): New function.
4276 (linux_wait_for_event_filtered): Use it.
4277
8cc73a39
SDJ
42782015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4279
4280 * Makefile.in (SFILES): Add linux-personality.c.
4281 (linux-personality.o): New rule.
4282 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4283 list of objects to be built.
4284 * linux-low.c: Include nat/linux-personality.h.
4285 (linux_create_inferior): Remove code to disable address space
4286 randomization (moved to ../nat/linux-personality.c). Create
4287 cleanup to disable address space randomization.
4288
fb23d554
SDJ
42892015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4290
4291 * Makefile.in (posix-strerror.o): New rule.
4292 (mingw-strerror.o): Likewise.
4293 * configure: Regenerated.
4294 * configure.ac: Source file ../common/common.host. Initialize new
4295 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4296
cdf43629
YQ
42972015-01-14 Yao Qi <yao@codesourcery.com>
4298
4299 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4300 (ppc-linux.o): New rule.
4301 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4302 * configure.ac: AC_CHECK_FUNCS(getauxval).
4303 * config.in: Re-generated.
4304 * configure: Re-generated.
4305 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4306 ppc64_64bit_inferior_p
4307
514c5338
YQ
43082015-01-14 Yao Qi <yao@codesourcery.com>
4309
4310 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4311 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4312 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4313 (PT_ORIG_R3, PT_TRAP): Likewise.
4314 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4315 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4316 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4317
3368c1e5
JB
43182015-01-10 Joel Brobecker <brobecker@adacore.com>
4319
4320 * i387-fp.c (i387_cache_to_xsave): In look over
4321 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4322 zmmh_low_space field by use of zmmh_high_space.
4323
582511be
PA
43242015-01-09 Pedro Alves <palves@redhat.com>
4325
4326 * linux-low.c (step_over_bkpt): Move higher up in the file.
4327 (handle_extended_wait): Don't store the stop_pc here.
4328 (get_stop_pc): Adjust comments and rename to ...
4329 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4330 stopped for a software breakpoint or hardware breakpoint.
4331 (thread_still_has_status_pending_p): New function.
4332 (status_pending_p_callback): Use
4333 thread_still_has_status_pending_p. If the event is no longer
4334 interesting, resume the LWP.
4335 (handle_tracepoints): Add assert.
4336 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4337 (wstatus_maybe_breakpoint): New function.
4338 (cancel_breakpoint): Delete function.
4339 (check_stopped_by_watchpoint): New function, factored out from
4340 linux_low_filter_event.
4341 (lp_status_maybe_breakpoint): Delete function.
4342 (linux_low_filter_event): Remove filter_ptid argument.
4343 Leave thread group exits pending here. Store the LWP's stop PC.
4344 Always leave events pending.
4345 (linux_wait_for_event_filtered): Pull all events out of the
4346 kernel, and leave them all pending.
4347 (count_events_callback, select_event_lwp_callback): Consider all
4348 events.
4349 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4350 (select_event_lwp): Only give preference to the stepping LWP in
4351 all-stop mode. Adjust comments.
4352 (ignore_event): New function.
4353 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4354 references to cancel_breakpoints. Adjust to renames. Also give
4355 equal priority to all LWPs that have had events in non-stop mode.
4356 If reporting a software breakpoint event, unadjust the LWP's PC.
4357 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4358 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4359 Adjust.
4360 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4361 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4362 (linux_stopped_by_watchpoint): Adjust.
4363 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4364 * linux-low.h (enum lwp_stop_reason): New.
4365 (struct lwp_info) <stop_pc>: Adjust comment.
4366 <stopped_by_watchpoint>: Delete field.
4367 <stop_reason>: New field.
4368 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4369 * mem-break.c (software_breakpoint_inserted_here)
4370 (hardware_breakpoint_inserted_here): New function.
4371 * mem-break.h (software_breakpoint_inserted_here)
4372 (hardware_breakpoint_inserted_here): Declare.
4373 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4374 (cancel_breakpoints): Delete.
4375 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4376 (upload_fast_traceframes): Remove references to
4377 cancel_breakpoints.
4378
a33e3959
PA
43792015-01-09 Pedro Alves <palves@redhat.com>
4380
4381 * thread-db.c (find_new_threads_callback): Ignore thread if the
4382 kernel thread ID is -1.
4383
8784d563
PA
43842015-01-09 Pedro Alves <palves@redhat.com>
4385
4386 * linux-low.c (linux_attach_fail_reason_string): Move to
4387 nat/linux-ptrace.c, and rename.
4388 (linux_attach_lwp): Update comment.
4389 (attach_proc_task_lwp_callback): New function.
4390 (linux_attach): Adjust to rename and use
4391 linux_proc_attach_tgid_threads.
4392 (linux_attach_fail_reason_string): Delete declaration.
4393
76f2b779
JB
43942015-01-01 Joel Brobecker <brobecker@adacore.com>
4395
4396 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4397 * server.c (gdbserver_version): Likewise.
4398
fafcc06a
SDJ
43992014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4400
4401 * remote-utils.c: Include ctype.h.
4402 (input_interrupt): Explicitly handle the case when the char
4403 received is the NUL byte. Improve the printing of non-ASCII
4404 characters.
4405
beed38b8
JB
44062014-12-16 Joel Brobecker <brobecker@adacore.com>
4407
4408 * linux-low.c (linux_low_filter_event): Update call to
4409 linux_enable_event_reporting following the addition of
4410 a new parameter to that function.
4411
bf330350
CU
44122014-12-16 Catalin Udma <catalin.udma@freescale.com>
4413
4414 PR server/17457
4415 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4416 (AARCH64_FPCR_REGNO): Likewise.
4417 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4418 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4419 (aarch64_store_fpregset): Likewise.
4420
5227d625
JB
44212014-12-15 Joel Brobecker <brobecker@adacore.com>
4422
4423 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4424 Remove FIXME comment about assumption about N.
4425
f93b65a0
JB
44262014-12-13 Joel Brobecker <brobecker@adacore.com>
4427
4428 * configure.ac: If large-file support is disabled in GDBserver,
4429 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4430 * configure: Regenerate.
4431
e5a9158d
AA
44322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4433
4434 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4435 warning upon ENODATA from ptrace.
4436 * linux-s390-low.c (s390_store_tdb): New.
4437 (s390_regsets): Add regset for NT_S390_TDB.
4438
feea5f36
AA
44392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4440
4441 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4442 without a fill_function.
4443 * linux-s390-low.c (s390_fill_last_break): Remove.
4444 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4445 (s390_arch_setup): Use regset's size instead of fill_function for
4446 loop end condition.
4447
098dbe61
AA
44482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4449
4450 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4451 the regset's store function when ptrace returned an error.
4452 * regcache.c (get_thread_regcache): Invalidate register cache
4453 before fetching inferior's registers.
4454
28eef672
AA
44552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4456
4457 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4458 while-loop as for-loop.
4459 (regsets_store_inferior_registers): Likewise.
4460
bdca27a2
YQ
44612014-11-28 Yao Qi <yao@codesourcery.com>
4462
4463 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4464 * config.in, configure: Re-generate.
4465 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4466 is defined.
4467
9c232dda
YQ
44682014-11-21 Yao Qi <yao@codesourcery.com>
4469
4470 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4471 (AC_CHECK_HEADERS): Remove malloc.h.
4472 * configure: Re-generated.
4473 * config.in: Re-generated.
4474 * server.h: Don't include alloca.h and malloc.h.
4475 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4476 Don't include malloc.h.
4477
43968415
JB
44782014-11-17 Joel Brobecker <brobecker@adacore.com>
4479
4480 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4481 corresponding ERRNO check in same block.
4482
40e91bc7
PA
44832014-11-12 Pedro Alves <palves@redhat.com>
4484
4485 * server.c (cont_thread): Update comment.
4486 (start_inferior, attach_inferior): No longer clear cont_thread.
4487 (handle_v_cont): No longer set cont_thread.
4488 (captured_main): Clear cont_thread each time a GDB connects.
4489
c2c118cf
PA
44902014-11-12 Pedro Alves <palves@redhat.com>
4491
4492 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4493 thread, and don't resume all threads if the Hc thread has exited.
4494
78708b7c
PA
44952014-11-12 Pedro Alves <palves@redhat.com>
4496
4497 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4498 the process group instead of to a specific LWP.
4499
a2abc7de
PA
45002014-10-15 Pedro Alves <palves@redhat.com>
4501
4502 PR server/17487
4503 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4504 parameter.
4505 (arm_set_thread_context): Delete.
4506 (the_low_target): Adjust.
4507 * win32-i386-low.c (debug_registers_changed)
4508 (debug_registers_used): Delete.
4509 (update_debug_registers_callback): New function.
4510 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4511 needing to update their debug registers.
4512 (win32_get_current_dr): New function.
4513 (x86_dr_low_get_addr, x86_dr_low_get_control)
4514 (x86_dr_low_get_status): Fetch the debug register from the thread
4515 record's context.
4516 (i386_initial_stuff): Adjust.
4517 (i386_get_thread_context): Remove current_event parameter. Don't
4518 clear debug_registers_changed nor copy DR values to
4519 debug_reg_state.
4520 (i386_set_thread_context): Delete.
4521 (i386_prepare_to_resume): New function.
4522 (i386_thread_added): Mark the thread as needing to update irs
4523 debug registers.
4524 (the_low_target): Remove i386_set_thread_context and install
4525 i386_prepare_to_resume.
4526 * win32-low.c (win32_get_thread_context): Adjust.
4527 (win32_set_thread_context): Use SetThreadContext
4528 directly.
4529 (win32_prepare_to_resume): New function.
4530 (win32_require_context): New function, factored out from ...
4531 (thread_rec): ... this.
4532 (continue_one_thread): Call win32_prepare_to_resume on each thread
4533 we're about to continue.
4534 (win32_resume): Call win32_prepare_to_resume on the event thread.
4535 * win32-low.h (struct win32_thread_info)
4536 <debug_registers_changed>: New field.
4537 (struct win32_target_ops): Change prototype of set_thread_context,
4538 delete set_thread_context and add prepare_to_resume.
4539 (win32_require_context): New declaration.
4540
a442d071
GB
45412014-10-08 Gary Benson <gbenson@redhat.com>
4542
4543 * server.h: Do not include common-exceptions.h.
4544
6f1947e8
GB
45452014-10-08 Gary Benson <gbenson@redhat.com>
4546
4547 * server.h: Do not include cleanups.h.
4548
63b434a4
JH
45492014-09-30 James Hogan <james.hogan@imgtec.com>
4550
4551 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4552 mips64-dsp-linux.c.
4553
c4d9ceb6
YQ
45542014-09-23 Yao Qi <yao@codesourcery.com>
4555
4556 * linux-low.c (lp_status_maybe_breakpoint): New function.
4557 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4558 (count_events_callback): Likewise.
4559 (select_event_lwp_callback): Likewise.
4560 (cancel_breakpoints_callback): Likewise.
4561
89a5711c
DB
45622014-09-19 Don Breazeal <donb@codesourcery.com>
4563
4564 * linux-low.c (handle_extended_wait): Call
4565 linux_ptrace_get_extended_event.
4566 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4567 linux_is_extended_waitstatus.
4568
bffc0964
JB
45692014-09-16 Joel Brobecker <brobecker@adacore.com>
4570
4571 * Makefile.in (CPPFLAGS): Define.
4572 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4573 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4574
0bfdf32f
GB
45752014-09-16 Gary Benson <gbenson@redhat.com>
4576
4577 * inferiors.h (current_inferior): Renamed as...
4578 (current_thread): New variable. All uses updated.
4579 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4580 (maybe_move_out_of_jump_pad): Likewise.
4581 (cancel_breakpoint): Likewise.
4582 (linux_low_filter_event): Likewise.
4583 (wait_for_sigstop): Likewise.
4584 (linux_resume_one_lwp): Likewise.
4585 (need_step_over_p): Likewise.
4586 (start_step_over): Likewise.
4587 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4588 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4589 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4590 and save_inferior as saved_thread.
4591 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4592 saved_thread.
4593 (regcache_invalidate_thread): Likewise.
4594 * remote-utils.c (prepare_resume_reply): Likewise.
4595 * thread-db.c (thread_db_get_tls_address): Likewise.
4596 (disable_thread_event_reporting): Likewise.
4597 (remove_thread_event_breakpoints): Likewise.
4598 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4599 as saved_thread.
4600 * target.h (set_desired_inferior): Renamed as...
4601 (set_desired_thread): New declaration. All uses updated.
4602 * server.c (myresume): Updated comment to reference thread instead
4603 of inferior.
4604 (handle_serial_event): Likewise.
4605 (handle_target_event): Likewise.
4606
361c8ade
GB
46072014-09-12 Tom Tromey <tromey@redhat.com>
4608 Gary Benson <gbenson@redhat.com>
4609
4610 * regcache.h: Include common-regcache.h.
4611 (regcache_read_pc): Don't declare.
4612 * regcache.c (get_thread_regcache_for_ptid): New function.
4613
bd9269f7
GB
46142014-09-11 Tom Tromey <tromey@redhat.com>
4615 Gary Benson <gbenson@redhat.com>
4616
4617 * symbol.c: New file.
4618 * Makefile.in (SFILES): Add symbol.c.
4619 (OBS): Add symbol.o.
4620
f8c1d06b
GB
46212014-09-11 Gary Benson <gbenson@redhat.com>
4622
4623 * target.c (target_stop_ptid, target_continue_ptid): New
4624 functions.
4625
721ec300
GB
46262014-09-11 Tom Tromey <tromey@redhat.com>
4627 Gary Benson <gbenson@redhat.com>
4628
4629 * target.h: Include target/target.h.
4630 * target.c (target_read_memory, target_read_uint32)
4631 (target_write_memory): New functions.
4632
c5e92cca
GB
46332014-09-11 Gary Benson <gbenson@redhat.com>
4634
4635 * server.h (debug_hw_points): Don't declare.
4636 * server.c (debug_hw_points): Don't define. Replace all uses
4637 with show_debug_regs.
4638 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4639 all uses with show_debug_regs.
4640
2e4bb98a
EBM
46412014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4642
4643 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4644 endianness into account.
4645 (ppc_supply_ptrace_register): Likewise.
4646
ac740bc7
JH
46472014-09-03 James Hogan <james.hogan@imgtec.com>
4648
4649 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4650 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4651
97ea6506
GB
46522014-09-03 Gary Benson <gbenson@redhat.com>
4653
4654 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4655 ALL_DEBUG_ADDRESS_REGISTERS.
4656
df7e5265
GB
46572014-09-02 Gary Benson <gbenson@redhat.com>
4658
4659 * i386-low.h: Renamed as...
4660 * x86-low.h: New file. All type, function and variable name
4661 prefixes changed from "i386_" to "x86_". All references updated.
4662 * i386-low.c: Renamed as...
4663 * x86-low.c: New file. All type, function and variable name
4664 prefixes changed from "i386_" to "x86_". All references updated.
4665
ed859da7
GB
46662014-09-02 Gary Benson <gbenson@redhat.com>
4667
4668 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4669 (x86_linux_new_thread): Likewise.
4670
860789c7
GB
46712014-08-29 Gary Benson <gbenson@redhat.com>
4672
4673 * server.h (setjmp.h): Do not include.
4674 (toplevel): Do not declare.
4675 (common-exceptions.h): Include.
4676 (cleanups.h): Likewise.
4677 * server.c (toplevel): Do not define.
4678 (exit_code): New static global.
4679 (detach_or_kill_for_exit_cleanup): New function.
4680 (main): New function. Original main renamed to...
4681 (captured_main): New function.
4682 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4683
ff55e1b5
GB
46842014-08-29 Gary Benson <gbenson@redhat.com>
4685
4686 * Makefile.in (SFILES): Add common/common-exceptions.c.
4687 (OBS): Add common-exceptions.o.
4688 (common-exceptions.o): New rule.
4689 * utils.c (prepare_to_throw_exception): New function.
4690
e9bcb658
GB
46912014-08-29 Gary Benson <gbenson@redhat.com>
4692
4693 * config.in: Regenerate.
4694 * configure: Likewise.
4695
e3180625
GB
46962014-08-29 Gary Benson <gbenson@redhat.com>
4697
4698 * Makefile.in (SFILES): Add common/cleanups.c.
4699 (OBS): cleanups.o.
4700 (cleanups.o): New rule.
4701
e3d6ba5d
GB
47022014-08-29 Gary Benson <gbenson@redhat.com>
4703
4704 * utils.c (internal_vwarning): New function.
4705
7096e886
GB
47062014-08-28 Gary Benson <gbenson@redhat.com>
4707
4708 * utils.h (fatal): Remove declaration.
4709 * utils.c (fatal): Remove function.
4710
14ce3192
GB
47112014-08-28 Gary Benson <gbenson@redhat.com>
4712
4713 * tracepoint.c (gdb_agent_init): Replace fatal with
4714 perror_with_name.
4715 (initialize_tracepoint): Likewise.
4716
50278d59
GB
47172014-08-28 Gary Benson <gbenson@redhat.com>
4718
4719 * remote-utils.c (remote_prepare): Replace fatal with error.
4720
aa96c426
GB
47212014-08-28 Gary Benson <gbenson@redhat.com>
4722
4723 * linux-low.c (linux_async): Replace fatal with warning.
4724 Tidy up and return.
4725 (linux_start_non_stop): Return -1 if linux_async failed.
4726
f7160e97
GB
47272014-08-28 Gary Benson <gbenson@redhat.com>
4728
4729 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4730 gdb_assert.
4731 (i386_dr_low_get_addr): Remove vague comment.
4732 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4733 gdb_assert.
4734
38e08fca
GB
47352014-08-28 Gary Benson <gbenson@redhat.com>
4736
4737 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4738 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4739 internal_error.
4740 (linux_resume_one_lwp): Likewise.
4741 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4742 gdb_assert.
4743 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4744 with internal_error.
4745 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4746 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4747 (find_register_by_name): Replace fatal with internal_error.
4748 (find_regno): Likewise.
4749 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4750 * thread-db.c (thread_db_create_event): Likewise.
4751 (thread_db_load_search): Likewise.
4752 (try_thread_db_load_1): Likewise.
4753 * tracepoint.c (get_jump_space_head): Replace fatal with
4754 internal_error.
4755 (claim_trampoline_space): Likewise.
4756 (have_fast_tracepoint_trampoline_buffer): Likewise.
4757 (cmd_qtstart): Likewise.
4758 (stop_tracing): Likewise.
4759 (fast_tracepoint_collecting): Likewise.
4760 (target_malloc): Likewise.
4761 (download_tracepoint): Likewise.
4762 (download_trace_state_variables): Replace check with gdb_assert.
4763 (upload_fast_traceframes): Replace fatal with internal_error.
4764
34abf635
GB
47652014-08-19 Tom Tromey <tromey@redhat.com>
4766 Gary Benson <gbenson@redhat.com>
4767
4768 * Makefile.in (SFILES): Add common/common-debug.c.
4769 (OBS): Add common-debug.o.
4770 (common-debug.o): New rule.
4771 * debug.h (debug_printf): Don't declare.
4772 * debug.c (debug_printf): Renamed and rewritten as...
4773 (debug_vprintf): New function.
4774
f6e94d78
GB
47752014-08-19 Gary Benson <gbenson@redhat.com>
4776
4777 * utils.h: Do not include print-utils.h.
4778
9239eeab
GB
47792014-08-19 Tom Tromey <tromey@redhat.com>
4780 Gary Benson <gbenson@redhat.com>
4781
4782 * server.h: Add static assertion.
4783 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4784
ef87c8bb
GB
47852014-08-19 Tom Tromey <tromey@redhat.com>
4786 Gary Benson <gbenson@redhat.com>
4787
4788 * Makefile.in (SFILES): Add common/errors.c.
4789 (OBS): Add errors.o.
4790 (IPA_OBS): Add errors-ipa.o.
4791 (errors.o): New rule.
4792 (errors-ipa.o): Likewise.
4793 * utils.h (perror_with_name, error, warning): Don't declare.
4794 * utils.c (warning): Renamed and rewritten as...
4795 (vwarning): New function.
4796 (error): Renamed and rewritten as...
4797 (verror): New function.
4798 (internal_error): Renamed and rewritten as...
4799 (internal_verror): New function.
4800
bb974a24
GB
48012014-08-07 Gary Benson <gbenson@redhat.com>
4802
4803 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4804 * configure: Regenerate.
4805 * config.in: Likewise.
4806 * server.h: Do not include errno.h.
4807 * event-loop.c: Likewise.
4808 * hostio-errno.c: Likewise.
4809 * linux-low.c: Likewise.
4810 * remote-utils.c: Likewise.
4811 * spu-low.c: Likewise.
4812 * utils.c: Likewise.
4813 * gdbreplay.c: Unconditionally include errno.h.
4814
6d3d12eb
GB
48152014-08-07 Gary Benson <gbenson@redhat.com>
4816
4817 * server.h: Do not include string.h.
4818 * event-loop.c: Likewise.
4819 * linux-low.c: Likewise.
4820 * regcache.c: Likewise.
4821 * remote-utils.c: Likewise.
4822 * spu-low.c: Likewise.
4823 * utils.c: Likewise.
4824
dccbb609
GB
48252014-08-07 Gary Benson <gbenson@redhat.com>
4826
4827 * server.h: Do not include gdb_assert.h.
4828
e76df0d0
GB
48292014-08-07 Gary Benson <gbenson@redhat.com>
4830
4831 * server.h: Do not include common-utils.h.
4832
4cb9c816
GB
48332014-08-07 Gary Benson <gbenson@redhat.com>
4834
4835 * server.h: Do not include ptid.h.
4836 * notif.h: Likewise.
4837
3995eeee
GB
48382014-08-07 Gary Benson <gbenson@redhat.com>
4839
4840 * server.h: Do not include gdb_locale.h.
4841
cb9f1a9b
GB
48422014-08-07 Gary Benson <gbenson@redhat.com>
4843
4844 * server.h: Do not include gdb/signals.h.
4845 * win32-low.c: Likewise.
4846
a5fceff8
GB
48472014-08-07 Gary Benson <gbenson@redhat.com>
4848
4849 * server.h: Do not include pathmax.h.
4850
b9391142
GB
48512014-08-07 Gary Benson <gbenson@redhat.com>
4852
4853 * server.h: Do not include libiberty.h.
4854 * linux-bfin-low.c: Likewise.
4855
0e443c87
GB
48562014-08-07 Gary Benson <gbenson@redhat.com>
4857
4858 * server.h: Do not include ansidecl.h.
4859
8ebb3f56
GB
48602014-08-07 Gary Benson <gbenson@redhat.com>
4861
4862 * linux-x86-low.c: Do not include stddef.h.
4863 * lynx-ppc-low.c: Likewise.
4864 * tracepoint.c: Likewise.
4865
8980bdf6
GB
48662014-08-07 Gary Benson <gbenson@redhat.com>
4867
4868 * server.h: Do not include stdarg.h.
4869 * nto-low.c: Likewise.
4870
d7096f71
GB
48712014-08-07 Gary Benson <gbenson@redhat.com>
4872
4873 * server.h: Do not include stdlib.h.
4874 * inferiors.c: Likewise.
4875 * linux-low.c: Likewise.
4876 * regcache.c: Likewise.
4877 * spu-low.c: Likewise.
4878 * tracepoint.c: Likewise.
4879 * utils.c: Likewise.
4880
d02f550d
GB
48812014-08-07 Gary Benson <gbenson@redhat.com>
4882
4883 * server.h: Do not include stdio.h.
4884 * linux-low.c: Likewise.
4885 * remote-utils.c: Likewise.
4886 * spu-low.c: Likewise.
4887 * utils.c: Likewise.
4888 * wincecompat.c: Likewise.
4889
87f6c4e3
GB
48902014-08-06 Gary Benson <gbenson@redhat.com>
4891
4892 * regcache.c (init_register_cache): Move conditionals inside if.
4893
7089dca4
GB
48942014-08-06 Gary Benson <gbenson@redhat.com>
4895
4896 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4897
462f517e
GB
48982014-07-31 Gary Benson <gbenson@redhat.com>
4899
4900 * ax.h: Do not include server.h.
4901 * gdbthread.h: Likewise.
4902 * lynx-low.h: Likewise.
4903 * notif.h: Likewise.
4904
976411d6
GB
49052014-07-30 Gary Benson <gbenson@redhat.com>
4906
4907 * server.h: Include common-defs.h.
4908 Do not include config.h or build-gnulib-gdbserver/config.h.
4909
d41f6d8e
GB
49102014-07-30 Gary Benson <gbenson@redhat.com>
4911
4912 * hostio-errno.c: Move server.h to top of includes list.
4913 * inferiors.c: Likewise.
4914 * linux-x86-low.c: Likewise.
4915 * notif.c: Include server.h.
4916
314c6a35
TT
49172014-07-24 Tom Tromey <tromey@redhat.com>
4918 Gary Benson <gbenson@redhat.com>
4919
4920 * server.h (CORE_ADDR): Now unsigned.
4921
69ff6be5
PA
49222014-07-16 Pedro Alves <palves@redhat.com>
4923
4924 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4925
ce9e3fe7
PA
49262014-07-15 Pedro Alves <palves@redhat.com>
4927
4928 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4929 copy.
4930
e76126e8
PA
49312014-07-11 Pedro Alves <palves@redhat.com>
4932
4933 * linux-low.c (kill_wait_lwp): New function, based on
4934 kill_one_lwp_callback, but use my_waitpid directly.
4935 (kill_one_lwp_callback, linux_kill): Use it.
4936
8e9db26e
PA
49372014-06-23 Pedro Alves <palves@redhat.com>
4938
4939 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4940 before setting DR0..DR3.
4941
698b3e08
GB
49422014-06-20 Gary Benson <gbenson@redhat.com>
4943
4944 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4945 * configure: Regenerated.
4946 * config.in: Likewise.
4947
125f8a3d
GB
49482014-06-20 Gary Benson <gbenson@redhat.com>
4949
4950 * Makefile.in (SFILES): Update locations for files moved
4951 from common to nat.
4952 (object file files): Reordered.
4953
42995dbd
GB
49542014-06-20 Gary Benson <gbenson@redhat.com>
4955
4956 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4957 (i386_dr_low_set_addr): Likewise.
4958 (i386_dr_low_get_addr): Likewise.
4959 (i386_dr_low_can_set_control): Likewise.
4960 (i386_dr_low_set_control): Likewise.
4961 (i386_dr_low_get_control): Likewise.
4962 (i386_dr_low_get_status): Likewise.
4963 (i386_get_debug_register_length): Likewise.
4964 * linux-x86-low.c (i386_dr_low_set_addr):
4965 Changed signature. Made static.
4966 (i386_dr_low_get_addr): Likewise.
4967 (i386_dr_low_set_control): Likewise.
4968 (i386_dr_low_get_control): Likewise.
4969 (i386_dr_low_get_status): Likewise.
4970 (i386_dr_low): New global variable.
4971 * win32-i386-low.c (i386_dr_low_set_addr):
4972 Changed signature. Made static.
4973 (i386_dr_low_get_addr): Likewise.
4974 (i386_dr_low_set_control): Likewise.
4975 (i386_dr_low_get_control): Likewise.
4976 (i386_dr_low_get_status): Likewise.
4977 (i386_dr_low): New global variable.
4978
e1d2394b
MS
49792014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4980
4981 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4982 * Makefile.in (AR, AR_FLAGS): Define.
4983 * configure: Regenerate.
4984
3a8ee006
GB
49852014-06-19 Gary Benson <gbenson@redhat.com>
4986
4987 * Makefile.in (i386-dregs.o): New rule.
4988 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4989 * i386-low.c (target.h): Remove include.
4990 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4991 (DR_CONTROL_SHIFT): Likewise.
4992 (DR_CONTROL_SIZE): Likewise.
4993 (DR_RW_EXECUTE): Likewise.
4994 (DR_RW_WRITE): Likewise.
4995 (DR_RW_READ): Likewise.
4996 (DR_RW_IORW): Likewise.
4997 (DR_LEN_1): Likewise.
4998 (DR_LEN_2): Likewise.
4999 (DR_LEN_4): Likewise.
5000 (DR_LEN_8): Likewise.
5001 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5002 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5003 (DR_ENABLE_SIZE): Likewise.
5004 (DR_LOCAL_SLOWDOWN): Likewise.
5005 (DR_GLOBAL_SLOWDOWN): Likewise.
5006 (DR_CONTROL_RESERVED): Likewise.
5007 (I386_DR_CONTROL_MASK): Likewise.
5008 (I386_DR_VACANT): Likewise.
5009 (I386_DR_LOCAL_ENABLE): Likewise.
5010 (I386_DR_GLOBAL_ENABLE): Likewise.
5011 (I386_DR_DISABLE): Likewise.
5012 (I386_DR_SET_RW_LEN): Likewise.
5013 (I386_DR_GET_RW_LEN): Likewise.
5014 (I386_DR_WATCH_HIT): Likewise.
5015 (i386_wp_op_t): Likewise.
5016 (i386_show_dr): Likewise.
5017 (i386_length_and_rw_bits): Likewise.
5018 (i386_insert_aligned_watchpoint): Likewise.
5019 (i386_remove_aligned_watchpoint): Likewise.
5020 (i386_handle_nonaligned_watchpoint): Likewise.
5021 i386_update_inferior_debug_regs(): Likewise.
5022 (i386_dr_insert_watchpoint): Likewise.
5023 (i386_dr_remove_watchpoint): Likewise.
5024 (i386_dr_region_ok_for_watchpoint): Likewise.
5025 (i386_dr_stopped_data_address): Likewise.
5026 (i386_dr_stopped_by_watchpoint): Likewise.
5027
8f26655c
GB
50282014-06-19 Gary Benson <gbenson@redhat.com>
5029
5030 * i386-low.c (i386_dr_show): Renamed to
5031 i386_show_dr and made static. All uses updated.
5032 (i386_dr_length_and_rw_bits): Renamed to
5033 i386_length_and_rw_bits and made static.
5034 All uses updated.
5035 (i386_dr_insert_aligned_watchpoint): Renamed to
5036 i386_insert_aligned_watchpoint and made static.
5037 All uses updated.
5038 (i386_dr_remove_aligned_watchpoint): Renamed to
5039 i386_remove_aligned_watchpoint and made static.
5040 All uses updated.
5041 (i386_dr_update_inferior_debug_regs): Renamed to
5042 i386_update_inferior_debug_regs and made static.
5043 All uses updated.
5044
b9228891
GB
50452014-06-18 Gary Benson <gbenson@redhat.com>
5046
5171def3
GB
5047 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5048 (i386_dr_low_can_set_control): Likewise.
5049 (i386_get_debug_register_length): Likewise.
5050 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5051 (i386_dr_low_can_set_control): Likewise.
5052 (i386_get_debug_register_length): Likewise.
5053
50542014-06-17 Gary Benson <gbenson@redhat.com>
5055
b9228891
GB
5056 * i386-low.h (i386-dregs.h): New include.
5057 (DR_FIRSTADDR): Now in i386-dregs.h.
5058 (DR_LASTADDR): Likewise.
5059 (DR_NADDR): Likewise.
5060 (DR_STATUS): Likewise.
5061 (DR_CONTROL): Likewise.
5062 (i386_debug_reg_state): Likewise.
5063 (i386_dr_insert_watchpoint): Likewise.
5064 (i386_dr_remove_watchpoint): Likewise.
5065 (i386_dr_region_ok_for_watchpoint): Likewise.
5066 (i386_dr_stopped_data_address): Likewise.
5067 (i386_dr_stopped_by_watchpoint): Likewise.
5068 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5069
4be83cc2
GB
50702014-06-18 Gary Benson <gbenson@redhat.com>
5071
5072 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5073 i386_dr_insert_watchpoint.
5074 (i386_low_remove_watchpoint): Renamed to
5075 i386_dr_remove_watchpoint.
5076 (i386_low_region_ok_for_watchpoint): Renamed to
5077 i386_dr_region_ok_for_watchpoint.
5078 (i386_low_stopped_data_address): Renamed to
5079 i386_dr_stopped_data_address.
5080 (i386_low_stopped_by_watchpoint): Renamed to
5081 i386_dr_stopped_by_watchpoint.
5082 * i386-low.c (i386_show_dr): Renamed to
5083 i386_dr_show and made nonstatic. All uses updated.
5084 (i386_length_and_rw_bits): Renamed to
5085 i386_dr_length_and_rw_bits and made nonstatic.
5086 All uses updated.
5087 (i386_insert_aligned_watchpoint): Renamed to
5088 i386_dr_insert_aligned_watchpoint and made nonstatic.
5089 All uses updated.
5090 (i386_remove_aligned_watchpoint): Renamed to
5091 i386_dr_remove_aligned_watchpoint and made nonstatic.
5092 All uses updated.
5093 (i386_update_inferior_debug_regs): Renamed to
5094 i386_dr_update_inferior_debug_regs and made nonstatic.
5095 All uses updated.
5096 (i386_low_insert_watchpoint): Renamed to
5097 i386_dr_insert_watchpoint. All uses updated.
5098 (i386_low_remove_watchpoint): Renamed to
5099 i386_dr_remove_watchpoint. All uses updated.
5100 (i386_low_region_ok_for_watchpoint): Renamed to
5101 i386_dr_region_ok_for_watchpoint. All uses updated.
5102 (i386_low_stopped_data_address): Renamed to
5103 i386_dr_stopped_data_address. All uses updated.
5104 (i386_low_stopped_by_watchpoint): Renamed to
5105 i386_dr_stopped_by_watchpoint. All uses updated.
5106
131aa0d4
GB
51072014-06-18 Gary Benson <gbenson@redhat.com>
5108
5109 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5110 (i386_dr_low_can_set_control): Likewise.
5111 (i386_insert_aligned_watchpoint): New check.
5112
d9305f7f
GB
51132014-06-18 Gary Benson <gbenson@redhat.com>
5114
5115 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5116 Renamed to state.
5117
e927c9fc
GB
51182014-06-18 Gary Benson <gbenson@redhat.com>
5119
5120 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5121 instead of fatal and error.
5122 (i386_handle_nonaligned_watchpoint): Likewise.
5123
1b6d4134
GB
51242014-06-18 Gary Benson <gbenson@redhat.com>
5125
5126 * i386-low.c (i386_get_debug_register_length): New macro.
5127 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5128 (i386_show_dr): Use debug_printf instead of fprintf. Use
5129 phex to format values.
5130
6e62758f
GB
51312014-06-18 Gary Benson <gbenson@redhat.com>
5132
5133 * i386-low.h: Comment changes.
5134 * i386-low.c: Likewise.
5135
fc6e2f03
GB
51362014-06-18 Gary Benson <gbenson@redhat.com>
5137
5138 * i386-low.c: Whitespace changes.
5139
f9d1eeed
TT
51402014-06-12 Tom Tromey <tromey@redhat.com>
5141
5142 * utils.c (freeargv): Remove.
5143
0b04e523
TT
51442014-06-12 Tom Tromey <tromey@redhat.com>
5145
5146 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5147 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5148 (parse_debug_format_options): Likewise.
5149 (gdbserver_usage): Likewise.
5150 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5151 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5152 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5153 against libiberty.
5154 ($(LIBGNU)): Depend on libiberty.
5155 (all-lib): Recurse into all subdirs.
5156 (install-only): Invoke "install" target in subdirs.
5157 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5158 targets.
5159 * configure: Rebuild.
5160 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5161 for vasprintf, vsnprintf, or gettimeofday.
5162 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5163 srv_tgtobj.
5164
270c9937
JB
51652014-06-05 Joel Brobecker <brobecker@adacore.com>
5166
5167 * development.sh: Delete.
5168 * Makefile.in (config.status): Adjust dependency on development.sh.
5169 * configure.ac: Adjust development.sh source call.
5170 * configure: Regenerate.
5171
0a261ed8
PA
51722014-06-02 Pedro Alves <palves@redhat.com>
5173
5174 * ax.c (gdb_free_agent_expr): New function.
5175 * ax.h (gdb_free_agent_expr): New declaration.
5176 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5177 list.
5178 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5179 static.
5180 (clear_breakpoint_conditions_and_commands): New function.
5181 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5182 (clear_breakpoint_conditions_and_commands): New declaration.
5183
e9dae05e
RR
51842014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5185
5186 * linux-aarch64-low.c (asm/ptrace.h): Include.
5187
5876f503
JK
51882014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5189
5190 Fix TLS access for -static -pthread.
5191 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5192 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5193 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5194
802e8e6d
PA
51952014-05-20 Pedro Alves <palves@redhat.com>
5196
5197 * linux-aarch64-low.c (aarch64_insert_point)
5198 (aarch64_remove_point): No longer check whether the type is
5199 supported here. Adjust to new interface.
5200 (the_low_target): Install aarch64_supports_z_point_type as
5201 supports_z_point_type method.
5202 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5203 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5204 instead of a Z packet char. Adjust.
5205 (arm_supports_z_point_type): New function.
5206 (arm_insert_point, arm_remove_point): Adjust to new interface.
5207 (the_low_target): Install arm_supports_z_point_type.
5208 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5209 (cris_insert_point, cris_remove_point): Adjust to new interface.
5210 Don't check whether the type is supported here.
5211 (the_low_target): Install cris_supports_z_point_type.
5212 * linux-low.c (linux_supports_z_point_type): New function.
5213 (linux_insert_point, linux_remove_point): Adjust to new interface.
5214 * linux-low.h (struct linux_target_ops) <insert_point,
5215 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5216 raw_breakpoint pointer parameter.
5217 <supports_z_point_type>: New method.
5218 * linux-mips-low.c (mips_supports_z_point_type): New function.
5219 (mips_insert_point, mips_remove_point): Adjust to new interface.
5220 Use mips_supports_z_point_type.
5221 (the_low_target): Install mips_supports_z_point_type.
5222 * linux-ppc-low.c (the_low_target): Install NULL as
5223 supports_z_point_type method.
5224 * linux-s390-low.c (the_low_target): Install NULL as
5225 supports_z_point_type method.
5226 * linux-sparc-low.c (the_low_target): Install NULL as
5227 supports_z_point_type method.
5228 * linux-x86-low.c (x86_supports_z_point_type): New function.
5229 (x86_insert_point): Adjust to new insert_point interface. Use
5230 insert_memory_breakpoint. Adjust to new
5231 i386_low_insert_watchpoint interface.
5232 (x86_remove_point): Adjust to remove_point interface. Use
5233 remove_memory_breakpoint. Adjust to new
5234 i386_low_remove_watchpoint interface.
5235 (the_low_target): Install x86_supports_z_point_type.
5236 * lynx-low.c (lynx_target_ops): Install NULL as
5237 supports_z_point_type callback.
5238 * nto-low.c (nto_supports_z_point_type): New.
5239 (nto_insert_point, nto_remove_point): Adjust to new interface.
5240 (nto_target_ops): Install nto_supports_z_point_type.
5241 * mem-break.c: Adjust intro comment.
5242 (struct raw_breakpoint) <raw_type, size>: New fields.
5243 <inserted>: Update comment.
5244 <shlib_disabled>: Delete field.
5245 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5246 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5247 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5248 (raw_bkpt_type_to_target_hw_bp_type): New function.
5249 (find_enabled_raw_code_breakpoint_at): New function.
5250 (find_raw_breakpoint_at): New type and size parameters. Use them.
5251 (insert_memory_breakpoint): New function, based off
5252 set_raw_breakpoint_at.
5253 (remove_memory_breakpoint): New function.
5254 (set_raw_breakpoint_at): Reimplement.
5255 (set_breakpoint): New, based on set_breakpoint_at.
5256 (set_breakpoint_at): Reimplement.
5257 (delete_raw_breakpoint): Go through the_target->remove_point
5258 instead of assuming memory breakpoints.
5259 (find_gdb_breakpoint_at): Delete.
5260 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5261 (find_gdb_breakpoint): New function.
5262 (set_gdb_breakpoint_at): Delete.
5263 (z_type_supported): New function.
5264 (set_gdb_breakpoint_1): New function, loosely based off
5265 set_gdb_breakpoint_at.
5266 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5267 (delete_gdb_breakpoint_at): Delete.
5268 (delete_gdb_breakpoint_1): New function, loosely based off
5269 delete_gdb_breakpoint_at.
5270 (delete_gdb_breakpoint): New function.
5271 (clear_gdb_breakpoint_conditions): Rename to ...
5272 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5273 breakpoint.
5274 (add_condition_to_breakpoint): Make static.
5275 (add_breakpoint_condition): Take a struct breakpoint pointer
5276 instead of an address. Adjust.
5277 (gdb_condition_true_at_breakpoint): Rename to ...
5278 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5279 z_type parameter.
5280 (gdb_condition_true_at_breakpoint): Reimplement.
5281 (add_breakpoint_commands): Take a struct breakpoint pointer
5282 instead of an address. Adjust.
5283 (gdb_no_commands_at_breakpoint): Rename to ...
5284 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5285 parameter. Return true if no breakpoint was found. Change debug
5286 output.
5287 (gdb_no_commands_at_breakpoint): Reimplement.
5288 (run_breakpoint_commands): Rename to ...
5289 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5290 and change return type to boolean.
5291 (run_breakpoint_commands): New function.
5292 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5293 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5294 breakpoint. Go through the_target->remove_point instead of
5295 assuming memory breakpoint.
5296 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5297 software and hardware breakpoints.
5298 (reinsert_raw_breakpoint): Go through the_target->insert_point
5299 instead of assuming memory breakpoint.
5300 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5301 software and hardware breakpoints.
5302 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5303 Check both software and hardware breakpoints.
5304 (validate_inserted_breakpoint): Assert the breakpoint is a
5305 software breakpoint. Set the inserted flag to -1 instead of
5306 setting shlib_disabled.
5307 (delete_disabled_breakpoints): Adjust.
5308 (validate_breakpoints): Only validate software breakpoints.
5309 Adjust to inserted flag change.
5310 (check_mem_read, check_mem_write): Skip breakpoint types other
5311 than software breakpoints. Adjust to inserted flag change.
5312 * mem-break.h (enum raw_bkpt_type): New enum.
5313 (raw_breakpoint, struct process_info): Forward declare.
5314 (Z_packet_to_target_hw_bp_type): Delete declaration.
5315 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5316 (set_gdb_breakpoint, delete_gdb_breakpoint)
5317 (clear_breakpoint_conditions): New declarations.
5318 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5319 (breakpoint_inserted_here): Update comment.
5320 (add_breakpoint_condition, add_breakpoint_commands): Replace
5321 address parameter with a breakpoint pointer parameter.
5322 (gdb_breakpoint_here): Update comment.
5323 (delete_gdb_breakpoint_at): Delete.
5324 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5325 * server.c (process_point_options): Take a struct breakpoint
5326 pointer instead of an address. Adjust.
5327 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5328 delete_gdb_breakpoint.
5329 * spu-low.c (spu_target_ops): Install NULL as
5330 supports_z_point_type method.
5331 * target.h: Include mem-break.h.
5332 (struct target_ops) <prepare_to_access_memory>: Update comment.
5333 <supports_z_point_type>: New field.
5334 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5335 instead of a char. Also take a raw breakpoint pointer.
5336 * win32-arm-low.c (the_low_target): Install NULL as
5337 supports_z_point_type.
5338 * win32-i386-low.c (i386_supports_z_point_type): New function.
5339 (i386_insert_point, i386_remove_point): Adjust to new interface.
5340 (the_low_target): Install i386_supports_z_point_type.
5341 * win32-low.c (win32_supports_z_point_type): New function.
5342 (win32_insert_point, win32_remove_point): Adjust to new interface.
5343 (win32_target_ops): Install win32_supports_z_point_type.
5344 * win32-low.h (struct win32_target_ops):
5345 <supports_z_point_type>: New method.
5346 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5347 instead of a char. Also take a raw breakpoint pointer.
5348
932539e3
PA
53492014-05-20 Pedro Alves <palves@redhat.com>
5350
5351 * mem-break.h: Include break-common.h.
5352 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5353 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5354 (Z_packet_to_target_hw_bp_type): New declaration.
5355 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5356 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5357 (Z_PACKET_ACCESS_WP): Delete macros.
5358 (Z_packet_to_hw_type): Delete function.
5359 * i386-low.h: Don't include break-common.h here.
5360 (Z_packet_to_hw_type): Delete declaration.
5361 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5362 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5363 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5364 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5365 * linux-aarch64-low.c: Don't include break-common.h here.
5366 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5367 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5368 (Z_packet_to_target_hw_bp_type): Delete function.
5369 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5370 function.
5371 (mips_insert_point, mips_remove_point): Use
5372 Z_packet_to_target_hw_bp_type.
5373
4ff0d3d8
PA
53742014-05-20 Pedro Alves <palves@redhat.com>
5375
5376 * linux-aarch64-low.c: Include break-common.h.
5377 (enum target_point_type): Delete.
5378 (Z_packet_to_point_type): Rename to ...
5379 (Z_packet_to_target_hw_bp_type): ... this, and return a
5380 target_hw_bp_type instead.
5381 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5382 instead of an enum target_point_type.
5383 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5384 breakpoint type.
5385 (aarch64_dr_state_insert_one_point)
5386 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5387 (aarch64_handle_aligned_watchpoint)
5388 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5389 Take an enum target_hw_bp_type instead of an enum
5390 target_point_type.
5391 (aarch64_supports_z_point_type): New function.
5392 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5393 use Z_packet_to_target_hw_bp_type.
5394
786dc519
JB
53952014-05-20 Joel Brobecker <brobecker@adacore.com>
5396
5397 * configure.ac: Only use -Werror by default when DEVELOPMENT
5398 is true.
5399 * configure: Regenerate.
5400
9e0aa64f
JK
54012014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5402
5403 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5404 * linux-x86-low.c (X86_64_USER_REGS): New.
5405 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5406
2b577b92
YQ
54072014-04-28 Yao Qi <yao@codesourcery.com>
5408
5409 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5410 name.
5411
94611da2
PA
54122014-04-25 Pedro Alves <palves@redhat.com>
5413
5414 PR server/16255
5415 * linux-low.c (linux_attach_fail_reason_string): New function.
5416 (linux_attach_lwp): Delete.
5417 (linux_attach_lwp_1): Rename to ...
5418 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5419 argument. Remove "initial" parameter. Return int instead of
5420 void. Don't error or warn here.
5421 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5422 failure to attach to the tgid. Call warning when failing to
5423 attach to an lwp.
5424 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5425 argument. Remove "initial" parameter. Return int instead of
5426 void. Don't error or warn here.
5427 (linux_attach_fail_reason_string): New declaration.
5428 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5429 interface change. Use linux_attach_fail_reason_string.
5430
01f9f808
MS
54312014-04-24 Michael Sturm <michael.sturm@mintel.com>
5432 Walfred Tedeschi <walfred.tedeschi@intel.com>
5433
5434 * Makefile.in: Added rules to handle new files
5435 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5436 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5437 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5438 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5439 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5440 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5441 x32-avx512-linux.o.
5442 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5443 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5444 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5445 i386/x32-avx512.xml.
5446 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5447 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5448 i386/x32-avx512-linux.xml.
5449 * i387-fp.c (num_avx512_k_registers): New constant for number
5450 of K registers.
5451 (num_avx512_zmmh_low_registers): New constant for number of
5452 lower ZMM registers (0-15).
5453 (num_avx512_zmmh_high_registers): New constant for number of
5454 higher ZMM registers (16-31).
5455 (num_avx512_ymmh_registers): New contant for number of higher
5456 YMM registers (ymm16-31 added by avx521 on x86_64).
5457 (num_avx512_xmm_registers): New constant for number of higher
5458 XMM registers (xmm16-31 added by AVX512 on x86_64).
5459 (struct i387_xsave): Add space for AVX512 registers.
5460 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5461 Add code to handle AVX512 registers.
5462 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5463 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5464 prototypei from generated file.
5465 (tdesc_amd64_avx512_linux): Likewise.
5466 (init_registers_x32_avx512_linux): Likewise.
5467 (tdesc_x32_avx512_linux): Likewise.
5468 (init_registers_i386_avx512_linux): Likewise.
5469 (tdesc_i386_avx512_linux): Likewise.
5470 (x86_64_regmap): Add AVX512 registers.
5471 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5472 mask.
5473 (initialize_low_arch): Add code to initialize AVX512 registers.
5474
51aa91f9
PA
54752014-04-23 Pedro Alves <palves@redhat.com>
5476
5477 * mem-break.c (find_gdb_breakpoint_at): Make static.
5478 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5479
a4165e94
PA
54802014-04-23 Pedro Alves <palves@redhat.com>
5481
5482 * i386-low.c: Don't include break-common.h here.
5483 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5484 prototype to take target_hw_bp_type as argument instead of a Z
5485 packet char.
5486 * i386-low.h: Include break-common.h here.
5487 (Z_packet_to_hw_type): Declare.
5488 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5489 prototypes.
5490 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5491 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5492 (x86_remove_point): Convert the packet number to a
5493 target_hw_bp_type before calling i386_low_remove_watchpoint.
5494 * win32-i386-low.c (i386_insert_point): Convert the packet number
5495 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5496 (i386_remove_point): Convert the packet number to a
5497 target_hw_bp_type before calling i386_low_remove_watchpoint.
5498
b8acf843
PA
54992014-04-23 Pedro Alves <palves@redhat.com>
5500
5501 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5502
d708bcd1
PA
55032014-04-10 Pedro Alves <palves@redhat.com>
5504
5505 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5506 Check if the condition or command is NULL before checking if the
5507 breakpoint is known. On success, return true.
5508 * mem-break.h (add_breakpoint_condition): Document return.
5509 (add_breakpoint_commands): Add describing comment.
5510 * server.c (skip_to_semicolon): New function.
5511 (process_point_options): Use it.
5512
2eec7d5b
PA
55132014-04-09 Pedro Alves <palves@redhat.com>
5514
5515 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5516 to lwpid_of.
5517
fa96cb38
PA
55182014-02-27 Pedro Alves <palves@redhat.com>
5519
5520 PR 12702
5521 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5522 macros.
5523 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5524 output.
5525 (last_thread_of_process_p): Take a PID argument instead of a
5526 thread pointer.
5527 (linux_wait_for_lwp): Delete.
5528 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5529 functions.
5530 (linux_low_filter_event): New function, party factored out from
5531 linux_wait_for_event.
5532 (linux_wait_for_event): Rename to ...
5533 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5534 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5535 sigsuspend. Check for zombie leaders.
5536 (linux_wait_for_event): Reimplement as wrapper around
5537 linux_wait_for_event_filtered.
5538 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5539 a normal or signal exit is seen, it's the whole process exiting.
5540 (wait_for_sigstop): No longer a for_each_inferior callback.
5541 Rewrite on top of linux_wait_for_event_filtered.
5542 (stop_all_lwps): Call wait_for_sigstop directly.
5543 * server.c (resume, handle_target_event): Handle
5544 TARGET_WAITKIND_NO_RESUMED.
5545
d763de10
JB
55462014-02-26 Joel Brobecker <brobecker@adacore.com>
5547
5548 * win32-low.c (psapi_get_dll_name,
5549 * win32_CreateToolhelp32Snapshot): Delete.
5550 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5551 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5552 Delete.
5553 (handle_load_dll): Add function description.
5554 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5555
850a0f76
JB
55562014-02-26 Joel Brobecker <brobecker@adacore.com>
5557
5558 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5559 Add comment.
5560 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5561 base address when calling win32_add_one_solib.
5562 (handle_load_dll): Delete local variable load_addr.
5563 Remove 0x1000 offset applied to DLL base address when calling
5564 win32_add_one_solib.
5565 (handle_unload_dll): Add comment.
5566
f25b3fc3
JB
55672014-02-26 Joel Brobecker <brobecker@adacore.com>
5568
5569 * win32-low.c (win32_add_all_dlls): Renames
5570 win32_ensure_ntdll_loaded. Rewrite function documentation.
5571 Adjust implementation to always load all DLLs.
5572 Add 0x1000 offset to DLL base address when calling
5573 win32_add_one_solib.
5574 (child_initialization_done): New static global.
5575 (do_initial_child_stuff): Set child_initialization_done to
5576 zero during child initialization, and 1 after. Replace call
5577 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5578 Add comment.
5579 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5580 (handle_unload_dll): Add function documentation.
5581 (get_child_debug_event): Ignore load and unload DLL events
5582 during child initialization.
5583
d86d4aaf
DE
55842014-02-20 Doug Evans <dje@google.com>
5585
3bc32da3 5586 Remove global all_lwps.
d86d4aaf
DE
5587 * inferiors.h (ptid_of): Move here from linux-low.h.
5588 (pid_of, lwpid_of): Ditto.
5589 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5590 parameter is a struct thread_info * now.
5591 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5592 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5593 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5594 directly.
5595 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5596 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5597 * linux-arm-low.c (update_registers_callback): Update, "entry"
5598 parameter is a struct thread_info * now.
5599 Fetch lwpid from current_inferior directly.
5600 (arm_insert_point): Pass &all_threads to find_inferior instead of
5601 &all_lwps.
5602 (arm_remove_point): Ditto.
5603 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5604 (arm_prepare_to_resume): Fetch pid from thread.
5605 (arm_read_description): Fetch lwpid from current_inferior directly.
5606 * linux-low.c (all_lwps): Delete.
5607 (delete_lwp): Delete call to remove_inferior.
5608 (handle_extended_wait): Fetch lwpid from thread.
5609 (add_lwp): Don't set lwp->entry.id. Remove call to
5610 add_inferior_to_list.
5611 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5612 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5613 (kill_one_lwp_callback): Ditto.
5614 (linux_kill): Don't dereference NULL pointer.
5615 Fetch ptid,lwpid from thread.
5616 (get_detach_signal): Fetch ptid from thread.
5617 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5618 Simplify call to regcache_invalidate_thread.
5619 (delete_lwp_callback): Update, "entry" parameter is a
5620 struct thread_info * now. Fetch pid from thread.
5621 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5622 (status_pending_p_callback): Update, "entry" parameter is a
5623 struct thread_info * now. Fetch ptid from thread.
5624 (find_lwp_pid): Update, "entry" parameter is a
5625 struct thread_info * now.
5626 (linux_wait_for_lwp): Fetch pid from thread.
5627 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5628 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5629 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5630 (dequeue_one_deferred_signal): Ditto.
5631 (cancel_breakpoint): Fetch ptid from current_inferior.
5632 (linux_wait_for_event): Pass &all_threads to find_inferior,
5633 not &all_lwps. Fetch ptid, lwpid from thread.
5634 (count_events_callback): Update, "entry" parameter is a
5635 struct thread_info * now.
5636 (select_singlestep_lwp_callback): Ditto.
5637 (select_event_lwp_callback): Ditto.
5638 (cancel_breakpoints_callback): Ditto.
5639 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5640 not &all_lwps.
5641 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5642 (unsuspend_one_lwp): Update, "entry" parameter is a
5643 struct thread_info * now.
5644 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5645 not &all_lwps.
5646 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5647 Fetch lwpid from thread, not lwp.
5648 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5649 Pass &all_threads to find_inferior, not &all_lwps.
5650 (send_sigstop): Fetch lwpid from thread, not lwp.
5651 (send_sigstop_callback): Update, "entry" parameter is a
5652 struct thread_info * now.
5653 (suspend_and_send_sigstop_callback): Ditto.
5654 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5655 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5656 struct thread_info * now.
5657 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5658 from thread, lwp.
5659 (lwp_running): Update, "entry" parameter is a
5660 struct thread_info * now.
5661 (stop_all_lwps): Fetch ptid from thread.
5662 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5663 (linux_resume_one_lwp): Fetch lwpid from thread.
5664 (linux_set_resume_request): Update, "entry" parameter is a
5665 struct thread_info * now. Fetch pid, lwpid from thread.
5666 (resume_status_pending_p): Update, "entry" parameter is a
5667 struct thread_info * now.
5668 (need_step_over_p): Ditto. Fetch lwpid from thread.
5669 (start_step_over): Fetch lwpid from thread.
5670 (linux_resume_one_thread): Update, "entry" parameter is a
5671 struct thread_info * now. Fetch lwpid from thread.
5672 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5673 (proceed_one_lwp): Update, "entry" parameter is a
5674 struct thread_info * now. Fetch lwpid from thread.
5675 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5676 struct thread_info * now.
5677 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5678 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5679 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5680 directly.
5681 (regsets_store_inferior_registers): Ditto.
5682 (fetch_register, store_register): Ditto.
5683 (linux_read_memory, linux_write_memory): Ditto.
5684 (linux_request_interrupt): Ditto.
5685 (linux_read_auxv): Ditto.
5686 (linux_xfer_siginfo): Ditto.
5687 (linux_qxfer_spu): Ditto.
5688 (linux_qxfer_libraries_svr4): Ditto.
5689 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5690 moved to inferiors.h.
5691 (get_lwp): Delete.
5692 (get_thread_lwp): Update.
5693 (struct lwp_info): Delete member "entry". Simplify comment for
5694 member "thread".
5695 (all_lwps): Delete.
5696 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5697 current_inferior directly.
5698 (update_watch_registers_callback): Update, "entry" parameter is a
5699 struct thread_info * now. Fetch pid from thread.
5700 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5701 (mips_insert_point): Fetch lwpid from current_inferior.
5702 Pass &all_threads to find_inferior, not &all_lwps.
5703 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5704 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5705 directly.
5706 (mips_stopped_data_address): Ditto.
5707 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5708 directly.
5709 * linux-tile-low.c (tile_arch_setup): Ditto.
5710 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5711 (update_debug_registers_callback): Update, "entry" parameter is a
5712 struct thread_info * now. Fetch pid from thread.
5713 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5714 Pass &all_threads to find_inferior, not &all_lwps.
5715 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5716 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5717 Pass &all_threads to find_inferior, not &all_lwps.
5718 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5719 (i386_dr_low_get_status): Ditto.
5720 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5721 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5722 (x86_linux_read_description): Ditto.
5723 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5724
3b8361aa
DE
57252014-02-20 Doug Evans <dje@google.com>
5726
5727 * inferiors.c (get_first_inferior): Fix buglet.
5728
f7667f0d
DE
57292014-02-19 Doug Evans <dje@google.com>
5730
5731 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5732 * inferiors.c (add_thread): Change result type to struct thread_info *.
5733 All callers updated.
5734 (add_lwp): Call add_thread here instead of in callers.
5735 All callers updated.
5736 * linux-low.h (get_lwp_thread): Rewrite.
5737 (struct lwp_info): New member "thread".
5738
b3312d80
DE
57392014-02-19 Doug Evans <dje@google.com>
5740
5741 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5742 All callers updated.
5743
ecc6f45c
DE
57442014-02-19 Doug Evans <dje@google.com>
5745
5746 * inferiors.c (add_thread): Fix whitespace.
5747
649ebbca
DE
57482014-02-19 Doug Evans <dje@google.com>
5749
5750 * dll.c (clear_dlls): Replace accessing list implemention details
5751 with API function.
5752 * gdbthread.h (get_first_thread): Declare.
5753 * inferiors.c (for_each_inferior_with_data): New function.
5754 (get_first_thread): New function.
5755 (find_thread_ptid): Simplify.
5756 (get_first_inferior): New function.
5757 (clear_list): Delete.
5758 (one_inferior_p): New function.
5759 (clear_inferior_list): New function.
5760 (clear_inferiors): Update.
5761 * inferiors.h (for_each_inferior_with_data): Declare.
5762 (clear_inferior_list): Declare.
5763 (one_inferior_p): Declare.
5764 (get_first_inferior): Declare.
5765 * linux-low.c (linux_wait_for_event): Replace accessing list
5766 implemention details with API function.
5767 * server.c (target_running): Ditto.
5768 (accumulate_file_name_length): New function.
5769 (emit_dll_description): New function.
5770 (handle_qxfer_libraries): Replace accessing list implemention
5771 details with API function.
5772 (handle_qxfer_threads_worker): New function.
5773 (handle_qxfer_threads_proper): Replace accessing list implemention
5774 details with API function.
5775 (handle_query): Ditto.
5776 (visit_actioned_threads_callback_ftype): New typedef.
5777 (visit_actioned_threads_data): New struct.
5778 (visit_actioned_threads): Rewrite to be find_inferior callback.
5779 (resume): Call find_inferior.
5780 (handle_status): Replace accessing list implemention
5781 details with API function.
5782 (process_serial_event): Replace accessing list implemention details
5783 with API function.
5784 * target.c (set_desired_inferior): Replace accessing list implemention
5785 details with API function.
5786 * tracepoint.c (same_process_p): New function.
5787 (gdb_agent_about_to_close): Replace accessing list implemention
5788 details with API function.
5789 * win32-low.c (child_delete_thread): Replace accessing list
5790 implemention details with API function.
5791 (match_dll_by_basename): New function.
5792 (dll_is_loaded_by_basename): New function.
5793 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5794 details call to dll_is_loaded_by_basename.
5795
80894984
DE
57962014-02-19 Doug Evans <dje@google.com>
5797
5798 * dll.h (struct dll_info): Add comment.
5799 * gdbthread.h (struct thread_info): Add comment.
5800 (current_ptid): Simplify.
5801 * inferiors.c (add_process): Update.
5802 (remove_process): Update.
5803 * inferiors.h (struct process_info): Rename member "head" to "entry".
5804 * linux-low.c (delete_lwp): Update.
5805 (add_lwp): Update.
5806 (last_thread_of_process_p): Update.
5807 (kill_one_lwp_callback, linux_kill): Update.
5808 (status_pending_p_callback): Update.
5809 (wait_for_sigstop): Update. Simplify read of ptid.
5810 (start_step_over): Update.
5811 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5812 (get_lwp_thread): Update.
5813 (struct lwp_info): Rename member "head" to "entry".
5814 * regcache.h (inferior_list_entry): Delete.
5815 * server.c (kill_inferior_callback): Update.
5816 (detach_or_kill_inferior_callback): Update.
5817 (print_started_pid): Update.
5818 (print_attached_pid): Update.
5819 (process_serial_event): Simplify read of ptid.
5820 * thread-db.c (thread_db_create_event): Update.
5821 (thread_db_get_tls_address): Update.
5822 * win32-low.c (current_inferior_ptid): Simplify.
5823
46917d26
TT
58242014-02-19 Tom Tromey <tromey@redhat.com>
5825
5826 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5827 argument.
5828 (target_supports_btrace): Update.
5829
0759a81e
YQ
58302014-02-14 Yao Qi <yao@codesourcery.com>
5831
5832 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5833 (rsp-low-ipa.o): New target.
5834
a7191e8b
TT
58352014-02-12 Tom Tromey <tromey@redhat.com>
5836
5837 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5838 convert_ascii_to_int.
5839 * regcache.c (registers_to_string): Likewise.
5840 * remote-utils.c (decode_M_packet): Likewise.
5841 * server.c (process_serial_event): Likewise.
5842
ff0e980e
TT
58432014-02-12 Tom Tromey <tromey@redhat.com>
5844
5845 * server.c (handle_query, handle_v_run): Use hex2bin, not
5846 unhexify.
5847 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5848
e9371aff
TT
58492014-02-12 Tom Tromey <tromey@redhat.com>
5850
5851 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5852 convert_int_to_ascii.
5853 * regcache.c (registers_to_string, collect_register_as_string):
5854 Likewise.
5855 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5856 Likewise.
5857 * server.c (process_serial_event): Likewise.
5858 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5859 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5860
971dc0b8
TT
58612014-02-12 Tom Tromey <tromey@redhat.com>
5862
5863 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5864 bin2hex, not hexify.
5865 * tracepoint.c (cmd_qtstatus): Likewise.
5866
0a822afb
TT
58672014-02-12 Tom Tromey <tromey@redhat.com>
5868
5869 * remote-utils.c (monitor_output): Pass explicit length to
5870 hexify.
5871
9c3d6531
TT
58722014-02-12 Tom Tromey <tromey@redhat.com>
5873
5874 * tracepoint.c: Include rsp-low.h.
5875 * server.c: Include rsp-low.h.
5876 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5877 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5878 declare.
5879 * remote-utils.c: Include rsp-low.h.
5880 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5881 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5882 (convert_int_to_ascii, convert_ascii_to_int): Move to
5883 common/rsp-low.c.
5884 * regcache.c: Include rsp-low.h.
5885 * ax.c: Include rsp-low.h.
5886 * Makefile.in (SFILES): Add common/rsp-low.c.
5887 (OBS): Add rsp-low.o.
5888 (rsp-low.o): New target.
5889
01fd3ea5
TT
58902014-02-12 Tom Tromey <tromey@redhat.com>
5891
5892 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5893 Include print-utils.h.
5894 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5895 (plongest, thirty_two, phex_nz): Remove.
5896 * Makefile.in (SFILES): Add common/print-utils.c.
5897 (OBS): Add print-utils.o.
5898 (print-utils-ipa.o): New target.
5899 (print-utils.o): New target.
5900 (IPA_OBJS): Add print-utils-ipa.o.
5901
e99dc820
TT
59022014-02-06 Tom Tromey <tromey@redhat.com>
5903
5904 * Makefile.in (SFILES): Fix indentation.
5905
ee1e2d4f
DE
59062014-02-05 Doug Evans <dje@google.com>
5907
5908 * linux-low.c (linux_wait_for_event): Improve comment.
5909 (linux_wait_1): Keep current_inferior in sync with event_child.
5910
f5a02773
DE
59112014-01-22 Doug Evans <dje@google.com>
5912
5913 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5914
87ce2a04
DE
59152014-01-22 Doug Evans <dje@google.com>
5916
5917 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5918 * configure: Regenerate.
5919 * config.in: Regenerate.
5920 * Makefile.in (SFILES): Add debug.c.
5921 (OBS): Add debug.o.
5922 * debug.c: New file.
5923 * debug.h: New file.
5924 * linux-aarch64-low.c (*): Update all debugging printfs to use
5925 debug_printf instead of fprintf.
5926 * linux-arm-low.c (*): Ditto.
5927 * linux-cris-low.c (*): Ditto.
5928 * linux-crisv32-low.c (*): Ditto.
5929 * linux-m32r-low.c (*): Ditto.
5930 * linux-sparc-low.c (*): Ditto.
5931 * linux-x86.c (*): Ditto.
5932 * linux-low.c (*): Ditto.
5933 (linux_wait_1): Add calls to debug_enter, debug_exit.
5934 (linux_wait): Remove redundant debugging printf.
5935 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5936 (linux_resume, unstop_all_lwps): Ditto.
5937 * mem-break.c (*): Update all debugging printfs to use
5938 debug_printf instead of fprintf.
5939 * remote-utils.c (*): Ditto.
5940 * thread-db.c (*): Ditto.
5941 * server.c #include <ctype.h>, "gdb_vecs.h".
5942 (debug_threads): Moved to debug.c.
5943 (*): Update all debugging printfs to use debug_printf instead of
5944 fprintf.
5945 (start_inferior): Replace call to fflush with call to debug_flush.
5946 (monitor_show_help): Mention set debug-format.
5947 (parse_debug_format_options): New function.
5948 (handle_monitor_command): Handle "monitor set debug-format".
5949 (gdbserver_usage): Mention --debug-format.
5950 (main): Parse --debug-format.
5951 * server.h (debug_threads): Declaration moved to debug.h.
5952 #include "debug.h".
5953 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5954 trace_debug_1 that uses debug_printf.
5955 (tracepoint_look_up_symbols): Update all debugging printfs to use
5956 debug_printf instead of fprintf.
5957
e671835b
BS
59582014-01-20 Baruch Siach <baruch@tkos.co.il>
5959
5960 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5961 sys/ptrace.h.
5962
b5737fa9
PA
59632014-01-17 Pedro Alves <palves@redhat.com>
5964
ea38d2a9 5965 PR build/16445
c7faa97a
PA
5966 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5967 defined after including gdb_proc_service.h.
b5737fa9 5968
40ed484e
DE
59692014-01-16 Doug Evans <dje@google.com>
5970
5971 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5972 (match_dll): Use it.
5973
969c39fb
MM
59742014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5975
5976 * target.h (target_ops) <read_btrace>: Change parameters and
5977 return type to allow error reporting.
5978 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5979 trace reading errors on.
5980 * linux-low.c (linux_low_read_btrace): Pass trace reading
5981 errors on.
5982 (linux_low_disable_btrace): New.
5983
ab7f45ba
DE
59842014-01-15 Doug Evans <dje@google.com>
5985
5986 * inferiors.c (thread_id_to_gdb_id): Delete.
5987 * inferiors.h (thread_id_to_gdb_id): Delete.
5988
66af0f44
EZ
59892014-01-13 Eli Zaretskii <eliz@gnu.org>
5990
5991 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5992 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5993 versions.
5994
9939e131
PA
59952014-01-08 Pedro Alves <palves@redhat.com>
5996
5997 * server.c (handle_status): Don't discard previous queued stop
5998 replies or thread's pending status here.
5999 (main) <disconnection>: Do it here instead.
6000
b7ea362b
PA
60012014-01-08 Pedro Alves <palves@redhat.com>
6002
6003 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6004 * server.c (visit_actioned_threads, handle_pending_status): New
6005 function.
6006 (handle_v_cont): Factor out parts to ...
6007 (resume): ... this new function. If in all-stop, and a thread
6008 being resumed has a pending status, report it without actually
6009 resuming.
6010 (myresume): Adjust to use the new 'resume' function.
6011 (clear_pending_status_callback, set_pending_status_callback)
6012 (find_status_pending_thread_callback): New functions.
6013 (handle_status): Handle the case of multiple threads having
6014 interesting statuses to report. Report threads' real last signal
6015 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6016 with an interesting thread to report the status for, instead of
6017 always reporting the status of the first thread.
6018
28498c42
JB
60192014-01-01 Joel Brobecker <brobecker@adacore.com>
6020
6021 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6022 * gdbreplay.c (gdbreplay_version): Likewise.
6023
f45c82da
YZ
60242013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6025
6026 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6027 iov.iov_len with the real length in use.
6028
379a5e2d
JB
60292013-12-13 Joel Brobecker <brobecker@adacore.com>
6030
6031 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6032 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6033 for all targets that use win32-low.c.
6034 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6035 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6036
4210d83e
PA
60372013-12-13 Pedro Alves <palves@redhat.com>
6038
6039 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6040 if equal to TARGET_WAITKIND_LOADED.
6041 * win32-low.c (cached_status): New static global.
6042 (win32_wait): Add declaration.
6043 (do_initial_child_stuff): Flush all initial pending debug events
6044 up to the initial breakpoint.
6045 (win32_wait): If CACHED_STATUS was set, return that instead
6046 of doing a real wait. Remove the code resuming the execution
6047 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6048 during the initial phase. Also remove the code changing
6049 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6050 TARGET_WAITKIND_STOPPED.
6051
e7f0d979
YQ
60522013-12-11 Yao Qi <yao@codesourcery.com>
6053
6054 * notif.c (handle_notif_ack): Return 0 if no notification
6055 matches.
6056
ebcf782c
DE
60572013-11-20 Doug Evans <dje@google.com>
6058
6059 * linux-low.c (linux_set_resume_request): Fix comment.
6060
20ad9378
DE
60612013-11-20 Doug Evans <dje@google.com>
6062
6063 * linux-low.c (resume_status_pending_p): Tweak comment.
6064
a196ebeb
WT
60652013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6066
6067 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6068 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6069 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6070 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6071 (srv_amd64_regobj): Add amd64-mpx.o.
6072 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6073 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6074 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6075 * i387-fp.c (num_pl_bnd_register) Added constant.
6076 (num_pl_bnd_cfg_registers) Added constant.
6077 (struct i387_xsave) Added reserved area and MPX fields.
6078 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6079 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6080 function.
6081 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6082 (init_registers_amd64_mpx_linux): Declare new function.
6083 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6084 (x86_64_regmap): Add MPX registers.
6085 (x86_linux_read_description): Add MPX case.
6086 (initialize_low_arch): Initialize MPX targets.
6087
0080a2f6
TT
60882013-11-18 Tom Tromey <tromey@redhat.com>
6089
6090 * configure: Rebuild.
6091 * configure.ac: Don't check for stdlib.h.
6092 * gdbreplay.c: Unconditionally include stdlib.h.
6093
2978b111
TT
60942013-11-18 Tom Tromey <tromey@redhat.com>
6095
6096 * config.in: Rebuild.
6097 * configure: Rebuild.
6098 * configure.ac: Don't use AC_HEADER_DIRENT.
6099
a3d08894
TT
61002013-11-18 Tom Tromey <tromey@redhat.com>
6101
6102 * server.h: Don't check HAVE_STRING_H.
6103 * gdbreplay.c: Don't check HAVE_STRING_H.
6104 * configure: Rebuild.
6105
0a5dd17d
TT
61062013-11-18 Tom Tromey <tromey@redhat.com>
6107
6108 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6109 LIBGNU.
6110
1bd2f0ba
TT
61112013-11-08 Tom Tromey <tromey@redhat.com>
6112
6113 * configure, config.in: Rebuild.
6114 * configure.ac: Remove unused configury.
6115
3266f10b
TT
61162013-11-08 Tom Tromey <tromey@redhat.com>
6117
6118 * acinclude.m4: Include common.m4, codeset.m4.
6119 * configure, config.in: Rebuild.
6120 * configure.ac: Use GDB_AC_COMMON.
6121
6682d959
AA
61222013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6123
6124 * linux-s390-low.c (HWCAP_S390_TE): New define.
6125 (s390_arch_setup): Consider the TE field in the HWCAP for
6126 determining 'have_regset_tdb'.
6127
fd0a4d76
SDJ
61282013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6129
6130 PR gdb/16014
6131 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6132 call to sizeof.
6133
1a3d890b
PA
61342013-10-02 Pedro Alves <palves@redhat.com>
6135
6136 * server.c (process_serial_event): Don't output "GDBserver
6137 exiting" if GDB is connected through stdio.
6138 * target.c (mywait): Likewise, be silent if GDB is connected
6139 through stdio.
6140
97ad4581
JB
61412013-10-01 Joel Brobecker <brobecker@adacore.com>
6142
6143 * lynx-low.c (lynx_add_threads_after_attach): New function.
6144 (lynx_attach): Remove call to add_thread. Add call to
6145 lynx_add_threads_after_attach instead.
6146
5b4e221c
MF
61472013-09-28 Mike Frysinger <vapier@gentoo.org>
6148
6149 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6150 * config.in, configure: Regenerated.
6151
ee47b2f8
YQ
61522013-09-18 Yao Qi <yao@codesourcery.com>
6153
6154 PR server/15959
6155 * server.c (start_inferior): Clear 'resume_info'.
6156
d6707650 61572013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6158
d6707650
JW
6159 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6160 for each register.
6161
9243dd0e 61622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6163
9243dd0e
JW
6164 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6165 linux-tile-low.o to srv_tgtobj.
6166
c623a6ef
WN
61672013-09-16 Will Newton <will.newton@linaro.org>
6168
6169 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6170 out regs.
6171
fb71d39e
PA
61722013-09-06 Pedro Alves <palves@redhat.com>
6173
6174 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6175 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6176 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6177 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6178 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6179 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6180
8e7e9910
PA
61812013-09-06 Pedro Alves <palves@redhat.com>
6182
6183 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6184 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6185
7c3a12ca
PA
61862013-09-06 Pedro Alves <palves@redhat.com>
6187
6188 * linux-amd64-ipa.c: Include tracepoint.h.
6189 * linux-i386-ipa.c: Include tracepoint.h.
6190
8eb3d7b6
RW
61912013-09-06 Ricard Wanderlof <ricardw@axis.com>
6192
6193 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6194 (ps_get_thread_area): New function.
6195
eddddb9d
RW
61962013-09-06 Ricard Wanderlof <ricardw@axis.com>
6197
6198 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6199 (initialize_low_arch): Call init_registers_crisv32 rather than
6200 init_register_crisv32.
6201
533b0600
PA
62022013-09-05 Pedro Alves <palves@redhat.com>
6203
6204 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6205 to ...
6206 * hostio.h: ... this new file.
6207 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6208 win32-low.c: Include hostio.h.
6209
0ce3d3b5
PA
62102013-09-05 Pedro Alves <palves@redhat.com>
6211
6212 * server.h (gdb_client_data, handler_func, callback_handler_func)
6213 (delete_file_handler, add_file_handler, append_callback_event)
6214 (delete_callback_event, start_event_loop, initialize_event_loop):
6215 Move to event-loop.h and include it.
6216 * event-loop.h: New file.
6217
799cdc37
PA
62182013-09-05 Pedro Alves <palves@redhat.com>
6219
6220 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6221 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6222 (loaded_dll, unloaded_dll): Move to ...
6223 * dll.h: ... this new file.
6224 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6225
6a6bbd9d
PA
62262013-09-05 Pedro Alves <palves@redhat.com>
6227
6228 * server.h (current_process, get_thread_process, all_processes)
6229 (add_inferior_to_list, for_each_inferior, current_inferior)
6230 (remove_inferior, add_process, remove_process, find_process_pid)
6231 (have_started_inferiors_p, have_attached_inferiors_p)
6232 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6233 (clear_inferiors, find_inferior, find_inferior_id)
6234 (inferior_target_data, set_inferior_target_data)
6235 (inferior_regcache_data, set_inferior_regcache_data): Move to
6236 inferiors.h, and include it.
6237 * inferiors.h: New file.
6238
f699aaba
PA
62392013-09-05 Pedro Alves <palves@redhat.com>
6240
6241 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6242 Move ...
72f4393d 6243 * ax.h: ... here.
f699aaba 6244
c144c7a0
PA
62452013-09-05 Pedro Alves <palves@redhat.com>
6246
6247 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6248 tracepoint.h.
6249 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6250 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6251 (handle_tracepoint_general_set, handle_tracepoint_query)
6252 (tracepoint_finished_step, tracepoint_was_hit)
6253 (release_while_stepping_state_list, current_traceframe)
6254 (in_readonly_region, traceframe_read_mem)
6255 (fetch_traceframe_registers, traceframe_read_sdata)
6256 (traceframe_read_info, struct fast_tpoint_collect_status)
6257 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6258 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6259 (supply_fast_tracepoint_registers)
6260 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6261 (ipa_tdesc, claim_trampoline_space)
6262 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6263 (agent_mem_read, agent_get_trace_state_variable_value)
6264 (agent_set_trace_state_variable_value, agent_tsv_read)
6265 (agent_mem_read_string, get_raw_reg_func_addr)
6266 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6267 * tracepoint.h: ... this new file.
6268
ff42e6ab
PA
62692013-09-05 Pedro Alves <palves@redhat.com>
6270
6271 * server.h (perror_with_name, error, fatal, warning, paddress)
6272 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6273 include it.
6274 * utils.h: New file.
6275
541af0f4
PA
62762013-09-05 Pedro Alves <palves@redhat.com>
6277
6278 * server.h (remote_debug, noack_mode, transport_is_reliable)
6279 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6280 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6281 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6282 (write_enn, initialize_async_io, enable_async_io)
6283 (disable_async_io, check_remote_input_interrupt_request)
6284 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6285 (dead_thread_notify, prepare_resume_reply)
6286 (decode_address_to_semicolon, decode_address, decode_m_packet)
6287 (decode_M_packet, decode_X_packet, decode_xfer_write)
6288 (decode_search_memory_packet, unhexify, hexify)
6289 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6290 (look_up_one_symbol, relocate_instruction)
6291 (monitor_output): Move to remote-utils.h, and include it.
6292 * remote-utils.h: New file.
6293
eebdf26b
PA
62942013-09-05 Pedro Alves <palves@redhat.com>
6295
6296 * server.h (_): Delete.
6297
3aafd2ff
PA
62982013-09-02 Pedro Alves <palves@redhat.com>
6299
6300 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6301 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6302 allocated.
6303 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6304
cee83bcb
PM
63052013-09-02 Pierre Muller <muller@sourceware.org>
6306
6307 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6308 or WriteProcessMemory complete successfully and handle
6309 ERROR_PARTIAL_COPY error.
6310
9a13b2fa
PA
63112013-09-02 Pedro Alves <palves@redhat.com>
6312
6313 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6314 error instead of EIO.
6315
602e3198
JK
63162013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6317
6318 PR server/15604
6319 * linux-low.c: Include filestuff.h.
6320 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6321 * lynx-low.c: Include filestuff.h.
6322 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6323 * server.c: Include filestuff.h.
6324 (main): Call notice_open_fds.
6325 * spu-low.c: Include filestuff.h.
6326 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6327
96d7229d
LM
63282013-08-22 Luis Machado <lgustavo@codesourcery.com>
6329
6330 * Makefile.in: Explain why ../target and ../nat are not
6331 listed as include file search paths.
6332 (linux-waitpid.o): New object file rule.
6333 * configure.srv (srv_native_linux_obj): New variable.
6334 Replace all occurrences of linux native object files with
6335 $srv_native_linux_obj.
6336 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6337 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6338 (linux_enable_event_reporting): Remove declaration.
6339 (my_waitpid): Moved to common/linux-waitpid.c.
6340 (linux_wait_for_event): Pass ptid when calling
6341 linux_enable_event_reporting.
6342 (linux_supports_tracefork_flag): Remove.
6343 (linux_enable_event_reporting): Likewise.
6344 (linux_tracefork_grandchild): Remove.
6345 (STACK_SIZE): Moved to common/linux-ptrace.c.
6346 (linux_tracefork_child): Remove.
6347 (linux_test_for_tracefork): Remove.
6348 (linux_look_up_symbols): Call linux_supports_traceclone.
6349 (initialize_low): Remove call to linux_test_for_tracefork.
6350 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6351 common/linux-ptrace.h.
6352 (PTRACE_TYPE_ARG4): Likewise.
6353 Include linux-ptrace.h.
6354
32940073
PA
63552013-08-21 Pedro Alves <palves@redhat.com>
6356
6357 * config.in: Renegerate.
6358
33b60d58 63592013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6360
33b60d58
LM
6361 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6362 (SFILES): Remove $(srcdir)/common/target-common.c and
6363 add $(srcdir)/target/waitstatus.c.
6364 (OBS): Remove target-common.o and add waitstatus.o.
6365 (server_h): Remove $(srcdir)/../common/target-common.h and
6366 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6367 and $(srcdir)/../target/waitstatus.h.
6368 (target-common.o): Remove.
6369 (waitstatus.o): New target object file.
6370 * target.h: Do not include target-common.h and
6371 include target/resume.h, target/wait.h and
6372 target/waitstatus.h.
6373
b8e1b30e
LM
63742013-08-13 Luis Machado <lgustavo@codesourcery.com>
6375
6376 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6377 to PTRACE_TYPE_ARG3.
6378 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6379 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6380 PTRACE_TYPE_ARG4.
6381 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6382 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6383
7a60ad40
YQ
63842013-07-27 Jie Zhang <jie@codesourcery.com>
6385 Daniel Jacobowitz <dan@codesourcery.com>
6386 Yao Qi <yao@codesourcery.com>
6387
6388 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6389 (mips-linux-watch.o): New rule.
6390 (mips_linux_watch_h): New variable.
6391 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6392 srv_tgtobj.
6393 * linux-mips-low.c: Include mips-linux-watch.h.
6394 (struct arch_process_info, struct arch_lwp_info): New.
6395 (update_watch_registers_callback): New function.
6396 (mips_linux_new_process, mips_linux_new_thread) New functions.
6397 (mips_linux_prepare_to_resume, mips_insert_point): New
6398 functions.
6399 (mips_remove_point, mips_stopped_by_watchpoint): New
6400 functions.
6401 (rsp_bp_type_to_target_hw_bp_type): New function.
6402 (mips_stopped_data_address): New function.
6403 (the_low_target): Add watchpoint support functions.
6404
de6f69ad
YQ
64052013-07-27 Yao Qi <yao@codesourcery.com>
6406
6407 * i386-low.c: Include break-common.h.
6408 (enum target_hw_bp_type): Remove.
6409
3360c0bf
LM
64102013-07-24 Luis Machado <lgustavo@codesourcery.com>
6411
6412 * Makefile.in (SFILES): /common/target-common.c.
6413 (OBS): Add target-common.o.
6414 (server_h): Add $(srcdir)/../common/target-common.h.
6415 (target-common.o): New target.
6416 * server.c (queue_stop_reply_callback): Free
6417 status string after use.
6418 * target.c (target_waitstatus_to_string): Remove.
6419 * target.h: Include target-common.h.
6420 (resume_kind): Likewise.
6421 (target_waitkind): Likewise.
6422 (target_waitstatus): Likewise.
6423 (TARGET_WNOHANG): Likewise.
6424
bd885420
YQ
64252013-07-04 Yao Qi <yao@codesourcery.com>
6426
6427 * Makefile.in (host_alias): Use @host_noncanonical@.
6428 (target_alias): Use @target_noncanonical@.
6429 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6430 ACX_NONCANONICAL_HOST.
6431 * configure: Regenerated.
6432
6433 Revert:
6434 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6435
6436 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6437 * configure: Rebuild.
6438 * Makefile.in (version_host, version_target): Get from configure.
6439 (version.c): Use $(version_host) and $(version_target).
6440
17ef446e
PA
64412013-07-03 Pedro Alves <palves@redhat.com>
6442
6443 * Makefile.in (config.status): Depend on development.sh.
6444 * acinclude.m4: Include libmcheck.m4.
6445 * configure: Regenerate.
6446
7a9a7487
MG
64472013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6448
6449 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6450 attribute inside the parentheses.
6451 (winapi_DebugSetProcessKillOnExit): Ditto.
6452 (winapi_DebugBreakProcess): Ditto.
6453 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6454
49b64de6
MG
64552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6456
6457 * notif.h (notif_event): Add a dummy member to avoid compiler
6458 errors.
6459
d5749ee7
PA
64602013-07-01 Pedro Alves <palves@redhat.com>
6461
6462 * hostio.c (HOSTIO_PATH_MAX): Define.
6463 (require_filename, handle_open, handle_unlink, handle_readlink):
6464 Use it.
6465
d8d2a3ee
PA
64662013-07-01 Pedro Alves <palves@redhat.com>
6467
6468 * server.h: Include "pathmax.h".
6469 * linux-low.c: Don't include sys/param.h.
6470 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6471 MAXPATHLEN.
6472 * win32-low.c: Don't include sys/param.h.
6473 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6474
bc7dea8d
PA
64752013-07-01 Pedro Alves <palves@redhat.com>
6476
6477 * event-loop.c: Don't check HAVE_UNISTD_H before including
6478 <unistd.h>.
6479 * gdbreplay.c: Likewise.
6480 * remote-utils.c: Likewise.
6481 * server.c: Likewise.
6482 * configure.ac: Don't check for unistd.h.
6483 * configure: Regenerate.
6484
d6c2da54
TT
64852013-06-28 Tom Tromey <tromey@redhat.com>
6486
6487 * Makefile.in (version.c): Use version.in, not
6488 common/version.in.
6489
257b6bec
MG
64902013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6491
6492 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6493 * configure: Rebuild.
6494 * Makefile.in (version_host, version_target): Get from configure.
6495 (version.c): Use $(version_host) and $(version_target).
6496
86ebe149
DK
64972013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6498
6499 Fix trace-status to output user name without trailing colon.
6500 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6501
f30aa5af
DK
65022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6503
6504 Fix trace-status to output proper start-time and stop-time.
6505 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6506 output start time and stop time in hex as gdb expects.
6507
28a93511
YQ
65082013-06-26 Pedro Alves <pedro@codesourcery.com>
6509
6510 * tracepoint.c (build_traceframe_info_xml): Output trace state
6511 variables present in the trace buffer.
6512
01208463
TT
65132013-06-24 Tom Tromey <tromey@redhat.com>
6514
6515 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6516 create-version.sh.
6517 (version.o): Remove.
6518 * gdbreplay.c: Include version.h.
6519 (version, host_name): Don't declare.
6520 * server.h: Include version.h.
6521 (version, host_name): Don't declare.
6522
760256f9
PA
65232013-06-12 Pedro Alves <palves@redhat.com>
6524
6525 * linux-x86-low.c (linux_is_elf64): Delete global.
6526 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6527 with local linux_pid_exe_is_elf_64_file use.
6528
030031ee
PA
65292013-06-11 Pedro Alves <palves@redhat.com>
6530
6531 * linux-low.c (regset_disabled, disable_regset): New functions.
6532 (regsets_fetch_inferior_registers)
6533 (regsets_store_inferior_registers): Use them.
6534 (initialize_regsets_info); Don't allocate the disabled_regsets
6535 array here.
6536 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6537 comment.
6538
5da6eb0a
PA
65392013-06-11 Pedro Alves <palves@redhat.com>
6540
6541 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6542 xmalloc.
6543
7e5aaa09
PA
65442013-06-11 Pedro Alves <palves@redhat.com>
6545
6546 * linux-x86-low.c (initialize_low_arch): Call
6547 init_registers_x32_avx_linux.
6548
d878444c
JK
65492013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6550
6551 Fix compatibility with Android Bionic.
6552 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6553 it is not empty.
6554
3aee8918
PA
65552013-06-07 Pedro Alves <palves@redhat.com>
6556
5f2b57b5 6557 PR server/14823
3aee8918
PA
6558 * Makefile.in (OBS): Add tdesc.o.
6559 (IPA_OBJS): Add tdesc-ipa.o.
6560 (tdesc-ipa.o): New rule.
6561 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6562 interface.
6563 * linux-low.c (new_inferior): Delete.
6564 (disabled_regsets, num_regsets): Delete.
6565 (linux_add_process): Adjust to set the new per-process
6566 new_inferior flag.
6567 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6568 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6569 was a stop. When calling arch_setup, switch the current inferior
6570 to the thread that got an event.
6571 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6572 (regsets_fetch_inferior_registers)
6573 (regsets_store_inferior_registers): New regsets_info parameter.
6574 Adjust to use it.
6575 (linux_register_in_regsets): New regs_info parameter. Adjust to
6576 use it.
6577 (register_addr, fetch_register, store_register): New usrregs_info
6578 parameter. Adjust to use it.
6579 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6580 parameter regs_info. Adjust to use it.
6581 (linux_fetch_registers): Get the current inferior's regs_info, and
6582 adjust to use it.
6583 (linux_store_registers): Ditto.
6584 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6585 (initialize_low): Don't initialize the target_regsets here. Call
6586 initialize_low_arch.
6587 * linux-low.h (target_regsets): Delete declaration.
6588 (struct regsets_info): New.
6589 (struct usrregs_info): New.
6590 (struct regs_info): New.
6591 (struct process_info_private) <new_inferior>: New field.
6592 (struct linux_target_ops): Delete the num_regs, regmap, and
6593 regset_bitmap fields. New field regs_info.
6594 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6595 * i387-fp.c (num_xmm_registers): Delete.
6596 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6597 calls to new interface.
6598 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6599 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6600 Infer the number of xmm registers from the regcache's target
6601 description.
6602 * i387-fp.h (num_xmm_registers): Delete.
6603 * inferiors.c (add_thread): Don't install the thread's regcache
6604 here.
6605 * proc-service.c (gregset_info): Fetch the current inferior's
6606 regs_info. Adjust to use it.
6607 * regcache.c: Include tdesc.h.
6608 (register_bytes, reg_defs, num_registers)
6609 (gdbserver_expedite_regs): Delete.
6610 (get_thread_regcache): If the thread doesn't have a regcache yet,
6611 create one, instead of aborting gdbserver.
6612 (regcache_invalidate_one): Rename to ...
6613 (regcache_invalidate_thread): ... this.
6614 (regcache_invalidate_one): New.
6615 (regcache_invalidate): Only invalidate registers of the current
6616 process.
6617 (init_register_cache): Add target_desc parameter, and use it.
6618 (new_register_cache): Ditto. Assert the target description has a
6619 non zero registers_size.
6620 (regcache_cpy): Add assertions. Adjust.
6621 (realloc_register_cache, set_register_cache): Delete.
6622 (registers_to_string, registers_from_string): Adjust.
6623 (find_register_by_name, find_regno, find_register_by_number)
6624 (register_cache_size): Add target_desc parameter, and use it.
6625 (free_register_cache_thread, free_register_cache_thread_one)
6626 (regcache_release, register_cache_size): New.
6627 (register_size): Add target_desc parameter, and use it.
6628 (register_data, supply_register, supply_register_zeroed)
6629 (supply_regblock, supply_register_by_name, collect_register)
6630 (collect_register_as_string, collect_register_by_name): Adjust.
6631 * regcache.h (struct target_desc): Forward declare.
6632 (struct regcache) <tdesc>: New field.
6633 (init_register_cache, new_register_cache): Add target_desc
6634 parameter.
6635 (regcache_invalidate_thread): Declare.
6636 (regcache_invalidate_one): Delete declaration.
6637 (regcache_release): Declare.
6638 (find_register_by_number, register_cache_size, register_size)
6639 (find_regno): Add target_desc parameter.
6640 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6641 declarations.
6642 * remote-utils.c: Include tdesc.h.
6643 (outreg, prepare_resume_reply): Adjust.
6644 * server.c: Include tdesc.h.
6645 (gdbserver_xmltarget): Delete declaration.
6646 (get_features_xml, process_serial_event): Adjust.
6647 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6648 declare.
6649 (struct process_info) <tdesc>: New field.
6650 (ipa_tdesc): Declare.
6651 * tdesc.c: New file.
6652 * tdesc.h: New file.
6653 * tracepoint.c: Include tdesc.h.
6654 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6655 (get_context_regcache): Adjust to pass ipa_tdesc down.
6656 (do_action_at_tracepoint): Adjust to get the register cache size
6657 from the context regcache's description.
6658 (traceframe_walk_blocks): Adjust to get the register cache size
6659 from the current trace frame's description.
6660 (traceframe_get_pc): Adjust to get current trace frame's
6661 description and pass it down.
6662 (gdb_collect): Adjust to get the register cache size from the
6663 IPA's description.
6664 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6665 (gdbserver_xmltarget): Delete.
6666 (initialize_low_tracepoint): Set the ipa's target description.
6667 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6668 (initialize_low_tracepoint): Set the ipa's target description.
6669 * linux-x86-low.c: Include tdesc.h.
6670 [__x86_64__] (is_64bit_tdesc): New.
6671 (ps_get_thread_area, x86_get_thread_area): Use it.
6672 (i386_cannot_store_register): Rename to ...
6673 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6674 (i386_cannot_fetch_register): Rename to ...
6675 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6676 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6677 to new interface.
6678 (target_regsets): Rename to ...
6679 (x86_regsets): ... this.
6680 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6681 interface.
6682 (x86_siginfo_fixup): Use is_64bit_tdesc.
6683 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6684 (tdesc_x32_avx_linux, tdesc_x32_linux)
6685 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6686 Declare.
6687 (x86_linux_update_xmltarget): Delete.
6688 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6689 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6690 (AMD64_LINUX_USER64_CS): New.
6691 (x86_linux_read_description): New, based on
6692 x86_linux_update_xmltarget.
6693 (same_process_callback): New.
6694 (x86_arch_setup_process_callback): New.
6695 (x86_linux_update_xmltarget): New.
6696 (x86_regsets_info): New.
6697 (amd64_linux_regs_info): New.
6698 (i386_linux_usrregs_info): New.
6699 (i386_linux_regs_info): New.
6700 (x86_linux_regs_info): New.
6701 (x86_arch_setup): Reimplement.
6702 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6703 (x86_emit_ops): Ditto.
6704 (the_low_target): Adjust. Install x86_linux_regs_info,
6705 x86_cannot_fetch_register, and x86_cannot_store_register.
6706 (initialize_low_arch): New.
6707 * linux-ia64-low.c (tdesc_ia64): Declare.
6708 (ia64_fetch_register): Adjust.
6709 (ia64_usrregs_info, regs_info): New globals.
6710 (ia64_regs_info): New function.
6711 (the_low_target): Adjust.
6712 (initialize_low_arch): New function.
6713 * linux-sparc-low.c (tdesc_sparc64): Declare.
6714 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6715 Adjust.
6716 (sparc_arch_setup): New function.
6717 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6718 (the_low_target): Adjust.
6719 (initialize_low_arch): New function.
6720 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6721 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6722 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6723 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6724 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6725 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6726 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6727 (tdesc_powerpc_isa205_vsx64l): Declare.
6728 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6729 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6730 (ppc_set_pc, ppc_get_hwcap): Adjust.
6731 (ppc_usrregs_info): Forward declare.
6732 (!__powerpc64__) ppc_regmap_adjusted: New global.
6733 (ppc_arch_setup): Adjust to the current process'es target
6734 description.
6735 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6736 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6737 (ppc_store_evrregset): Adjust.
6738 (target_regsets): Rename to ...
6739 (ppc_regsets): ... this, and make static.
6740 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6741 (ppc_regs_info): New function.
6742 (the_low_target): Adjust.
6743 (initialize_low_arch): New function.
6744 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6745 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6746 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6747 (tdesc_s390x_linux64v2): Declare.
6748 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6749 (s390_fill_gregset, s390_store_last_break): Adjust.
6750 (target_regsets): Rename to ...
6751 (s390_regsets): ... this, and make static.
6752 (s390_get_pc, s390_set_pc): Adjust.
6753 (s390_get_hwcap): New target_desc parameter, and use it.
6754 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6755 (s390_arch_setup): Adjust to set the current process'es target
6756 description. Don't adjust the regmap.
6757 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6758 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6759 (regs_info_3264): New globals.
6760 (s390_regs_info): New function.
6761 (the_low_target): Adjust.
6762 (initialize_low_arch): New function.
6763 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6764 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6765 [__mips64] (init_registers_mips_linux)
6766 (init_registers_mips_dsp_linux): Delete defines.
6767 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6768 (have_dsp): New global.
6769 (mips_read_description): New, based on mips_arch_setup.
6770 (mips_arch_setup): Reimplement.
6771 (get_usrregs_info): New function.
6772 (mips_cannot_fetch_register, mips_cannot_store_register)
6773 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6774 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6775 (target_regsets): Rename to ...
6776 (mips_regsets): ... this, and make static.
6777 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6778 (dsp_regs_info, regs_info): New globals.
6779 (mips_regs_info): New function.
6780 (the_low_target): Adjust.
6781 (initialize_low_arch): New function.
6782 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6783 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6784 Declare.
6785 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6786 (arm_read_description): New, with bits factored from
6787 arm_arch_setup.
6788 (arm_arch_setup): Reimplement.
6789 (target_regsets): Rename to ...
6790 (arm_regsets): ... this, and make static.
6791 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6792 (arm_regs_info): New function.
6793 (the_low_target): Adjust.
6794 (initialize_low_arch): New function.
6795 * linux-m68k-low.c (tdesc_m68k): Declare.
6796 (target_regsets): Rename to ...
6797 (m68k_regsets): ... this, and make static.
6798 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6799 (m68k_regs_info): New function.
6800 (m68k_arch_setup): New function.
6801 (the_low_target): Adjust.
6802 (initialize_low_arch): New function.
6803 * linux-sh-low.c (tdesc_sharch): Declare.
6804 (target_regsets): Rename to ...
6805 (sh_regsets): ... this, and make static.
6806 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6807 (sh_regs_info, sh_arch_setup): New functions.
6808 (the_low_target): Adjust.
6809 (initialize_low_arch): New function.
6810 * linux-bfin-low.c (tdesc_bfin): Declare.
6811 (bfin_arch_setup): New function.
6812 (bfin_usrregs_info, regs_info): New globals.
6813 (bfin_regs_info): New function.
6814 (the_low_target): Adjust.
6815 (initialize_low_arch): New function.
6816 * linux-cris-low.c (tdesc_cris): Declare.
6817 (cris_arch_setup): New function.
6818 (cris_usrregs_info, regs_info): New globals.
6819 (cris_regs_info): New function.
6820 (the_low_target): Adjust.
6821 (initialize_low_arch): New function.
6822 * linux-cris-low.c (tdesc_crisv32): Declare.
6823 (cris_arch_setup): New function.
6824 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6825 (cris_regs_info): New function.
6826 (the_low_target): Adjust.
6827 (initialize_low_arch): New function.
6828 * linux-m32r-low.c (tdesc_m32r): Declare.
6829 (m32r_arch_setup): New function.
6830 (m32r_usrregs_info, regs_info): New globals.
6831 (m32r_regs_info): Adjust.
6832 (initialize_low_arch): New function.
6833 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6834 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6835 (tic6x_usrregs_info): Forward declare.
6836 (tic6x_read_description): New function, based on ...
6837 (tic6x_arch_setup): ... this. Reimplement.
6838 (target_regsets): Rename to ...
6839 (tic6x_regsets): ... this, and make static.
6840 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6841 (tic6x_regs_info): New function.
6842 (the_low_target): Adjust.
6843 (initialize_low_arch): New function.
6844 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6845 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6846 (target_regsets): Rename to ...
6847 (xtensa_regsets): ... this, and make static.
6848 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6849 globals.
6850 (xtensa_arch_setup, xtensa_regs_info): New functions.
6851 (the_low_target): Adjust.
6852 (initialize_low_arch): New function.
6853 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6854 (nios2_arch_setup): Set the current process'es tdesc.
6855 (target_regsets): Rename to ...
6856 (nios2_regsets): ... this.
6857 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6858 (nios2_regs_info): New function.
6859 (the_low_target): Adjust.
6860 (initialize_low_arch): New function.
a261b8f5
PA
6861 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6862 (aarch64_arch_setup): Set the current process'es tdesc.
6863 (target_regsets): Rename to ...
6864 (aarch64_regsets): ... this.
6865 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6866 (aarch64_regs_info): New function.
6867 (the_low_target): Adjust.
6868 (initialize_low_arch): New function.
3aee8918
PA
6869 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6870 globals.
6871 (target_regsets): Rename to ...
6872 (tile_regsets): ... this.
6873 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6874 (tile_regs_info): New function.
6875 (tile_arch_setup): Set the current process'es tdesc.
6876 (the_low_target): Adjust.
6877 (initialize_low_arch): New function.
6878 * spu-low.c (tdesc_spu): Declare.
6879 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6880 * win32-arm-low.c (tdesc_arm): Declare.
6881 (arm_arch_setup): New function.
6882 (the_low_target): Install arm_arch_setup instead of
6883 init_registers_arm.
6884 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6885 (init_windows_x86): Rename to ...
6886 (i386_arch_setup): ... this. Set `win32_tdesc'.
6887 (the_low_target): Adjust.
6888 * win32-low.c (win32_tdesc): New global.
6889 (child_add_thread): Don't create the thread cache here.
6890 (do_initial_child_stuff): Set the new process'es tdesc.
6891 * win32-low.h (struct target_desc): Forward declare.
6892 (win32_tdesc): Declare.
6893 * lynx-i386-low.c (tdesc_i386): Declare global.
6894 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6895 * lynx-low.c (lynx_tdesc): New global.
6896 (lynx_add_process): Set the new process'es tdesc.
6897 * lynx-low.h (struct target_desc): Forward declare.
6898 (lynx_tdesc): Declare global.
6899 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6900 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6901 * nto-low.c (nto_tdesc): New global.
6902 (do_attach): Set the new process'es tdesc.
6903 * nto-low.h (struct target_desc): Forward declare.
6904 (nto_tdesc): Declare.
6905 * nto-x86-low.c (tdesc_i386): Declare.
6906 (nto_x86_arch_setup): Set `nto_tdesc'.
6907
b1fbec62
GB
69082013-06-04 Gary Benson <gbenson@redhat.com>
6909
6910 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6911 to qSupported response when appropriate.
6912 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6913 with nonzero-length annex.
6914 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6915 arguments supplied in annex.
6916
d1ec4ce7
DE
69172013-05-31 Doug Evans <dje@google.com>
6918
ac44adcb 6919 PR server/15594
d1ec4ce7
DE
6920 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6921 64 bits in 64-cross-32 environment.
6922
9b25f2d3
PA
69232013-05-28 Pedro Alves <palves@redhat.com>
6924
6925 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6926 (aarch64-without-fpu.c): Delete rule.
6927 * configure.srv (aarch64*-*-linux*): Remove references to
6928 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6929 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6930 declaration.
6931
6740dc9c
PA
69322013-05-24 Pedro Alves <palves@redhat.com>
6933
6934 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6935 instead of strchr/decode_address. Error if the range isn't split
6936 with a ','. Don't assume there's be a ':' in the action.
6937
c2d6af84
PA
69382013-05-23 Yao Qi <yao@codesourcery.com>
6939 Pedro Alves <palves@redhat.com>
6940
6941 * linux-low.c (lwp_in_step_range): New function.
6942 (linux_wait_1): If the thread was range stepping and stopped
6943 outside the stepping range, report the stop to GDB. Otherwise,
6944 continue stepping. Add range stepping debug output.
6945 (linux_set_resume_request): Copy the step range from the resume
6946 request to the lwp.
6947 (linux_supports_range_stepping): New.
6948 (linux_target_ops) <supports_range_stepping>: Set to
6949 linux_supports_range_stepping.
6950 * linux-low.h (struct linux_target_ops)
6951 <supports_range_stepping>: New field.
6952 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6953 * linux-x86-low.c (x86_supports_range_stepping): New.
6954 (the_low_target) <supports_range_stepping>: Set to
6955 x86_supports_range_stepping.
6956 * server.c (handle_v_cont): Handle 'r' action.
6957 (handle_v_requests): Append ";r" if the target supports range
6958 stepping.
6959 * target.h (struct thread_resume) <step_range_start,
6960 step_range_end>: New fields.
6961 (struct target_ops) <supports_range_stepping>:
6962 New field.
6963 (target_supports_range_stepping): New macro.
6964
58794e1a
JB
69652013-05-17 Joel Brobecker <brobecker@adacore.com>
6966
6967 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6968 confusion in comment.
6969
d631c5a7
JB
69702013-05-17 Joel Brobecker <brobecker@adacore.com>
6971
6972 * lynx-low.c (struct process_info_private): New type.
6973 (lynx_add_process): New function.
6974 (lynx_create_inferior, lynx_attach): Replace calls to
6975 add_process by calls to lynx_add_process.
6976 (lynx_resume): If PTID is null, then try using
6977 current_process()->private->last_wait_event_ptid.
6978 Add comments.
6979 (lynx_clear_inferiors): Delete. The contents of that function
6980 has been inlined in lynx_mourn;
6981 (lynx_wait_1): Save the ptid in the process's private data.
6982 (lynx_mourn): Free the process' private data. Replace call
6983 to lynx_clear_inferiors by call to clear_inferiors.
6984
96f7a20f
YQ
69852013-05-17 Yao Qi <yao@codesourcery.com>
6986
6987 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6988 the right place.
6989
db0dfaa0
LM
69902013-05-16 Luis Machado <lgustavo@codesourcery.com>
6991
6992 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6993 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6994 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6995 PT_TEXT_END_ADDR guards. Update comments.
6996 (linux_target_op) <read_offsets>: Conditionally define to
6997 linux_read_offsets if the target is UCLIBC and if it defines
6998 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6999
68f5f838
SL
70002013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7001 Andrew Jenner <andrew@codesourcery.com>
7002
7003 * Makefile.in (SFILES): Add linux-nios2-low.c.
7004 (clean): Add action to delete nios2-linux.c.
7005 (nios2-linux.c): New rule.
7006 * configure.srv: Add nios2*-*-linux*.
7007 * linux-nios2-low.c: New.
7008
1ebff1fd
HAQ
70092013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7010
7011 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7012
f6150862
HZ
70132013-04-25 Hui Zhu <hui@codesourcery.com>
7014
7015 PR gdb/15186
f6150862
HZ
7016 * ax.c (ax_printf): Add fflush.
7017
614c279d
TT
70182013-04-22 Tom Tromey <tromey@redhat.com>
7019
7020 * Makefile.in (SFILES): Add filestuff.c.
7021 (OBS): Add filestuff.o.
7022 (filestuff.o): New target.
7023 * config.in, configure: Rebuild.
7024 * configure.ac: Check for fdwalk, pipe2.
7025
7d4e5717
PA
70262013-04-17 Pedro Alves <palves@redhat.com>
7027
7028 * configure.ac (USE_THREAD_DB): Delete variable.
7029 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7030 Don't AC_SUBST USE_THREAD_DB.
7031 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7032 * config.in, configure: Regenerate.
7033
d5c93e41
PA
70342013-04-16 Pedro Alves <palves@redhat.com>
7035
7036 * linux-low.h (struct lwp_info) <thread_known>: Move under
7037 the USE_THREAD_DB #ifdef.
7038
04f5fe89
PA
70392013-04-16 Pedro Alves <palves@redhat.com>
7040
7041 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7042 (linux-low.o): Delete rule.
7043 * linux-low.h: Always include "gdb_thread_db.h" instead of
7044 conditionally including thread_db.h.
7045 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7046 HAVE_THREAD_DB_H.
7047
480b27bf
JK
70482013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7049
7050 * Makefile.in (install-only): Fix make install regression.
7051
43662968
JK
70522013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7053
7054 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7055 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7056 installation.
7057 * gdbserver.1: Remove.
7058
3e74e146
PA
70592013-03-22 Pedro Alves <palves@redhat.com>
7060
7061 * linux-low.c (handle_extended_wait): Don't call
7062 linux_enable_event_reporting.
7063
a8347a2a
TT
70642013-03-15 Tony Theodore <tonyt@logyst.com>
7065
7066 PR build/9098:
7067 * Makefile.in (SHELL): Use @SHELL@.
7068
eeb56fa7
SDJ
70692013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7070
7071 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7072 compiler warning.
7073
4fa7e2ff
JB
70742013-03-13 Joel Brobecker <brobecker@adacore.com>
7075
7076 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7077 Remove extraneous NULL element.
7078
8ddb1965
YQ
70792013-03-13 Yao Qi <yao@codesourcery.com>
7080
7081 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7082 'V' block in trace frame.
7083
9accd112
MM
70842013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7085
7086 * target.h (struct target_ops): Add btrace ops.
7087 (target_supports_btrace): New macro.
7088 (target_enable_btrace): New macro.
7089 (target_disable_btrace): New macro.
7090 (target_read_btrace): New macro.
7091 * gdbthread.h (struct thread_info): Add btrace field.
7092 * server.c: Include btrace-common.h.
7093 (handle_btrace_general_set): New function.
7094 (handle_btrace_enable): New function.
7095 (handle_btrace_disable): New function.
7096 (handle_general_set): Call handle_btrace_general_set.
7097 (handle_qxfer_btrace): New function.
7098 (struct qxfer qxfer_packets[]): Add btrace entry.
7099 * inferiors.c (remove_thread): Disable btrace.
7100 * linux-low: Include linux-btrace.h.
7101 (linux_low_enable_btrace): New function.
7102 (linux_low_read_btrace): New function.
7103 (linux_target_ops): Add btrace ops.
7104 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7105 Add srv_linux_btrace=yes.
7106 (x86_64-*-linux*): Add linux-btrace.o.
7107 Add srv_linux_btrace=yes.
7108 * configure.ac: Define HAVE_LINUX_BTRACE.
7109 * config.in: Regenerated.
7110 * configure: Regenerated.
7111
5cc22e4c
MM
71122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7113
7114 * server.c (handle_qxfer): Preserve error message if -3 is
7115 returned.
7116 (qxfer): Document the -3 return value.
7117
7c97f91e
MM
71182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7119
7120 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7121 (linux_btrace_h): New variable.
7122 (linux-btrace.o): New rule.
7123
be9a119c 71242013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7125 Hafiz Abid Qadeer <abidh@codesourcery.com>
7126
7127 * tracepoint.c (trace_buffer_size): New global.
7128 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7129 (init_trace_buffer): Change to one-argument function. Allocate
7130 trace buffer memory.
7131 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7132 handle QTBuffer:size packet.
7133 (cmd_bigqtbuffer_size): New function.
7134 (initialize_tracepoint): Call init_trace_buffer with
7135 DEFAULT_TRACE_BUFFER_SIZE.
7136 * server.c (handle_query): Add QTBuffer:size in the
7137 supported packets.
7138
e64f7499
YQ
71392013-03-07 Yao Qi <yao@codesourcery.com>
7140
7141 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7142 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7143 of -1.
7144 (cmd_qtsp): Adjust condition. Do post increment.
7145 Set cur_action and cur_step_action back to 0.
7146
f0ae6fc3
PA
71472013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7148
7149 PR server/15236
7150 * linux-low.c (linux_write_memory): Return early success if LEN is
7151 zero.
7152
b5b0b0af
CV
71532013-03-05 Corinna Vinschen <vinschen@redhat.de>
7154
334ad4a8 7155 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7156
589bc927
TT
71572013-02-28 Tom Tromey <tromey@redhat.com>
7158
7159 * configure.ac: Invoke AC_SYS_LARGEFILE.
7160 * configure, config.in: Rebuild.
7161
dfe07582
CV
71622013-02-28 Corinna Vinschen <vinschen@redhat.com>
7163
7164 * win32-low.c: Throughout, fix format strings and casts of
7165 printf-like functions to avoid type related warnings on all
7166 platforms.
7167 (get_child_debug_event): Print dwDebugEventCode as hex since
7168 that's how it's usually documented.
7169
736cd585
YQ
71702013-02-28 Yao Qi <yao@codesourcery.com>
7171
7172 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7173 pulongest.
7174
e1f58301
JW
71752013-02-27 Jiong Wang <jiwang@tilera.com>
7176
7177 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7178 (reg-tilegx32.c): New rule.
7179 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7180 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7181 different register info initializer according to elf class.
7182 (init_registers_tilgx32): New function. The tilegx32 register info
7183 initializer.
7184 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7185 (tile_store_gregset): Likewise.
7186
d171ca78
YQ
71872013-02-27 Yao Qi <yao@codesourcery.com>
7188
7189 * server.c (process_point_options): Print debug message when
7190 debug_threads is true.
7191
282bbdf3
YQ
71922013-02-26 Yao Qi <yao@codesourcery.com>
7193
7194 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7195
aca22551
PA
71962013-02-19 Pedro Alves <palves@redhat.com>
7197 Kai Tietz <ktietz@redhat.com>
7198
7199 PR gdb/15161
7200
7201 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7202 instead of strtoul to extract address from packet.
7203 (process_serial_event) <'z'>: Likewise.
7204
4f3cee1c
YQ
72052013-02-18 Yao Qi <yao@codesourcery.com>
7206
7207 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7208
8e1d55a3
PA
72092013-02-14 Pedro Alves <palves@redhat.com>
7210
7211 Plug memory leak.
7212
7213 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7214 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7215
458820da
PA
72162013-02-14 Pedro Alves <palves@redhat.com>
7217
7218 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7219
baea0dae
PA
72202013-02-14 Pedro Alves <palves@redhat.com>
7221
7222 * tracepoint.c (save_string): Delete.
7223 (add_tracepoint_action): Use savestring instead of save_string.
7224
0b1afbb3
PA
72252013-02-12 Pedro Alves <palves@redhat.com>
7226
7227 * linux-xtensa-low.c: Ditto.
7228 * xtensa-xtregs.c: Ditto.
7229
8a4ac37e
PA
72302013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7231
7232 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7233 thread_db.
7234
148de6bb
MS
72352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7236
7237 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7238 aarch64_num_wp_regs and aarch64_num_bp_regs to
7239 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7240
55fac6e0
MS
72412013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7242
7243 * linux-aarch64-low.c (ps_get_thread_area): Replace
7244 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7245
176eb98c
MS
72462013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7247 Marcus Shawcroft <marcus.shawcroft@arm.com>
7248 Nigel Stephens <nigel.stephens@arm.com>
7249 Yufeng Zhang <yufeng.zhang@arm.com>
7250
7251 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7252 (aarch64.c, aarch64-without-fpu.c): New targets.
7253 * configure.srv (aarch64*-*-linux*): New.
7254 * linux-aarch64-low.c: New file.
7255
56f7af9c
MS
72562013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7257
43aaf8b6 7258 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7259 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7260 (dequeue_one_deferred_signal, linux_resume_one_thread)
7261 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7262 (linux_tracefork_grandchild, linux_test_for_tracefork)
7263 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7264 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7265 where the argument is 0.
7266
60f662b0
YQ
72672013-01-25 Yao Qi <yao@codesourcery.com>
7268
7269 * event-loop.c: Include "queue.h".
7270 (gdb_event_p): New typedef.
7271 (struct gdb_event) <next_event>: Remove.
7272 (event_queue): Change to QUEUE(gdb_event_p).
7273 (async_queue_event): Remove.
7274 (gdb_event_xfree): New.
7275 (initialize_event_loop): New.
7276 (process_event): Use API from QUEUE.
7277 (wait_for_event): Likewise.
7278 * server.c (main): Call initialize_event_loop.
7279 * server.h (initialize_event_loop): Declare.
7280
5ae4861a
YQ
72812013-01-18 Yao Qi <yao@codesourcery.com>
7282
7283 * ax.h (struct eval_agent_expr_context): New.
7284 (gdb_eval_agent_expr): Update declaration.
7285 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7286 TFRAME. Add new argument CTX.
7287 * server.h (struct eval_agent_expr_context): Declare.
7288 (agent_mem_read, agent_tsv_read): Update declaration.
7289 (agent_mem_read_string): Likewise.
7290 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7291 (add_traceframe_block): Add new argument TPOINT.
7292 Increase TPOINT->traceframe_usage.
7293 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7294 eval_tracepoint_agent_expr.
7295 (condition_true_at_tracepoint): Likewise.
7296 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7297 (agent_mem_read_string, agent_tsv_read): Likewise.
7298
85e00e85
YQ
72992013-01-16 Yao Qi <yao@codesourcery.com>
7300
7301 * linux-low.c (linux_resume_one_lwp): Don't check
7302 'lwp->bp_reinsert != 0'.
7303
4039cf45
JB
73042013-01-07 Joel Brobecker <brobecker@adacore.com>
7305 Pedro Alves <palves@redhat.com>
7306
7307 * lynx-low.c (ptrace_request_to_str): Define a temporary
7308 macro and use it to simplify this function's implementation.
7309
9044dee2
JB
73102013-01-07 Joel Brobecker <brobecker@adacore.com>
7311
7312 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7313 sets errno.
7314
e6352c8f
JB
73152013-01-07 Joel Brobecker <brobecker@adacore.com>
7316
7317 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7318
50681a27
JB
73192013-01-07 Joel Brobecker <brobecker@adacore.com>
7320
7321 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7322
3f6e77ef
JB
73232013-01-07 Joel Brobecker <brobecker@adacore.com>
7324
7325 * lynx-low.c (lynx_resume): Use the resume_info parameter
7326 to determine the ptid for the lynx_ptrace call, unless
7327 it is equal to minus_one_ptid, in which case we use the
7328 ptid of the current_inferior.
7329 (lynx_wait_1): After having received a thread create/exit
7330 event, resume the inferior's execution using the signaling
7331 thread's ptid, rather than the old ptid.
7332
7fda33ae
JB
73332013-01-07 Joel Brobecker <brobecker@adacore.com>
7334
7335 * lynx-low.c (lynx_resume): Delete variable ret.
7336
b9786c74
JB
73372013-01-01 Joel Brobecker <brobecker@adacore.com>
7338
7339 * gdbreplay.c (gdbreplay_version): Update copyright year.
7340 * server.c (gdbserver_version): Likewise.
7341
8b93d60f
JB
73422012-12-17 Joel Brobecker <brobecker@adacore.com>
7343
7344 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7345 new thread.
7346
037335a7
JB
73472012-12-17 Joel Brobecker <brobecker@adacore.com>
7348
7349 * lynx-low.c (ptrace_request_to_str): Add handling for
7350 PTRACE_GETTRACESIG.
7351
52d4cbd8
JB
73522012-12-17 Joel Brobecker <brobecker@adacore.com>
7353
7354 * lynx-low.c (lynx_attach): Delete variable new_process.
7355
ab8f6ca9
JB
73562012-12-17 Joel Brobecker <brobecker@adacore.com>
7357
7358 * lynx-low.c (lynx_create_inferior): Delete variable
7359 new_process.
7360
78cbc024
JB
73612012-12-17 Joel Brobecker <brobecker@adacore.com>
7362
7363 * lynx-low.c (ptrace_request_to_str): Do not handle
7364 PTRACE_GETTHREADLIST if this macro does not exist.
7365
14a00470
YQ
73662012-12-15 Yao Qi <yao@codesourcery.com>
7367
7368 * Makefile.in (OBS): Add notif.o.
7369 * notif.c, notif.h: New.
7370 * server.c: Include "notif.h".
7371 (struct vstop_notif) <next>: Remove.
7372 <base>: New field.
7373 (queue_stop_reply): Update.
7374 (push_event, send_next_stop_reply): Remove.
7375 (discard_queued_stop_replies): Update.
7376 (notif_stop): New variable.
7377 (handle_v_stopped): Remove.
7378 (handle_v_requests): Don't call handle_v_stopped. Call
7379 handle_ack_notif instead.
7380 (queue_stop_reply_callback): Call notif_event_enque instead
7381 of queue_stop_reply.
7382 (handle_status): Don't call send_next_stop_reply, call
7383 notif_write_event instead.
7384 (kill_inferior_callback): Likewise.
7385 (detach_or_kill_inferior_callback): Likewise.
7386 (main): Call initialize_notif.
7387 (process_serial_event): Call QUEUE_is_empty.
7388 (handle_target_event): Call notif_push instead of push event.
7389 * server.h (push_event): Remove declaration.
7390
61c125b9
TT
73912012-12-10 Tom Tromey <tromey@redhat.com>
7392
7393 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7394 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7395 macros.
7396 (.c.o): Rewrite.
7397 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7398 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7399 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7400 (amd64-linux-ipa.o, ax.o): Rewrite.
7401 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7402 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7403 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7404 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7405 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7406 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7407 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7408 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7409 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7410 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7411 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7412 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7413 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7414 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7415 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7416 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7417 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7418 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7419 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7420 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7421 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7422 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7423 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7424 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7425 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7426 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7427 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7428 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7429 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7430 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7431 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7432 (reg-tilegx.o): Remove.
7433 (all_object_files): New macro.
7434 Include .deps files.
7435 * aclocal.m4, configure: Rebuild.
7436 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7437 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7438 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7439
e90e9ad9
TT
74402012-12-05 Tom Tromey <tromey@redhat.com>
7441
7442 PR gdb/14917:
7443 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7444
02d403bf 74452012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7446
7447 * configure.ac: Check for linux/perf_event.h.
7448 * config.in: Regenerated.
7449 * configure: Regenerated.
7450
0270a750
PA
74512012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7452
7453 * hostio.c (handle_readlink): Decrease buffer size
7454 parameter passed to readlink by one byte.
7455
8c29b58e
YQ
74562012-11-26 Yao Qi <yao@codesourcery.com>
7457
7458 * configure.ac (build_warnings): Append '-Wempty-body'.
7459 * configure: Regenerated.
7460 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7461 body.
7462
8bdce1ff
PM
74632012-11-15 Pierre Muller <muller@sourceware.org>
7464
7465 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7466 * config.in: Regenerate.
7467 * configure: Regenerate.
7468 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7469 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7470 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7471 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7472 header.
7473 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7474 instead of <sys/wait.h> header.
7475 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7476
02d403bf 74772012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7478
7479 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7480 (various make rules): Remove -DGDBSERVER
7481
fbd5db48
YQ
74822012-11-09 Yao Qi <yao@codesourcery.com>
7483
7484 * spu-low.c (current_ptid): Move it to ..
7485 * gdbthread.h: ... here. New.
7486 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7487 * server.c (myresume, process_serial_event): Likewise.
7488 * thread-db.c (thread_db_find_new_threads): Likewise.
7489 * tracepoint.c (run_inferior_command): Likewise.
7490
b3dc46ff
AB
74912012-10-01 Andrew Burgess <aburgess@broadcom.com>
7492
7493 * server.c (handle_search_memory_1): Include access length in
7494 warning message.
7495
07c04788
HPN
74962012-09-05 Michael Brandt <michael.brandt@axis.com>
7497
7498 * linux-crisv32-low.c: Fix compile errors.
7499
918d227b
YQ
75002012-09-04 Yao Qi <yao@codesourcery.com>
7501
7502 * tracepoint.c (cmd_qtsv): Adjust debug message.
7503 Don't check CUR_TPOINT.
7504
18c1b81a
YQ
75052012-08-28 Yao Qi <yao@codesourcery.com>
7506
7507 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7508 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7509 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7510 Remove declarations of xmalloc, xreallloc, xstrdup and
7511 freeargv.
7512 * Makefile.in (libiberty_h): New.
7513 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7514 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7515
dc82f37b
YQ
75162012-08-23 Yao Qi <yao@codesourcery.com>
7517
7518 * server.h: Remove declaration of 'xsnprintf'.
7519
406b1477
KS
75202012-08-22 Keith Seitz <keiths@redhat.com>
7521
7522 * server.h: Include build-gnulib-gbserver/config.h.
7523 * gdbreplay.c: Likewise.
7524
e6712ff1
DE
75252012-08-08 Doug Evans <dje@google.com>
7526
7527 * Makefile.in (SFILES): Add gdb_vecs.c.
7528 (OBS): Add gdb_vecs.o.
7529 (gdb_vecs_h, host_defs_h): New variables.
7530 (thread-db.o): Add $(gdb_vecs_h) dependency.
7531 (gdb_vecs.o): New rule.
7532 * thread-db.c: #include "gdb_vecs.h".
7533 (thread_db_load_search): Use a vector to iterate over path elements.
7534 Handle text appearing after "$pdir".
7535
7536 * configure.ac: Add check for strstr.
7537 * config.in: Regenerate.
7538 * configure: Regenerate.
7539
7c3270ae
UW
75402012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7541
7542 * hostio.c (handle_pread): If pread fails, fall back to attempting
7543 lseek/read.
7544 (handle_pwrite): Likewise for pwrite.
7545
b62e2b27
UW
75462012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7547
7548 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7549 between unsupported TYPE and unimplementable ADDR/LEN combination.
7550 (arm_insert_point): Act on new return value.
7551
78a99e91
PA
75522012-07-31 Pedro Alves <palves@redhat.com>
7553
7554 * server.c (process_point_options): Only skip tokens if we find
7555 one that is unrecognized. Don't treat 'X' specially while
7556 skipping unrecognized tokens.
7557
fcf303ab
UW
75582012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7559
7560 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7561 to 4-byte-align HW breakpoint addresses for Thumb.
7562
7255706c
YQ
75632012-07-27 Yao Qi <yao@codesourcery.com>
7564
7565 PR remote/14161.
7566
7567 * server.h: Declare gdb_agent_about_to_close.
7568 * target.c (kill_inferior): Include "agent.h".
7569 New. Send command 'kill'.
7570 * target.h (kill_inferior): Removed macro.
7571 * tracepoint.c (gdb_agent_about_to_close): New.
7572 (gdb_agent_helper_thread): Handle command 'close'.
7573 Wait endlessly until the inferior stops.
7574 Install gdb_agent_remove_socket to atexit hook.
7575 (agent_socket_name): New static variable.
7576 (gdb_agent_socket_init): Replace local variable 'name' with
7577 'agent_socket_name'.
7578 (gdb_agent_remove_socket): New.
7579
5a3f286f
YQ
75802012-07-27 Yao Qi <yao@codesourcery.com>
7581
7582 * server.c (process_point_options): Stop at 'X' when parsing.
7583
961bd387
ME
75842012-07-19 Michael Eager <eager@eagercon.com>
7585
a261b8f5 7586 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7587 to hw_execute.
7588 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7589 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7590 hardware breakpoint.
7591
aa7c7447
JK
75922012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7593
7594 * gdbserver/linux-low.c (initialize_low): Call
7595 linux_ptrace_init_warnings.
7596
7f216e7c
DE
75972012-07-02 Doug Evans <dje@google.com>
7598
7599 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7600 pointer to int.
7601
d3ce09f5
SS
76022012-07-02 Stan Shebs <stan@codesourcery.com>
7603
7604 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7605 (ax.o): Add it to build rule.
7606 (ax-ipa.o): Ditto.
7607 (OBS): Add format.o.
7608 (IPA_OBS): Add format.o.
7609 * server.c (handle_query): Claim support for breakpoint commands.
7610 (process_point_options): Add command case.
7611 (process_serial_event): Leave running if there are printfs in
7612 effect.
7613 * mem-break.h (any_persistent_commands): Declare.
7614 (add_breakpoint_commands): Declare.
7615 (gdb_no_commands_at_breakpoint): Declare.
7616 (run_breakpoint_commands): Declare.
7617 * mem-break.c (struct point_command_list): New struct.
7618 (struct breakpoint): New field command_list.
7619 (any_persistent_commands): New function.
7620 (add_commands_to_breakpoint): New function.
7621 (add_breakpoint_commands): New function.
7622 (gdb_no_commands_at_breakpoint): New function.
7623 (run_breakpoint_commands): New function.
7624 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7625 locally.
7626 * ax.c: Include format.h.
7627 (ax_printf): New function.
7628 (gdb_eval_agent_expr): Add printf opcode.
7629
2f8f6aed
YQ
76302012-06-13 Yao Qi <yao@codesourcery.com>
7631
7632 * server.c (start_inferior): Remove duplicated writes to fields
7633 'last_resume_kind' and 'last_status' of 'current_inferior'.
7634
0c9070b3
YQ
76352012-06-12 Yao Qi <yao@codesourcery.com>
7636 Pedro Alves <palves@redhat.com>
7637
7638 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7639 comment.
7640 * server.c (handle_v_cont): Extend comment.
7641
c52daf70
YQ
76422012-06-11 Yao Qi <yao@codesourcery.com>
7643
7644 * linux-low.c (linux_attach): Add 'static'.
7645
d38bbb0a
YQ
76462012-06-06 Yao Qi <yao@codesourcery.com>
7647
7648 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7649
89dc0afd
JK
76502012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7651
7652 Fix gcc -flto compilation warning.
7653 * server.c (main): Make variable multi_mode and attach volatile.
7654
75f62ce7
TJB
76552012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7656
7657 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7658 if the platform doesn't know about it.
7659
65f479b6
PA
76602012-05-30 Jeff Kenton <jkenton@tilera.com>
7661
7662 * Makefile.in (SFILES): Add linux-tile-low.c.
7663 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7664 * configure.srv: Handle tilegx-*-linux*.
7665 * linux-tile-low.c: New file.
7666
0c5bf5a9
JK
76672012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7668
7669 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7670
a493e3e2
PA
76712012-05-24 Pedro Alves <palves@redhat.com>
7672
7673 PR gdb/7205
7674
43aaf8b6 7675 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7676
2ea28649
PA
76772012-05-24 Pedro Alves <palves@redhat.com>
7678
7679 PR gdb/7205
7680
7681 Replace target_signal with gdb_signal throughout.
7682
8d409d16
MR
76832012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7684
7685 * linux-low.c (linux_store_registers): Avoid the copying sequence
7686 when no data has been retrieved by ptrace.
7687
23512c01
MGD
76882012-05-22 Will Deacon <will.deacon@arm.com>
7689
7690 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7691 Include asm/ptrace.h.
7692 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7693 already defined.
7694
4934b29e
MR
76952012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7696
7697 * linux-low.c (linux_store_registers): Don't re-retrieve data
7698 with ptrace that has already been obtained from /proc. Always
7699 copy any data retrieved with ptrace to the buffer supplied.
7700
bde24c0a
PA
77012012-05-11 Yao Qi <yao@codesourcery.com>
7702 Pedro Alves <palves@redhat.com>
7703
7704 * linux-low.c (enum stopping_threads_kind): New.
7705 (stopping_threads): Change type to `enum stopping_threads_kind'.
7706 (handle_extended_wait): If stopping and suspending threads, leave
7707 the new_lwp suspended too.
7708 (linux_wait_for_event): Adjust.
7709 (stop_all_lwps): Set `stopping_threads' to
7710 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7711 whether we're suspending threads or just stopping them. Assert no
7712 recursion happens.
7713
623b6bdf
YQ
77142012-04-29 Yao Qi <yao@codesourcery.com>
7715
7716 * server.h: Move some code to ...
7717 * gdbthread.h: ... here. New.
7718 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7719 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7720 (nto-low.o, win32-low.o): Likewise.
7721 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7722 * regcache.c, remote-utils.c, server.c: Likewise.
7723 * target.c, tracepoint.c, win32-low.c: Likewise.
7724
f15f9948
TJB
77252012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7726
7727 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7728 (PTRACE_ARG4_TYPE): Likewise.
7729 (PTRACE_XFER_TYPE): Likewise.
7730 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7731 ptrace to PTRACE_ARG3_TYPE.
7732 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7733 (PTRACE_ARG4_TYPE): Likewise.
7734 (PTRACE_XFER_TYPE): Likewise.
7735 (linux_detach_one_lwp): Cast fourth argument of
7736 ptrace to long then PTRACE_ARG4_TYPE.
7737 (regsets_fetch_inferior_registers): Cast third argument of
7738 ptrace to long then PTRACE_ARG3_TYPE.
7739 (regsets_store_inferior_registers): Likewise.
7740
38ea300a
PA
77412012-04-20 Pedro Alves <palves@redhat.com>
7742
7743 * configure: Regenerate.
7744
c971b7fa
PA
77452012-04-19 Pedro Alves <palves@redhat.com>
7746
43aaf8b6 7747 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7748 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7749 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7750 (all, install-only, uninstall, clean-info, all-lib, clean): No
7751 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7752 (maintainer-clean realclean distclean): Use subdir_do.
7753 (subdir_do): New.
7754 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7755 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7756 * acinclude.m4: Include acx_configure_dir.m4.
7757 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7758 calls. Call AC_PROG_RANLIB. Configure gnulib using
7759 ACX_CONFIGURE_DIR.
7760 (GNULIB): New.
7761 (GNULIB_STDINT_H): Adjust.
7762 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7763 * gdbreplay.c: Include build-gnulib/config.h.
7764 * server.h: Likewise.
7765 * aclocal.m4: Regenerate.
7766 * config.in: Regenerate.
7767 * configure: Regenerate.
c971b7fa 7768
809277f8
PA
77692012-04-19 Pedro Alves <palves@redhat.com>
7770
7771 * Makefile.in (LIBGNU, INCGNU): Adjust.
7772 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7773 (all, install-only, uninstall, clean-info, all-lib, clean)
7774 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7775 * configure.ac: Adjust AC_OUTPUT output.
7776 * aclocal.m4: Regenerate.
7777 * configure: Regenerate.
7778
fd9bb8b8
PA
77792012-04-19 Pedro Alves <palves@redhat.com>
7780
7781 * Makefile.in (generated_files): New.
7782 (server_h): Remove the explicit dependency on config.h, and depend
7783 on $generated_files.
7784
1c298c66
PA
77852012-04-19 Pedro Alves <palves@redhat.com>
7786
7787 * Makefile.in (INCGNU): Add -Ignulib.
7788
57c4b50b
PA
77892012-04-19 Pedro Alves <palves@redhat.com>
7790
7791 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7792 (INCGNU): ... this, and spell out -I here.
7793 (GNULIB_LIB): Rename to ...
7794 (LIBGNU): ... this.
7795 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7796
1030e047
PA
77972012-04-19 Pedro Alves <palves@redhat.com>
7798
7799 * config.in: Regenerate.
7800
447d4319
PA
78012012-04-19 Pedro Alves <palves@redhat.com>
7802
7803 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7804 * server.h (memmem): Remove declaration.
7805 * config.in: Regenerate.
7806 * configure: Regenerate.
7807
aad9eab9
YQ
78082012-04-19 Yao Qi <yao@codesourcery.com>
7809
7810 * Makefile.in (SFILES): Add common/vec.c.
7811 (OBS): Add vec.o.
7812 (vec.o): New rule.
7813
3e10640f
YQ
78142012-04-19 Yao Qi <yao@codesourcery.com>
7815
7816 * remote-utils.c (prepare_resume_reply): Replace with macro
7817 target_core_of_thread.
7818 * server.c (handle_qxfer_threads_proper): Likewise.
7819 * target.h (traget_core_of_thread): New macro.
7820
71622373
PA
78212012-04-18 Pedro Alves <palves@redhat.com>
7822
7823 * aclocal.m4: Regenerate.
7824 * configure: Regenerate.
7825
80d26939
YQ
78262012-04-16 Yao Qi <yao@codesourcery.com>
7827
7828 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7829 duplicated on address.
7830
42476b70
YQ
78312012-04-16 Yao Qi <yao@codesourcery.com>
7832
7833 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7834 (struct tracepoint_action_ops) <send>: New field.
7835 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7836 (agent_expr_send, x_tracepoint_action_send): New.
7837 (l_tracepoint_action_send): New.
7838 (cmd_qtdp): Download and install tracepoint
7839 according to `use_agent'.
7840 (run_inferior_command): Add one more parameter `len'.
7841 Update callers.
7842 (tracepoint_send_agent): New.
7843 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7844
7bc83639
YQ
78452012-04-16 Yao Qi <yao@codesourcery.com>
7846
7847 * tracepoint.c (download_tracepoints): Moved to ...
7848 (cmd_qtstart): ... here.
7849
5f18041e
YQ
78502012-04-14 Yao Qi <yao@codesourcery.com>
7851
7852 * tracepoint.c: Include inttypes.h.
7853 (struct collect_memory_action): Use sized types.
7854 (struct tracepoint): Likewise.
7855 (cmd_qtdp, stop_tracing): Update print specifiers.
7856 (cmd_qtp, response_tracepoint): Likewise.
7857 (collect_data_at_tracepoint): Likewise.
7858 (collect_data_at_step): Likewise.
7859
55a8c076
YQ
78602012-04-14 Yao Qi <yao@codesourcery.com>
7861
7862 Import gnulib module inttypes.
7863 * aclocal.m4, config.in, configure: Regenerated.
7864
dc750257
YQ
78652012-04-14 Yao Qi <yao@codesourcery.com>
7866
7867 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7868 Makefile and config.status at last.
7869
0ab5faf9
YQ
78702012-04-13 Yao Qi <yao@codesourcery.com>
7871
7872 * tracepoint.c: Include stdint.h unconditionally.
7873
18f5fd81
TJB
78742012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7875
7876 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7877 on BFD_HAVE_SYS_PROCFS_TYPE.
7878 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7879 * configure: Regenerate.
7880 * config.in: Likewise.
7881
4d47af5c
L
78822012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7883
7884 * Makefile.in (clean): Also remove x32.c x32-linux.c
7885 x32-avx.c x32-avx-linux.c.
7886 (x32.o): New target.
7887 (x32.c): Likewise.
7888 (x32-linux.o): Likewise.
7889 (x32-linux.c): Likewise.
7890 (x32-avx.o): Likewise.
7891 (x32-avx.c): Likewise.
7892 (x32-avx-linux.o): Likewise.
7893 (x32-avx-linux.c): Likewise.
7894
7895 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7896 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7897 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7898 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7899 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7900 i386/x32-avx-linux.xml.
7901
7902 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7903 (init_registers_x32_avx_linux): Likwise.
7904 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7905 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7906
ecedbe58
PA
79072012-04-13 Pedro Alves <palves@redhat.com>
7908
7909 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7910 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7911 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7912 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7913 the sub-make.
7914
c92b5177
L
79152012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7916
7917 * linux-x86-low.c (compat_x32_clock_t): New.
7918 (compat_x32_siginfo_t): Likewise.
7919 (compat_x32_siginfo_from_siginfo): Likewise.
7920 (siginfo_from_compat_x32_siginfo): Likewise.
7921 (linux_is_elf64): Likewise.
7922 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7923 and siginfo_from_compat_x32_siginfo for x32.
7924 (x86_arch_setup): Set linux_is_elf64.
7925
214d508e
L
79262012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7927
7928 PR gdb/13969
7929 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7930 e_machine field.
7931 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7932 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7933 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7934 compatible with process.
7935
c9a1864a
YQ
79362012-04-12 Yao Qi <yao@codesourcery.com>
7937
7938 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7939 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7940 (install-only, install-info, clean): Handle sub dir gnulib.
7941 (all-lib, am--refresh): New targets.
7942 (memmem.o): Remove target.
7943 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7944 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7945 (AC_REPLACE_FUNCS): Remove memmem.
7946 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7947 (AC_OUTPUT): Generate Makefile in gnulib/.
7948 * aclocal.m4, config.in, configure: Regenerated.
7949
367ba2c2
MR
79502012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7951
7952 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7953
9d236627
PA
79542012-04-05 Pedro Alves <palves@redhat.com>
7955
7956 -Werror=strict-aliasing
7957
7958 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7959 pointer.
7960
111217b3
PA
79612012-04-04 Pedro Alves <palves@redhat.com>
7962
7963 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7964 (sparc_store_gregset_from_stack, sparc_store_gregset)
7965 (sparc_breakpoint_at): Fix formatting.
7966
8365dcf5
TJB
79672012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7968
7969 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7970 are available.
7971 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7972 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7973 * config.in: Regenerate.
7974 * configure: Likewise.
7975
689cc2ae
PA
79762012-03-29 Pedro Alves <palves@redhat.com>
7977
7978 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7979 Correct ptrace arguments.
7980
c14dfd32
PA
79812012-03-28 Pedro Alves <palves@redhat.com>
7982
7983 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7984 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7985 (IA64_FR1_REGNUM): New defines.
7986 (ia64_fetch_register): New.
7987 (the_low_target): Install it.
7988 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7989 field.
7990 * linux-low.c (linux_fetch_registers): Try the
7991 the_low_target.fetch_register hook first.
7992
7993 * linux-arm-low.c (the_low_target): Adjust.
7994 * linux-bfin-low.c (the_low_target): Adjust.
7995 * linux-cris-low.c (the_low_target): Adjust.
7996 * linux-crisv32-low.c (the_low_target): Adjust.
7997 * linux-m32r-low.c (the_low_target): Adjust.
7998 * linux-m68k-low.c (the_low_target): Adjust.
7999 * linux-mips-low.c (the_low_target): Adjust.
8000 * linux-ppc-low.c (the_low_target): Adjust.
8001 * linux-s390-low.c (the_low_target): Adjust.
8002 * linux-sh-low.c (the_low_target): Adjust.
8003 * linux-sparc-low.c (the_low_target): Adjust.
8004 * linux-tic6x-low.c (the_low_target): Adjust.
8005 * linux-x86-low.c (the_low_target): Adjust.
8006 * linux-xtensa-low.c (the_low_target): Adjust.
8007
63c88e13
PA
80082012-03-26 Pedro Alves <palves@redhat.com>
8009
8010 * server.c (handle_qxfer_libraries): Don't bail early if
8011 the_target->qxfer_libraries_svr4 is not NULL.
8012
fb723180
PA
80132012-03-26 Pedro Alves <palves@redhat.com>
8014
8015 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8016
0afae3cf
PA
80172012-03-23 Pedro Alves <palves@redhat.com>
8018
8019 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8020 "library-list-svr4" element's start tag when the the DSO list is
8021 empty.
8022
485f1ee4
PA
80232012-03-23 Pedro Alves <palves@redhat.com>
8024
8025 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8026 a variable whose type size is the same as the inferior's pointer
8027 size.
8028
a5362b9a
TS
80292012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8030
8031 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8032 struct siginfo.
8033 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8034 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8035 * linux-low.h: Include <signal.h>.
8036 (struct siginfo): Remove forward declaration.
8037 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8038 struct siginfo.
8039
d226c142
MF
80402012-03-21 Mike Frysinger <vapier@gentoo.org>
8041
8042 * .gitignore: Ignore more files.
8043
122f36ef
PA
80442012-03-19 Pedro Alves <palves@redhat.com>
8045 Jan Kratochvil <jan.kratochvil@redhat.com>
8046
8047 * server.c (cont_thread, general_thread): Add describing comments.
8048 (start_inferior): Clear `cont_thread'.
8049 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8050 of a process.
8051
fc3e5175
YQ
80522012-03-15 Yao Qi <yao@codesourcery.com>
8053
8054 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8055 handling to ...
8056 (cmd_qtdp): ... here.
8057
8d0d92cd
YQ
80582012-03-15 Yao Qi <yao@codesourcery.com>
8059
8060 * tracepoint.c (struct tracepoint_action_ops): New.
8061 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8062 (m_tracepoint_action_download): New.
8063 (r_tracepoint_action_download): New.
8064 (x_tracepoint_action_download): New.
8065 (l_tracepoint_action_download): New.
8066 (add_tracepoint_action): Install `action->ops' according type.
8067 (download_tracepoint_1): Move code `download' function pointer
8068 of various tracepoint_action_ops.
8069
87b0bb13
JK
80702012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8071
8072 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8073 linux_ptrace_attach_warnings.
8074
5f572dec
JK
80752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8076
8077 * Makefile.in (linux-ptrace.o): New.
8078 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8079 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8080 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8081 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8082 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8083 of these targets.
8084 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8085
f4647387
YQ
80862012-03-08 Yao Qi <yao@codesourcery.com>
8087 Pedro Alves <palves@redhat.com>
8088
8089 Fix PR server/13392.
8090 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8091 offset of JMP insn.
8092 * tracepoint.c (remove_tracepoint): New.
8093 (cmd_qtdp): Call remove_tracepoint when failed to install.
8094
9b224c5e
PA
80952012-03-07 Pedro Alves <palves@redhat.com>
8096
8097 * linux-low.c (get_detach_signal): New.
8098 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8099 Pass on pending signals to PTRACE_DETACH. Check the result of the
8100 ptrace call.
8101 * server.c (program_signals, program_signals_p): New.
8102 (handle_general_set): Handle QProgramSignals.
8103 * server.h (program_signals, program_signals_p): Declare.
8104
e237a7e2
JK
81052012-03-05 Pedro Alves <palves@redhat.com>
8106 Jan Kratochvil <jan.kratochvil@redhat.com>
8107
8108 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8109 New comment why.
8110
5808517f
YQ
81112012-03-03 Yao Qi <yao@codesourcery.com>
8112
8113 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8114 agent_look_up_symbols.
8115
58b4daa5
YQ
81162012-03-03 Yao Qi <yao@codesourcery.com>
8117
8118 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8119 (linux-x86-low.o): Likewise.
8120 * server.h: Remove in_process_agent_loaded.
8121 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8122 common/agent.c.
8123 Update callers.
8124
8ffcbaaf
YQ
81252012-03-03 Yao Qi <yao@codesourcery.com>
8126
8127 * tracepoint.c (gdb_agent_capability): New global.
8128 (in_process_agent_loaded_ust): Renamed to
8129 `in_process_agent_supports_ust'.
8130 Update callers.
8131 (in_process_agent_supports_ust): Call agent_capability_check.
8132 (clear_installed_tracepoints): Assert that agent supports
8133 agent.
8134
d1feda86
YQ
81352012-03-03 Yao Qi <yao@codesourcery.com>
8136
8137 * linux-low.c (linux_supports_agent): New.
8138 (linux_target_ops): Initialize field `supports_agent' with
8139 linux_supports_agent.
8140 * target.h (struct target_ops) <supports_agent>: New.
8141 (target_supports_agent): New macro.
8142 * server.c (handle_general_set): Handle packet 'QAgent'.
8143 (handle_query): Send `QAgent+'.
8144 * Makefile.in (server.o): Depends on agent.h.
8145
2fa291ac
YQ
81462012-03-03 Yao Qi <yao@codesourcery.com>
8147
8148 * Makefile.in (OBS): Add agent.o.
8149 Add new rule for agent.o.
8150 Track dependence of tracepoint.c on agent.h.
8151 * tracepoint.c (run_inferior_command_1):
8152 (run_inferior_command): Call agent_run_command.
8153 (gdb_ust_connect_sync_socket): Deleted. Move it to
8154 common/agent.c.
8155 (resume_thread, stop_thread): Likewise.
8156 (gdb_ust_socket_init): Renamed to ...
8157 (gdb_agent_socket_init): ... New.
8158 (gdb_ust_thread): Renamed to ...
8159 (gdb_agent_helper_thread): ... New.
8160 (gdb_ust_init): Move some code to ...
8161 (gdb_agent_init): ... here. New.
8162 [HAVE_UST]: Call gdb_ust_init.
8163 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8164 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8165 * config.in, configure: Regenerated.
8166
05044653
PA
81672012-03-02 Pedro Alves <palves@redhat.com>
8168
8169 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8170 * linux-low.c (struct simple_pid_list): New.
8171 (stopped_pids): New a struct simple_pid_list pointer.
8172 (add_to_pid_list, pull_pid_from_list): New.
8173 (handle_extended_wait): Don't assume the first signal new children
8174 report is SIGSTOP. Adjust call to pull_pid_from_list.
8175 (linux_wait_for_lwp): Adjust.
8176
8d00225b
YQ
81772012-03-02 Yao Qi <yao@codesourcery.com>
8178
8179 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8180 debug log.
8181
19560ba5
YQ
81822012-03-02 Yao Qi <yao@codesourcery.com>
8183
8184 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8185 `stop_pc' and `tpoint'. Update caller.
8186
1faeff08
MR
81872012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8188
8189 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8190 * linux-low.c (use_linux_regsets): New macro.
8191 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8192 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8193 (linux_register_in_regsets): New function.
8194 (usr_fetch_inferior_registers): Skip registers covered by
8195 regsets.
8196 (usr_store_inferior_registers): Likewise.
8197 (usr_fetch_inferior_registers): New macro.
8198 (usr_store_inferior_registers): Likewise.
8199 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8200 (linux_store_registers): Likewise.
8201 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8202 prototype.
8203 (init_registers_mips64_dsp_linux): Likewise.
8204 (init_registers_mips_linux): New macro.
8205 (init_registers_mips_dsp_linux): Likewise.
8206 (mips_dsp_num_regs): Likewise.
8207 (DSP_BASE, DSP_CONTROL): New fallback macros.
8208 (mips_base_regs): New macro.
8209 (mips_regmap): Use it. Fix the size.
8210 (mips_dsp_regmap): New variable.
8211 (mips_dsp_regset_bitmap): Likewise.
8212 (mips_arch_setup): New function.
8213 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8214 than mips_regmap.
8215 (mips_cannot_store_register): Likewise.
8216 (the_low_target): Update .arch_setup, .num_regs and .regmap
8217 initializers. Add .regset_bitmap initializer.
8218 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8219 initializer.
8220 * linux-bfin-low.c (the_low_target): Likewise.
8221 * linux-cris-low.c (the_low_target): Likewise.
8222 * linux-crisv32-low.c (the_low_target): Likewise.
8223 * linux-ia64-low.c (the_low_target): Likewise.
8224 * linux-m32r-low.c (the_low_target): Likewise.
8225 * linux-m68k-low.c (the_low_target): Likewise.
8226 * linux-ppc-low.c (the_low_target): Likewise.
8227 * linux-s390-low.c (the_low_target): Likewise.
8228 * linux-sh-low.c (the_low_target): Likewise.
8229 * linux-sparc-low.c (the_low_target): Likewise.
8230 * linux-tic6x-low.c (the_low_target): Likewise.
8231 * linux-x86-low.c (the_low_target): Likewise.
8232 * linux-xtensa-low.c (the_low_target): Likewise.
8233 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8234 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8235 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8236 srv_xmlfiles.
8237 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8238 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8239
c03e6ccc
YQ
82402012-02-29 Yao Qi <yao@codesourcery.com>
8241 Pedro Alves <palves@redhat.com>
8242
8243 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8244 `step_over_finished' is true.
8245
644cebc9
PA
82462012-02-27 Pedro Alves <palves@redhat.com>
8247
8248 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8249 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8250
c14d7ab2
PA
82512012-02-27 Pedro Alves <palves@redhat.com>
8252
8253 PR server/9684
8254 * linux-low.c (pid_is_stopped): New.
8255 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8256
412c89dd
LM
82572012-02-25 Luis Machado <lgustavo@codesourcery.com>
8258
8259 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8260 of conditions.
8261
b745defe
MR
82622012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8263
8264 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8265
9f3a5c85
LM
82662012-02-24 Luis Machado <lgustavo@codesourcery>
8267
8268 * server.c (handle_query): Advertise support for target-side
8269 breakpoint condition evaluation.
8270 (process_point_options): New function.
8271 (process_serial_event): When inserting a breakpoint, check for
8272 a target-side condition that should be evaluated.
8273
8274 * mem-break.c: Include regcache.h and ax.h.
8275 (point_cond_list_t): New data structure.
8276 (breakpoint) <cond_list>: New field.
8277 (find_gdb_breakpoint_at): Make non-static.
8278 (delete_gdb_breakpoint_at): Clear any target-side
8279 conditions.
8280 (clear_gdb_breakpoint_conditions): New function.
8281 (add_condition_to_breakpoint): Likewise.
8282 (add_breakpoint_condition): Likewise.
8283 (gdb_condition_true_at_breakpoint): Likewise.
8284 (gdb_breakpoint_here): Return result directly instead
8285 of going through a local variable.
8286
8287 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8288 (clear_gdb_breakpoint_conditions): Likewise.
8289 (add_breakpoint_condition): Likewise.
8290 (gdb_condition_true_at_breakpoint): Likewise.
8291
8292 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8293 (need_step_over_p): Take target-side breakpoint condition into
8294 consideration.
8295
5e1dc496
LM
82962012-02-24 Luis Machado <lgustavo@codesourcery>
8297
8298 * server.h: Include tracepoint.h.
8299 (agent_mem_read, agent_get_trace_state_variable_value,
8300 agent_set_trace_state_variable_value,
8301 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8302 get_set_tsv_func_addr): New prototypes.
8303
8304 * ax.h: New include file.
8305 * ax.c: New source file.
8306
8307 * tracepoint.c: Include ax.h.
8308 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8309 agent_expr, eval_result_type): Move to ax.h.
8310 (parse_agent_expr): Rename to ...
8311 (gdb_parse_agent_expr): ... this, make it non-static and move
8312 to ax.h.
8313 (unparse_agent_expr) Rename to ...
8314 (gdb_unparse_agent_expr): ... this, make it non-static and move
8315 to ax.h.
8316 (eval_agent_expr): Rename to ...
8317 (eval_tracepoint_agent_expr): ... this.
8318 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8319 forward declarations.
8320 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8321 (agent_get_trace_state_variable_value): New function.
8322 (agent_set_trace_state_variable_value): New function.
8323 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8324 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8325 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8326 (condition_true_at_tracepoint): Likewise.
8327 (parse_agent_expr): Rename to ...
8328 (gdb_parse_agent_expr): ... this and move to ax.c.
8329 (unparse_agent_expr): Rename to ...
8330 (gdb_unparse_agent_expr): ... this and move to ax.c.
8331 (gdb_agent_op_name): Move to ax.c.
8332 (eval_agent_expr): Rename to ...
8333 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8334 and move to ax.c.
8335 (eval_tracepoint_agent_expr): New function.
8336 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8337 non-static.
5e1dc496
LM
8338 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8339 ax.c.
8340 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8341 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8342 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8343 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8344 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8345 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8346 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8347 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8348 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8349 (compile_bytecodes): Remove forward declaration.
8350 (is_goto_target): Move to ax.c.
8351 (compile_bytecodes): Move to ax.c and call
8352 agent_get_trace_state_variable_value (...) and
8353 agent_set_trace_state_variable_value (...).
8354
8355 * Makefile.in: Update ax.c and IPA dependencies.
8356
277e4e52
PA
83572012-02-24 Pedro Alves <palves@redhat.com>
8358
8359 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8360 (cmd_bigqtbuffer_circular): ... this. Only handle
8361 'QTBuffer:circular:'.
8362 (handle_tracepoint_general_set): Adjust.
8363
bf4c19f7
YQ
83642012-02-16 Yao Qi <yao@codesourcery.com>
8365
8366 * inferiors.c: Move code to ...
8367 * dll.c: .... here. New.
8368 * server.h: Declare clear_dlls.
8369 * Makefile.in (SFILES): Add dll.c.
8370 (OBS): Add dll.o
8371 (dll.o): New rule.
8372
d73f2619
YQ
83732012-02-11 Yao Qi <yao@codesourcery.com>
8374
8375 * server.c: (handle_monitor_command): Add a new parameter
8376 `own_buf'.
8377 (handle_query): Update caller.
8378
f8255c2a
JB
83792012-02-09 Joel Brobecker <brobecker@adacore.com>
8380
8381 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8382 * configure, config.in: Regenerate.
8383 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8384 is not defined.
8385
da84f473
PA
83862012-02-02 Pedro Alves <palves@redhat.com>
8387
8388 Try SIGKILL first, then PTRACE_KILL.
8389 * linux-low.c (linux_kill_one_lwp): New.
8390 (linux_kill_one_lwp): Rename to ...
8391 (kill_one_lwp_callback): ... this. Use the new
8392 linux_kill_one_lwp.
8393
e886a173
PA
83942012-02-02 Pedro Alves <palves@redhat.com>
8395
8396 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8397 inferior.
8398
be07f1a2
PA
83992012-01-27 Pedro Alves <palves@redhat.com>
8400
8401 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8402 (elf_64_file_p): Make static.
8403 (linux_pid_exe_is_elf_64_file): New.
8404 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8405 Delete declarations.
8406 (linux_pid_exe_is_elf_64_file): Declare.
8407 * linux-x86-low.c (x86_arch_setup): Use
8408 linux_pid_exe_is_elf_64_file.
8409
d8301ad1
JK
84102012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8411
8412 * linux-low.c (linux_wait_for_event_1): Rename to ...
8413 (linux_wait_for_event): ... here and merge it with former
8414 linux_wait_for_event - new variable wait_ptid, use it.
8415 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8416
01b17894
PA
84172012-01-23 Pedro Alves <palves@redhat.com>
8418
8419 * server.c (main): Avoid yet another case of infinite loop while
8420 detaching/killing after a longjmp.
8421
e825046f
JK
84222012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8423
8424 Code cleanup.
8425 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8426
b9e7b9c3
UW
84272012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8428
8429 * hostio.c (handle_readlink): New function.
8430 (handle_vFile): Call it to handle "vFile:readlink" packets.
8431
901f9912
UW
84322012-01-20 Pedro Alves <palves@redhat.com>
8433 Ulrich Weigand <ulrich.weigand@linaro.org>
8434
8435 * server.c (handle_v_requests): Only support vAttach and vRun to
8436 start multiple processes when in extended protocol mode.
8437
fc1ab1a0
PA
84382012-01-17 Pedro Alves <palves@redhat.com>
8439
8440 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8441 memalign plus mprotect to allocate the scratch buffer.
8442
7d5d4e98
PA
84432012-01-13 Pedro Alves <palves@redhat.com>
8444
8445 * server.c (attach_inferior): Clear `cont_thread'.
8446
f128d5e9
PA
84472012-01-13 Pedro Alves <palves@redhat.com>
8448
8449 * server.c (main): Avoid infinite loop while detaching/killing
8450 after a longjmp.
8451
06db92f0
DE
84522012-01-09 Doug Evans <dje@google.com>
8453
8454 * server.c (start_inferior): Set last_ptid in --wrapper case.
8455
32d92999
YQ
84562012-01-06 Yao Qi <yao@codesourcery.com>
8457
8458 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8459 defined.
8460 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8461
5e0a92a9
YQ
84622012-01-04 Yao Qi <yao@codesourcery.com>
8463
8464 * tracepoint.c (cmd_qtdp): Print debug message
8465 for static tracepoint.
8466
ae639e8c
YQ
84672012-01-04 Yao Qi <yao@codesourcery.com>
8468
8469 * tracepoint.c (trace_vdebug): Differentiate debug message
8470 between gdbserver and IPA.
8471
f72429c5
YQ
84722012-01-03 Yao Qi <yao@codesourcery.com>
8473
8474 * tracepoint.c (tracepoint_was_hit): Don't collect for
8475 static tracepoint.
8476
12c3e59c
JB
84772012-01-02 Joel Brobecker <brobecker@adacore.com>
8478
8479 * terminal.h: Reformat copyright header.
8480
67827812
JB
84812012-01-02 Joel Brobecker <brobecker@adacore.com>
8482
8483 * server.c (gdbserver_version): Update copyright year.
8484 * gdbreplay.c (gdbreplay_version): Likewise.
8485
3e52c33d
JK
84862011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8487
8488 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8489
8490 Revert:
8491 2011-12-18 Hui Zhu <teawater@gmail.com>
8492 * linux-low.c (linux_create_inferior): Save return value to ret.
8493
66f1260e
HZ
84942011-12-18 Hui Zhu <teawater@gmail.com>
8495
8496 * linux-low.c (linux_create_inferior): Save return value to ret.
8497
e77616d7
DE
84982011-12-16 Doug Evans <dje@google.com>
8499
e7b06c57
DE
8500 * linux-low.c (linux_create_inferior): If stdio connection,
8501 redirect stdin from /dev/null, stdout to stderr.
8502 * remote-utils.c (remote_is_stdio): New static global.
8503 (remote_connection_is_stdio): New function.
8504 (remote_prepare): Handle stdio connection.
8505 (remote_open): Ditto.
8506 (remote_close): Don't close stdin for stdio connections.
8507 (read_prim,write_prim): New functions. Replace all calls to
8508 read/write to these.
8509 * server.c (main): Watch for "-" argument. Move call to
8510 remote_prepare before start_inferior.
8511 * server.h (STDIO_CONNECTION_NAME): New macro.
8512 (remote_connection_is_stdio): Declare.
8513
e77616d7
DE
8514 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8515 in debugging output.
8516
82067193
YQ
85172011-12-15 Yao Qi <yao@codesourcery.com>
8518
8519 * tracepoint.c: Include sys/syscall.h.
8520 (gdb_ust_thread): Remove preprocessor conditional.
8521
82bfbe7e
PA
85222011-12-14 Pedro Alves <pedro@codesourcery.com>
8523
8524 * linux-low.c (linux_detach_one_lwp): Call
8525 the_low_target.prepare_to_resume before detaching.
8526
712c6575
YQ
85272011-12-14 Yao Qi <yao@codesourcery.com>
8528
8529 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8530 of write.
8531
d54d1edf
YQ
85322011-12-14 Yao Qi <yao@codesourcery.com>
8533
8534 * i386-low.c (i386_low_stopped_data_address): Initialize local
8535 variable `control'.
8536
6210a125
PA
85372011-12-13 Pedro Alves <pedro@codesourcery.com>
8538
8539 PR remote/13492
8540
8541 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8542 DR_CONTROL unless necessary. Extend comments.
8543 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8544 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8545
2ece8244
YQ
85462011-12-13 Yao Qi <yao@codesourcery.com>
8547
8548 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8549 macros.
8550 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8551
784867a5
JK
85522011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8553
8554 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8555 Print new debug message for such case.
8556
6bf36717
JK
85572011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8558
8559 Fix overlapping memcpy.
8560 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8561 the read_inferior_memory transfer.
8562 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8563 write_inferior_memory transfer.
8564 (set_fast_tracepoint_jump): New variable buf. Use it for the
8565 read_inferior_memory and write_inferior_memory transfers.
8566 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8567 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8568 Use it for the write_inferior_memory transfer.
8569 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8570 buffers.
8571
50275556
MR
85722011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8573
8574 * linux-low.c (fetch_register, store_register): Make code
8575 consistent, fix formatting.
8576
7325beb4
MR
85772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8578
8579 * linux-low.c (usr_store_inferior_registers): Factor out code
8580 to handle individual registers into...
8581 (store_register): ... this new function.
8582
c642a434
UW
85832011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8584
8585 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8586 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8587 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8588 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8589 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8590 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8591 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8592 (srv_xmlfiles): Add new XML files.
8593
8594 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8595 and <sys/uio.h>.
8596 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8597 (init_registers_s390_linux32v1): Add prototype.
8598 (init_registers_s390_linux32v2): Likewise.
8599 (init_registers_s390_linux64v1): Likewise.
8600 (init_registers_s390_linux64v2): Likewise.
8601 (init_registers_s390x_linux64v1): Likewise.
8602 (init_registers_s390x_linux64v2): Likewise.
8603 (s390_num_regs): Increment to 52.
8604 (s390_regmap): Add orig_r2 register.
8605 (s390_num_regs_3264): Increment to 68.
8606 (s390_regmap_3264): Add orig_r2 register.
8607 (s390_collect_ptrace_register): Handle orig_r2 register.
8608 (s390_supply_ptrace_register): Likewise.
8609 (s390_fill_last_break): New function.
8610 (s390_store_last_break): Likewise.
8611 (s390_fill_system_call): New function.
8612 (s390_store_system_call): Likewise.
8613 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8614 register sets.
8615 (s390_check_regset): New function.
8616 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8617 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8618 Update target_regsets for available register sets.
8619
2268b414
JK
86202011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8621 Jan Kratochvil <jan.kratochvil@redhat.com>
8622
8623 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8624 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8625 New.
8626 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8627 * linux-low.h (struct process_info_private): New member r_debug.
8628 * server.c (handle_qxfer_libraries): Call
8629 the_target->qxfer_libraries_svr4.
8630 (handle_qxfer_libraries_svr4): New function.
8631 (qxfer_packets): New entry "libraries-svr4".
8632 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8633 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8634 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8635 PACKET_qXfer_libraries_svr4.
8636
d6db1fab
UW
86372011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8638
8639 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8640 PSW address/mask between 8-byte and 16-byte formats.
8641 (s390_supply_ptrace_register): Likewise.
8642 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8643 basic addressing mode bit.
8644
242f5f1c
SS
86452011-11-24 Stan Shebs <stan@codesourcery.com>
8646
8647 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8648
f196051f
SS
86492011-11-17 Stan Shebs <stan@codesourcery.com>
8650
8651 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8652 (tracing_start_time): New global.
8653 (tracing_stop_time): New global.
8654 (tracing_user_name): New global.
8655 (tracing_notes): New global.
8656 (tracing_stop_note): New global.
8657 (cmd_qtstart): Set traceframe_usage, start_time.
8658 (stop_tracing): Set stop_time.
8659 (cmd_qtstatus): Report additional status.
8660 (cmd_qtp): New function.
8661 (handle_tracepoint_query): Call it.
8662 (cmd_qtnotes): New function.
8663 (handle_tracepoint_general_set): Call it.
8664 (get_timestamp): Rename from tsv_get_timestamp.
8665
405f8e94
SS
86662011-11-14 Stan Shebs <stan@codesourcery.com>
8667 Kwok Cheung Yeung <kcy@codesourcery.com>
8668
8669 * linux-x86-low.c (small_jump_insn): New.
8670 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8671 trampoline and error message, build a trampoline and issue a small
8672 jump instruction to it.
8673 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8674 trampoline and error message.
8675 (x86_get_min_fast_tracepoint_insn_len): New.
8676 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8677 * linux-low.h (struct linux_target_ops): Add arguments to
8678 install_fast_tracepoint_jump_pad operation, add new operation.
8679 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8680 arguments.
8681 (linux_get_min_fast_tracepoint_insn_len): New function.
8682 (linux_target_op): Add new operation.
8683 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8684 (gdb_trampoline_buffer_end): Ditto.
8685 (gdb_trampoline_buffer_error): Ditto.
8686 (struct ipa_sym_addresses): Add fields for new IPA variables.
8687 (symbol_list): Add entries for new IPA variables.
8688 (struct tracepoint): Add fields to hold the address range of the
8689 trampoline used by the tracepoint.
8690 (trampoline_buffer_head): New static variable.
8691 (trampoline_buffer_tail): Ditto.
8692 (claim_trampoline_space): New function.
8693 (have_fast_tracepoint_trampoline_buffer): New function.
8694 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8695 structure.
8696 (install_fast_tracepoint): Ditto, also add error buffer argument.
8697 (cmd_qtminftpilen): New function.
8698 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8699 (fast_tracepoint_from_trampoline_address): New function.
8700 (fast_tracepoint_collecting): Handle trampoline as part of jump
8701 pad space.
8702 (set_trampoline_buffer_space): New function.
8703 (initialize_tracepoint): Initialize new IPA variables.
8704 * target.h (struct target_ops): Add arguments to
8705 install_fast_tracepoint_jump_pad operation, add new
8706 get_min_fast_tracepoint_insn_len operation.
8707 (target_get_min_fast_tracepoint_insn_len): New.
8708 (install_fast_tracepoint_jump_pad): Add arguments.
8709 * server.h (IPA_BUFSIZ): Define.
8710 * linux-i386-ipa.c: Include extra header files.
8711 (initialize_fast_tracepoint_trampoline_buffer): New function.
8712 (initialize_low_tracepoint): Call it.
8713 * server.h (set_trampoline_buffer_space): Declare.
8714 (claim_trampoline_space): Ditto.
8715 (have_fast_tracepoint_trampoline_buffer): Ditto.
8716
1e4d1764
YQ
87172011-11-14 Yao Qi <yao@codesourcery.com>
8718
8719 * server.c (handle_query): Handle InstallInTrace for qSupported.
8720 * tracepoint.c (add_tracepoint): Sort list.
8721 (install_tracepoint, download_tracepoint): New.
8722 (cmd_qtdp): Call them to install and download tracepoints.
8723 (sort_tracepoints): Removed.
8724 (cmd_qtstart): Update.
8725
5c73ff4e
YQ
87262011-11-14 Yao Qi <yao@codesourcery.com>
8727
8728 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8729 * mem-break.h: Declare.
8730 * tracepoint.c (cmd_qtstart): Move some code to ...
8731 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8732 New.
8733 (download_tracepoints): Move some code to ...
8734 (download_tracepoint_1): ... here. New.
8735
86a30030
YQ
87362011-11-08 Yao Qi <yao@codesourcery.com>
8737
8738 * remote-utils.c (relocate_instruction): A comment fix.
8739
8d26e50c
JB
87402011-11-07 Joel Brobecker <brobecker@adacore.com>
8741
8742 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8743 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8744 dr_status_mirror and dr_control_mirror from debug_reg_state.
8745 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8746 (i386_initial_stuff): Remove use of deleted globals.
8747 (i386_get_thread_context, i386_set_thread_context,
8748 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8749 from debug_reg_state.
8750
a59306a3
YQ
87512011-11-05 Yao Qi <yao@codesourcery.com>
8752
8753 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8754 address as TPOINT's.
8755
3065dfb6
SS
87562011-11-02 Stan Shebs <stan@codesourcery.com>
8757
8758 * tracepoint.c (agent_mem_read_string): New function.
8759 (eval_agent_expr): Call it for tracenz.
8760 * server.c (handle_query): Report support for tracenz.
8761
fd0d8c7c
YQ
87622011-11-02 Yao Qi <yao@codesourcery.com>
8763
8764 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8765
609086b1
YQ
87662011-11-02 Yao Qi <yao@codesourcery.com>
8767
8768 * target.h: Fix a typo in comment.
8769
b9fd1791
PA
87702011-10-31 Pedro Alves <pedro@codesourcery.com>
8771
8772 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8773 clobber the breakpoints' shadows with fast tracepoint jumps.
8774 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8775 * target.c (write_inferior_memory): Also pass MYADDR down to
8776 check_mem_write.
8777
03583c20
UW
87782011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8779
8780 * configure.ac: Check support for personality routine.
8781 * configure: Regenerate.
8782 * config.in: Likewise.
8783 * linux-low.c: Include <sys/personality.h>.
8784 Define ADDR_NO_RANDOMIZE if necessary.
8785 (linux_create_inferior): Disable address space randomization when
8786 forking inferior, if requested.
8787 (linux_supports_disable_randomization): New function.
8788 (linux_target_ops): Install it.
8789 * server.h (disable_randomization): Declare.
8790 * server.c (disable_randomization): New global variable.
8791 (handle_general_set): Handle QDisableRandomization.
8792 (handle_query): Likewise for qSupported.
8793 (main): Support --disable-randomization and --no-disable-randomization
8794 command line arguments.
8795 * target.h (struct target_ops): Add supports_disable_randomization.
8796 (target_supports_disable_randomization): New macro.
8797
723b724b
MF
87982011-09-29 Mike Frysinger <vapier@gentoo.org>
8799
8800 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8801 ifdef check.
8802 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8803 [!PT_GETDSBT] (target_loadmap): New definition.
8804 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8805 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8806 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8807 and PT_GETDSBT to LINUX_LOADMAP.
8808 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8809 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8810
55329a5c 88112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8812
8813 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8814 (arm_linux_hwbp_cap): New static variable.
8815 (arm_linux_get_hwbp_cap): Replace by ...
8816 (arm_linux_init_hwbp_cap): ... this new function.
8817 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8818 (arm_linux_get_hw_watchpoint_count): Likewise.
8819 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8820 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8821 (arm_prepare_to_resume): Use perror_with_name instead of error.
8822
55329a5c 88232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8824
8825 * linux-arm-low.c: Include <signal.h>.
8826 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8827 (struct arm_linux_hwbp_cap): New data type.
8828 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8829 (struct arm_linux_hw_breakpoint): New data type.
8830 (MAX_BPTS, MAX_WPTS): Define.
8831 (struct arch_process_info, struct arch_lwp_info): New data types.
8832 (arm_linux_get_hwbp_cap): New function.
8833 (arm_linux_get_hw_breakpoint_count): Likewise.
8834 (arm_linux_get_hw_watchpoint_count): Likewise.
8835 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8836 (arm_hwbp_control_initialize): Likewise.
8837 (arm_hwbp_control_is_enabled): Likewise.
8838 (arm_hwbp_control_is_initialized): Likewise.
8839 (arm_hwbp_control_disable): Likewise.
8840 (arm_linux_hw_breakpoint_equal): Likewise.
8841 (arm_linux_hw_point_initialize): Likewise.
8842 (struct update_registers_data): New data structure.
8843 (update_registers_callback: New function.
8844 (arm_insert_point): Likewise.
8845 (arm_remove_point): Likewise.
8846 (arm_stopped_by_watchpoint): Likewise.
8847 (arm_stopped_data_address): Likewise.
8848 (arm_new_process): Likewise.
8849 (arm_new_thread): Likewise.
8850 (arm_prepare_to_resume): Likewise.
8851 (the_low_target): Register arm_insert_point, arm_remove_point,
8852 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8853 arm_new_thread, and arm_prepare_to_resume.
8854
6b9801d4
SS
88552011-09-15 Stan Shebs <stan@codesourcery.com>
8856
8857 * server.h (struct emit_ops): Add compare-goto fields.
8858 * tracepoint.c (gdb_agent_op_sizes): New table.
8859 (emit_eq_goto): New function.
8860 (emit_ne_goto): New function.
8861 (emit_lt_goto): New function.
8862 (emit_le_goto): New function.
8863 (emit_gt_goto): New function.
8864 (emit_ge_goto): New function.
8865 (is_goto_target): New function.
8866 (compile_bytecodes): Recognize special cases of compare-goto
8867 combinations and call specialized emitters for them.
8868 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8869 (amd64_emit_ne_goto): New function.
8870 (amd64_emit_lt_goto): New function.
8871 (amd64_emit_le_goto): New function.
8872 (amd64_emit_gt_goto): New function.
8873 (amd64_emit_ge_goto): New function.
8874 (amd64_emit_ops): Add the new functions.
8875 (i386_emit_eq_goto): New function.
8876 (i386_emit_ne_goto): New function.
8877 (i386_emit_lt_goto): New function.
8878 (i386_emit_le_goto): New function.
8879 (i386_emit_gt_goto): New function.
8880 (i386_emit_ge_goto): New function.
8881 (i386_emit_ops): Add the new functions.
8882
bf15cbda
SS
88832011-09-08 Stan Shebs <stan@codesourcery.com>
8884
8885 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8886 (i386_emit_epilogue): Restore %ebx.
8887
943ca1dd
JZ
88882011-08-31 Jie Zhang <jzhang918@gmail.com>
8889
8890 * server.c (step_thread): Remove definition.
8891 (process_serial_event): Don't handle Hs.
8892 * server.h (step_thread): Remove declaration.
8893 * target.c (set_desired_inferior): Remove use of step_thread.
8894
e3deef73
LM
88952011-08-24 Luis Machado <lgustavo@codesourcery.com>
8896
8897 * linux-low.c: Include linux-procfs.h.
8898 (linux_attach_lwp_1): Update comments.
8899 (linux_attach): Scan for existing threads when attaching to a
8900 process that is the tgid.
8901 * Makefile.in: Update dependencies.
8902
13da1c97
LM
89032011-08-24 Luis Machado <lgustavo@codesourcery.com>
8904
8905 * configure.srv: Add linux-procfs.o dependencies.
8906
881127c9
YQ
89072011-08-14 Yao Qi <yao@codesourcery.com>
8908
8909 * target.h (struct target_ops): Fix indent.
8910 * win32-low.c (win32_target_ops): Fix comment.
8911
58dbd541
YQ
89122011-08-14 Andrew Jenner <andrew@codesourcery.com>
8913 Yao Qi <yao@codesourcery.com>
8914
8915 * Makefile.in (clean): Remove tic6x-*.c files.
8916 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8917 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8918 (tic6x-c64xp-linux.c): Likewise.
8919 * configure.srv: Add support for tic6x-*-uclinux.
8920 * linux-tic6x-low.c: New.
8921 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8922
78d85199
YQ
89232011-08-14 Andrew Stubbs <ams@codesourcery.com>
8924 Yao Qi <yao@codesourcery.com>
8925
8926 * target.h (struct target_ops): Add read_loadmap.
8927 * linux-low.c (struct target_loadseg): New type.
8928 (struct target_loadmap): New type.
8929 (linux_read_loadmap): New function.
8930 (linux_target_ops): Add linux_read_loadmap.
8931 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8932 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8933 to NULL.
78d85199 8934
a959a88d
EZ
89352011-08-05 Eli Zaretskii <eliz@gnu.org>
8936
8937 * win32-low.c: Include <stdint.h>.
8938
1ced966e
PA
89392011-07-22 Pedro Alves <pedro@codesourcery.com>
8940
8941 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8942 to the inferior here.
8943 (i386_remove_aligned_watchpoint): Ditto.
8944 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8945 fit part of the watchpoint in the debug registers.
8946 (i386_update_inferior_debug_regs): New.
8947 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8948 registers, and only update the inferior on success.
8949 (i386_low_remove_watchpoint): Ditto.
8950
d26e3629
KY
89512011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8952
8953 * linux-low.c (compare_ints, unique, list_threads, show_process,
8954 linux_core_of_thread): Delete.
8955 (linux_target_ops): Change linux_core_of_thread to
8956 linux_common_core_of_thread.
8957 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8958 * utils.c (malloc_failure): Change type of argument.
8959 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8960 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8961 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8962 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8963 (IPA_OBJS): Add common-utils-ipa.o.
8964 (ptid_h, linux_osdata_h): New macros.
8965 (server_h): Add common/common-utils.h, common/xml-utils.h,
8966 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8967 common/ptid.h.
8968 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8969 ptid.o, buffer.o): New rules.
8970 (linux-low.o): Add common/linux-osdata.h as a dependency.
8971 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8972 * configure.ac: Add AC_HEADER_DIRENT check.
8973 * config.in: Regenerate.
8974 * configure: Regenerate.
8975 * remote-utils.c (xml_escape_text): Delete.
8976 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8977 buffer_xml_printf): Move to common/buffer.c.
8978 * server.c (main): Remove call to initialize_inferiors.
8979 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8980 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8981 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8982 internal_error, gdb_assert, gdb_assert_fail): Delete.
8983 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8984 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8985 common/buffer.h.
8986 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8987 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8988 initialize_inferiors): Delete.
8989
2275a1a7
PA
89902011-07-20 Pedro Alves <pedro@codesourcery.com>
8991
8992 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8993 symbol error.
8994
0a5b1e09
PA
89952011-05-31 Pedro Alves <pedro@codesourcery.com>
8996
8997 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8998 assertion.
8999 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9000
6938fd34
YQ
90012011-05-26 Yao Qi <yao@codesourcery.com>
9002
9003 * Makefile.in (thread-db.o): Track dependence to
9004 common/gdb_thread_db.h.
9005 * thread-db.c: include gdb_thread_db.h from right place.
9006
b481f9e0
TT
90072011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9008
9009 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9010 __FILE__ and __LINE__ to internal_error.
9011
98a5dd13
DE
90122011-05-13 Doug Evans <dje@google.com>
9013
9014 * thread-db.c (try_thread_db_load_from_sdir): New function.
9015 (try_thread_db_load_from_dir): New function.
9016 (thread_db_load_search): Handle $sdir, ignore $pdir.
9017 Remove trying of system directories if search of
9018 libthread-db-search-path fails, that is now done via $sdir.
9019
d248b706
KY
90202011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9021
9022 * server.c (handle_query): Add EnableDisableTracepoints to the list
9023 of supported features.
43aaf8b6 9024 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9025 tracepoints.
43aaf8b6
PA
9026 (cmd_qtenable_disable): New.
9027 (cmd_qtstart): Install tracepoints even if disabled.
9028 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9029 receiving a QTEnable or QTDisable packet.
9030 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9031 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9032 tracepoints.
9033 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9034
84e578fb
DE
90352011-05-10 Doug Evans <dje@google.com>
9036
9037 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9038
71f55dd8
DE
90392011-05-04 Doug Evans <dje@google.com>
9040
9041 * linux-low.c (linux_join): Skip process lookup.
9042 * spu-low.c (spu_join): Ditto.
9043 * server.c (join_inferiors_callback): Delete.
9044 (process_serial_event): For 'D' packet (detach) call join_inferior
9045 directly.
9046
4d393d60
JM
90472011-05-04 Joseph Myers <joseph@codesourcery.com>
9048
9049 * README: Don't mention xscale*-*-linux*.
9050 * configure.srv (xscale*-*-linux*): Don't handle target.
9051
b00ad6ff
NF
90522011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9053
9054 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9055 casting pointers.
9056 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9057 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9058 (i386_emit_void_call_2): Likewise.
9059
af96c192
YQ
90602011-04-26 Yao Qi <yao@codesourcery.com>
9061
43aaf8b6
PA
9062 * linux-low.c: Move common macros to linux-ptrace.h.
9063 Include linux-ptrace.h.
af96c192
YQ
9064 * Makefile.in (linux_ptrace_h): New.
9065 (linux-low.o): Depends on linux-ptrace.h.
9066
03f2bd59
JK
90672011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9068
9069 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9070 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9071 (remote_prepare): New function with most of the TCP code from ...
9072 (remote_open): ... here. Detect PORT here unconditionally. Move also
9073 setting transport_is_reliable.
9074 * server.c (run_once): New variable.
9075 (gdbserver_usage): Document it.
9076 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9077 the first run if RUN_ONCE.
9078 * server.h (run_once, remote_prepare): New declarations.
9079
7a9dd1b2
TT
90802011-04-19 Tom Tromey <tromey@redhat.com>
9081
9082 * win32-low.c (handle_load_dll): Remove duplicate "the".
9083
81239425
PM
90842011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9085
9086 Remove support for old Cygwin 1.5 versions.
9087 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9088 function to avoid warning.
9089 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9090 warning.
9091
9e0627f1
PM
90922011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9093
9094 * gdbserver/server.h (Macro _): Define it if not available.
9095
588eebee
MS
90962011-03-14 Michael Snyder <msnyder@vmware.com>
9097
348af9f7 9098 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9099
43f70d4c
JB
91002011-03-10 Joel Brobecker <brobecker@adacore.com>
9101
9102 * Makefile.in (maintainer-clean realclean distclean): Remove
9103 "make ... subdir_do" command.
9104
348af9f7
MS
91052011-03-10 Michael Snyder <msnyder@vmware.com>
9106
9107 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9108
9109 * server.c (handle_v_run): Free alloced buffer on early return.
9110
e637a4f5
YQ
91112011-03-09 Yao Qi <yao@codesourcery.com>
9112
9113 Revert:
9114 2011-03-04 Yao Qi <yao@codesourcery.com>
9115
9116 * Makefile.in: Remove GNU make feature --directory.
9117
9118 2011-03-05 Yao Qi <yao@codesourcery.com>
9119
9120 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9121 (subdir_do): New make target. Copied from gdb/Makefile.
9122 (maintainer-clean, realclean, distclean, clean): Call corresponding
9123 make targets in common/Makefile.
9124
9125 2011-02-11 Yao Qi <yao@codesourcery.com>
9126
9127 * configure.ac: Call AC_PROG_RANLIB.
9128 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9129 * configure: Regenerate.
9130
e6edda56
JK
91312011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9132
9133 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9134
e5141119
JB
91352011-03-06 Yao Qi <yao@codesourcery.com>
9136
9137 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9138
64794aa4
JB
91392011-03-05 Yao Qi <yao@codesourcery.com>
9140
9141 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9142 (subdir_do): New make target. Copied from gdb/Makefile.
9143 (maintainer-clean, realclean, distclean, clean): Call corresponding
9144 make targets in common/Makefile.
9145
7a762829
YQ
91462011-03-04 Yao Qi <yao@codesourcery.com>
9147
9148 * Makefile.in: Remove GNU make feature --directory.
9149
348af9f7
MS
91502011-03-04 Michael Snyder <msnyder@vmware.com>
9151
9152 * server.c (queue_stop_reply): Call xmalloc not malloc.
9153
91542011-03-02 Michael Snyder <msnyder@vmware.com>
9155
9156 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9157
9f72fee2
MS
91582011-02-28 Michael Snyder <msnyder@vmware.com>
9159
588eebee
MS
9160 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9161 (cmd_qtframe): Ditto.
9162 (cmd_qtbuffer): Ditto.
9163 (cmd_bigqtbuffer): Ditto.
9164
9f72fee2
MS
9165 * utils.c (decimal2str): Initialize 'width' to nine, then
9166 don't mess with it.
9167
8040bd49
UW
91682011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9169
9170 * hostio.c (require_data): Free *data, not data.
9171
7e52cbd0
JK
91722011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9173
9174 * hostio.c (require_data): Use free, not xfree.
9175
9130f83e
MS
91762011-02-27 Michael Snyder <msnyder@vmware.com>
9177
4b812f4e
MS
9178 * server.c (handle_query): Discard unused value.
9179
9130f83e
MS
9180 * hostio.c (require_data): Free malloc memory before returning
9181 error.
9182
69d37113
MS
91832011-02-26 Michael Snyder <msnyder@vmware.com>
9184
9185 * linux-low.c (list_threads): Call closedir for dirent.
9186
35f5825a
MS
91872011-02-27 Michael Snyder <msnyder@vmware.com>
9188
2a589cef
MS
9189 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9190 a case statement falls through.
9191
0adea5f7
MS
9192 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9193
35f5825a
MS
9194 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9195 in comparison.
9196
238f1c74
MS
91972011-02-26 Michael Snyder <msnyder@vmware.com>
9198
9199 * utils.c (decimal2str): Eliminate dead code and dead param.
9200 (pulongest): Drop dead param from call to decimal2str.
9201 (plongest): Ditto.
9202
633ff500
JB
92032011-02-24 Joel Brobecker <brobecker@adacore.com>
9204
9205 Revert the following patch (not approved yet):
9206 2011-02-21 Hui Zhu <teawater@gmail.com>
9207 * tracepoint.c (tp_printf): New function.
9208 (eval_agent_expr): Handle gdb_agent_op_printf.
9209
f9c6ff72
HZ
92102011-02-21 Hui Zhu <teawater@gmail.com>
9211
9212 * tracepoint.c (tp_printf): New function.
9213 (eval_agent_expr): Handle gdb_agent_op_printf.
9214
94d5e490
TT
92152011-02-18 Tom Tromey <tromey@redhat.com>
9216
9217 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9218 (tracepoint.o): Likewise.
9219 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9220 (gdb_agent_op_names): Likewise.
9221
c7f96d2b
TT
92222011-02-18 Tom Tromey <tromey@redhat.com>
9223
9224 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9225 gdb_agent_op_rot>: New constants.
9226 (gdb_agent_op_names): Add pick and roll.
9227 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9228 cases.
9229
0feedb2c
JK
92302011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9231
9232 * aclocal.m4: Regenerated with aclocal-1.11.1.
9233
b3b9301e
PA
92342011-02-14 Pedro Alves <pedro@codesourcery.com>
9235
9236 * server.c (handle_qxfer_traceframe_info): New.
9237 (qxfer_packets): Register "traceframe-info".
9238 (handle_query): Report support for qXfer:traceframe-info:read+.
9239 * tracepoint.c (match_blocktype): New.
9240 (traceframe_find_block_type): Rename to ...
9241 (traceframe_walk_blocks): ... this. Add callback filter argument,
9242 and use it.
9243 (traceframe_find_block_type): New, reimplemented on top of
9244 traceframe_walk_blocks.
9245 (build_traceframe_info_xml): New.
9246 (traceframe_read_info): New.
9247 * server.h (traceframe_read_info): Declare.
9248
4f3e6fb7
YQ
92492011-02-11 Yao Qi <yao@codesourcery.com>
9250
9251 * configure.ac: Call AC_PROG_RANLIB.
9252 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9253 * configure: Regenerate.
9254
764880b7
PA
92552011-02-07 Pedro Alves <pedro@codesourcery.com>
9256
9257 * server.c (gdb_read_memory): Change return semantics to allow
9258 partial transfers.
9259 (handle_search_memory_1): Adjust.
9260 (process_serial_event) <'m' packet>: Handle partial transfers.
9261 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9262
1c79eb8a
PA
92632011-01-28 Pedro Alves <pedro@codesourcery.com>
9264
9265 * regcache.c (init_register_cache): Initialize
9266 regcache->register_status.
9267 (free_register_cache): Release regcache->register_status.
9268 (regcache_cpy): Copy register_status.
9269 (registers_to_string): Print 'x's for unavailable registers.
9270 (supply_register): Mark the register's status valid or
9271 unavailable, depending on whether a buffer was passed in or not.
9272 (supply_register_zeroed): New.
9273 (supply_regblock): Mark the registers' status valid or
9274 unavailable, depending on whether a buffer was passed in or not.
9275 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9276 (struct regcache): New `register_status' field.
9277 (supply_register_zeroed): Declare.
9278 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9279 supply_register_zeroed, rather than passing a NULL buffer to
9280 supply_register.
9281 * tracepoint.c (fetch_traceframe_registers): Update comment.
9282
85724a0e
PA
92832011-01-28 Pedro Alves <pedro@codesourcery.com>
9284
9285 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9286 buffer explicit.
9287
d08aafef
PA
92882011-01-25 Pedro Alves <pedro@codesourcery.com>
9289
9290 * server.h (decode_xfer_write): Change prototype.
9291 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9292 and don't extract the annex here.
9293 * server.c (decode_xfer_read): Remove `annex' parameter,
9294 and don't extract the annex here.
9295 (decode_xfer): New.
9296 (struct qxfer): New.
9297 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9298 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9299 (handle_qxfer_statictrace): New functions, abstracted out from
9300 handle_query, and made to use the struct qxfer interface.
9301 (handle_threads_qxfer_proper): Rename to ...
9302 (handle_qxfer_threads_proper): ... this.
9303 (handle_threads_qxfer): Rename to ...
9304 (handle_qxfer_threads): ... this. Adjust.
9305 (qxfer_packets): New array.
9306 (handle_qxfer): New function.
9307 (handle_query): Use handle_qxfer.
9308
493e2a69
MS
93092011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9310
9311 * gdbreplay.c: Shorten lines of >= 80 columns.
9312 * linux-low.c: Ditto.
9313 * linux-ppc-low.c: Ditto.
9314 * linux-s390-low.c: Ditto.
9315 * linux-sparc-low.c: Ditto.
9316 * linux-x86-low.c: Ditto.
9317 * linux-xtensa-low.c: Ditto.
9318 * mem-break.c: Ditto.
9319 * nto-low.c: Ditto.
9320 * regcache.h: Ditto.
9321 * remote-utils.c: Ditto.
9322 * server.c: Ditto.
9323 * server.h: Ditto.
9324 * thread-db.c: Ditto.
9325 * tracepoint.c: Ditto.
9326 * utils.c: Ditto.
9327 * win32-low.h: Ditto.
9328
44944448
JB
93292011-01-05 Joel Brobecker <brobecker@adacore.com>
9330
9331 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9332 update.
9333
71ce852c
JB
93342011-01-01 Joel Brobecker <brobecker@adacore.com>
9335
9336 * server.c (gdbserver_version): Update copyright year in version
9337 output.
9338 * gdbreplay.c (gdbreplay_version): Ditto.
9339
eb826dc6
MF
93402010-12-29 Jie Zhang <jie.zhang@analog.com>
9341
9342 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9343 * linux-bfin-low.c: New file.
9344 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9345 PT_DATA_ADDR for BFIN targets.
9346 * Makefile.in (SFILES): Add linux-bfin-low.c.
9347 (clean): Remove reg-bfin.c.
9348 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9349 * README: Mention supported Blackfin targets.
9350
39ab222a
MF
93512010-12-23 Mike Frysinger <vapier@gentoo.org>
9352
9353 * .gitignore: New file.
9354
a1f2ce7d
MF
93552010-11-16 Mike Frysinger <vapier@gentoo.org>
9356
9357 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9358
f474844c
JZ
93592010-10-22 Jie Zhang <jie@codesourcery.com>
9360
9361 * Makefile.in: Add FLAGS_TO_PASS variable.
9362 (install): Remove dependency of install-only and recursively
9363 invoke make for install-only.
9364
f1048712
DE
93652010-10-04 Doug Evans <dje@google.com>
9366
9367 * Makefile.in (uninstall): Use $(DESTDIR).
9368
b53a1623
PA
93692010-09-24 Pedro Alves <pedro@codesourcery.com>
9370
e6ee044d
PA
9371 PR gdb/11842
9372
b53a1623
PA
9373 * linux-x86-low.c (compat_siginfo_from_siginfo)
9374 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9375 si_code is < 0. Check for si_code == SI_TIMER before checking for
9376 si_code < 0.
9377
fa1bd1e4
JB
93782010-09-13 Joel Brobecker <brobecker@adacore.com>
9379
9380 * lynx-i386-low.c: New file.
9381 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9382
47fac8f8
JB
93832010-09-13 Joel Brobecker <brobecker@adacore.com>
9384
9385 * lynx-low.c (ptrace_request_to_str): Remove handling for
9386 request values that have been removed in LynxOS 5.x.
9387
1adfc54d
JB
93882010-09-13 Joel Brobecker <brobecker@adacore.com>
9389
9390 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9391 <ptrace.h>
9392
c2a66c29
NS
93932010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9394
9395 * configure.ac: Add --enable-inprocess-agent option.
9396 * configure: Rebuilt.
9397
32fcada3
YQ
93982010-09-06 Yao Qi <yao@codesourcery.com>
9399
9400 * linux-low.c (linux_kill): Remove unused variable.
9401 (linux_stabilize_threads): Likewise.
9402 * server.c (start_inferior): Likewise.
9403 (queue_stop_reply_callback): Likewise.
9404 * tracepoint.c (do_action_at_tracepoint): Likewise.
9405
0cccb683
YQ
94062010-09-06 Yao Qi <yao@codesourcery.com>
9407
9408 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9409 on return.
9410
423ec54c
JK
94112010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9412
9413 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9414
12ac6819
PA
94152010-09-06 Pedro Alves <pedro@codesourcery.com>
9416
9417 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9418 "$(IPA_DEPFILES)".
9419
8ed54b31
JB
94202010-09-01 Joel Brobecker <brobecker@adacore.com>
9421
9422 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9423 gdbserver/lynx-ppc-low.c: New files.
9424 * Makefile.in (lynx_low_h): New variable.
9425 (lynx-low.o, lynx-ppc-low.o): New rules.
9426 * configure.ac: On LynxOS, link with -lnetinet.
9427 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9428 * configure: regenerate.
9429
bb0116a4
JB
94302010-09-01 Joel Brobecker <brobecker@adacore.com>
9431
9432 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9433 * configure.ac: Add check for vasprintf and vsnprintf.
9434 * configure, config.in: Regenerate.
9435 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9436
a778ab81 94372010-09-01 Joel Brobecker <brobecker@adacore.com>
9438
9439 * gdbreplay.c: Move include of alloca.h up, next to include of
9440 malloc.h.
9441 * server.h: Add include of malloc.h.
9442 * mem-break.c: Remove include of malloc.h.
9443 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9444
8b034a19 94452010-09-01 Joel Brobecker <brobecker@adacore.com>
9446
9447 * Makefile.in (memmem.o): Build with -Wno-error.
9448
94492010-09-01 Joel Brobecker <brobecker@adacore.com>
9450
9451 * utils.c (xsnprintf): Make non-static.
9452 * server.h: Add xsnprintf declaration.
9453 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9454 replace calls to snprintf by calls to xsnprintf throughout.
9455
94562010-09-01 Joel Brobecker <brobecker@adacore.com>
9457
9458 * configure.ac: Add configure check for alloca.
9459 * configure, config.in: Regenerate.
9460 * server.h: Include alloca.h if it exists.
9461 * gdbreplay.c: Include alloca.h if it exists.
9462
1a981360
PA
94632010-08-28 Pedro Alves <pedro@codesourcery.com>
9464
9465 * linux-low.c (__SIGRTMIN): Define if not already defined.
9466 (linux_create_inferior): Check for __ANDROID__ rather than
9467 __SIGRTMIN.
9468 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9469 are already deferred.
9470 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9471 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9472 stopped and already has a pending signal to report.
9473 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9474 a pending signal to report or is moving out of a jump pad.
9475 (linux_init_signals): Check for __ANDROID__ rather than
9476 __SIGRTMIN.
9477
b4d51a55
PA
94782010-08-28 Pedro Alves <pedro@codesourcery.com>
9479
9480 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9481 debug_threads check. Avoid a linear search when not doing debug
9482 output.
9483
ec48365d
PA
94842010-08-27 Pedro Alves <pedro@codesourcery.com>
9485
9486 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9487 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9488 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9489 (process_event): Change local fd's type to gdb_fildes_t.
9490 (create_file_handler): Adjust prototype.
9491 (delete_file_handler): Adjust prototype.
9492 (handle_file_event): Adjust prototype. Use pfildes.
9493 (create_file_event): Adjsut prototype.
9494 * remote-utils.c (remote_desc, listen_desc): Change type to
9495 gdb_fildes_t.
9496 * server.h: New gdb_fildes_t typedef.
9497 [USE_WIN32API]: Include winsock2.h.
9498 (delete_file_handler, add_file_handler): Adjust prototypes.
9499 (pfildes): Declare.
9500 * utils.c (pfildes): New.
9501
854d88f0
PA
95022010-08-27 Pedro Alves <pedro@codesourcery.com>
9503
9504 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9505 * configure: Regenerate.
9506
0146f85b
PA
95072010-08-27 Pedro Alves <pedro@codesourcery.com>
9508
9509 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9510 (linux_done_accessing_memory): ... this.
9511 (linux_target_ops): Adjust.
9512 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9513 * nto-low.c (nto_target_ops): Adjust comment.
9514 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9515 * spu-low.c (spu_target_ops): Adjust comment.
9516 * target.h (target_ops): Rename unprepare_to_access_memory field
9517 to done_accessing_memory.
9518 (unprepare_to_access_memory): Rename to ...
9519 (done_accessing_memory): ... this.
9520
90d74c30
PA
95212010-08-26 Pedro Alves <pedro@codesourcery.com>
9522
9523 * linux-low.c (linux_prepare_to_access_memory): New.
9524 (linux_unprepare_to_access_memory): New.
9525 (linux_target_ops): Install them.
9526 * server.c (read_memory): Rename to ...
9527 (gdb_read_memory): ... this. Use
9528 prepare_to_access_memory/prepare_to_access_memory.
9529 (write_memory): Rename to ...
9530 (gdb_write_memory): ... this. Use
9531 prepare_to_access_memory/prepare_to_access_memory.
9532 (handle_search_memory_1): Adjust.
9533 (process_serial_event): Adjust.
9534 * target.h (struct target_ops): New fields
9535 prepare_to_access_memory and unprepare_to_access_memory.
9536 (prepare_to_access_memory, unprepare_to_access_memory): New.
9537 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9538 prepare_to_access_memory/prepare_to_access_memory.
9539 * nto-low.c (nto_target_ops): Adjust.
9540 * spu-low.c (spu_target_ops): Adjust.
9541 * win32-low.c (win32_target_ops): Adjust.
9542
fd467969
PA
95432010-08-26 Pedro Alves <pedro@codesourcery.com>
9544
9545 * Makefile.in (WARN_CFLAGS): Get it from configure.
9546 (WERROR_CFLAGS): New.
9547 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9548 * configure.ac: Introduce --enable-werror, which adds -Werror to
9549 the compiler command line. Enabled by default. Disable with
9550 --disable-werror. Add -Wdeclaration-after-statement
9551 Wpointer-arith and -Wformat-nonliteral to warning flags.
9552 * configure: Regenerate.
9553
331e2f5f
PA
95542010-08-26 Pedro Alves <pedro@codesourcery.com>
9555
9556 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9557
e581f2b4
PA
95582010-08-26 Pedro Alves <pedro@codesourcery.com>
9559
9560 * gdbreplay.c (remote_error): New.
9561 (gdbchar): New.
9562 (expect): Use gdbchar. Check for error reading from GDB.
9563 Clarify sync error output.
9564 (play): Check for errors writing to GDB.
9565 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9566 * remote-utils.c (getpkt): Check for errors writing to the remote
9567 descriptor.
9568
3c11dd79
PA
95692010-08-25 Pedro Alves <pedro@codesourcery.com>
9570
9571 * linux-low.c (linux_wait_1): Move non-debugging code out of
9572 `debug_threads' control.
9573
d20a8ad9
PA
95742010-08-25 Pedro Alves <pedro@codesourcery.com>
9575
9576 * linux-low.c (linux_wait_1): Don't set last_status here.
9577 * server.c (push_event, queue_stop_reply_callback): Assert we're
9578 not pushing a TARGET_WAITKIND_IGNORE event.
9579 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9580 (myresume, handle_target_event): Set the thread's last_resume_kind
9581 and last_status from the target returned status.
9582
964e4306
PA
95832010-08-25 Pedro Alves <pedro@codesourcery.com>
9584
9585 PR threads/10729
9586
9587 * linux-x86-low.c (update_debug_registers_callback): New.
9588 (i386_dr_low_set_addr): Use it.
9589 (i386_dr_low_get_addr): New.
9590 (i386_dr_low_set_control): Use update_debug_registers_callback.
9591 (i386_dr_low_get_control): New.
9592 (i386_dr_low_get_status): Adjust.
9593 * linux-low.c (linux_stop_lwp): New.
9594 * linux-low.h (linux_stop_lwp): Declare.
9595
9596 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9597 argument instead of a i386_debug_reg_state.
9598 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9599 a i386_debug_reg_state.
9600 (i386_insert_aligned_watchpoint): Adjust.
9601 (i386_remove_aligned_watchpoint): Adjust.
9602 (i386_low_stopped_data_address): Read the debug registers from the
9603 inferior instead of from the mirrors.
9604 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9605 (i386_dr_low_get_addr): Declare.
9606 (i386_dr_low_get_control): Declare.
9607 (i386_dr_low_get_status): Change prototype.
9608
9609 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9610 (i386_dr_low_get_addr): New.
9611 (i386_dr_low_get_control): New.
9612 (i386_dr_low_get_status): Adjust prototype. Return
9613 dr_status_mirror.
9614 (i386_initial_stuff): Clear dr_status_mirror and
9615 dr_control_mirror.
9616 (i386_get_thread_context): Adjust.
9617 (i386_set_thread_context): Adjust.
9618 (i386_thread_added): Adjust.
9619
5f21a75b
PA
96202010-08-24 Pedro Alves <pedro@codesourcery.com>
9621
9622 * linux-low.h (linux_thread_area): Delete declaration.
9623
3e4c1235
TS
96242010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9625
9626 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9627 after its termination.
9628
1971b033
PA
96292010-08-09 Pedro Alves <pedro@codesourcery.com>
9630
9631 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9632 (gdb_wants_all_stopped): Delete.
9633 (linux_wait_1): Don't call them.
9634 * server.c (handle_v_cont): Tag all threads as want-stopped.
9635 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9636 stopped as "client-wants-stopped".
9637
310444ac
PA
96382010-07-31 Pedro Alves <pedro@codesourcery.com>
9639
9640 * Makefile.in (signals_h): New.
9641 (server_h): Depend on it.
9642 (server.o): Don't depend on $(signals_def).
9643 (signals.o): Depend on $(signals_def).
9644
a19cae16
JK
96452010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9646
9647 * Makefile.in (signals_def): New.
9648 (server_h): Append include/gdb/signals.h and signals_def.
9649 (server.o): Append signals_def.
9650
30d50328
JK
96512010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9652
9653 * server.c (handle_target_event): Use target_signal_to_host for
9654 resume_info.sig initialization.
9655 * target.h (struct thread_resume) <sig>: New comment.
9656
5c3216e2
OS
96572010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9658
c6f46ca0
OS
9659 * server.c (handle_query): strcpy() the returned string from paddress()
9660 instead of sprintf().
5c3216e2
OS
9661 * utils.c (paddress): Return phex_nz().
9662
6bd31874
JB
96632010-07-07 Joel Brobecker <brobecker@adacore.com>
9664
9665 * server.c (handle_v_cont): Call mourn_inferior if process
9666 just exited.
9667 (myresume): Likewise.
9668
0fb4aa4b
PA
96692010-07-01 Pedro Alves <pedro@codesourcery.com>
9670
9671 Static tracepoints, and integration with UST.
9672
9673 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9674 * mem-break.c (uninsert_all_breakpoints)
9675 (reinsert_all_breakpoints): New.
9676 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9677 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9678 (gdb_agent_ust_loaded, helper_thread_id)
9679 (gdb_agent_helper_thread_id): New macros.
9680 (struct ipa_sym_addresses): Add addr_ust_loaded,
9681 addr_helper_thread_id, addr_cmd_buf.
9682 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9683 (in_process_agent_loaded_ust): New.
9684 (write_e_ust_not_loaded): New.
9685 (maybe_write_ipa_ust_not_loaded): New.
9686 (struct collect_static_trace_data_action): New.
9687 (enum tracepoint_type) <static_tracepoint>: New.
9688 (struct tracepoint) <handle>: Mention static tracepoints.
9689 (struct static_tracepoint_ctx): New.
9690 (CMD_BUF_SIZE): New.
9691 (add_tracepoint_action): Handle static tracepoint actions.
9692 (unprobe_marker_at): New.
9693 (clear_installed_tracepoints): Handle static tracepoints.
9694 (cmd_qtdp): Handle static tracepoints.
9695 (probe_marker_at): New.
9696 (cmd_qtstart): Handle static tracepoints.
9697 (response_tracepoint): Handle static tracepoints.
9698 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9699 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9700 (get_context_regcache): Handle static tracepoints.
9701 (do_action_at_tracepoint): Handle static tracepoint actions.
9702 (traceframe_find_block_type): Handle static trace data blocks.
9703 (traceframe_read_sdata): New.
9704 (download_tracepoints): Download static tracepoint actions.
9705 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9706 (GDB_PROBE_NAME): New.
9707 (ust_ops): New.
9708 (GET_UST_SYM): New.
9709 (USTF): New.
9710 (dlsym_ust): New.
9711 (ust_marker_to_static_tracepoint): New.
9712 (gdb_probe): New.
9713 (collect_ust_data_at_tracepoint): New.
9714 (gdb_ust_probe): New.
9715 (UNIX_PATH_MAX, SOCK_DIR): New.
9716 (gdb_ust_connect_sync_socket): New.
9717 (resume_thread, stop_thread): New.
9718 (run_inferior_command): New.
9719 (init_named_socket): New.
9720 (gdb_ust_socket_init): New.
9721 (cstr_to_hexstr): New.
9722 (next_st): New.
9723 (first_marker, next_marker): New.
9724 (response_ust_marker): New.
9725 (cmd_qtfstm, cmd_qtsstm): New.
9726 (unprobe_marker_at, probe_marker_at): New.
9727 (cmd_qtstmat, gdb_ust_thread): New.
9728 (gdb_ust_init): New.
9729 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9730 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9731 (ST_REGENTRY): New.
9732 (x86_64_st_collect_regmap): New.
9733 (X86_64_NUM_ST_COLLECT_GREGS): New.
9734 (AMD64_RIP_REGNUM): New.
9735 (supply_static_tracepoint_registers): New.
9736 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9737 (ST_REGENTRY): New.
9738 (i386_st_collect_regmap): New.
9739 (i386_NUM_ST_COLLECT_GREGS): New.
9740 (supply_static_tracepoint_registers): New.
9741 * server.c (handle_query): Handle qXfer:statictrace:read.
9742 <qSupported>: Report support for StaticTracepoints, and
9743 qXfer:statictrace:read features.
9744 * server.h (traceframe_read_sdata)
9745 (supply_static_tracepoint_registers): Declare.
9746 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9747 (unpack_varlen_hex): Include in IPA build.
9748 * Makefile.in (ustlibs, ustinc): New.
9749 (IPA_OBJS): Add remote-utils-ipa.o.
9750 ($(IPA_LIB)): Link -ldl and -lpthread.
9751 (UST_CFLAGS): New.
9752 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9753 * config.in, configure: Regenerate.
9754
9e4344e5
PA
97552010-06-20 Ian Lance Taylor <iant@google.com>
9756 Pedro Alves <pedro@codesourcery.com>
9757
9758 * linux-x86-low.c (always_true): Delete.
9759 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9760 trying to fool the compiler with always_true.
9761
c6beb2cb
PA
97622010-06-20 Pedro Alves <pedro@codesourcery.com>
9763
9764 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9765 conditions in gdbserver.
9766
d2ed6730
UW
97672010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9768
9769 * spu-low.c (spu_read_memory): Wrap around local store limit.
9770 (spu_write_memory): Likewise.
9771
4e29fb54
PA
97722010-06-15 Pedro Alves <pedro@codesourcery.com>
9773
9774 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9775 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9776 LONGEST uses.
9777 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9778 uses.
9779 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9780 uses with LONGEST uses.
9781
6a271cae
PA
97822010-06-14 Stan Shebs <stan@codesourcery.com>
9783 Pedro Alves <pedro@codesourcery.com>
9784
9785 Bytecode compiler.
9786
9787 * linux-x86-low.c: Include limits.h.
9788 (add_insns): New.
9789 (always_true): New.
9790 (EMIT_ASM): New.
9791 (EMIT_ASM32): New.
9792 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9793 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9794 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9795 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9796 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9797 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9798 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9799 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9800 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9801 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9802 (amd64_emit_void_call_2): New.
9803 (amd64_emit_ops): New.
9804 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9805 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9806 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9807 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9808 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9809 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9810 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9811 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9812 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9813 (i386_emit_stack_adjust, i386_emit_int_call_1)
9814 (i386_emit_void_call_2): New.
9815 (i386_emit_ops): New.
9816 (x86_emit_ops): New.
9817 (the_low_target): Install x86_emit_ops.
9818 * server.h (struct emit_ops): New.
9819 (get_raw_reg_func_addr): Declare.
9820 (current_insn_ptr, emit_error): Declare.
9821 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9822 (set_trace_state_variable_value): New defines.
9823 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9824 addr_get_trace_state_variable_value and
9825 addr_set_trace_state_variable_value.
9826 (symbol_list): New fields for get_raw_reg,
9827 get_trace_state_variable_value and set_trace_state_variable_value.
9828 (condfn): New typedef.
9829 (struct tracepoint): New field `compiled_cond'.
9830 (do_action_at_tracepoint): Clear compiled_cond.
9831 (get_trace_state_variable_value, set_trace_state_variable_value):
9832 Export in the IPA.
9833 (condition_true_at_tracepoint): If there's a compiled condition,
9834 run that.
9835 (current_insn_ptr, emit_error): New globals.
9836 (struct bytecode_address): New.
9837 (get_raw_reg_func_addr): New.
9838 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9839 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9840 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9841 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9842 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9843 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9844 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9845 (compile_tracepoint_condition, compile_bytecodes): New.
9846 * target.h (emit_ops): Forward declare.
9847 (struct target_ops): New field emit_ops.
9848 (target_emit_ops): New.
9849 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9850 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9851 * linux-low.c (linux_emit_ops): New.
9852 (linux_target_ops): Install it.
9853 * linux-low.h (struct linux_target_ops): New field emit_ops.
9854
92b72907
UW
98552010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9856
9857 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9858 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9859
fa593d66
PA
98602010-06-01 Pedro Alves <pedro@codesourcery.com>
9861 Stan Shebs <stan@codesourcery.com>
9862
9863 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9864 (all): Depend on $(extra_libraries).
9865 (install-only): Install the IPA.
9866 (IPA_OBJS, IPA_LIB): New.
9867 (clean): Remove the IPA lib.
9868 (IPAGENT_CFLAGS): New.
9869 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9870 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9871 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9872 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9873 * configure.ac: Check for atomic builtins support in the compiler.
9874 (IPA_DEPFILES, extra_libraries): Define.
9875 * configure.srv (ipa_obj): Add description.
9876 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9877 (i[34567]86-*-linux*): Set ipa_obj.
9878 (x86_64-*-linux*): Set ipa_obj.
9879 * linux-low.c (stabilizing_threads): New.
9880 (supports_fast_tracepoints): New.
9881 (linux_detach): Stabilize threads before detaching.
9882 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9883 the lwp is either not stabilizing, or is moving out of a jump pad.
9884 (linux_fast_tracepoint_collecting): New.
9885 (maybe_move_out_of_jump_pad): New.
9886 (enqueue_one_deferred_signal): New.
9887 (dequeue_one_deferred_signal): New.
9888 (linux_wait_for_event_1): If moving out of a jump pad, defer
9889 pending signals to later.
9890 (linux_stabilize_threads): New.
9891 (linux_wait_1): Check if threads need moving out of jump pads, and
9892 do it if so.
9893 (stuck_in_jump_pad_callback): New.
9894 (move_out_of_jump_pad_callback): New.
9895 (lwp_running): New.
9896 (linux_resume_one_lwp): Handle moving out of jump pads.
9897 (linux_set_resume_request): Dequeue deferred signals.
9898 (need_step_over_p): Also step over fast tracepoint jumps.
9899 (start_step_over): Also uninsert fast tracepoint jumps.
9900 (finish_step_over): Also reinsert fast tracepoint jumps.
9901 (linux_install_fast_tracepoint_jump): New.
9902 (linux_target_ops): Install linux_stabilize_threads and
9903 linux_install_fast_tracepoint_jump_pad.
9904 * linux-low.h (linux_target_ops) <get_thread_area,
9905 install_fast_tracepoint_jump_pad>: New fields.
9906 (struct lwp_info) <collecting_fast_tracepoint,
9907 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9908 (linux_get_thread_area): Declare.
9909 * linux-x86-low.c (jump_insn): New.
9910 (x86_get_thread_area): New.
9911 (append_insns): New.
9912 (push_opcode): New.
9913 (amd64_install_fast_tracepoint_jump_pad): New.
9914 (i386_install_fast_tracepoint_jump_pad): New.
9915 (x86_install_fast_tracepoint_jump_pad): New.
9916 (the_low_target): Install x86_get_thread_area and
9917 x86_install_fast_tracepoint_jump_pad.
9918 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9919 (struct fast_tracepoint_jump): New.
9920 (fast_tracepoint_jump_insn): New.
9921 (fast_tracepoint_jump_shadow): New.
9922 (find_fast_tracepoint_jump_at): New.
9923 (fast_tracepoint_jump_here): New.
9924 (delete_fast_tracepoint_jump): New.
9925 (set_fast_tracepoint_jump): New.
9926 (uninsert_fast_tracepoint_jumps_at): New.
9927 (reinsert_fast_tracepoint_jumps_at): New.
9928 (set_breakpoint_at): Use write_inferior_memory.
9929 (uninsert_raw_breakpoint): Use write_inferior_memory.
9930 (check_mem_read): Mask out fast tracepoint jumps.
9931 (check_mem_write): Mask out fast tracepoint jumps.
9932 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9933 (set_fast_tracepoint_jump): Declare.
9934 (delete_fast_tracepoint_jump)
9935 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9936 (reinsert_fast_tracepoint_jumps_at): Declare.
9937 * regcache.c: Don't compile many functions when building the
9938 in-process agent library.
9939 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9940 the register buffer in the heap.
9941 (free_register_cache): If the register buffer isn't owned by the
9942 regcache, don't free it.
9943 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9944 pre-existing register caches.
9945 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9946 type.
9947 (convert_ascii_to_int): : Constify `from' parameter type.
9948 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9949 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9950 the needed buffer in-place.
9951 (relocate_instruction): New.
9952 * server.c (handle_query) <qSymbols>: If the target supports
9953 tracepoints, give it a chance of looking up symbols. Report
9954 support for fast tracepoints.
9955 (handle_status): Stabilize threads.
9956 (process_serial_event): Adjust.
9957 * server.h (struct fast_tracepoint_jump): Forward declare.
9958 (struct process_info) <fast_tracepoint_jumps>: New field.
9959 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9960 (decode_X_packet, decode_M_packet): Adjust.
9961 (relocate_instruction): Declare.
9962 (in_process_agent_loaded): Declare.
9963 (tracepoint_look_up_symbols): Declare.
9964 (struct fast_tpoint_collect_status): Declare.
9965 (fast_tracepoint_collecting): Declare.
9966 (force_unlock_trace_buffer): Declare.
9967 (handle_tracepoint_bkpts): Declare.
9968 (initialize_low_tracepoint)
9969 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9970 * target.h (struct target_ops) <stabilize_threads,
9971 install_fast_tracepoint_jump_pad>: New fields.
9972 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9973 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9974 [HAVE_STDINT_H]: Include stdint.h.
9975 (trace_debug_1): Rename to ...
9976 (trace_vdebug): ... this.
9977 (trace_debug): Rename to ...
9978 (trace_debug_1): ... this. Add `level' parameter.
9979 (trace_debug): New.
9980 (ATTR_USED, ATTR_NOINLINE): New.
9981 (IP_AGENT_EXPORT): New.
9982 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9983 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9984 (about_to_request_buffer_space, trace_buffer_is_full)
9985 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9986 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9987 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9988 (traceframe_write_count, traceframes_created)
9989 (trace_state_variables)
9990 New renaming defines.
9991 (struct ipa_sym_addresses): New.
9992 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9993 (symbol_list): New.
9994 (ipa_sym_addrs): New.
9995 (all_tracepoint_symbols_looked_up): New.
9996 (in_process_agent_loaded): New.
9997 (write_e_ipa_not_loaded): New.
9998 (maybe_write_ipa_not_loaded): New.
9999 (tracepoint_look_up_symbols): New.
10000 (debug_threads) [IN_PROCESS_AGENT]: New.
10001 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10002 (UNKNOWN_SIDE_EFFECTS): New.
10003 (stop_tracing): New.
10004 (flush_trace_buffer): New.
10005 (stop_tracing_bkpt): New.
10006 (flush_trace_buffer_bkpt): New.
10007 (read_inferior_integer): New.
10008 (read_inferior_uinteger): New.
10009 (read_inferior_data_pointer): New.
10010 (write_inferior_data_pointer): New.
10011 (write_inferior_integer): New.
10012 (write_inferior_uinteger): New.
10013 (struct collect_static_trace_data_action): Delete.
10014 (enum tracepoint_type): New.
10015 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10016 <actions_str, step_actions, step_actions_str>: Only include in
10017 GDBserver.
fa593d66
PA
10018 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10019 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10020 (tracepoints): Use IP_AGENT_EXPORT.
10021 (last_tracepoint): Don't include in the IPA.
10022 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10023 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10024 (alloced_trace_state_variables): New.
10025 (trace_state_variables): Use IP_AGENT_EXPORT.
10026 (traceframe_t): Delete unused variable.
10027 (circular_trace_buffer): Don't include in the IPA.
10028 (trace_buffer_start): Delete.
10029 (struct trace_buffer_control): New.
10030 (trace_buffer_free): Delete.
10031 (struct ipa_trace_buffer_control): New.
10032 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10033 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10034 New.
10035 (trace_buffer_ctrl): New.
10036 (TRACE_BUFFER_CTRL_CURR): New.
10037 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10038 Reimplement as macros.
10039 (trace_buffer_wrap): Delete.
10040 (traceframe_write_count, traceframe_read_count)
10041 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10042 (struct tracepoint_hit_ctx) <type>: New field.
10043 (struct fast_tracepoint_ctx): New.
10044 (memory_barrier): New.
10045 (cmpxchg): New.
10046 (record_tracepoint_error): Update atomically in the IPA.
10047 (clear_inferior_trace_buffer): New.
10048 (about_to_request_buffer_space): New.
10049 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10050 updating the same buffer.
10051 (add_tracepoint): Default the tracepoint's type to trap
10052 tracepoint, and orig_size to -1.
10053 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10054 internal variables.
10055 (create_trace_state_variable): New parameter `gdb'. Handle it.
10056 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10057 (cmd_qtdp): Handle fast tracepoints.
10058 (cmd_qtdv): Adjust.
10059 (max_jump_pad_size): New.
10060 (gdb_jump_pad_head): New.
10061 (get_jump_space_head): New.
10062 (claim_jump_space): New.
10063 (sort_tracepoints): New.
10064 (MAX_JUMP_SIZE): New.
10065 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10066 IPA.
10067 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10068 support. Upload fast traceframes, and delete internal IPA
10069 breakpoints.
10070 (stop_tracing_handler): New.
10071 (flush_trace_buffer_handler): New.
10072 (cmd_qtstop): Upload fast tracepoints.
10073 (response_tracepoint): Handle fast tracepoints.
10074 (tracepoint_finished_step): Upload fast traceframes. Set the
10075 tracepoint hit context's tracepoint type.
10076 (handle_tracepoint_bkpts): New.
10077 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10078 type. Add comment about fast tracepoints.
10079 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10080 non-existing action_str field.
10081 (get_context_regcache): Handle fast tracepoints.
10082 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10083 to the regcache.
10084 (fast_tracepoint_from_jump_pad_address): New.
10085 (fast_tracepoint_from_ipa_tpoint_address): New.
10086 (collecting_t): New.
10087 (force_unlock_trace_buffer): New.
10088 (fast_tracepoint_collecting): New.
10089 (collecting): New.
10090 (gdb_collect): New.
10091 (write_inferior_data_ptr): New.
10092 (target_tp_heap): New.
10093 (target_malloc): New.
10094 (download_agent_expr): New.
10095 (UALIGN): New.
10096 (download_tracepoints): New.
10097 (download_trace_state_variables): New.
10098 (upload_fast_traceframes): New.
10099 (IPA_FIRST_TRACEFRAME): New.
10100 (IPA_NEXT_TRACEFRAME_1): New.
10101 (IPA_NEXT_TRACEFRAME): New.
10102 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10103 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10104 (gdb_jump_pad_buffer_end): New.
10105 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10106 (initialize_tracepoint): Adjust.
10107 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10108 buffer. Initialize the low module.
10109 * utils.c (PREFIX, TOOLNAME): New.
10110 (malloc_failure): Use PREFIX.
10111 (error): In the IPA, an error causes an exit.
10112 (fatal, warning): Use PREFIX.
10113 (internal_error): Use TOOLNAME.
10114 (NUMCELLS): Increase to 10.
10115 * configure, config.in: Regenerate.
10116
d149dd1d
PA
101172010-06-01 Pedro Alves <pedro@codesourcery.com>
10118
10119 * server.c (handle_query) <qSupported>: Do two passes over the
10120 qSupported string to avoid nesting strtok.
10121
f6528abd
JK
101222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10123
10124 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10125 (CDEPS): New.
10126 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10127 -Wl,--dynamic-list.
10128 * configure: Regenerate.
10129 * proc-service.list: New.
10130
ca2a87a0
JK
101312010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10132
10133 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10134 New comment.
10135
363a6e9f
OS
101362010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10137
10138 * gdbreplay.c (remote_open): Check error return from socket() call by
10139 its equality to -1 not by it being negative.
10140 * remote-utils.c (remote_open): Likewise.
10141
d23b6cb1
PA
101422010-05-23 Pedro Alves <pedro@codesourcery.com>
10143
10144 * config.h: Regenerate.
10145
28d3cf85
MK
101462010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10147
10148 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10149 doesn't provide PTRACE_GET_THREAD_AREA.
10150
fea36a59
MK
101512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10152
10153 * linux-m68k-low.c: Include <asm/ptrace.h>
10154 (ps_get_thread_area): Implement.
10155
24b066ba
DE
101562010-05-03 Doug Evans <dje@google.com>
10157
10158 * event-loop.c (struct callback_event): New struct.
10159 (callback_list): New global.
10160 (append_callback_event, delete_callback_event): New functions.
10161 (process_callback): New function.
10162 (start_event_loop): Call it.
10163 * remote-utils.c (NOT_SCHEDULED): Define.
10164 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10165 moved out of readchar.
10166 (readchar): Rewrite. Call reschedule before returning.
10167 (reset_readchar): New function.
10168 (remote_close): Call it.
10169 (process_remaining, reschedule): New functions.
10170 * server.h (callback_handler_func): New typedef.
10171 (append_callback_event, delete_callback_event): Declare.
10172
9836d6ea
PA
101732010-05-03 Pedro Alves <pedro@codesourcery.com>
10174
10175 * proc-service.c (ps_pglobal_lookup): Use
10176 thread_db_look_up_one_symbol.
10177 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10178 parameter. Use it instead of all_symbols_looked_up.
10179 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10180 field.
10181 (all_symbols_looked_up): Don't declare.
10182 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10183 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10184 field.
10185 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10186 Set all_symbols_looked_up here.
10187 (thread_db_look_up_one_symbol): New.
10188 (thread_db_get_tls_address): Adjust.
10189 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10190 thread_db object on the heap, and tentatively set it in the
10191 process structure.
10192 (thread_db_init): Don't set all_symbols_looked_up here.
10193 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10194
7984d532
PA
101952010-05-03 Pedro Alves <pedro@codesourcery.com>
10196
10197 * linux-low.c (linux_kill, linux_detach): Adjust.
10198 (status_pending_p_callback): Remove redundant statement. Check
10199 for !TARGET_WAITIKIND_IGNORE, instead of
10200 TARGET_WAITKIND_STOPPED.
10201 (handle_tracepoints): Make sure LWP is locked. Adjust.
10202 (linux_wait_for_event_1): Adjust.
10203 (linux_cancel_breakpoints): New.
10204 (unsuspend_one_lwp): New.
10205 (unsuspend_all_lwps): New.
10206 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10207 (send_sigstop_callback): Change return type to int, add new
10208 `except' parameter and handle it.
10209 (suspend_and_send_sigstop_callback): New.
10210 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10211 pass them down. If SUSPEND, also increment the lwp's suspend
10212 count.
10213 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10214 (need_step_over_p): Don't consider suspended LWPs.
10215 (start_step_over): Adjust.
10216 (proceed_one_lwp): Change return type to int, add new `except'
10217 parameter and handle it.
10218 (unsuspend_and_proceed_one_lwp): New.
10219 (proceed_all_lwps): Use find_inferior instead of
10220 for_each_inferior.
10221 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10222 also decrement the suspend count of LWPs. Pass `except' down,
10223 instead of hacking its suspend count.
10224 (linux_pause_all): Add `freeze' parameter. Adjust.
10225 (linux_unpause_all): New.
10226 (linux_target_ops): Install linux_unpause_all.
10227 * server.c (handle_status): Adjust.
10228 * target.h (struct target_ops): New fields `unpause_all' and
10229 `cancel_breakpoints'. Add new parameter to `pause_all'.
10230 (pause_all): Add new `freeze' parameter.
10231 (unpause_all): New.
10232 (cancel_breakpoints): New.
10233 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10234 cancel breakpoints.
10235 (cmd_qtstart): Pause threads.
10236 (stop_tracing): Pause threads, and cancel breakpoints.
10237 * win32-low.c (win32_target_ops): Adjust.
10238
e471f25b
PA
102392010-05-03 Pedro Alves <pedro@codesourcery.com>
10240
10241 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10242 the inferior right away from here...
10243 (linux_wait_1): ... to here, and adjust to check the thread's
10244 last_resume_kind instead of the lwp's step or stop_expected flags.
10245
1915ef4f
PA
102462010-05-02 Pedro Alves <pedro@codesourcery.com>
10247
10248 * README: Use consistent `GDB' and `GDBserver' spellings.
10249
f9e39928
PA
102502010-05-02 Pedro Alves <pedro@codesourcery.com>
10251
10252 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10253 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10254 (linux_detach_one_lwp): Assume the lwp is stopped.
10255 (any_thread_of): Delete.
10256 (linux_detach): Stop all lwps here. Don't blindly delete all
10257 breakpoints.
10258 (delete_lwp_callback): New.
10259 (linux_mourn): Delete all lwps of the process that is gone.
10260 (linux_wait_1): Don't delete the last lwp of the process here.
10261 * mem-break.h (mark_breakpoints_out): Declare.
10262 * mem-break.c (mark_breakpoints_out): New.
10263 (free_all_breakpoints): Use it.
10264 * server.c (handle_target_event): If the process is gone, mark
10265 breakpoints out.
10266 * thread-db.c (struct thread_db) <create_bp>: New field.
10267 (thread_db_enable_reporting): Fix prototype. Store a thread event
10268 breakpoint reference in the thread_db struct.
10269 (thread_db_load_search): Clear the thread_db object.
10270 (try_thread_db_load_1): Ditto.
10271 (switch_to_process): New.
10272 (disable_thread_event_reporting): Use it.
10273 (remove_thread_event_breakpoints): New.
10274 (thread_db_detach, thread_db_mourn): Use it.
10275
1e7fc18c
PA
102762010-05-01 Pedro Alves <pedro@codesourcery.com>
10277
10278 * linux-low.c (linux_enable_event_reporting): New.
10279 (linux_wait_for_event_1, handle_extended_wait): Use it.
10280
02fc4de7
PA
102812010-04-30 Pedro Alves <pedro@codesourcery.com>
10282
10283 * linux-low.c (linux_kill_one_lwp, linux_kill)
10284 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10285 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10286 SIGSTOP even if the LWP is stopped.
10287 (send_sigstop_callback): New.
10288 (stop_all_lwps): Use send_sigstop_callback instead.
10289 (linux_resume_one_thread): Adjust.
10290 (proceed_one_lwp): Still proceed an LWP that the client has
10291 requested to stop, if we haven't reported it as stopped yet. Make
10292 sure that LWPs the client want stopped, have a pending SIGSTOP.
10293
bc3b5632
DE
102942010-04-26 Doug Evans <dje@google.com>
10295
ae1ada35
DE
10296 * server.c (handle_general_set): Make static.
10297
bc3b5632
DE
10298 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10299 Print received char after testing for error/eof instead of before.
10300 (input_interrupt): Tweak comment.
10301
65730243
DE
103022010-04-23 Doug Evans <dje@google.com>
10303
10304 * server.c (start_inferior): Print inferior argv if --debug.
10305
a8ae7dc0
AR
103062010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10307
10308 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10309 * nto-x86-low.c: Include server.h
10310
1c07cc19
PM
103112010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10312
10313 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10314 be consistent with other sources of this directory.
10315 (init_registers_amd64): Correct name of source file of this function
10316 in the comment.
10317
e0a61e09
PM
103182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10319
10320 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10321 64-bit executables.
10322
54709339
PM
103232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10324
10325 * win32-i386-low.c: Add 64-bit support.
10326 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10327 (init_registers_amd64): Declare.
10328 (mappings): Add 64-bit version of array.
10329 (init_windows_x86): New function.
10330 (the_low_target): Change init_arch field to init_windows_x86.
10331
e8f0053d
PM
103322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10333
10334 * win32-low.c: Adapt to support also 64-bit architecture.
10335 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10336 (get_image_name): Use SIZE_T type for local variable `done'.
10337 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10338 (toolhelp_get_dll_name): Idem.
10339 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10340 Use uintptr_t typecast to avoid warning.
10341 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10342 (handle_exception): Use phex_nz to avoid warning.
10343 (win32_wait): Remove unused local variable `process'.
10344
c481e77e
PM
103452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10346
10347 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10348 `amd64-avx.o'.
10349
12ea4b69
PM
103502010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10351
10352 * configure.ac: Use `ws2_32' library for srv_mingw.
10353 * configure: Regenerate.
10354 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10355 * remote-utils.c: Likewise.
10356
f6d1620c
L
103572010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10358
10359 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10360 if __x86_64__ is defined.
10361
8e642873
PM
103622010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10363
10364 * configure: Regenerate.
10365
711e434b
PM
103662010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10367
10368 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10369 * target.h (target_ops): New get_tib_address field.
10370 * win32-low.h (win32_thread_info): Add thread_local_base field.
10371 * win32-low.c (child_add_thread): Add tlb argument.
10372 Set thread_local_base field to TLB.
10373 (get_child_debug_event): Adapt to child_add_thread change.
10374 (win32_get_tib_address): New function.
10375 (win32_target_ops): Set get_tib_address field to
10376 win32_get_tib_address.
10377 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10378
505106cd
PA
103792010-04-12 Pedro Alves <pedro@codesourcery.com>
10380
505106cd
PA
10381 * linux-low.c (linux_mourn): Also remove the process.
10382 * server.c (handle_target_event): Don't remove the process here.
10383 * nto-low.c (nto_mourn): New.
10384 (nto_target_ops): Install it.
10385 * spu-low.c (spu_mourn): New.
10386 (spu_target_ops): Install it.
10387 * win32-low.c (win32_mourn): New.
10388 (win32_target_ops): Install it.
10389
e8470a06
PA
103902010-04-12 Pedro Alves <pedro@codesourcery.com>
10391
10392 * server.h (buffer_xml_printf): Remove redundant `;'.
10393
45ba0d02
PA
103942010-04-12 Pedro Alves <pedro@codesourcery.com>
10395
10396 * regcache.c (set_register_cache): Invalidate regcaches before
10397 changing the register cache layout.
10398 (regcache_invalidate_one): Allow a NULL regcache.
10399 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10400 regcaches before changing the register cache layout or the target
10401 regsets.
10402
59e04013
L
104032010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10404
10405 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10406 variable warning on Linux/x86-64.
10407
8336d594
PA
104082010-04-11 Pedro Alves <pedro@codesourcery.com>
10409
10410 GDBserver disconnected tracing support.
10411
10412 * linux-low.c (linux_remove_process): Delete.
10413 (add_lwp): Don't set last_resume_kind here.
10414 (linux_kill): Use `mourn'.
10415 (linux_detach): Use `thread_db_detach', and `mourn'.
10416 (linux_mourn): New.
10417 (linux_attach_lwp_1): Adjust comment.
10418 (linux_attach): last_resume_kind moved the thread_info; adjust.
10419 (status_pending_p_callback): Adjust.
10420 (linux_wait_for_event_1): Adjust.
10421 (count_events_callback, select_singlestep_lwp_callback)
10422 (select_event_lwp_callback, cancel_breakpoints_callback)
10423 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10424 (proceed_one_lwp): Adjust.
10425 (linux_async): Add debug output.
10426 (linux_thread_stopped): New.
10427 (linux_pause_all): New.
10428 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10429 linux_pause_all.
10430 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10431 (thread_db_free): Delete declaration.
10432 (thread_db_detach, thread_db_mourn): Declare.
10433 * thread-db.c (thread_db_init): Use thread_db_mourn.
10434 (thread_db_free): Delete, split in two.
10435 (disable_thread_event_reporting): New.
10436 (thread_db_detach): New.
10437 (thread_db_mourn): New.
10438
10439 * server.h (struct thread_info) <last_resume_kind>: New field.
10440 <attached>: Add comment.
10441 <gdb_detached>: New field.
10442 (handler_func): Change return type to int.
10443 (handle_serial_event, handle_target_event): Ditto.
10444 (gdb_connected): Declare.
10445 (tracing): Delete.
10446 (disconnected_tracing): Declare.
10447 (stop_tracing): Declare.
10448
10449 * server.c (handle_query) <qSupported>: Report support for
10450 disconnected tracing.
10451 (queue_stop_reply_callback): Account for running threads.
10452 (gdb_wants_thread_stopped): New.
10453 (gdb_wants_all_threads_stopped): New.
10454 (gdb_reattached_process): New.
10455 (handle_status): Clear the `gdb_detached' flag of all processes.
10456 In all-stop, stop all threads.
10457 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10458 (process_serial_event): If the remote connection breaks, or if an
10459 exit was forced with "monitor exit", force an event loop exit.
10460 Handle disconnected tracing on detach.
10461 (handle_serial_event): Adjust.
10462 (handle_target_event): If GDB isn't connected, forward events back
10463 to the inferior, unless the last process exited, in which case,
10464 exit gdbserver. Adjust interface.
10465
10466 * remote-utils.c (remote_open): Don't block in accept. Instead
10467 register an event loop source on the listen socket file
10468 descriptor. Refactor bits into ...
10469 (listen_desc): ... this new global.
10470 (gdb_connected): ... this new function.
10471 (enable_async_notification): ... this new function.
10472 (handle_accept_event): ... this new function.
10473 (remote_close): Clear remote_desc.
10474
10475 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10476
10477 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10478 New fields.
10479 (mourn_inferior): Define.
10480 (target_process_qsupported): Avoid the dangling else problem.
10481 (thread_stopped): Define.
10482 (pause_all): Define.
10483 (target_waitstatus_to_string): Declare.
10484 * target.c (target_waitstatus_to_string): New.
10485
10486 * tracepoint.c (tracing): Make extern.
10487 (disconnected_tracing): New.
10488 (stop_tracing): Make extern. Handle tracing stops due to GDB
10489 disconnecting.
10490 (cmd_qtdisconnected): New.
10491 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10492 (handle_tracepoint_general_set): Handle QTDisconnected.
10493
10494 * event-loop.c (event_handler_func): Change return type to int.
10495 (process_event): Bail out if the event handler wants the event
10496 loop to stop.
10497 (handle_file_event): Ditto.
10498 (start_event_loop): Bail out if the event handler wants the event
10499 loop to stop.
10500
10501 * nto-low.c (nto_target_ops): Adjust.
10502 * spu-low.c (spu_wait): Don't remove the process here.
10503 (spu_target_ops): Adjust.
10504 * win32-low.c (win32_wait): Don't remove the process here.
10505 (win32_target_ops): Adjust.
10506
5d267c4c
PA
105072010-04-11 Pedro Alves <pedro@codesourcery.com>
10508
10509 * regcache.c (realloc_register_cache): Invalidate inferior's
10510 regcache before recreating it.
10511
623ccd72
PA
105122010-04-09 Pedro Alves <pedro@codesourcery.com>
10513
10514 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10515
219f2f23
PA
105162010-04-09 Stan Shebs <stan@codesourcery.com>
10517 Pedro Alves <pedro@codesourcery.com>
10518
10519 * server.h (LONGEST): New.
10520 (struct thread_info) <while_stepping>: New field.
10521 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10522 Declare.
10523 (initialize_tracepoint, handle_tracepoint_general_set)
10524 (handle_tracepoint_query, tracepoint_finished_step)
10525 (tracepoint_was_hit, release_while_stepping_state_list):
10526 (current_traceframe): Declare.
10527 * server.c (handle_general_set): Handle tracepoint packets.
10528 (read_memory): New.
10529 (write_memory): New.
10530 (handle_search_memory_1): Use read_memory.
10531 (handle_query): Report support for conditional tracepoints, trace
10532 state variables, and tracepoint sources. Handle tracepoint
10533 queries.
10534 (main): Initialize the tracepoints module.
10535 (process_serial_event): Handle traceframe reads/writes.
10536
10537 * linux-low.c (handle_tracepoints): New.
10538 (linux_wait_1): Call it.
10539 (linux_resume_one_lwp): Handle while-stepping.
10540 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10541 (linux_target_ops): Install them.
10542 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10543 New field.
10544 * linux-x86-low.c (x86_supports_tracepoints): New.
10545 (the_low_target). Install it.
10546
10547 * mem-break.h (delete_breakpoint): Declare.
10548 * mem-break.c (delete_breakpoint): Make external.
10549
10550 * target.h (struct target_ops): Add `supports_tracepoints',
10551 `read_pc', and `write_pc' fields.
10552 (target_supports_tracepoints): Define.
10553 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10554 (phex_nz): New.
10555
10556 * regcache.h (struct regcache) <registers_owned>: New field.
10557 (init_register_cache, regcache_cpy): Declare.
10558 (regcache_read_pc, regcache_write_pc): Declare.
10559 (register_cache_size): Declare.
10560 (supply_regblock): Declare.
10561 * regcache.c (init_register_cache): New.
10562 (new_register_cache): Use it.
10563 (regcache_cpy): New.
10564 (register_cache_size): New.
10565 (supply_regblock): New.
10566 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10567
219f2f23
PA
10568 * tracepoint.c: New.
10569
10570 * Makefile.in (OBS): Add tracepoint.o.
10571 (tracepoint.o): New rule.
10572
3a13a53b
L
105732010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10574
10575 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10576 (i386-mmx.o): New.
10577 (i386-mmx.c): Likewise.
10578 (i386-mmx-linux.o): Likewise.
10579 (i386-mmx-linux.c): Likewise.
10580
10581 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10582 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10583 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10584 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10585
10586 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10587 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10588 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10589
1570b33e
L
105902010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10591
10592 * Makefile.in (clean): Updated.
10593 (i386-avx.o): New.
10594 (i386-avx.c): Likewise.
10595 (i386-avx-linux.o): Likewise.
10596 (i386-avx-linux.c): Likewise.
10597 (amd64-avx.o): Likewise.
10598 (amd64-avx.c): Likewise.
10599 (amd64-avx-linux.o): Likewise.
10600 (amd64-avx-linux.c): Likewise.
10601
10602 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10603 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10604 (srv_amd64_regobj): Add amd64-avx.o.
10605 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10606 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10607 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10608 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10609 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10610 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10611 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10612
10613 * i387-fp.c: Include "i386-xstate.h".
10614 (i387_xsave): New.
10615 (i387_cache_to_xsave): Likewise.
10616 (i387_xsave_to_cache): Likewise.
10617 (x86_xcr0): Likewise.
10618
10619 * i387-fp.h (i387_cache_to_xsave): Likewise.
10620 (i387_xsave_to_cache): Likewise.
10621 (x86_xcr0): Likewise.
10622
10623 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10624 * linux-crisv32-low.c (target_regsets): Likewise.
10625 * linux-m68k-low.c (target_regsets): Likewise.
10626 * linux-mips-low.c (target_regsets): Likewise.
10627 * linux-ppc-low.c (target_regsets): Likewise.
10628 * linux-s390-low.c (target_regsets): Likewise.
10629 * linux-sh-low.c (target_regsets): Likewise.
10630 * linux-sparc-low.c (target_regsets): Likewise.
10631 * linux-xtensa-low.c (target_regsets): Likewise.
10632
10633 * linux-low.c: Include <sys/uio.h>.
10634 (regsets_fetch_inferior_registers): Support nt_type.
10635 (regsets_store_inferior_registers): Likewise.
10636 (linux_process_qsupported): New.
10637 (linux_target_ops): Add linux_process_qsupported.
10638
10639 * linux-low.h (regset_info): Add nt_type.
10640 (linux_target_ops): Add process_qsupported.
10641
10642 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10643 and <sys/uio.h>.
10644 (init_registers_i386_avx_linux): New.
10645 (init_registers_amd64_avx_linux): Likewise.
10646 (xmltarget_i386_linux_no_xml): Likewise.
10647 (xmltarget_amd64_linux_no_xml): Likewise.
10648 (PTRACE_GETREGSET): Likewise.
10649 (PTRACE_SETREGSET): Likewise.
10650 (x86_fill_xstateregset): Likewise.
10651 (x86_store_xstateregset): Likewise.
10652 (use_xml): Likewise.
10653 (x86_linux_update_xmltarget): Likewise.
10654 (x86_linux_process_qsupported): Likewise.
10655 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10656 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10657 init_registers_i386_linux here. Call
10658 x86_linux_update_xmltarget.
10659 (the_low_target): Add x86_linux_process_qsupported.
10660
10661 * server.c (handle_query): Call target_process_qsupported.
10662
10663 * target.h (target_ops): Add process_qsupported.
10664 (target_process_qsupported): New.
10665
fc7238bb
PA
106662010-04-03 Pedro Alves <pedro@codesourcery.com>
10667
10668 * inferiors.c (add_thread): Set last_status kind to
10669 TARGET_WAITKIND_IGNORE.
10670 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10671 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10672 (linux_wait_1): Move `thread' local definition to block that uses
10673 it. Don't NULL initialize `event_child'.
10674 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10675 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10676 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10677
bdabb078
PA
106782010-04-01 Pedro Alves <pedro@codesourcery.com>
10679
10680 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10681 an extended waitstatus, or by a watchpoint.
10682 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10683 thread was stepping or has been stopped by a watchpoint.
10684
d3bbe7a0
PA
106852010-04-01 Pedro Alves <pedro@codesourcery.com>
10686
10687 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10688 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10689 of another, then delete the previous, and validate all
10690 breakpoints.
10691 (validate_inserted_breakpoint): New.
10692 (delete_disabled_breakpoints): New.
10693 (validate_breakpoints): New.
10694 (check_mem_read): Validate breakpoints before trusting their
10695 shadow. Delete disabled breakpoints.
10696 (check_mem_write): Validate breakpoints before trusting they
10697 should be inserted. Delete disabled breakpoints.
10698 * mem-break.h (validate_breakpoints):
10699 * server.c (handle_query): Validate breakpoints when we see a
10700 qSymbol query.
10701
8b07ae33
PA
107022010-04-01 Pedro Alves <pedro@codesourcery.com>
10703
10704 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10705 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10706 if we could tell there's a GDB breakpoint at stop_pc.
10707 (need_step_over_p): Don't do a step over if we find a GDB
10708 breakpoint at the resume PC.
10709
10710 * mem-break.c (struct raw_breakpoint): New.
10711 (enum bkpt_type): New type `gdb_breakpoint'.
10712 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10713 fields. New field `raw'.
10714 (find_raw_breakpoint_at): New.
10715 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10716 breakpoint instead.
10717 (set_breakpoint_at): Adjust.
10718 (delete_raw_breakpoint): New.
10719 (release_breakpoint): New.
10720 (delete_breakpoint): Rename to...
10721 (delete_breakpoint_1): ... this. Add proc parameter. Use
10722 release_breakpoint. Return ENOENT.
10723 (delete_breakpoint): Reimplement.
10724 (find_breakpoint_at): Delete.
10725 (find_gdb_breakpoint_at): New.
10726 (delete_breakpoint_at): Delete.
10727 (set_gdb_breakpoint_at): New.
10728 (delete_gdb_breakpoint_at): New.
10729 (gdb_breakpoint_here): New.
10730 (set_reinsert_breakpoint): Use release_breakpoint.
10731 (uninsert_breakpoint): Rename to ...
10732 (uninsert_raw_breakpoint): ... this.
10733 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10734 (reinsert_raw_breakpoint): Change parameter type to
10735 raw_breakpoint.
10736 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10737 instead.
10738 (check_breakpoints): Adjust. Use release_breakpoint.
10739 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10740 (breakpoint_inserted_here): Ditto.
10741 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10742 Don't trust the breakpoint's shadow if it is not inserted.
10743 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10744 (delete_all_breakpoints): Adjust.
10745 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10746 use delete_breakpoint_1.
10747
10748 * mem-break.h (breakpoints_supported): Delete declaration.
10749 (set_gdb_breakpoint_at): Declare.
10750 (gdb_breakpoint_here): Declare.
10751 (delete_breakpoint_at): Delete.
10752 (delete_gdb_breakpoint_at): Declare.
10753
10754 * server.h (struct raw_breakpoint): Forward declare.
10755 (struct process_info): New field `raw_breakpoints'.
10756
10757 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10758 breakpoints.
10759
6bf5e0ba
PA
107602010-03-24 Pedro Alves <pedro@codesourcery.com>
10761
10762 * linux-low.c (status_pending_p_callback): Fix comment.
10763 (linux_wait_for_event_1): Move most of the internal breakpoint
10764 handling from here...
10765 (linux_wait_1): ... to here.
10766 (count_events_callback): New.
10767 (select_singlestep_lwp_callback): New.
10768 (select_event_lwp_callback): New.
10769 (cancel_breakpoints_callback): New.
10770 (select_event_lwp): New.
10771 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10772 priority to all LWPs that have had events that should be reported
10773 to the client. Cancel breakpoints when about to reporting the
10774 event to the client, not while stopping lwps. No longer cancel
10775 finished single-steps here.
10776 (cancel_finished_single_step): Delete.
10777 (cancel_finished_single_steps): Delete.
10778
414a389f
PA
107792010-03-24 Pedro Alves <pedro@codesourcery.com>
10780
10781 * mem-break.c (enum bkpt_type): New.
10782 (struct breakpoint): New field `type'.
10783 (set_breakpoint_at): Change return type to struct breakpoint
10784 pointer. Set type to `other_breakpoint' by default.
10785 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10786 in the breakpoint list.
10787 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10788 (reinsert_breakpoint): Rename to ...
10789 (reinsert_raw_breakpoint): ... this.
10790 (reinsert_breakpoints_at): Adjust.
10791 * mem-break.h (struct breakpoint): Declare.
10792 (set_breakpoint_at): Change return type to struct breakpoint
10793 pointer.
10794
2280c721
PA
107952010-03-24 Pedro Alves <pedro@codesourcery.com>
10796
10797 * server.c (handle_query): Assign, not compare.
10798
d50171e4
PA
107992010-03-24 Pedro Alves <pedro@codesourcery.com>
10800
10801 Teach linux gdbserver to step-over-breakpoints.
10802
10803 * linux-low.c (can_hardware_single_step): New.
10804 (supports_breakpoints): New.
10805 (handle_extended_wait): If stopping threads, read the stop pc of
10806 the new cloned LWP.
10807 (get_pc): New.
10808 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10809 low target doesn't support retrieving the PC.
10810 (add_lwp): Set last_resume_kind to resume_continue.
10811 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10812 (linux_attach): Don't clear stop_expected. Set the lwp's
10813 last_resume_kind to resume_stop.
10814 (linux_detach_one_lwp): Don't check for removed breakpoints.
10815 (check_removed_breakpoint): Delete.
10816 (status_pending_p): Rename to ...
10817 (status_pending_p_callback): ... this. Don't check for removed
10818 breakpoints. Don't consider threads that are stopped from GDB's
10819 perspective.
10820 (linux_wait_for_lwp): Always read the stop_pc here.
10821 (cancel_breakpoint): New.
10822 (step_over_bkpt): New global.
10823 (linux_wait_for_event_1): Implement stepping over breakpoints.
10824 (gdb_wants_lwp_stopped): New.
10825 (gdb_wants_all_stopped): New.
10826 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10827 single-step traps here. Store the thread's last reported target
10828 wait status.
10829 (send_sigstop): Don't clear stop_expected. Always set it,
10830 instead.
10831 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10832 (cancel_finished_single_step): New.
10833 (cancel_finished_single_steps): New.
10834 (wait_for_sigstop): Don't cancel finished single-step traps here.
10835 (linux_resume_one_lwp): Don't check for removed breakpoints.
10836 Don't set `step' on non-hardware step archs.
10837 (linux_set_resume_request): Ignore resume_stop requests if already
10838 stopping or stopped. Set the lwp's last_resume_kind.
10839 (resume_status_pending_p): Don't check for removed breakpoints.
10840 (need_step_over_p): New.
10841 (start_step_over): New.
10842 (finish_step_over): New.
10843 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10844 requests. Clear the thread's last reported target waitstatus.
10845 Don't use the `suspended' flag. Don't consider pending breakpoints.
10846 (linux_resume): Start a step-over if necessary.
10847 (proceed_one_lwp): New.
10848 (proceed_all_lwps): New.
10849 (unstop_all_lwps): New.
10850 * linux-low.h (struct lwp_info): Rewrite comment for the
10851 `suspended' flag. Add the `stop_pc' field. Delete the
10852 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10853 Add `'last_resume_kind' and `need_step_over' fields.
10854 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10855 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10856 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10857 (set_raw_breakpoint_at): New.
10858 (set_breakpoint_at): Rewrite to use it.
10859 (reinsert_breakpoint_handler): Delete.
10860 (set_reinsert_breakpoint): New.
10861 (reinsert_breakpoint_by_bp): Delete.
10862 (delete_reinsert_breakpoints): New.
10863 (uninsert_breakpoint): Rewrite.
10864 (uninsert_breakpoints_at): New.
10865 (reinsert_breakpoint): Rewrite.
10866 (reinsert_breakpoints_at): New.
10867 (check_breakpoints): Rewrite.
10868 (breakpoint_here): New.
10869 (breakpoint_inserted_here): New.
10870 (check_mem_read): Adjust.
10871 * mem-break.h (breakpoints_supported, breakpoint_here)
10872 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10873 (reinsert_breakpoint_by_bp): Delete declaration.
10874 (delete_reinsert_breakpoints): Declare.
10875 (reinsert_breakpoint): Delete declaration.
10876 (reinsert_breakpoints_at): Declare.
10877 (uninsert_breakpoint): Delete declaration.
10878 (uninsert_breakpoints_at): Declare.
10879 (check_breakpoints): Adjust prototype.
10880 * server.h: Adjust include order.
10881 (struct thread_info): Declare here. Add a `last_status' field.
10882
30ba68cb
MS
108832010-03-23 Michael Snyder <msnyder@vmware.com>
10884
10885 * server.c (crc32): New function.
10886 (handle_query): Add handling for 'qCRC:' request.
10887
b9a881c2
PA
108882010-03-23 Pedro Alves <pedro@codesourcery.com>
10889
10890 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10891 lwp had been stopped by a watchpoint.
10892
e92d13d5
PA
108932010-03-16 Pedro Alves <pedro@codesourcery.com>
10894
10895 * server.h (internal_error): Declare.
10896 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10897 * utils.c (internal_error): New function.
10898
64daa791
AS
108992010-03-15 Andreas Schwab <schwab@redhat.com>
10900
10901 * configure.srv: Fix typo setting srv_regobj.
10902
f52cd8cd
PA
109032010-03-15 Pedro Alves <pedro@codesourcery.com>
10904
10905 * linux-low.c (fetch_register): Avoid passing a non string literal
10906 format to `error'.
10907 (usr_store_inferior_registers): Ditto.
10908
93ae6fdc
PA
109092010-03-14 Pedro Alves <pedro@codesourcery.com>
10910
10911 * linux-low.c (linux_write_memory): Bail out early if peeking
10912 memory failed.
10913
c3adc08c
PA
109142010-03-14 Pedro Alves <pedro@codesourcery.com>
10915
10916 * linux-low.h (struct lwp_info): New fields
10917 `stopped_by_watchpoint' and `stopped_data_address'.
10918 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10919 here, and cache them in the lwp object.
10920 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10921 directly.
10922 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10923 field.
10924 (linux_stopped_by_watchpoint): Rewrite.
10925 (linux_stopped_data_address): Rewrite.
10926
bce522a2
PA
109272010-03-06 Simo Melenius <simo.melenius@iki.fi>
10928
10929 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10930 switching the current inferior, not before.
10931
90884b2b
L
109322010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10933
10934 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10935 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10936 i386-linux.c and amd64-linux.c.
10937 (reg-i386.o): Removed.
10938 (reg-i386.c): Likewise.
10939 (reg-i386-linux.o): Likewise.
10940 (reg-i386-linux.c): Likewise.
10941 (reg-x86-64.o): Likewise.
10942 (reg-x86-64.c): Likewise.
10943 (reg-x86-64-linux.o): Likewise.
10944 (reg-x86-64-linux.c): Likewise.
10945 (i386.o): New.
10946 (i386.c): Likewise.
10947 (i386-linux.o): Likewise.
10948 (i386-linux.c): Likewise.
10949 (amd64.o): Likewise.
10950 (amd64.c): Likewise.
10951 (amd64-linux.o): Likewise.
10952 (amd64-linux.c): Likewise.
10953
10954 * configure.srv (srv_i386_regobj): New.
10955 (srv_i386_linux_regobj): Likewise.
10956 (srv_amd64_regobj): Likewise.
10957 (srv_amd64_linux_regobj): Likewise.
10958 (srv_i386_32bit_xmlfiles): Likewise.
10959 (srv_i386_64bit_xmlfiles): Likewise.
10960 (srv_i386_xmlfiles): Likewise.
10961 (srv_amd64_xmlfiles): Likewise.
10962 (srv_i386_linux_xmlfiles): Likewise.
10963 (srv_amd64_linux_xmlfiles): Likewise.
10964 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10965 srv_xmlfiles to $srv_i386_xmlfiles.
10966 (i[34567]86-*-mingw32ce*): Likewise.
10967 (i[34567]86-*-mingw*): Likewise.
10968 (i[34567]86-*-nto*): Likewise.
10969 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10970 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10971 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10972 (x86_64-*-linux*): Likewise.
10973
10974 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10975 (init_registers_amd64_linux): New.
10976 (x86_arch_setup): Replace init_registers_x86_64_linux with
10977 init_registers_amd64_linux.
10978
193f13e6
MK
109792010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10980
10981 * configure.ac: Check for libdl. If it is not available link against
10982 static libthread_db.
10983 * configure: Regenerate.
10984
85d721b8
PA
109852010-02-22 Pedro Alves <pedro@codesourcery.com>
10986
10987 PR9605
10988
10989 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10990 handing a read watchpoint.
10991 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10992
6076632b
DE
109932010-02-12 Doug Evans <dje@google.com>
10994
10995 * linux-low.c (linux_supports_tracefork_flag): Document.
10996 (linux_look_up_symbols): Add comment.
10997
3327ccf7
L
109982010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10999
11000 * regcache.c (supply_register): Clear regcache if buf is NULL.
11001
0718675c 110022010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11003 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11004
11005 * inferiors.c (find_inferior): Add function documentation.
11006 (unloaded_dll): Handle the case where the unloaded dll has not
11007 been previously registered in the dll list.
11008
177321bd
DJ
110092010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11010
11011 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11012 (thumb2_breakpoint): New.
11013 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11014
2b009048
DJ
110152010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11016
11017 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11018 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11019 breakpoints.
11020
3be029c7
PA
110212010-01-21 Pedro Alves <pedro@codesourcery.com>
11022
11023 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11024
18f5de3b
JK
110252010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11026
11027 * linux-s390-low.c (s390_collect_ptrace_register)
11028 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11029
3743bb4f
DE
110302010-01-21 Doug Evans <dje@google.com>
11031
14ce3065
DE
11032 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11033 (PTRACE_ARG4_TYPE): New macro.
11034 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11035 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11036 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11037 (usr_store_inferior_registers): Ditto.
11038 (linux_read_memory, linux_write_memory): Ditto.
11039 (linux_test_for_tracefork): Ditto.
11040
3743bb4f
DE
11041 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11042 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11043
8b315be5
PA
110442010-01-21 Pedro Alves <pedro@codesourcery.com>
11045
11046 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11047 target.
11048
85492558
PA
110492010-01-21 Pedro Alves <pedro@codesourcery.com>
11050
11051 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11052 prototype to take a regcache. Adjust.
11053
442ea881
PA
110542010-01-20 Pedro Alves <pedro@codesourcery.com>
11055
11056 * regcache.h (struct thread_info): Forward declare.
11057 (struct regcache): New.
11058 (new_register_cache): Adjust prototype.
11059 (get_thread_regcache): Declare.
11060 (free_register_cache): Adjust prototype.
11061 (registers_to_string, registers_from_string): Ditto.
11062 (supply_register, supply_register_by_name, collect_register)
11063 (collect_register_as_string, collect_register_by_name): Ditto.
11064 * regcache.c (struct inferior_regcache_data): Delete.
11065 (get_regcache): Rename to ...
11066 (get_thread_regcache): ... this. Adjust. Switch inferior before
11067 fetching registers.
11068 (regcache_invalidate_one): Adjust.
11069 (regcache_invalidate): Fix prototype.
11070 (new_register_cache): Return the new register cache.
11071 (free_register_cache): Change prototype.
11072 (realloc_register_cache): Adjust.
11073 (registers_to_string): Change prototype to take a regcache. Adjust.
11074 (registers_from_string): Ditto.
11075 (register_data): Ditto.
11076 (supply_register): Ditto.
11077 (supply_register_by_name): Ditto.
11078 (collect_register): Ditto.
11079 (collect_register_as_string): Ditto.
11080 (collect_register_by_name): Ditto.
11081 * server.c (process_serial_event): Adjust.
11082 * linux-low.h (regset_fill_func, regset_store_func): Change
11083 prototype.
11084 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11085 Change prototype.
11086 * linux-low.c (get_stop_pc): Adjust.
11087 (check_removed_breakpoint): Adjust.
11088 (linux_wait_for_event): Adjust.
11089 (linux_resume_one_lwp): Adjust.
11090 (fetch_register): Add regcache parameter. Adjust.
11091 (usr_store_inferior_registers): Ditto.
11092 (regsets_fetch_inferior_registers): Ditto.
11093 (regsets_store_inferior_registers): Ditto.
11094 (linux_fetch_registers, linux_store_registers): Ditto.
11095 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11096 regcache. Adjust.
43aaf8b6
PA
11097 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11098 Ditto.
442ea881
PA
11099 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11100 prototype to take a regcache.
11101 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11102 * remote-utils.c (convert_ascii_to_int, outreg)
11103 (prepare_resume_reply): Change prototype to take a regcache.
11104 Adjust.
11105 * target.h (struct target_ops) <fetch_registers, store_registers>:
11106 Change prototype to take a regcache.
11107 (fetch_inferior_registers, store_inferior_registers): Change
11108 prototype to take a regcache. Adjust.
11109 * proc-service.c (ps_lgetregs): Adjust.
11110 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11111 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11112 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11113 take a regcache. Adjust.
11114 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11115 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11116 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11117 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11118 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11119 (cris_cannot_fetch_register):
11120 (cris_breakpoint_at): Change prototype to take a regcache.
11121 Adjust.
11122 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11123 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11124 to take a regcache. Adjust.
11125 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11126 Adjust.
11127 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11128 take a regcache. Adjust.
11129 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11130 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11131 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11132 * linux-mips-low.c (mips_get_pc):
11133 (mips_set_pc): Change prototype to take a regcache. Adjust.
11134 (mips_reinsert_addr): Adjust.
11135 (mips_collect_register): Change prototype to take a regcache.
11136 Adjust.
11137 (mips_supply_register):
11138 (mips_collect_register_32bit, mips_supply_register_32bit)
11139 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11140 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11141 * linux-ppc-low.c (ppc_supply_ptrace_register)
11142 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11143 (parse_spufs_run): Adjust.
11144 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11145 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11146 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11147 take a regcache. Adjust.
11148 * linux-s390-low.c (s390_collect_ptrace_register)
11149 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11150 (s390_set_pc): Change prototype to take a regcache. Adjust.
11151 (s390_arch_setup): Adjust.
11152 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11153 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11154 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11155 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11156 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11157 regcache. Adjust.
11158 (sparc_breakpoint_at): Adjust.
11159 * linux-xtensa-low.c (xtensa_fill_gregset):
11160 (xtensa_store_gregset):
11161 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11162 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11163 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11164 prototype to take a regcache. Adjust.
11165 * win32-arm-low.c (arm_fetch_inferior_register)
11166 (arm_store_inferior_register): Change prototype to take a
11167 regcache. Adjust.
11168 * win32-i386-low.c (i386_fetch_inferior_register)
11169 (i386_store_inferior_register): Change prototype to take a
11170 regcache. Adjust.
11171 * win32-low.c (child_fetch_inferior_registers)
11172 (child_store_inferior_registers): Change prototype to take a
11173 regcache. Adjust.
11174 (win32_wait): Adjust.
11175 (win32_fetch_inferior_registers): Change prototype to take a
11176 regcache. Adjust.
11177 (win32_store_inferior_registers): Adjust.
11178 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11179 store_inferior_register>: Change prototype to take a regcache.
11180
60c3d7b0
DE
111812010-01-20 Doug Evans <dje@google.com>
11182
11183 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11184 #ifdef.
11185 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11186 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11187
dc146f7c
VP
111882010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11189
11190 * linux-low.c (linux_core_of_thread): New.
11191 (compare_ints, show_process, list_threads): New.
11192 (linux_qxfer_osdata): Report threads and cores.
11193 (linux_target_op): Register linux_core_of_thread.
11194 * remote-utils.c (prepare_resume_reply): Report the core.
11195 (buffer_xml_printf): Support %d specifier.
11196 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11197 New.
11198 (handle_query): Handle qXfer:threads. Announce availability
11199 thereof.
11200 * target.h (struct target_ops): New field core_of_thread.
11201
7803799a
UW
112022010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11203
11204 * Makefile.in (clean): Remove new generated files.
11205 (reg-s390.o, reg-s390.c): Remove rules.
11206 (reg-s390x.o, reg-s390x.c): Likewise.
11207 (s390-linux32.o, s390-linux32.c): Add rules.
11208 (s390-linux64.o, s390-linux64.c): Likewise.
11209 (s390x-linux64.o, s390x-linux64.c): Likewise.
11210 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11211 * linux-s390-low.c: Include <elf.h>.
11212 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11213 (init_registers_s390): Remove prototype.
11214 (init_registers_s390x): Likewise.
11215 (init_registers_s390_linux32): Add prototype.
11216 (init_registers_s390_linux64): Likewise.
11217 (init_registers_s390x_linux64): Likewise.
11218 (s390_num_regs_3264): New define.
11219 (s390_regmap_3264): New global variable.
11220 (s390_cannot_fetch_register): Remove obsolete check.
11221 (s390_cannot_store_register): Likewise.
11222 (s390_collect_ptrace_register): Handle upper/lower register halves.
11223 (s390_supply_ptrace_register): Likewise.
11224 (s390_fill_gregset): Update to register number changes.
11225 (s390_get_hwcap): New routine.
11226 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11227 Install appropriate regmap and register set.
11228
6e7ffa39
JB
112292010-01-01 Joel Brobecker <brobecker@adacore.com>
11230
11231 * server.c (gdbserver_version): Update copyright year to 2010.
11232 * gdbreplay.c (gdbreplay_version): Likewise.
11233
957f3f49
DE
112342009-12-28 Doug Evans <dje@google.com>
11235
11236 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11237 elf/external.h. Include <elf.h> instead but only if necessary.
11238
ca5c370d
PA
112392009-12-28 Pedro Alves <pedro@codesourcery.com>
11240
11241 * linux-low.c (linux_remove_process): Remove `detaching'
11242 parameter. Don't release/detach from thread_db here.
11243 (linux_kill): Release/detach from thread_db here, ...
11244 (linux_detach): ... and here, before actually detaching.
11245 (linux_wait_1): ... and here, when a process exits.
11246 * thread-db.c (any_thread_of): New.
11247 (thread_db_free): Switch the current inferior to a thread of the
11248 passed in process.
11249
4ee62156
DE
112502009-12-21 Doug Evans <dje@google.com>
11251
d90e6a88
DE
11252 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11253
c5f62d5f
DE
11254 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11255 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11256 warning ifndef __NR_tkill. Move setting of errno there too.
11257 Delete unnecessary resetting of errno after syscall.
11258 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11259
10e86dd7
DE
11260 * configure.ac: Check for dladdr.
11261 * config.in: Regenerate.
11262 * configure: Regenerate.
11263 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11264 (try_thread_db_load): Update.
11265
4ee62156
DE
11266 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11267
00f515da
DE
112682009-12-18 Doug Evans <dje@google.com>
11269
e9464885
DE
11270 * event-loop.c: Include unistd.h if it exists.
11271
07d4f67e
DE
11272 * linux-low.c (my_waitpid): Move definition away from being in
11273 between linux_tracefork_child/linux_test_for_tracefork.
11274
00f515da
DE
11275 * gdb_proc_service.h (psaddr_t): Fix type.
11276 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11277 signature to match glibc.
11278
1de1badb
DE
112792009-12-16 Doug Evans <dje@google.com>
11280
11281 * linux-low.c (linux_read_memory): Fix argument to read.
11282
aeeb81d1
PA
112832009-11-26 Pedro Alves <pedro@codesourcery.com>
11284
11285 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11286 events, don't leave current_inferior pointing at null.
11287
10357975
PA
112882009-11-26 Pedro Alves <pedro@codesourcery.com>
11289
11290 * win32-low.c (LOG): Delete.
11291 (OUTMSG): Output to stderr.
11292 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11293 on compile time LOG macro.
11294 (win32_wait): Fix debug output.
11295
cf6e3471
PA
112962009-11-26 Pedro Alves <pedro@codesourcery.com>
11297
11298 * win32-low.c (win32_add_one_solib): If the dll name is
11299 "ntdll.dll", prepend the system directory to the dll path.
11300
0c85e18e
MK
113012009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11302
11303 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11304
9ac544ce 113052009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11306 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11307
11308 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11309 * configure.ac: Check for __mcoldfire__ and set
11310 gdb_cv_m68k_is_coldfire.
11311 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11312 reg-cf.o and reg-m68k.o.
11313 * configure: Regenerated.
11314
fd7dd3e6
PA
113152009-11-16 Pedro Alves <pedro@codesourcery.com>
11316
11317 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11318 Pass it to thread_db_free.
11319 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11320 proper `detaching' argument to linux_remove_process.
11321 * linux-low.h (thread_db_free): Add `detaching' parameter.
11322 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11323 to thread_db_free.
11324 (thread_db_free): Add `detaching' parameter. Only
11325 call td_ta_clear_event if detaching from process.
11326
75aa492e
MK
113272009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11328
11329 * thread-db.c (thread_db_free): Fix typo.
11330
21e1bee4
PP
113312009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11332
11333 PR gdb/10838
11334 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11335
8838b45e
NS
113362009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11337
11338 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11339 with an i686 compiler.
11340 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11341 needed.
11342 * configure: Rebuilt.
11343
8a35fb51
SL
113442009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11345
11346 PR gdb/10783
11347
11348 * server.c (handle_search_memory_1): Correct read_addr initialization
11349 in loop for searching subsequent chunks.
11350
96f15937
PP
113512009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11352
11353 * configure.ac: New --with-libthread-db option.
11354 * thread-db.c: Allow direct dependence on libthread_db.
11355 (thread_db_free): Adjust.
11356 * config.in: Regenerate.
11357 * configure: Likewise.
889bf7c5 11358
5f7d1694
PP
113592009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11360
11361 PR gdb/10757
11362 * thread-db.c (attach_thread): New function.
11363 (maybe_attach_thread): Return success/failure.
11364 (find_new_threads_callback): Adjust.
889bf7c5
PA
11365 (thread_db_find_new_threads): Loop until no new threads.
11366
88e3b899
PA
113672009-10-13 Pedro Alves <pedro@codesourcery.com>
11368
11369 * proc-service.c (ps_lgetregs): Formatting.
11370
cdbfd419
PP
113712009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11372
11373 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11374 * configure.ac: Adjust.
11375 * linux-low.h (struct process_info_private): Move members to struct
11376 thread_db.
11377 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11378 * linux-low.c (linux_remove_process): Adjust.
11379 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11380 * server.c (handle_query): Move code ...
11381 (handle_monitor_command): ... here. New function.
11382 * target.h (struct target_ops): New member.
11383 * thread-db.c (struct thread_db): New.
11384 (libthread_db_search_path): New variable.
11385 (thread_db_create_event, thread_db_enable_reporting)
11386 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11387 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11388 (try_thread_db_load_1, dladdr_to_soname): New functions.
11389 (try_thread_db_load, thread_db_load_search): New functions.
11390 (thread_db_init): Search for libthread_db.
11391 (thread_db_free): New function.
11392 (thread_db_handle_monitor_command): Likewise.
11393 * config.in: Regenerate.
11394 * configure: Regenerate.
889bf7c5 11395
4168d2d6
UW
113962009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11397
11398 * spu-low.c (spu_kill): Wait for inferior to terminate.
11399 Call clear_inferiors.
11400 (spu_detach): Call clear_inferiors.
11401
81ecdfbb
RW
114022009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11403
11404 * aclocal.m4: Regenerate.
11405 * config.in: Likewise.
11406 * configure: Likewise.
11407
0b9ff2c0
UW
114082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11409
11410 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11411 (parse_spufs_run): New function.
11412 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11413 (ppc_breakpoint_at): Handle SPU breakpoints.
11414
efcbbd14
UW
114152009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11416
11417 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11418 (SPUFS_MAGIC): Define.
11419 (spu_enumerate_spu_ids): New function.
11420 (linux_qxfer_spu): New function.
11421 (linux_target_ops): Install linux_qxfer_spu.
11422
f4d9bade
UW
114232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11424
11425 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11426 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11427 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11428 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11429 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11430 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11431 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11432 (init_registers_powerpc_cell32l): Add prototype.
11433 (init_registers_powerpc_cell64l): Likewise.
11434 (ppc_arch_setup): Detect Cell/B.E. architecture.
11435
96e946ca
RW
114362009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11437
11438 * Makefile.in (datarootdir): New variable.
11439
58d6951d
DJ
114402009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11441
11442 * linux-low.c (linux_write_memory): Update debugging output.
11443 * Makefile.in (clean): Add new descriptions.
11444 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11445 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11446 * configure.srv: Add new files for arm*-*-linux*.
11447 * linux-arm-low.c: Add new declarations.
11448 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11449 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11450 (HWCAP_VFPv3D16): New.
11451 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11452 instead of __IWMMXT__.
11453 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11454 (arm_arch_setup): New.
11455 (target_regsets): Remove #ifdef. Add VFP regset.
11456 (the_low_target): Use arm_arch_setup.
11457
12b42a12
DJ
114582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11459
11460 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11461 the main thread again.
11462
ac8c974e
AR
114632009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11464
11465 Adding Neutrino gdbserver.
11466 * configure: Regenerated.
11467 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11468 * configure.srv (i[34567]86-*-nto*): New target.
11469 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11470 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11471 (nto_comctrl) [__QNX__]: New function.
11472 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11473
4424e0c3 114742009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11475
11476 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11477 srv_tgtobj.
11478
912cf4ba
PA
114792009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11480 Pedro Alves <pedro@codesourcery.com>
11481
11482 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11483 don't support CONTEXT_EXTENDED_REGISTERS.
11484 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11485 (the_low_target): Install them.
11486 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11487 failing with ERROR_PIPE_NOT_CONNECTED.
11488
aa5ca48f
DE
114892009-06-30 Doug Evans <dje@google.com>
11490 Pierre Muller <muller@ics.u-strasbg.fr>
11491
11492 Add h/w watchpoint support to x86-linux, win32-i386.
11493 * Makefile.in (SFILES): Add i386-low.c
11494 (i386_low_h): Define.
11495 (i386-low.o): Add dependencies.
11496 (linux-x86-low.o): Add i386-low.h dependency.
11497 (win32-i386-low.o): Ditto.
11498 * i386-low.c: New file.
11499 * i386-low.h: New file.
11500 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11501 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11502 * linux-low.c (linux_add_process): Initialize arch_private.
11503 (linux_remove_process): Free arch_private.
11504 (add_lwp): Initialize arch_private.
11505 (delete_lwp): Free arch_private.
11506 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11507 provided.
11508 * linux-low.h (process_info_private): New member arch_private.
11509 (lwp_info): New member arch_private.
11510 (linux_target_ops): New members new_process, new_thread,
11511 prepare_to_resume.
11512 (ptid_of): New macro.
11513 * linux-x86-low.c: Include stddef.h, i386-low.h.
11514 (arch_process_info): New struct.
11515 (arch_lwp_info): New struct.
11516 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11517 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11518 (i386_dr_low_get_status): New function.
11519 (x86_insert_point, x86_remove_point): New functions.
11520 (x86_stopped_by_watchpoint): New function.
11521 (x86_stopped_data_address): New function.
11522 (x86_linux_new_process, x86_linux_new_thread): New functions.
11523 (x86_linux_prepare_to_resume): New function.
11524 (the_low_target): Add entries for insert_point, remove_point,
11525 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11526 prepare_to_resume.
11527 * server.c (debug_hw_points): New global.
11528 (monitor_show_help): Document set debug-hw-points.
11529 (handle_query): Process "set debug-hw-points".
11530 * server.h (debug_hw_points): Declare.
11531 (paddress): Declare.
11532 * utils.c (NUMCELLS, CELLSIZE): New macros.
11533 (get_sell, xsnprintf, paddress): New functions.
11534 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11535 remove_point, stopped_by_watchpoint, stopped_data_address.
11536 * win32-i386-low.c: Include i386-low.h.
11537 (debug_reg_state): Replaces dr.
11538 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11539 (i386_dr_low_get_status): New function.
11540 (i386_insert_point, i386_remove_point): New functions.
11541 (i386_stopped_by_watchpoint): New function.
11542 (i386_stopped_data_address): New function.
11543 (i386_initial_stuff): Update.
11544 (get_thread_context,set_thread_context,i386_thread_added): Update.
11545 (the_low_target): Add entries for insert_point,
11546 remove_point, stopped_by_watchpoint, stopped_data_address.
11547 * win32-low.c (win32_insert_watchpoint): New function.
11548 (win32_remove_watchpoint): New function.
11549 (win32_stopped_by_watchpoint): New function.
11550 (win32_stopped_data_address): New function.
11551 (win32_target_ops): Add entries for insert_watchpoint,
11552 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11553 * win32-low.h (win32_target_ops): New members insert_point,
11554 remove_point, stopped_by_watchpoint, stopped_data_address.
11555
d993e290
PA
115562009-06-25 Pedro Alves <pedro@codesourcery.com>
11557
11558 * server.c (process_serial_event): Re-return unsupported, not
11559 error, if the type isn't recognized. Re-allow supporting only
11560 insert or remove packets. Also call require_running for
11561 breakpoints. Add missing break statement to default case. Tidy.
11562 * target.h (struct target_ops): Rename insert_watchpoint to
11563 insert_point, and remove_watchpoint to remove_point.
11564
11565 * linux-low.h (struct linux_target_ops): Likewise.
11566 * linux-low.c (linux_insert_watchpoint): Rename to ...
11567 (linux_insert_point): ... this. Adjust.
11568 (linux_remove_watchpoint): Rename to ...
11569 (linux_remove_point): ... this. Adjust.
11570 (linux_target_ops): Adjust.
11571 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11572 (cris_insert_point): ... this.
11573 (cris_remove_watchpoint): Rename to ...
11574 (cris_remove_point): ... this.
11575 (the_low_target): Adjust.
11576
0f54c268
PM
115772009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11578
11579 * server.c (handle_v_kill): Pass signal_pid to
11580 kill_inferior if multi_process is zero.
11581
c6314022
AR
115822009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11583
11584 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11585 * target.h (target_ops): Comment for *_watchpoint to make it clear
11586 the functions can get types '0' and '1'.
11587
4463ce24
AR
115882009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11589
11590 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11591 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11592 * regcache.c (get_regcache): Likewise.
11593 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11594 * win32-low.c (child_fetch_inferior_registers): Remove check for
11595 regno 0.
11596
cf8fd78b
PA
115972009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11598 Pedro Alves <pedro@codesourcery.com>
11599
11600 * target.h (struct target_ops) <supports_multi_process>: New
11601 callback.
11602 (target_supports_multi_process): New.
11603 * server.c (handle_query): Even if GDB reports support, only
11604 enable multi-process if the target also supports it. Report
11605 multi-process support only if the target backend supports it.
11606 * linux-low.c (linux_supports_multi_process): New function.
11607 (linux_target_ops): Install it as target_supports_multi_process
11608 callback.
11609
47c0c975
DE
116102009-05-24 Doug Evans <dje@google.com>
11611
e09875d4
DE
11612 Global renaming of find_thread_pid to find_thread_ptid.
11613 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11614 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11615 All callers updated.
11616
e27d73f6
DE
11617 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11618 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11619 directly.
11620
47c0c975
DE
11621 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11622 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11623 (linux_resume_one_lwp): Ditto.
11624
2acc282a
DE
116252009-05-23 Doug Evans <dje@google.com>
11626
11627 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11628 from struct inferior_list_entry * to struct lwp_info *.
11629 All callers updated.
11630
9f1036c1
DE
116312009-05-13 Doug Evans <dje@google.com>
11632
11633 * linux-x86-low.c: Don't include assert.h.
11634 (x86_siginfo_fixup): Use fatal, not assert.
11635 (x86_arch_setup): Fix comment.
11636
d0722149
DE
116372009-05-12 Doug Evans <dje@google.com>
11638
11639 Biarch support for i386/amd64 gdbserver.
11640 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11641 Add linux-x86-low.c.
11642 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11643 (linux-x86-low.o): Add.
11644 * linux-x86-64-low.c: Delete.
11645 * linux-i386-low.c: Delete.
11646 * linux-x86-low.c: New file.
11647 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11648 linux-x86-low.o.
11649 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11650 linux-x86-low.o.
11651 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11652 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11653 (linux_child_pid_to_exec_file): New function.
11654 (elf_64_header_p, elf_64_file_p): New functions.
11655 (siginfo_fixup): New function.
11656 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11657 give target a chance to convert layout.
11658 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11659 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11660
fdeb2a12
DE
116612009-05-07 Doug Evans <dje@google.com>
11662
11663 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11664 (regsets_store_inferior_registers): Ditto.
11665
a6dbe5df
PA
116662009-05-06 Pedro Alves <pedro@codesourcery.com>
11667
11668 PR server/10048
11669
11670 * linux-low.c (must_set_ptrace_flags): Delete.
11671 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11672 of the global.
11673 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11674 `lwp->must_set_ptrace_flags' instead.
ba42693b 11675 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11676 (linux_wait_1): ... not here.
11677
5091eb23
DE
116782009-04-30 Doug Evans <dje@google.com>
11679
9f767825
DE
11680 * inferiors.c (started_inferior_callback): New function.
11681 (attached_inferior_callback): New function.
11682 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11683 * server.c (print_started_pid, print_attached_pid): New functions.
11684 (detach_or_kill_for_exit): New function.
11685 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11686 * server.h (have_started_inferiors_p): Declare.
11687 (have_attached_inferiors_p): Declare.
11688
5091eb23
DE
11689 * inferiors.c (remove_process): Fix memory leak, free process.
11690 * linux-low.c (linux_remove_process): New function.
11691 (linux_kill): Call it instead of remove_process.
11692 (linux_detach, linux_wait_1): Ditto.
11693
155c8968
PA
116942009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11695
11696 * configure.srv: Add x86 Windows CE target.
11697
7fe519cb
UW
116982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11699
11700 * inferiors.c (get_thread_process): Make global.
11701 * server.h (get_thread_process): Add prototype.
11702 * thread-db.c (find_one_thread): Use get_thread_process
11703 instead of current_process.
11704 (thread_db_get_tls_address): Do not crash if called when
11705 thread layer is not yet initialized.
11706
5472f405
UW
117072009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11708
11709 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11710 * spu-low.c (current_tid): Rename to ...
11711 (current_ptid): ... this.
11712 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11713 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11714 ptid_get_lwp (current_ptid) instead of current_tid.
11715 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11716 instead of current_tid. Use find_process_pid to verify pid
11717 argument is valid. Pass proper argument to remove_process.
11718 (spu_thread_alive): Compare current_ptid instead of current_tid.
11719 (spu_resume): Likewise.
11720
55ac2b99
PA
117212009-04-02 Pedro Alves <pedro@codesourcery.com>
11722
11723 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11724 variable.
11725
95954743
PA
117262009-04-01 Pedro Alves <pedro@codesourcery.com>
11727
11728 Implement the multiprocess extensions, and add linux multiprocess
11729 support.
11730
11731 * server.h (ULONGEST): Declare.
11732 (struct ptid, ptid_t): New.
11733 (minus_one_ptid, null_ptid): Declare.
11734 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11735 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11736 (struct inferior_list_entry): Change `id' type from unsigned from
11737 to ptid_t.
11738 (struct sym_cache, struct breakpoint, struct
11739 process_info_private): Forward declare.
11740 (struct process_info): Declare.
11741 (current_process): Declare.
11742 (all_processes): Declare.
11743 (initialize_inferiors): Declare.
11744 (add_thread): Adjust to use ptid_t.
11745 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11746 (add_process, remove_process, find_thread_pid): Declare.
11747 (find_inferior_id): Adjust to use ptid_t.
11748 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11749 (multi_process): Declare.
11750 (push_event): Adjust to use ptid_t.
11751 (read_ptid, write_ptid): Declare.
11752 (prepare_resume_reply): Adjust to use ptid_t.
11753 (clear_symbol_cache): Declare.
11754 * inferiors.c (all_processes): New.
11755 (null_ptid, minus_one_ptid): New.
11756 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11757 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11758 (add_thread): Change unsigned long to ptid. Remove gdb_id
11759 parameter. Adjust.
11760 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11761 (gdb_id_to_thread): Rename to ...
11762 (find_thread_pid): ... this. Change unsigned long to ptid.
11763 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11764 (loaded_dll, pull_pid_from_list): Adjust.
11765 (add_process, remove_process, find_process_pid)
11766 (get_thread_process, current_process, initialize_inferiors): New.
11767 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11768 (struct target_waitstatus) <related_pid>: Ditto.
11769 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11770 return type to int.
11771 (struct target_ops) <join>: Add `pid' argument.
11772 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11773 (struct target_ops) <wait>: Add `ptid' field. Change return type
11774 to ptid.
11775 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11776 (mywait): Add `ptid' argument. Change return type to ptid_t.
11777 (target_pid_to_str): Declare.
11778 * target.c (set_desired_inferior): Adjust to use ptids.
11779 (mywait): Add new `ptid' argument. Adjust.
11780 (target_pid_to_str): New.
11781 * mem-break.h (free_all_breakpoints): Declare.
11782 * mem-break.c (breakpoints): Delelete.
11783 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11784 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11785 to use per-process breakpoint list.
11786 (free_all_breakpoints): New.
11787 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11788 (symbol_cache, all_symbols_looked_up): Delete.
11789 (hexchars): New.
11790 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11791 read_ptid): New.
11792 (prepare_resume_reply): Change ptid argument's type from unsigned
11793 long to ptid_t. Adjust. Implement W;process and X;process.
11794 (free_sym_cache, clear_symbol_cache): New.
11795 (look_up_one_symbol): Adjust to per-process symbol cache. *
11796 * server.c (cont_thread, general_thread, step_thread): Change type
11797 to ptid_t.
11798 (attached): Delete.
11799 (multi_process): New.
11800 (last_ptid): Change type to ptid_t.
11801 (struct vstop_notif) <ptid>: Change type to ptid_t.
11802 (queue_stop_reply, push_event): Change `ptid' argument's type to
11803 ptid_t.
11804 (discard_queued_stop_replies): Add `pid' argument.
11805 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11806 changes. Don't reference the `attached' global.
11807 (attach_inferior): Adjust to mywait interface changes.
11808 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11809 features. Handle and report "multiprocess+". Handle
11810 "qAttached:PID".
11811 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11812 changes.
11813 (handle_v_kill): New.
11814 (handle_v_stopped): Adjust to use target_pid_to_str.
11815 (handle_v_requests): Allow multiple attaches and runs when
11816 multiprocess extensions are in effect. Handle "vKill".
11817 (myresume): Adjust to use ptids.
11818 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11819 (handle_status): Adjust to discard_queued_stop_replies interface
11820 change.
11821 (first_thread_of, kill_inferior_callback)
11822 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11823 (main): Call initialize_inferiors. Adjust to use ptids, killing
11824 and detaching from all inferiors. Handle multiprocess packet
11825 variants.
11826 * linux-low.h: Include gdb_proc_service.h.
11827 (struct process_info_private): New.
11828 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11829 <lwpid_of>: Use ptid_get_lwp.
11830 (get_lwp_thread): Adjust.
11831 (struct lwp_info): Add `dead' member.
11832 (find_lwp_pid): Declare.
11833 * linux-low.c (thread_db_active): Delete.
11834 (new_inferior): Adjust comment.
11835 (inferior_pid): Delete.
11836 (linux_add_process): New.
11837 (handle_extended_wait): Adjust.
11838 (add_lwp): Change unsigned long to ptid.
11839 (linux_create_inferior): Add process to processes table. Adjust
11840 to use ptids. Don't set new_inferior here.
11841 (linux_attach_lwp): Rename to ...
11842 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11843 it. Adjust to use ptids.
11844 (linux_attach_lwp): New.
11845 (linux_attach): Add process to processes table. Don't set
11846 new_inferior here.
11847 (struct counter): New.
11848 (second_thread_of_pid_p, last_thread_of_process_p): New.
11849 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11850 multiple processes.
11851 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11852 processes. Remove process from process table.
11853 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11854 to multiple processes.
11855 (any_thread_of): New.
11856 (linux_detach): Add `pid' argument, and handle it. Remove process
11857 from processes table.
11858 (linux_join): Add `pid' argument. Handle it.
11859 (linux_thread_alive): Change unsighed long argument to ptid_t.
11860 Consider dead lwps as not being alive.
11861 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11862 threads we're not interested in.
11863 (same_lwp, find_lwp_pid): New.
11864 (linux_wait_for_lwp): Change `pid' argument's type from int to
11865 ptid_t. Adjust.
11866 (linux_wait_for_event): Rename to ...
11867 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11868 from int to ptid_t. Adjust.
11869 (linux_wait_for_event): New.
11870 (linux_wait_1): Add `ptid' argument. Change return type to
11871 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11872 that exit from the process table.
11873 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11874 Adjust.
11875 (mark_lwp_dead): New.
11876 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11877 stopping all threads, mark its main lwp as dead.
11878 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11879 ptids.
11880 (fetch_register, usr_store_inferior_registers)
11881 (regsets_fetch_inferior_registers)
11882 (regsets_store_inferior_registers, linux_read_memory)
11883 (linux_write_memory): Inline `inferior_pid'.
11884 (linux_look_up_symbols): Adjust to use per-process
11885 `thread_db_active'.
11886 (linux_request_interrupt): Adjust to use ptids.
11887 (linux_read_auxv): Inline `inferior_pid'.
11888 (initialize_low): Don't reference thread_db_active.
11889 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11890 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11891 (ps_getpid): Return the pid of the current inferior.
11892 * thread-db.c (proc_handle, thread_agent): Delete.
11893 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11894 per-process data.
11895 (find_one_thread): Change argument type to ptid_t. Adjust to
11896 per-process data.
11897 (maybe_attach_thread): Adjust to per-process data and ptids.
11898 (thread_db_find_new_threads): Ditto.
11899 (thread_db_init): Ditto.
11900 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11901 processes table. Adjust to use ptids.
11902 (spu_kill, spu_detach): Adjust interface. Remove process from
11903 processes table.
11904 (spu_join, spu_thread_alive): Adjust interface.
11905 (spu_wait): Adjust interface. Remove process from processes
11906 table. Adjust to use ptids.
11907 * win32-low.c (current_inferior_tid): Delete.
11908 (current_inferior_ptid): New.
11909 (debug_event_ptid): New.
11910 (thread_rec): Take a ptid. Adjust.
11911 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11912 (child_delete_thread): Ditto.
11913 (do_initial_child_stuff): Add `attached' argument. Add process to
11914 processes table.
11915 (child_fetch_inferior_registers, child_store_inferior_registers):
11916 Adjust.
11917 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11918 (win32_attach): Pass 1 to do_initial_child_stuff.
11919 (win32_kill): Adjust interface. Remove process from processes
11920 table.
11921 (win32_detach): Ditto.
11922 (win32_join): Adjust interface.
11923 (win32_thread_alive): Take a ptid.
11924 (win32_resume): Adjust to use ptids.
11925 (get_child_debug_event): Ditto.
11926 (win32_wait): Adjust interface. Remove exiting process from
11927 processes table.
11928
bd99dc85
PA
119292009-04-01 Pedro Alves <pedro@codesourcery.com>
11930
11931 Non-stop mode support.
11932
11933 * server.h (non_stop): Declare.
11934 (gdb_client_data, handler_func): Declare.
11935 (delete_file_handler, add_file_handler, start_event_loop):
11936 Declare.
11937 (handle_serial_event, handle_target_event, push_event)
11938 (putpkt_notif): Declare.
11939 * target.h (enum resume_kind): New.
11940 (struct thread_resume): Replace `step' field by `kind' field.
11941 (TARGET_WNOHANG): Define.
11942 (struct target_ops) <wait>: Add `options' argument.
11943 <supports_non_stop, async, start_non_stop>: New fields.
11944 (target_supports_non_stop, target_async): New.
11945 (start_non_stop): Declare.
11946 (mywait): Add `options' argument.
11947 * target.c (mywait): Add `options' argument. Print child exit
11948 notifications here.
11949 (start_non_stop): New.
11950 * server.c (non_stop, own_buf, mem_buf): New globals.
11951 (struct vstop_notif): New.
11952 (notif_queue): New global.
11953 (queue_stop_reply, push_event, discard_queued_stop_replies)
11954 (send_next_stop_reply): New.
11955 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11956 interface changes.
11957 (attach_inferior): In non-stop mode, don't wait for the target
11958 here.
11959 (handle_general_set): Handle QNonStop.
11960 (handle_query): When handling qC, return the current general
11961 thread, instead of the first thread of the list.
11962 (handle_query): If the backend supports non-stop mode, include
11963 QNonStop+ in the qSupported query response.
11964 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11965 and non-stop mode.
11966 (handle_v_attach, handle_v_run): Handle non-stop mode.
11967 (handle_v_stopped): New.
11968 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11969 (myresume): Adjust to use resume_kind. Handle non-stop.
11970 (queue_stop_reply_callback): New.
11971 (handle_status): Handle non-stop mode.
11972 (main): Clear non_stop flag on reconnection. Use the event-loop.
11973 Refactor serial protocol handling from here ...
11974 (process_serial_event): ... to this new function. When GDB
11975 selects any thread, select one here. In non-stop mode, wait until
11976 GDB acks all pending events before exiting.
11977 (handle_serial_event, handle_target_event): New.
11978 * remote-utils.c (remote_open): Install remote_desc in the event
11979 loop.
11980 (remote_close): Remove remote_desc from the event loop.
11981 (putpkt_binary): Rename to...
11982 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11983 (putpkt_binary): New as wrapper around putpkt_binary_1.
11984 (putpkt_notif): New.
11985 (prepare_resume_reply): In non-stop mode, don't change the
11986 general_thread.
11987 * event-loop.c: New.
11988 * Makefile.in (OBJ): Add event-loop.o.
11989 (event-loop.o): New rule.
11990
11991 * linux-low.h (pid_of): Moved here.
11992 (lwpid_of): New.
11993 (get_lwp_thread): Use lwpid_of.
11994 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11995 * linux-low.c (pid_of): Delete.
11996 (inferior_pid): Use lwpid_of.
11997 (linux_event_pipe): New.
11998 (target_is_async_p): New.
11999 (delete_lwp): New.
12000 (handle_extended_wait): Use lwpid_of.
12001 (add_lwp): Don't set lwpid field.
12002 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12003 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12004 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12005 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12006 first. Adjust to linux_wait_for_event interface changes. Use
12007 lwpid_of.
12008 (linux_detach): Don't delete the main lwp here.
12009 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12010 (status_pending_p): Don't consider explicitly suspended lwps.
12011 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12012 pointer. Add OPTIONS argument. Change return type to int. Use
12013 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12014 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12015 pointer. Add status pointer argument. Return a pid instead of a
12016 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12017 changes. In non-stop mode, don't switch to a random thread.
12018 (linux_wait): Rename to...
12019 (linux_wait_1): ... this. Add target_options argument, and handle
12020 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12021 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12022 clean exit and signal exit code. Don't stop all threads in
12023 non-stop mode. In all-stop mode, only stop all threads when
12024 reporting a stop to GDB. Handle explicit thread stop requests.
12025 (async_file_flush, async_file_mark): New.
12026 (linux_wait): New.
12027 (send_sigstop): Use lwpid_of.
12028 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12029 interface changes. In non-stop mode, don't switch to a random
12030 thread.
12031 (linux_resume_one_lwp): Use lwpid_of.
12032 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12033 (linux_resume_one_thread): ... this. Handle resume_stop. In
12034 non-stop mode, don't look for pending flag in all threads.
12035 (resume_status_pending_p): Don't consider explicitly suspended
12036 threads.
12037 (my_waitpid): Reimplement. Emulate __WALL.
12038 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12039 Use lwpid_of.
12040 (sigchld_handler, linux_supports_non_stop, linux_async)
12041 (linux_start_non_stop): New.
12042 (linux_target_ops): Register linux_supports_non_stop, linux_async
12043 and linux_start_non_stop.
12044 (initialize_low): Install SIGCHLD handler.
12045 * thread-db.c (thread_db_create_event, find_one_thread)
12046 (thread_db_get_tls_address): Use lwpid_of.
12047 * win32-low.c (win32_detach): Adjust to use resume_kind.
12048 (win32_wait): Add `options' argument.
12049 * spu-low.c (spu_resume): Adjust to use resume_kind.
12050 (spu_wait): Add `options' argument.
12051
5b1c542e
PA
120522009-04-01 Pedro Alves <pedro@codesourcery.com>
12053
12054 Decouple target code from remote protocol.
12055
12056 * target.h (enum target_waitkind): New.
12057 (struct target_waitstatus): New.
12058 (struct target_ops) <wait>: Return an unsigned long. Take a
12059 target_waitstatus pointer instead of a char pointer.
12060 (mywait): Likewise.
12061 * target.c (mywait): Change prototype to return an unsigned long.
12062 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12063 * server.h (thread_from_wait, old_thread_from_wait): Delete
12064 declarations.
12065 (prepare_resume_reply): Change prototype to take a
12066 target_waitstatus.
12067 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12068 (last_status, last_ptid): New.
12069 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12070 pid instead of a signal.
12071 (attach_inferior): Remove "status" and "signal" parameters.
12072 Adjust.
12073 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12074 not as an address.
12075 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12076 (handle_v_requests, myresume): Remove "status" and "signal"
12077 parameters. Adjust.
12078 (handle_status): New.
12079 (main): Delete local `status'. Adjust.
12080 * remote-utils.c: Include target.h.
12081 (prepare_resume_reply): Change prototype to take a
12082 target_waitstatus. Adjust.
12083
12084 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12085 interface.
12086 * spu-low.c (spu_wait): Adjust.
12087 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12088 Delete.
12089 (win32_wait): Adjust.
12090
2bd7c093
PA
120912009-04-01 Pedro Alves <pedro@codesourcery.com>
12092
12093 * target.h (struct thread_resume): Delete leave_stopped member.
12094 (struct target_ops): Add a `n' argument to the `resume' callback.
12095 * server.c (start_inferior): Adjust.
12096 (handle_v_cont, myresume): Adjust.
12097 * linux-low.c (check_removed_breakpoint): Adjust to resume
12098 interface change, and to removed leave_stopped field.
12099 (resume_ptr): Delete.
12100 (struct thread_resume_array): New.
12101 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12102 resume interface change.
12103 (linux_continue_one_thread, linux_queue_one_thread)
12104 (resume_status_pending_p): Check if the resume field is NULL
12105 instead of checking the leave_stopped member.
12106 (linux_resume): Adjust to the target resume interface change.
12107 * spu-low.c (spu_resume): Adjust to the target resume interface
12108 change.
12109 * win32-low.c (win32_detach, win32_resume): Ditto.
12110
c35fafde
PA
121112009-04-01 Pedro Alves <pedro@codesourcery.com>
12112
12113 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12114 flag.
12115 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12116 pending.
12117 (linux_continue_one_thread): Only preserve the stepping flag if
12118 there's a pending breakpoint.
12119
0a59d50b
PA
121202009-03-31 Pedro Alves <pedro@codesourcery.com>
12121
12122 * server.c (main): After the inferior having exited, call
12123 remote_close before exiting gdbserver.
12124
f04c6d38
TJB
121252009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12126
12127 Fix size of FPSCR in Power 7 processors.
12128 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12129 (PPC_FEATURE_HAS_DFP): New #define.
12130 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12131 size of the FPSCR.
12132
78e5cee6
PA
121332009-03-23 Pedro Alves <pedro@codesourcery.com>
12134
12135 * server.c (handle_query) Whitespace and formatting.
12136
1b3f6016
PA
121372009-03-22 Pedro Alves <pedro@codesourcery.com>
12138
12139 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12140 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12141 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12142 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12143 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12144 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12145 Makefile.in, configure.ac: Fix whitespace throughout.
12146 * configure: Regenerate.
12147
a07b2135
PA
121482009-03-22 Pedro Alves <pedro@codesourcery.com>
12149
12150 * inferiors.c (find_inferior): Make it safe for the callback
12151 function to delete the currently iterated inferior.
12152
67cc2626
PA
121532009-03-22 Pedro Alves <pedro@codesourcery.com>
12154
12155 * Makefile.in (linuw_low_h): Move higher.
12156 (thread-db.o): Depend on $(linux_low_h).
12157
54a0b537
PA
121582009-03-17 Pedro Alves <pedro@codesourcery.com>
12159
12160 Rename "process" to "lwp" throughout.
12161
12162 * linux-low.c (all_processes): Rename to...
12163 (all_lwps): ... this.
12164 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12165 (add_process): Rename to ...
12166 (add_lwp): ... this. Adjust.
12167 (linux_create_inferior): Adjust.
12168 (linux_attach_lwp): Adjust.
12169 (linux_attach): Adjust.
12170 (linux_kill_one_process): Rename to ...
12171 (linux_kill_one_lwp): ... this. Adjust.
12172 (linux_kill): Adjust.
12173 (linux_detach_one_process): Rename to ...
12174 (linux_detach_one_lwp): ... this. Adjust.
12175 (linux_detach): Adjust.
12176 (check_removed_breakpoint): Adjust.
12177 (status_pending_p): Adjust.
12178 (linux_wait_for_process): Rename to ...
12179 (linux_wait_for_lwp): ... this. Adjust.
12180 (linux_wait_for_event): Adjust.
12181 (send_sigstop): Adjust.
12182 (wait_for_sigstop): Adjust.
12183 (stop_all_processes): Rename to ...
12184 (stop_all_lwps): ... this.
12185 (linux_resume_one_process): Rename to ...
12186 (linux_resume_one_lwp): ... this. Adjust.
12187 (linux_set_resume_request, linux_continue_one_thread)
12188 (linux_queue_one_thread, resume_status_pending_p)
12189 (usr_store_inferior_registers, regsets_store_inferior_registers)
12190 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12191 Adjust.
12192 * linux-low.h (get_process): Rename to ...
12193 (get_lwp): ... this. Adjust.
12194 (get_thread_process): Rename to ...
12195 (get_thread_lwp): ... this. Adjust.
12196 (get_process_thread): Rename to ...
12197 (get_lwp_thread): ... this. Adjust.
12198 (struct process_info): Rename to ...
12199 (struct lwp_info): ... this.
12200 (all_processes): Rename to ...
12201 (all_lwps): ... this.
12202 * proc-service.c (ps_lgetregs): Adjust.
12203 * thread-db.c (thread_db_create_event, find_one_thread)
12204 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12205
0b16c5cf
PA
122062009-03-14 Pedro Alves <pedro@codesourcery.com>
12207
12208 * server.c (handle_query): Handle "qAttached".
12209
32de4b9d
NS
122102009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12211
12212 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12213 GPLv3, update license URL.
12214
2aecd87f
DE
122152009-03-01 Doug Evans <dje@google.com>
12216
93efd302 12217 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12218 (server_h): Add gdb_signals.h.
12219 (signals.o): Update.
12220 * server.h (target_signal_from_host,target_signal_to_host_p)
12221 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12222
86b1f9c5
PM
122232009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12224
12225 * remote-utils.c (getpkt): Also generate remote-debug
12226 information if noack_mode is set.
12227
4aa995e1
PA
122282009-02-06 Pedro Alves <pedro@codesourcery.com>
12229
12230 * server.c (handle_query): Report qXfer:siginfo:read and
12231 qXfer:siginfo:write as supported and handle them.
12232 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12233 * linux-low.c (linux_xfer_siginfo): New.
12234 (linux_target_ops): Set it.
12235
62709adf
PA
122362009-01-26 Pedro Alves <pedro@codesourcery.com>
12237
12238 * server.c (gdbserver_usage): Mention --remote-debug.
12239 (main): Accept '--remote-debug' switch.
12240
aef93bd7
DE
122412009-01-18 Doug Evans <dje@google.com>
12242
12243 * regcache.c (new_register_cache): No need to check result of xcalloc.
12244 * server.c (handle_search_memory): Back out calls to xmalloc,
12245 result is checked and error is returned to user upon failure.
12246 (handle_query): Ditto. Add more checks for result of malloc.
12247 (handle_v_cont): Check result of malloc, report error back to
12248 user upon failure.
12249 (handle_v_run): Ditto. Call freeargv.
12250 * server.h (freeargv): Declare.
12251 * utils.c (freeargv): New fn.
12252
54363045
DE
122532009-01-15 Doug Evans <dje@google.com>
12254
f626972c
DE
12255 * gdbreplay.c (perror_with_name): Make arg const char *.
12256 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12257 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12258 * utils.c (perror_with_name): Make arg const char *.
54363045 12259
18aae699
PA
122602009-01-14 Pedro Alves <pedro@codesourcery.com>
12261
12262 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12263 when handling a EXIT_PROCESS_DEBUG_EVENT.
12264
ff703abe
JB
122652009-01-06 Joel Brobecker <brobecker@adacore.com>
12266
12267 * gdbreplay.c (gdbreplay_version): Update copyright year.
12268 * server.c (gdbserver_version): Likewise.
12269
f21cc1a2 122702009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12271
12272 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12273 (handle_extended_wait): Improve comment.
0e21c1ec 12274
bca929d3
DE
122752008-12-13 Doug Evans <dje@google.com>
12276
12277 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12278 * server.h (ATTR_MALLOC): New macro.
12279 (xmalloc,xcalloc,xstrdup): Declare.
12280 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12281 * inferiors.c: Ditto.
12282 * linux-low.c: Ditto.
12283 * mem-break.c: Ditto.
12284 * regcache.c: Ditto.
12285 * remote-utils.c: Ditto.
12286 * server.c: Ditto.
12287 * target.c: Ditto.
12288 * win32-low.c: Ditto.
12289
97438e3f
DE
122902008-12-12 Doug Evans <dje@google.com>
12291
896c7fbb
DE
12292 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12293 in debugging printf.
12294
97438e3f
DE
12295 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12296
e3b886f8
DE
122972008-12-09 Doug Evans <dje@google.com>
12298
12299 * linux-low.h (struct process_info): Delete member tid, unused.
12300 * thread-db.c (find_one_thread): Update.
12301 (maybe_attach_thread): Update.
12302
07e059b5
VP
123032008-12-02 Pedro Alves <pedro@codesourcery.com>
12304
889bf7c5
PA
12305 * target.h (struct target_ops): Add qxfer_osdata member.
12306 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12307 and dirent.h.
12308 (linux_qxfer_osdata): New functions.
12309 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12310 callback.
12311 * server.c (handle_query): Handle "qXfer:osdata:read:".
12312 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12313 (buffer_xml_printf): New functions.
12314 * server.h (struct buffer): New.
12315 (buffer_grow_str, buffer_grow_str0): New macros.
12316 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12317 (buffer_xml_printf): Declare.
07e059b5 12318
4cab47ab
DE
123192008-11-24 Doug Evans <dje@google.com>
12320
12321 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12322
f142445f
DJ
123232008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12324
12325 * server.c (handle_v_run): Always use the supplied argument list.
12326
d0107bb6 123272008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12328
d0107bb6
BW
12329 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12330 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12331
2c4ad781
TJB
123322008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12333
12334 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12335 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12336 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12337 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12338 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12339 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12340 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12341 XML target descriptions.
12342 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12343 when inferior is running on an ISA 2.05 or later processor. Add
12344 special case to return offset for full 64-bit slot of FPSCR when
12345 in 32-bits.
12346
dfb64f85
DJ
123472008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12348
12349 * Makefile.in (SFILES, clean): Added sparc64 files.
12350 (reg-sparc64.o, reg-sparc64.c): New.
12351 * configure.srv (sparc*-*-linux*): New configuration.
12352 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12353 syscall arguments for SPARC.
12354 (regsets_store_inferior_registers): Likewise.
12355 * linux-sparc-low.c: New file.
12356
66b6e1dd
DE
123572008-10-21 Doug Evans <dje@google.com>
12358
12359 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12360 (READLINE_DIR,READLINE_DEP): Delete.
12361 (INTERNAL_CFLAGS): Update.
12362 (LINTFLAGS): Update.
12363
9b710a42
PA
123642008-10-10 Pedro Alves <pedro@codesourcery.com>
12365
12366 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12367 whole argv from the last run, not just argv[0].
12368
5822d809
PA
123692008-09-08 Pedro Alves <pedro@codesourcery.com>
12370
12371 * regcache.c (new_register_cache): Return NULL if the register
12372 cache size isn't known yet.
12373 (free_register_cache): Avoid dereferencing a NULL regcache.
12374
74aac56f
DJ
123752008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12376
12377 * configure.srv: Merge MIPS and MIPS64.
12378
400b20f5
MR
123792008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12380
12381 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12382
677c5bb1
LM
123832008-08-18 Luis Machado <luisgpm@br.ibm.com>
12384
12385 * Makefile.in: Add required vsx dependencies.
12386
12387 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12388 Declare init_registers_powerpc_vsx32l.
12389 Declare init_registers_powerpc_vsx64l.
12390 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12391 (ppc_arch_setup): Check for VSX in hwcap.
12392 (ppc_fill_vsxregset): New function.
12393 (ppc_store_vsxregset): New function.
12394 Add new VSX entry in regset_info target_regsets.
12395
12396 * configure.srv: Add new VSX dependencies.
12397
a6f3e723
SL
123982008-08-12 Pedro Alves <pedro@codesourcery.com>
12399
12400 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12401 (remote_open): Set or clear transport_is_reliable.
12402 (putpkt_binary): Don't expect acks in noack mode.
12403 (getpkt): Don't send ack/nac in noack mode.
12404 * server.c (handle_general_set): Handle QStartNoAckMode.
12405 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12406 qSupported.
12407 (main): Reset noack_mode on every connection.
12408 * server.h (noack_mode): Declare.
12409
a417dc56
RW
124102008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12411
12412 * Makefile.in (GDBREPLAY_OBS): New variable.
12413 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12414
3221518c
UW
124152008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12416 Daniel Jacobowitz <dan@codesourcery.com>
12417
12418 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12419 (usr_store_inferior_registers): Likewise.
12420 (regsets_store_inferior_registers): Likewise.
12421
ec56be1b
PA
124222008-07-31 Rolf Jansen <rj@surtec.com>
12423 Pedro Alves <pedro@codesourcery.com>
12424
12425 * configure.ac: Check for memmem declaration.
12426 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12427 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12428 (disable_packet_qfThreadInfo): Unconditionally compile.
12429 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12430 * configure, config.in: Regenerate.
12431
2fe5e3ff
DE
124322008-07-28 Doug Kwan <dougkwan@google.com>
12433
12434 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12435 (linux_write_memory): Remove declaration of errno.
12436
836acd6d
UW
124372008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12438
12439 * linux-low.c (handle_extended_wait): Do not use "status"
12440 variable uninitialized.
12441
aeba519e
PA
124422008-07-07 Pedro Alves <pedro@codesourcery.com>
12443
12444 * server.c (handle_v_attach): Inhibit reporting dll changes.
12445
db42f210
PA
124462008-06-27 Pedro Alves <pedro@codesourcery.com>
12447
12448 * remote-utils.c (prepare_resume_reply): If requested, don't
12449 output "thread:TID" in the T stop reply.
12450
12451 * server.c (disable_packet_vCont, disable_packet_Tthread)
12452 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12453 (handle_query): If requested, disable support for qC, qfThreadInfo
12454 and qsThreadInfo.
12455 (handle_v_requests): If requested, disable support for vCont.
12456 (gdbserver_show_disableable): New.
12457 (main): Handle --disable-packet and --disable-packet=LIST.
12458
12459 * server.h (disable_packet_vCont, disable_packet_Tthread)
12460 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12461
8e4c5421
CD
124622008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12463
12464 * server.c (gdbserver_usage): Mention --version.
12465
6e23a804
DJ
124662008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12467
12468 * Makefile.in (gdbreplay.o): New rule.
12469
90aa6a40
JM
124702008-06-06 Joseph Myers <joseph@codesourcery.com>
12471
12472 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12473 message, not gdbserver.
12474
c16158bc 124752008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12476 Nathan Sidwell <nathan@codesourcery.com>
12477 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12478
12479 * acinclude.m4: Include ../../config/acx.m4.
12480 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12481 * configure, config.in: Regenerate.
12482 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12483 * server.c (gdbserver_version): Print PKGVERSION.
12484 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12485 (main): Adjust gdbserver_usage calls.
12486 * gdbreplay.c (version, host_name): Add declarations.
12487 (gdbreplay_version, gdbreplay_usage): New.
12488 (main): Accept --version and --help options.
12489
aeb75bf5
DJ
124902008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12491
12492 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12493 (arm_breakpoint_at): Handle Thumb.
12494 (the_low_target): Add comment.
12495
76b233dd
UW
124962008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12497
12498 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12499
08388c79
DE
125002008-05-09 Doug Evans <dje@google.com>
12501
a3c83fae
DE
12502 * server.h (decode_search_memory_packet): Declare.
12503 * remote-utils.c (decode_search_memory_packet): New fn.
12504 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12505 (handle_search_memory): New fn.
12506 (handle_query): Process qSearch:memory packets.
12507
bb9c3d36
UW
125082008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12509
12510 * regcache.c (registers_length): Remove.
12511 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12512 full register packet.
12513 * regcache.h (registers_length): Remove prototype.
12514 * server.h (PBUFSIZ): Define to 16384.
12515
7284e1be
UW
125162008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12517
12518 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12519 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12520 powerpc-64l.o, and powerpc-altivec64l.o.
12521 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12522 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12523 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12524 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12525 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12526 to srv_xmlfiles.
12527
12528 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12529 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12530 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12531 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12532 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12533 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12534 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12535 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12536 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12537 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12538 (clean): Update.
12539
12540 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12541 (init_registers_powerpc_32l): ... this new prototype.
12542 (init_registers_powerpc_32): Remove, replace by ...
12543 (init_registers_powerpc_altivec32l): ... this new prototype.
12544 (init_registers_powerpc_e500): Remove, replace by ...
12545 (init_registers_powerpc_e500l): ... this new prototype.
12546 (init_registers_ppc64): Remove, replace by ...
12547 (init_registers_powerpc_64l): ... this new prototype.
12548 (init_registers_powerpc_64): Remove, replace by ...
12549 (init_registers_powerpc_altivec64l): ... this new prototype.
12550 (ppc_num_regs): Set to 73.
12551 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12552 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12553 (ppc_cannot_store_register): Handle orig_r3 and trap.
12554 (ppc_arch_setup): Update init_registers_... calls.
12555 (ppc_fill_gregset): Handle orig_r3 and trap.
12556
12557 * inferiors.c (clear_inferiors): Reset current_inferior.
12558
fdc59709
PB
125592008-04-23 Paolo Bonzini <bonzini@gnu.org>
12560
889bf7c5
PA
12561 * acinclude.m4: Add override.m4.
12562 * configure: Regenerate.
fdc59709 12563
c9b2f845
UW
125642008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12565
12566 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12567 initial call to init_register_ppc64.
12568
550512b8
UW
125692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12570
43aaf8b6
PA
12571 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12572 single powerpc*-*-linux* case.
550512b8
UW
12573 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12574
b6430ec3
UW
125752008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12576
12577 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12578 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12579 from reg_xmlfiles.
12580 * linux-ppc-low.c: Include <elf.h>.
12581 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12582 (ppc_hwcap): New global variable.
12583 (ppc_regmap): Remove __SPE__ #ifdef sections.
12584 (ppc_regmap_e500): New global variable.
12585 (ppc_cannot_store_register): Update __SPE__ special case.
12586 (ppc_get_hwcap): New function.
12587 (ppc_arch_setup): Use it to determine whether inferior supports
12588 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12589 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12590 Do not access registers if target does not support AltiVec.
12591 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12592 Do not access registers if target does not support SPE.
12593 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12594
52fa2412
UW
125952008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12596
12597 * linux-low.c (disabled_regsets, num_regsets): New.
12598 (use_regsets_p): Delete.
12599 (linux_wait_for_process): Clear disabled_regsets.
12600 (regsets_fetch_inferior_registers): Check and set it.
12601 (regsets_store_inferior_registers): Likewise.
12602 (linux_fetch_registers, linux_store_registers): Do not use
12603 use_regsets_p.
12604 (initialize_low): Allocate disabled_regsets.
12605
e28b3332
DJ
126062008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12607
12608 * Makefile.in (LIBOBJS): New.
12609 (OBS): Use LIBOBJS.
12610 (memmem.o): New rule.
12611 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12612 * configure: Regenerated.
12613
4536995d
UW
126142008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12615
12616 * server.c (handle_query): Never return "unsupported" for
12617 qXfer:features:read queries.
12618
221c031f
UW
126192008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12620
12621 * server.c (get_features_xml): Fix inverted condition.
12622 (handle_query): Always support qXfer:feature:read.
12623
ccd213ac
DJ
126242008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12625
12626 * server.c (wrapper_argv): New.
12627 (start_inferior): Handle wrapper_argv. If set, expect an extra
12628 trap.
12629 (gdbserver_usage): Document --wrapper.
12630 (main): Parse --wrapper.
12631
6fe305f7
UW
126322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12633
12634 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12635 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12636 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12637 (ppc_set_pc): Likewise.
12638 (ppc_arch_setup): New function.
12639 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12640 of collect_register.
889bf7c5 12641 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12642
5b0a002e
UW
126432008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12644
12645 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12646 instead of linux-ppc64-low.o.
12647 * linux-ppc64-low.c: Remove file.
12648 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12649 (linux-ppc64-low.o): Remove rule.
12650
12651 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12652 (init_registers_powerpc_64): Likewise.
12653 (ppc_regmap): Conditionally define depending on __powerpc64__.
12654 (ppc_cannot_store_register): Do not special-case "fpscr" when
12655 compiled on __powerpc64__.
12656 (ppc_collect_ptrace_register): New function.
12657 (ppc_supply_ptrace_register): New function.
12658 (ppc_breakpoint): Change type to "unsigned int".
12659 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12660 (the_low_target): Conditionally provide initializers for the
889bf7c5 12661 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12662 collect_ptrace_register and supply_ptrace_register members.
12663
9b4b61c8
UW
126642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12665
12666 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12667 * server.c (gdbserver_xmltarget): Define.
12668 (get_features_xml): Use it to replace "target.xml" and arch_string.
12669
12670 * configure.srv: Remove srv_xmltarget. Add XML files that were
12671 mentioned there to srv_xmlfiles instead. Remove conditional tests
12672 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12673 srv_xmlfiles and srv_regobj to include all possible choices.
12674 * configure.ac (srv_xmltarget): Remove.
12675 (srv_xmlfiles): Do not add "target.xml".
12676 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12677 checks for supplementary target information.
12678 * configure: Regenerate.
12679 * Makefile.in (XML_TARGET): Remove.
12680 (target.xml): Remove rule.
12681 (clean): Do not clean up target.xml.
12682 (.PRECIOUS): Do not mention target.xml.
12683
12684 * target.h (struct target_ops): Remove arch_string member.
12685 * linux-low.c (linux_arch_string): Remove.
12686 (linux_target_ops): Remove arch_string initializer.
12687 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12688 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12689 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12690 * spu-low.c (spu_arch_string): Remove.
12691 (spu_target_ops): Remove arch_string initializer.
12692 * win32-low.c (win32_arch_string): Remove.
12693 (win32_target_ops): Remove arch_string initializer.
12694 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12695 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12696 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12697
ee1a7ae4
UW
126982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12699
12700 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12701 by collect_ptrace_register and supply_ptrace_register hooks.
12702 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12703 instead of checking for the_low_target.left_pad_xfer.
12704 (usr_store_inferior_registers): Use collect_ptrace_register callback
12705 instead of checking for the_low_target.left_pad_xfer.
12706
12707 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12708 (s390_supply_ptrace_register): Likewise.
12709 (s390_fill_gregset): Call s390_collect_ptrace_register.
12710 (the_low_target): Update.
12711
12712 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12713 (ppc_supply_ptrace_register): Likewise.
12714 (the_low_target): Update.
12715
12716 * linux-i386-low.c (the_low_target): Update.
12717 * linux-x86-64-low.c (the_low_target): Update.
12718
d61ddec4
UW
127192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12720
12721 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12722 reg-s390.o and reg-s390x.o.
12723
12724 * linux-low.c (new_inferior): New global variable.
12725 (linux_create_inferior, linux_attach): Set it.
12726 (linux_wait_for_process): Call the_low_target.arch_setup after the
12727 target has stopped for the first time.
12728 (initialize_low): Do not call the_low_target.arch_setup.
12729
12730 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12731 (s390_set_pc): Likewise.
12732 (s390_arch_setup): New function.
12733 (the_low_target): Use s390_arch_setup as arch_setup routine.
12734
12735 * regcache.c (realloc_register_cache): New function.
12736 (set_register_cache): Call it for each existing regcache.
12737
d05b4ac3
UW
127382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12739
12740 * server.h (init_registers): Remove prototype.
12741
12742 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12743 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12744 instead of init_registers ().
12745 * linux-arm-low.c (init_registers_arm): Add prototype.
12746 (init_registers_arm_with_iwmmxt): Likewise.
12747 (the_low_target): Add initializer for arch_setup field.
12748 * linux-cris-low.c (init_registers_cris): Add prototype.
12749 (the_low_target): Add initializer for arch_setup field.
12750 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12751 (the_low_target): Add initializer for arch_setup field.
12752 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12753 (the_low_target): Add initializer for arch_setup field.
12754 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12755 (the_low_target): Add initializer for arch_setup field.
12756 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12757 (the_low_target): Add initializer for arch_setup field.
12758 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12759 (the_low_target): Add initializer for arch_setup field.
12760 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12761 (init_registers_mips64_linux): Likewise.
12762 (the_low_target): Add initializer for arch_setup field.
12763 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12764 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12765 (the_low_target): Add initializer for arch_setup field.
12766 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12767 (init_registers_powerpc_64): Likewise.
12768 (the_low_target): Add initializer for arch_setup field.
12769 * linux-s390-low.c (init_registers_s390): Add prototype.
12770 (init_registers_s390x): Likewise.
12771 (the_low_target): Add initializer for arch_setup field.
12772 * linux-sh-low.c (init_registers_sh): Add prototype.
12773 (the_low_target): Add initializer for arch_setup field.
12774 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12775 (the_low_target): Add initializer for arch_setup field.
12776 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12777 (the_low_target): Add initializer for arch_setup field.
12778
12779 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12780 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12781 instead of init_registers ().
12782 * win32-arm-low.c (init_registers_arm): Add prototype.
12783 (the_low_target): Add initializer for arch_setup field.
12784 * win32-i386-low.c (init_registers_i386): Add prototype.
12785 (the_low_target): Add initializer for arch_setup field.
12786
12787 * spu-low.c (init_registers_spu): Add prototype.
12788 (initialize_low): Call initialie_registers_spu () instead of
12789 initialize_registers ().
12790
fd96d250
PA
127912008-02-19 Pedro Alves <pedro@codesourcery.com>
12792
12793 * server.c (handle_v_requests): When handling the vRun and vAttach
12794 packets, if already debugging a process, don't kill it. Return an
12795 error instead.
12796
d41b6bb4
DJ
127972008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12798
12799 * server.c (handle_query): Correct length check.
12800
5ac588cf
PA
128012008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12802
12803 * win32-low.c (do_initial_child_stuff): Add process handle
12804 parameter. Set current_process_handle and current_process_id from the
12805 parameters. Clear globals.
12806 (win32_create_inferior): Don't set current_process_handle and
12807 current_process_id here. Instead pass them on the call to
12808 do_initial_child_stuff.
12809 (win32_attach): Likewise.
12810 (win32_clear_inferiors): New.
12811 (win32_kill): Don't close the current process handle or the
12812 current thread handle here. Instead call win32_clear_inferiors.
12813 (win32_detach): Don't open a new handle to the process. Call
12814 win32_clear_inferiors.
12815 (win32_join): Don't rely on current_process_handle; open a new
12816 handle using the process id.
12817 (win32_wait): Call win32_clear_inferiors when the inferior process
12818 has exited.
12819
ecd7ecbc
DJ
128202008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12821
12822 * server.c (monitor_show_help): Add "exit".
12823
1525d545
MG
128242008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12825
ecd7ecbc 12826 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12827 (clean): Add reg-xtensa.c.
12828 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12829 * configure.srv (xtensa*-*-linux*) New target.
12830 * linux-xtensa-low.c: New.
12831 * xtensa-xtregs.c: New.
1525d545 12832
59a016f0
PA
128332008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12834
12835 * hostio.c: Don't include errno.h.
12836 (errno_to_fileio_errno): Move to hostio-errno.
12837 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12838 error number outputting to the target->hostio_last_error callback.
12839 (hostio_packet_error): Use FILEIO_EINVAL directly.
12840 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12841 calls to hostio_error.
12842 * hostio-errno.c: New.
12843 * server.h (hostio_last_error_from_errno): Declare.
12844 * target.h (target_ops): Add hostio_last_error member.
12845 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12846 as hostio_last_error handler.
889bf7c5 12847 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12848 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12849 (wince_hostio_last_error): New functions.
12850 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12851 as hostio_last_error handler.
12852 (win32_target_ops) [!_WIN32_WCE]: Register
12853 hostio_last_error_from_errno as hostio_last_error handler.
12854 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12855 (hostio-errno.o): New rule.
12856 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12857 * configure.srv (srv_hostio_err_objs): New variable. Default to
12858 hostio-errno.o.
12859 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12860 * configure: Regenerate.
12861
2d717e4f
DJ
128622008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12863
12864 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12865 (linux_kill, linux_detach): Clean up the process list.
12866 * remote-utils.c (remote_open): Improve port number parsing.
12867 (putpkt_binary, input_interrupt): Only send interrupts if the target
12868 is running.
12869 * server.c (extended_protocol): Make static.
12870 (attached): Define earlier.
12871 (exit_requested, response_needed, program_argv): New variables.
12872 (target_running): New.
12873 (start_inferior): Clear attached here.
12874 (attach_inferior): Set attached here.
12875 (require_running): Define.
12876 (handle_query): Use require_running and target_running. Implement
12877 "monitor exit".
12878 (handle_v_attach, handle_v_run): New.
12879 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12880 (gdbserver_usage): Update.
12881 (main): Redo argument parsing. Handle --debug and --multi. Handle
12882 --attach along with other options or after the port. Save
12883 program_argv. Support no initial program. Resynchronize
12884 communication with GDB after an error. Handle "monitor exit".
12885 Use require_running and target_running. Always allow the extended
12886 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12887 restart in extended mode.
12888 * README: Refer to the GDB manual. Update --attach usage.
12889
7407e2de
AS
128902007-12-20 Andreas Schwab <schwab@suse.de>
12891
12892 * linux-low.c (STACK_SIZE): Define.
12893 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12894 (linux_test_for_tracefork): Likewise.
12895
b65d95c5
DJ
128962007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12897
12898 * linux-low.c (linux_wait_for_event): Update messages. Do not
12899 reinsert auto-delete breakpoints.
12900 * mem-break.c (struct breakpoint): Change return type of handler to
12901 int.
12902 (set_breakpoint_at): Update handler type.
12903 (reinsert_breakpoint_handler): Return 1 instead of calling
12904 delete_breakpoint.
12905 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12906 setting a new one.
12907 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12908 * mem-break.h (set_breakpoint_at): Update handler type.
12909 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12910 * win32-low.c (auto_delete_breakpoint): New.
12911 (get_child_debug_event): Use it.
12912
4e799345
DJ
129132007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12914
12915 * configure.ac: Check for pread and pwrite.
12916 * hostio.c (handle_pread): Fall back to lseek and read.
12917 (handle_pwrite): Fall back to lseek and write.
12918 * config.in, configure: Regenerated.
12919
27524b67
DJ
129202007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12921
12922 * server.c (myresume): Add own_buf argument.
12923 (main): Update calls.
12924
a20d5e98
DJ
129252007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12926
12927 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12928 * remote-utils.c (remote_open): Do not call disable_async_io.
12929 (block_async_io): Delete.
12930 (unblock_async_io): Make static.
12931 (initialize_async_io): New.
12932 * server.c (handle_v_cont): Handle async I/O here.
12933 (myresume): Likewise. Move other common resume tasks here...
12934 (main): ... from here. Call initialize_async_io. Disable async
12935 I/O before the main loop.
12936 * server.h (initialize_async_io): Declare.
12937 (block_async_io, unblock_async_io): Delete prototypes.
12938 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12939
b79d787e
DJ
129402007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12941
12942 * remote-utils.c (readchar): Allow binary data in received messages.
12943
d97903b2
PA
129442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12945
12946 * win32-low.c (attaching): New global.
12947 (win32_create_inferior): Clear the `attaching' global.
12948 (win32_attach): Set the `attaching' global.
12949 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12950 attaching. Only set a breakpoint at the entry point if not
12951 attaching.
12952
311de423
PA
129532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12954
12955 * server.c (main): Don't report dll events on the initial
12956 connection on attaches.
12957
6c2d16d2
PA
129582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12959
12960 * server.c (main): Relax numerical bases supported for the pid of
12961 the --attach command line argument.
12962
5ca906e6
PA
129632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12964
12965 * win32-low.c (win32_attach): Call OpenProcess before
12966 DebugActiveProcess, not after. Add last error output to error
12967 call.
12968
9c6c8194
PA
129692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12970
12971 * win32-low.c (win32_get_thread_context)
12972 (win32_set_thread_context): New functions.
12973 (thread_rec): Use win32_get_thread_context.
12974 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12975 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12976 field.
12977
4d5d1aaa
PA
129782007-12-03 Leo Zayas
12979 Pedro Alves <pedro_alves@portugalmail.pt>
12980
12981 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12982 global variables.
12983 (child_add_thread): Minor cleanup.
12984 (child_continue): Resume artificially suspended threads before
12985 calling ContinueDebugEvent.
12986 (suspend_one_thread): New.
12987 (fake_breakpoint_event): New.
12988 (get_child_debug_event): Change return type to int. Check here if
12989 gdb sent an interrupt request. If a soft interrupt was requested,
12990 fake a breakpoint event. Return 0 if there is no event to handle,
12991 and 1 otherwise.
12992 (win32_wait): Don't check here if gdb sent an interrupt request.
12993 Ensure there is a valid event to handle.
12994 (win32_request_interrupt): Add soft interruption method as last
12995 resort.
12996
c436e841
PA
129972007-12-03 Leo Zayas
12998 Pedro Alves <pedro_alves@portugalmail.pt>
12999
13000 * win32-low.h (win32_thread_info): Add descriptions to the
13001 structure members. Replace `suspend_count' counter by a
13002 `suspended' flag.
13003 * win32-low.c (thread_rec): Update condition of when to get the
13004 context from the inferior. Rely on ContextFlags being set if it
13005 has already been retrieved. Only suspend the inferior thread if
13006 we haven't already. Warn if that fails.
13007 (continue_one_thread): s/suspend_count/suspended/. Only call
13008 ResumeThread once. Warn if that fails.
13009
e7b5fa67
PA
130102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13011
13012 * win32-low.c (win32_wait): Don't read from the inferior when it
13013 has already exited.
13014
a385171d
PA
130152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13016
13017 * Makefile.in (win32_low_h): New variable.
13018 (win32-low.o): Add dependency on $(win32_low_h).
13019 (win32-arm-low.o, win32-i386-low.o): New rules.
13020
f80c84b3
DJ
130212007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13022
13023 * hostio.c: Correct copyright year.
13024
a6b151f1
DJ
130252007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13026
13027 * Makefile.in (OBS): Add hostio.o.
13028 (hostio.o): New rule.
13029 * server.h (handle_vFile): Declare.
13030 * hostio.c: New file.
13031 * server.c (handle_v_requests): Take packet_len and new_packet_len
13032 for binary packets. Call handle_vFile.
13033 (main): Update call to handle_v_requests.
13034
f9387fc3
DJ
130352007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13036
13037 * linux-low.c: Include <sched.h>.
13038
51c2684e
DJ
130392007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13040
13041 * linux-low.c (linux_tracefork_grandchild): New.
13042 (linux_tracefork_child): Use clone.
13043 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13044
75f83163
JB
130452007-10-31 Joel Brobecker <brobecker@adacore.com>
13046
13047 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13048
da5898ce
DJ
130492007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13050
13051 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13052
24a09b5f
DJ
130532007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13054
13055 * inferiors.c (change_inferior_id): Delete.
13056 (add_pid_to_list, pull_pid_from_list): New.
13057 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13058 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13059 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13060 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13061 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13062 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13063 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13064 (using_threads): Always set to 1.
13065 (handle_extended_wait): New.
13066 (add_process): Do not set TID.
13067 (linux_create_inferior): Set must_set_ptrace_flags.
13068 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13069 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13070 (linux_thread_alive): Rename TID argument to LWPID.
13071 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13072 (linux_wait_for_event): Do not use TID or check using_threads. Update
13073 call to dead_thread_notify. Call handle_extended_wait.
13074 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13075 (send_sigstop): Delete sigstop_sent.
13076 (wait_for_sigstop): Avoid TID.
13077 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13078 (linux_test_for_tracefork): New.
13079 (linux_lookup_signals): Use thread_db_active and
13080 linux_supports_tracefork_flag.
13081 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13082 * linux-low.h (get_process_thread): Avoid TID.
13083 (struct process_ifo): Move thread_known and tid to the end. Remove
13084 sigstop_sent.
13085 (linux_attach_lwp, thread_db_init): Update prototypes.
13086 * server.h (change_inferior_id): Delete prototype.
13087 (add_pid_to_list, pull_pid_from_list): New prototypes.
13088 * thread-db.c (thread_db_use_events): New.
13089 (find_first_thread): Rename to...
13090 (find_one_thread): ...this. Update callers and messages. Do not
13091 call fatal. Check thread_db_use_events. Do not call
13092 change_inferior_id or new_thread_notify.
13093 (maybe_attach_thread): Update. Do not call new_thread_notify.
13094 (thread_db_init): Set thread_db_use_events. Check use_events.
13095 * utils.c (fatal, warning): Correct message prefix.
13096
30ed0a8f
DJ
130972007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13098
13099 * Makefile.in (clean): Remove new files.
13100 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13101 (powerpc-64.o, powerpc-64.c): New rules.
13102 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13103 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13104 with SPE.
13105 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13106 SPE targets.
13107 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13108 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13109 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13110 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13111 (target_regsets): Add AltiVec and SPE register sets.
13112 * configure.ac: Check for AltiVec and SPE.
13113 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13114 (ppc_fill_vrregset, ppc_store_vrregset): New.
13115 (target_regsets): Add AltiVec register set.
13116 * configure: Regenerated.
13117
fd462a61
DJ
131182007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13119
13120 * linux-low.c (O_LARGEFILE): Define.
13121 (linux_read_memory): Use /proc/PID/mem.
13122 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13123 * configure, config.in: Regenerated.
13124
69f223ed
DJ
131252007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13126
13127 * linux-low.c (linux_wait_for_event): Do not pass signals while
13128 single-stepping.
13129
aec18585
PA
131302007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13131
13132 * win32-low.c (create_process): New.
13133 (win32_create_inferior): Use create_process instead of
13134 CreateProcess. If create_process failed retry appending an ".exe"
13135 suffix. Store the GetLastError result immediatelly after
13136 create_process calls and use it on the call to error.
13137
34d86ddd
PA
131382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13139
13140 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13141
5a0e3bd0
JB
131422007-08-23 Joel Brobecker <brobecker@adacore.com>
13143
13144 * configure.ac: Switch license to GPLv3.
13145
f88c79e6
MS
131462007-08-01 Michael Snyder <msnyder@access-company.com>
13147
13148 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13149
6b3d9b83
PA
131502007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13151
13152 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13153 typedef.
13154 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13155 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13156 CloseToolhelp32Snapshot.
13157 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13158 CloseToolhelp32Snapshot.
13159
c588c53c
MS
131602007-07-27 Michael Snyder <michael.snyder@access-company.com>
13161
13162 * server.c (main): Check for inferior exit before main loop.
13163
aa0403d9
PA
131642007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13165
13166 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13167 instead of on tmp_desc.
13168
255e7678
DJ
131692007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13170 Daniel Jacobowitz <dan@codesourcery.com>
13171
13172 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13173 (add_thread): Minor cleanups.
13174 (clear_inferiors): Move lower in the file. Clear the DLL
13175 list.
13176 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13177 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13178 (xml_escape_text): New.
13179 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13180 for qSupported.
13181 (handle_v_cont): Report errors.
13182 (gdbserver_version): Update.
13183 (main): Correct size of own_buf. Do not report initial DLL events.
13184 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13185 (unloaded_dll, xml_escape_text): New.
13186 * win32-low.c (enum target_waitkind): Update comments.
13187 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13188 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13189 (win32_EnumProcessModules, win32_GetModuleInformation)
13190 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13191 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13192 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13193 (win32_Module32First, win32_Module32Next, load_toolhelp)
13194 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13195 (get_child_debug_event): Handle DLL events.
13196 (win32_wait): Likewise.
13197
0d37add9
DJ
131982007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13199
13200 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13201 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13202
45e2715e
PA
132032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13204
13205 * win32-low.c (handle_output_debug_string): Ignore event if not
13206 waiting.
13207
c5674cf1
PA
132082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13209
13210 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13211
2bbe3cc1
DJ
132122007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13213
13214 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13215
ae13219e
DJ
132162007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13217
13218 * inferiors.c (change_inferior_id): Add comment.
13219 * linux-low.c (check_removed_breakpoint): Add an early
13220 prototype. Improve debug output.
13221 (linux_attach): Doc update.
13222 (linux_detach_one_process, linux_detach): Clean up before releasing
13223 each process.
13224 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13225 * linux-low.h (struct process_info): Doc improvement.
13226 * mem-break.c (delete_all_breakpoints): New.
13227 * mem-break.h (delete_all_breakpoints): New prototype.
13228 * thread-db.c (find_first_thread): New.
13229 (thread_db_create_event): Call it instead of
13230 thread_db_find_new_threads. Clean up unused variables.
13231 (maybe_attach_thread): Remove first thread handling.
13232 (thread_db_find_new_threads): Use find_first_thread.
13233 (thread_db_get_tls_address): Likewise.
13234
4105de34
DJ
132352007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13236
13237 * thread-db.c (thread_db_find_new_threads): Add prototype.
13238 (thread_db_create_event): Check for the main thread before adding
13239 a new thread.
13240 (maybe_attach_thread): Only enable event reporting if TID == 0.
13241 (thread_db_get_tls_address): Check for new threads.
13242
2b876972
DJ
132432007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13244
13245 * linux-low.c (linux_create_inferior): Try execv before execvp.
13246 * spu-low.c (spu_create_inferior): Likewise.
13247
7a245884
DJ
132482007-06-13 Mike Frysinger <vapier@gentoo.org>
13249
13250 * linux-low.c (linux_create_inferior): Change execv to execvp.
13251 * spu-low.c (spu_create_inferior): Likewies.
13252
117ce543
DJ
132532007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13254
13255 * Makefile.in (clean): Clean new files instead of deleted ones.
13256 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13257 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13258 rules.
13259 * configure.srv: Specify XML files and new regformats for MIPS and
13260 MIPS64 GNU/Linux.
13261 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13262 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13263 an entry for the restart register.
13264 (mips_cannot_fetch_register, mips_cannot_store_register)
13265 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13266 register names to match the XML descriptions.
13267 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13268 restart register instead of $0.
13269
0e7f50da
UW
132702007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13271 Markus Deuling <deuling@de.ibm.com>
13272
13273 * remote-utils.c (decode_xfer_write): New function.
13274 * server.h (decode_xfer_write): Add prototype.
13275 * server.c (handle_query): Add PACKET_LEN argument. Support
13276 qXfer:spu:read and qXfer:spu:write packets.
13277 (main): Pass packet_len to handle_query.
13278 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13279 * target.h (target_ops): Add qxfer_spu.
13280
374c1d38
UW
132812007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13282
13283 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13284 accessing non-seekable spufs files.
13285
bb63802a
UW
132862007-05-16 Markus Deuling <deuling@de.ibm.com>
13287
889bf7c5 13288 * server.c (handle_query): Add reply for qC packet.
bb63802a 13289
7390519e
PA
132902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13291 Leo Zayas <lerele@champenstudios@com>
13292
13293 * server.h (check_remote_input_interrupt_request): New function.
13294 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13295 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13296 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13297 (check_remote_input_interrupt_request): New function.
13298 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13299 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13300 winapi_GenerateConsoleCtrlEvent): New typedefs.
13301 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13302 to 250 ms.
13303 (win32_wait): Check for remote interrupt request
13304 with check_remote_input_interrupt_request.
13305 (win32_request_interrupt): New function.
13306 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13307
34b34921
PA
133082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13309
13310 * win32-low.c (debug_registers_changed,
13311 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13312 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13313 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13314 (thread_rec): Get context using the low target.
13315 (child_add_thread): Call thread_added on the low target,
13316 which does the same thing.
13317 (regptr): Delete.
13318 (do_initial_child_stuff): Remove debug registers references.
13319 Set context using the low target. Resume threads after
13320 setting the contexts.
13321 (child_continue): Remove dead variable. Remove debug
13322 registers references.
13323 (child_fetch_inferior_registers): Go through the low target.
13324 (do_child_store_inferior_registers): Remove.
13325 (child_store_inferior_registers): Go through the low target.
13326 (win32_resume): Remove debug registers references.
13327 Set context using the low target.
13328 (handle_exception): Change return type to void. Don't record
13329 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13330 first chance exception.
889bf7c5 13331 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13332 goto loop. Always return after waiting for debug event.
13333 (win32_wait): Convert to switch statement. Handle spurious
13334 events.
13335
13336 * win32-i386-low.c (debug_registers_changed,
13337 debug_registers_used): New.
13338 (initial_stuff): Rename to ...
13339 (i386_initial_stuff): ... this. Clear debug registers
13340 state variables.
13341 (store_debug_registers): Delete.
13342 (i386_get_thread_context): New.
13343 (load_debug_registers): Delete.
13344 (i386_set_thread_context): New.
13345 (i386_thread_added): New.
13346 (single_step): Rename to ...
13347 (i386_single_step): ... this.
13348 (do_fetch_inferior_registers): Rename to ...
13349 (i386_fetch_inferior_register): ... this.
13350 (i386_store_inferior_register): New.
13351 (the_low_target): Adapt to new interface.
13352
13353 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13354 (arm_get_thread_context): New.
13355 (arm_set_thread_context): New.
13356 (regptr): New.
13357 (do_fetch_inferior_registers): Rename to ...
13358 (arm_fetch_inferior_register): ... this.
13359 (arm_store_inferior_register): New.
13360 (arm_wince_breakpoint): Reimplement as unsigned long.
13361 (arm_wince_breakpoint_len): Define.
13362 (the_low_target): Adapt to new interface.
13363
13364 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13365 load_debug_registers. Add get_thread_context, set_thread_context,
13366 thread_added and store_inferior_register. Rename
13367 fetch_inferior_registers to fetch_inferior_register.
13368 (regptr): Remove declaration.
13369
dd6953e1
PA
133702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13371
13372 * linux-low.c (linux_detach): Change return type to int. Return 0.
13373 * spu-low.c (spu_detach): Likewise.
13374
444d6139
PA
133752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13376
13377 * target.h (target_ops): Change return type of detach to int.
13378 Add join.
13379 (join_inferior): New.
13380 * server.c (main): Don't skip detach support on mingw32.
13381 If the inferior doesn't support detaching return error.
13382 Call join_inferior instead of using waitpid.
13383 * linux-low.c (linux_join): New.
13384 (linux_target_op): Add linux_join.
13385 * spu-low.c (spu_join): New.
13386 (spu_target_ops): Add spu_join.
13387 * win32-low.c (win32_detach): Adapt to new interface.
13388 Reopen current_process_handle before detaching. Issue a child
13389 resume before detaching.
13390 (win32_join): New.
13391 (win32_target_op): Add win32_join.
13392
1d5315fe
PA
133932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13394
13395 * win32-low.c (win32-attach): Fix return value.
13396 * target.h (target_ops): Describe ATTACH return values.
13397
bf914831
PA
133982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13399
13400 * win32-low.c (GETPROCADDRESS): Define.
13401 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13402 (winapi_DebugSetProcessKillOnExit): Likewise.
13403 (win32_create_inferior): Force usage of ansi CreateProcessA.
13404 (win32_attach): Use GETPROCADDRESS.
13405 (win32_detach): Likewise.
13406
f72f3e60
PA
134072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13408
13409 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13410
ed50f18f
PA
134112007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13412
13413 * win32-low.c: Commit leftover changes from 2007-03-29.
13414
0c2ead7e
DJ
134152007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13416
13417 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13418 fields short instead of int. Add explicit padding.
13419 (i387_cache_to_fsave): Remove unnecessary casts.
13420 (i387_fsave_to_cache): Doc fix.
13421 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13422
73725ff3
DJ
134232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13424
13425 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13426 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13427
d99f33d8
PA
134282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13429
13430 * configure.srv (arm*-*-mingw32ce*): Move near the other
13431 arm targets.
13432
68070c10
PA
134332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13434
2482afc6 13435 * configure.ac: Add errno checking.
68070c10
PA
13436 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13437 sys/file.h and malloc.h.
13438 (AC_CHECK_DECLS): Add perror.
13439 (srv_mingwce): Handle.
2482afc6 13440 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13441 win32-i386-low.o to srv_tgtobj.
13442 (i[34567]86-*-mingw*): Likewise.
13443 (arm*-*-mingw32ce*): Add case.
13444 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13445 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13446 [__MINGW32CE__] (strerror): New function.
13447 [__MINGW32CE__] (errno): Define to GetLastError.
13448 [__MINGW32CE__] (COUNTOF): New macro.
13449 (remote_open): Remove extra close call.
13450 * mem-break.c (delete_breakpoint_at): New function.
13451 * mem-break.h (delete_breakpoint_at): Declare.
13452 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13453 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13454 [USE_WIN32API] (read, write): Add char* casts.
13455 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13456 * server.h: Include wincecompat.h on Windows CE.
13457 [HAVE_ERRNO_H]: Check.
13458 (perror): Declare if not declared.
13459 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13460 (perror_with_name): Remove errno declaration.
13461 * wincecompat.h: New.
13462 * wincecompat.c: New.
13463 * win32-low.h: New.
13464 * win32-arm-low.c: New.
13465 * win32-i386-low.c: New.
13466 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13467 (OUTMSG2): Make it safe.
13468 (_T): New macro.
13469 (COUNTOF): New macro.
13470 (NUM_REGS): Get it from the low target.
13471 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13472 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13473 (thread_rec): Let low target handle debug registers.
13474 (child_add_thread): Likewise.
13475 (child_init_thread_list): Likewise.
13476 (continue_one_thread): Likewise.
13477 (regptr): New.
13478 (do_child_fetch_inferior_registers): Move to ...
13479 * win32-i386-low.c: ... here, and rename to ...
13480 (do_fetch_inferior_registers): ... this.
889bf7c5 13481 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13482 Go through the low target.
13483 (do_child_store_inferior_registers): Use regptr.
13484 (strwinerror): New function.
13485 (win32_create_inferior): Handle Windows CE.
13486 Use strwinerror instead of strerror on Windows error
13487 codes. Add program to the error output.
13488 Don't close the main thread handle on Windows CE.
13489 (win32_attach): Use coredll.dll on Windows CE.
13490 (win32_kill): Close current process and current
13491 thread handles.
13492 (win32_detach): Use coredll.dll on Windows CE.
13493 (win32_resume): Let low target handle debug registers, and
13494 step request.
13495 (handle_exception): Add/Remove initial breakpoint. Avoid
13496 non-existant WSTOPSIG on Windows CE.
13497 (win32_read_inferior_memory): Cast to remove warning.
13498 (win32_arch_string): Go through the low target.
13499 (initialize_low): Call set_breakpoint_data with the low
13500 target's breakpoint.
13501 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13502 FOP_REGNUM, mappings): Move to ...
13503 * win32-i386-low.c: ... here.
13504 * win32-low.c (win32_thread_info): Move to ...
13505 * win32-low.h: ... here.
13506 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13507 win32-arm-low.c and wincecompat.c.
13508 (all:): Add $EXEEXT.
13509 (install-only:): Likewise.
13510 (gdbserver:): Likewise.
13511 (gdbreplay:): Likewise.
13512 * config.in: Regenerate.
13513 * configure: Regenerate.
13514
41093d81
PA
135152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13516
13517 * win32-low.c: Rename typedef thread_info to
13518 win32_thread_info throughout.
13519
544afa54
PA
135202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13521
13522 * win32-i386-low.c: Rename to ...
13523 * win32-low.c: ... this.
13524 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13525 * Makefile.in: Likewise.
13526
bce7165d
PA
135272007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13528
13529 * remote-utils.c (monitor_output): Constify msg parameter.
13530 * server.h (monitor_output): Likewise.
13531 * win32-i386-low.c (handle_output_debug_string): New.
13532 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13533 handle_output_debug_string.
13534 (get_child_debug_event): Likewise.
13535
506c7aa0
DJ
135362007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13537
13538 * server.c (main): Correct strtoul check.
13539
42c81e2a
DJ
135402007-03-27 Jon Ringle <jon@ringle.org>
13541
13542 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13543
9453113a
DJ
135442007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13545
13546 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13547
64a69107
DJ
135482007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13549
13550 * terminal.h: Check HAVE_SGTTY_H.
13551
135522007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13553
13554 * remote-utils.c (remote_open): Print out the assigned port number.
13555
c74d0ad8
DJ
135562007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13557
13558 * remote-utils.c (monitor_output): New function.
13559 * server.c (debug_threads): Define here.
13560 (monitor_show_help): New function.
13561 (handle_query): Handle qRcmd.
13562 (main): Do not handle 'd' packet.
13563 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13564 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13565 of debug_threads.
13566
de7c3b4a
PA
135672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13568
13569 * Makefile.in (EXEEXT): New.
13570 (clean): Use $(EXEEXT).
13571
ef57601b
PA
135722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13573
13574 * target.h (target_ops): Rename send_signal to request_interrupt,
13575 and remove enum target_signal parameter.
13576 * linux-low.c (linux_request_interrupt): Rename from
13577 linux_send_signal, and always send SIGINT.
13578 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13579 and always send SIGINT.
13580 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13581 of send_signal.
13582 (input_interrupt): Likewise.
13583
820f2bda
PA
135842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13585
13586 * server.c (get_features_xml): Check if target implemented
13587 arch_string.
13588 * win32-i386-low.c (win32_arch_string): New.
13589 (win32_target_ops): Add win32_arch_string as arch_string member.
13590
ab39bf24
UW
135912007-02-22 Markus Deuling <deuling@de.ibm.com>
13592
13593 * spu-low.c (spu_arch_string): New.
13594 (spu_target_ops): Add spu_arch_string.
13595
61ff6e04
DJ
135962007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13597
13598 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13599 * configure.ac: Do not check for terminal.h.
13600 * configure, config.in: Regenerated.
13601
fb1e4ffc
DJ
136022007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13603
13604 * Makefile.in (OBS): Add $(XML_BUILTIN).
13605 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13606 (clean): Update.
13607 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13608 (arm-with-iwmmxt.c): New.
13609 * config.in, configure: Regenerate.
13610 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13611 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13612 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13613 (arm*-*-linux*): Add iWMMXt and regset support.
13614 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13615 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13616 (arm_store_wmmxregset, target_regsets): New.
13617 * server.c (get_features_xml): Take annex argument. Check builtin
13618 XML documents.
13619 (handle_query): Handle multiple annexes.
13620
0f48aa01
DJ
136212007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13622
13623 * remote-utils.c [USE_WIN32API] (read, write): Define.
13624 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13625 write.
13626
23181151
DJ
136272007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13628
13629 * linux-i386-low.c (the_low_target): Set arch_string.
13630 * linux-x86-64-low.c (the_low_target): Likewise.
13631 * linux-low.c (linux_arch_string): New.
13632 (linux_target_ops): Add it.
13633 * linux-low.h (struct linux_target_ops): Add arch_string.
13634 * server.c (write_qxfer_response): Use const void * for DATA.
13635 (get_features_xml): New.
13636 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13637 * target.h (struct target_ops): Add arch_string method.
13638
9d606399
DJ
136392007-01-03 Denis Pilat <denis.pilat@st.com>
13640 Daniel Jacobowitz <dan@codesourcery.com>
13641
13642 * linux-low.c (linux_kill): Handle being called with no threads.
13643 * win32-i386-low.c (win32_kill): Likewise.
13644 (get_child_debug_event): Clear current_process_handle.
13645
136462006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13647 Daniel Jacobowitz <dan@codesourcery.com>
13648
13649 * remote-utils.c (remote_open): Check the type of specified
13650 serial port devices before opening them.
13651 * server.c (main): Kill the inferior if an error occurs during
13652 the first remote_open.
13653
a5e13d24
DJ
136542006-12-05 Markus Deuling <deuling@de.ibm.com>
13655
13656 * README: Update supported targets.
13657
186947f7
DJ
136582006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13659
13660 * Makefile.in (clean): Remove reg-mips64.c.
13661 (reg-mips64.c, reg-mips64.o): New rules.
13662 * configure.srv: Handle mips64. Include regset support for mips.
13663 * linux-mips-low.c (union mips_register): New.
13664 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13665 (mips_breakpoint, mips_breakpoint_at): Use int.
13666 (mips_collect_register, mips_supply_register)
13667 (mips_collect_register_32bit, mips_supply_register_32bit)
13668 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13669 (mips_store_fpregset, target_regsets): New.
13670 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13671
a13e2c95
UW
136722006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13673
13674 * configure.srv: Add target "spu*-*-*".
13675 * Makefile.in (clean): Remove reg-spu.c.
13676 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13677 * spu-low.c: New file.
13678
cb7283db
DJ
136792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13680
13681 * configure.ac: Correct td_thr_tls_get_addr test.
13682 * configure: Regenerated.
13683
89be2091
DJ
136842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13685
13686 * linux-low.c (linux_wait_for_event): Reformat. Use the
13687 pass_signals array.
13688 * remote-utils.c (decode_address_to_semicolon): New.
13689 * server.c (pass_signals, handle_general_set): New.
13690 (handle_query): Mention QPassSignals for qSupported.
13691 (main): Call handle_general_set.
13692 * server.h (pass_signals, decode_address_to_semicolon): New.
13693
000ef4f0
DJ
136942006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13695
13696 * server.c (handle_query): Correct error handling for read_auxv.
13697
b7149293
UW
136982005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13699
13700 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13701 and srv_linux_thread_db to yes.
13702 * linux-s390-low.c (s390_fill_gregset): New function.
13703 (target_regsets): Define data structure.
13704
dae5f5cf
DJ
137052006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13706
13707 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13708 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13709 * config.in, configure: Regenerated.
13710 * inferiors.c (gdb_id_to_thread): New function.
13711 (gdb_id_to_thread_id): Use it.
13712 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13713 * linux-low.h (struct process_info): Add th member.
13714 (thread_db_get_tls_address): New prototype.
13715 * remote-utils.c (decode_address): Make non-static.
13716 * server.c (handle_query): Handle qGetTLSAddr.
13717 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13718 * target.h (struct target_ops): Add get_tls_address.
13719 * thread-db.c (maybe_attach_thread): Save the thread handle.
13720 (thread_db_get_tls_address): New.
13721
32ca6d61
DJ
137222006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13723
13724 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13725 (linux_resume_one_process): Take a siginfo_t *. Update all
13726 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13727 (struct pending_signals): Add a siginfo_t.
13728 (linux_wait_for_process): Always set last_status.
13729 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13730 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13731 * linux-low.h (struct process_info): Add last_status.
13732
5ffff7c1
DJ
137332006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13734
13735 * remote-utils.c (try_rle): New function.
13736 (putpkt_binary): Use it.
13737
8695c747
DJ
137382006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13739
13740 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13741 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13742 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13743 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13744 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13745 point registers.
13746
290fadea
RS
137472006-08-08 Richard Sandiford <richard@codesourcery.com>
13748
13749 * server.c (terminal_fd): New variable.
13750 (old_foreground_pgrp): Likewise.
13751 (restore_old_foreground_pgrp): New function.
13752 (start_inferior): Record the terminal file descriptor in terminal_fd
13753 and its original foreground group in old_foreground_pgrp. Register
13754 restore_old_foreground_pgrp with atexit().
13755
9f2e1e63
DJ
137562006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13757
13758 * server.c (handle_query): Correct qPart to qXfer.
13759
b80864fb
DJ
137602006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13761
13762 * configure.ac: Check for more headers which are missing on
13763 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13764 * configure.srv: Add Cygwin and mingw32.
13765 * remote-utils.c: Don't include headers unconditionally which
13766 are missing on mingw32. Include <winsock.h> for mingw32.
13767 (remote_open): Adjust for mingw32 support. Flush
13768 standard error after writing to it.
13769 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13770 (unblock_async_io, enable_async_io, disable_async_io)
13771 (readchar, getpkt): Update for Winsock support.
13772 (prepare_resume_reply): Expect a protocol signal number.
13773 * server.c: Disable <sys/wait.h> on mingw32.
13774 (start_inferior): Adjust for mingw32 support. Flush
13775 standard error after writing to it.
13776 (attach_inferior): Likewise. Use protocol signal
13777 numbers.
13778 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13779 and names.
13780 * win32-i386-low.c: New file.
13781 * Makefile.in (XM_CLIBS): Set.
13782 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13783 (win32-i386-low.o): New dependency rule.
13784 * linux-low.c (linux_wait): Use target signal numbers.
13785 * target.h (struct target_ops): Doc fix.
13786 * server.h (target_signal_to_name): New prototype.
13787 * gdbreplay.c: Don't include headers unconditionally which
13788 are missing on mingw32. Include <winsock.h> for mingw32.
13789 (remote_close, remote_open): Adjust for Winsock support.
13790 * configure, config.in: Regenerated.
13791
0876f84a
DJ
137922006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13793
13794 * server.c (decode_xfer_read, write_qxfer_response): New.
13795 (handle_query): Take a packet length argument. Handle
13796 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13797 the qSupported response.
13798 (main): Update call to handle_query.
13799
01f9e8fa
DJ
138002006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13801
13802 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13803 (putpkt_binary): Renamed from putpkt and adjusted for binary
13804 data.
13805 (putpkt): New wrapper for putpkt_binary.
13806 (readchar): Don't mask off the high bit.
13807 (decode_X_packet): New function.
13808 * server.c (main): Call putpkt_binary if a handler sets the packet
13809 length. Save the length of the incoming packet. Handle 'X'.
13810 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13811
be2a5f71
DJ
138122006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13813
13814 * server.c (handle_query): Handle qSupported.
13815
ea025f5f
DJ
138162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13817
13818 * remote-utils.c (all_symbols_looked_up): New variable.
13819 (look_up_one_symbol): Check it.
13820 * server.h (look_up_one_symbol): New declaration.
13821 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13822
9308fc88
DJ
138232006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13824
13825 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13826 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13827 (PTRACE_GET_THREAD_AREA): Define.
13828 (ps_get_thread_area): New function.
13829
52fb6437
NS
138302006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13831
13832 * configure.srv (m68k*-*-uclinux*): New target.
13833 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13834 (linux_resume_one_process): Remove extraneous cast.
13835 (linux_read_offsets): New.
13836 (linux_target_op): Add linux_read_offsets on mmuless systems.
13837 * server.c (handle_query): Add qOffsets logic.
13838 * target.h (struct target_ops): Add read_offsets.
13839
21b0f40c
DJ
138402006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13841
13842 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13843 (PTRACE_GET_THREAD_AREA): Define.
13844 (ps_get_thread_area): New function.
13845 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13846 (linux-x86-64-low.o): Update.
13847
0050a760
DJ
138482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13849
13850 * configure.ac: Remove checks for prfpregset_t.
13851 * gdb_proc_service.h: New file.
13852 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13853 new "gdb_proc_service.h".
13854 * proc-service.c: Likewise.
13855 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13856 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13857 * Makefile.in (gdb_proc_service_h): Updated.
13858 * configure, config.in: Regenerated.
13859
b92a518e
DJ
138602006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13861
13862 * remote-utils.c (prepare_resume_reply): Move declaration
13863 of gdb_id_from_wait to the top of the block.
13864
545587ee
DJ
138652006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13866
13867 * linux-low.c (regsets_store_inferior_registers): Read the regset
13868 from the target before filling it.
13869
9db87ebd
DJ
138702006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * server.c (attach_inferior): Return SIGTRAP for a successful
13873 attach.
13874
dd24457d
DJ
138752006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13876
13877 * Makefile.in (OBS): Add version.o.
13878 (STAGESTUFF): Delete.
13879 (version.o): Add dependencies.
13880 (version.c): Replace rule.
13881 (clean): Remove version.c.
13882 * server.c (gdbserver_version): New.
13883 (gdbserver_usage): Use printf.
13884 (main): Handle --version and --help.
13885 * server.h (version, host_name): Add declarations.
13886
6f0f660e
EZ
138872005-12-23 Eli Zaretskii <eliz@gnu.org>
13888
889bf7c5
PA
13889 * linux-arm-low.c:
13890 * linux-arm-low.c:
13891 * inferiors.c:
13892 * i387-fp.h:
13893 * i387-fp.c:
13894 * gdbreplay.c:
13895 * regcache.c:
13896 * proc-service.c:
13897 * mem-break.h:
13898 * mem-break.c:
13899 * linux-x86-64-low.c:
13900 * linux-sh-low.c:
13901 * linux-s390-low.c:
13902 * linux-ppc64-low.c:
13903 * linux-ppc-low.c:
13904 * linux-mips-low.c:
13905 * linux-m68k-low.c:
13906 * linux-m32r-low.c:
13907 * linux-low.h:
13908 * linux-low.c:
13909 * linux-ia64-low.c:
13910 * linux-i386-low.c:
13911 * linux-crisv32-low.c:
13912 * thread-db.c:
13913 * terminal.h:
13914 * target.h:
13915 * target.c:
13916 * server.h:
13917 * server.c:
13918 * remote-utils.c:
13919 * regcache.h:
13920 * utils.c:
13921 * Makefile.in:
13922 * configure.ac:
6f0f660e
EZ
13923 * gdbserver.1: Add (C) after Copyright. Update the FSF
13924 address.
13925
9d1fb177
DJ
139262005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13927
13928 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13929 (arm_breakpoint_at): Recognize both breakpoints.
13930 (the_low_target): Use the correct breakpoint instruction.
13931
011a70c2
DJ
139322005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13933
13934 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13935 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13936 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13937 (the_low_target): Update.
13938
7fb85e41
AS
139392005-10-25 Andreas Schwab <schwab@suse.de>
13940
13941 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13942
13943 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13944 (ia64_num_regs): Reduce to 462.
13945
3db0444b
DJ
139462005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13947
13948 * acinclude.m4: Correct quoting.
13949 * aclocal.m4: Regenerated.
13950
13951 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13952 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13953 (thread_db_init): Call thread_db_err_str.
13954 * configure.ac: Check for TD_VERSION.
13955 * config.in, configure: Regenerated.
13956
bee0189a
DJ
139572005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13958
13959 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13960
e9d25b98
DJ
139612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13962
13963 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13964 is not available. Define HAVE_PTRACE_GETREGS if it is.
13965 * config.in, configure: Regenerated.
13966 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13967 * linux-i386-low.c, linux-m68k-low.c: Update to use
13968 HAVE_PTRACE_GETREGS.
13969 * linux-low.c (regsets_fetch_inferior_registers)
13970 (regsets_store_inferior_registers): Only return 0 if we processed
13971 GENERAL_REGS.
13972 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13973 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13974
a06660f7
DJ
139752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13976
13977 * inferiors.c (struct thread_info): Add gdb_id.
13978 (add_thread): Add gdb_id argument.
13979 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13980 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13981 calls to add_thread.
13982 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13983 * server.c (handle_query): Use thread_to_gdb_id.
13984 (handle_v_cont, main): Use gdb_id_to_thread_id.
13985 * server.h (add_thread): Update prototype.
13986 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13987 prototypes.
13988
5a1f5858
DJ
139892005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13990
13991 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13992 left-padded registers.
13993 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13994 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13995
e122f1f5
SE
139962005-07-01 Steve Ellcey <sje@cup.hp.com>
13997
13998 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13999 * configure: Regenerate.
14000 * config.in: Regenerate.
14001 * server.h (NEED_DECLARATION_STRERROR):
14002 Replace with !HAVE_DECL_STRERROR.
14003
d592fa2f
DJ
140042005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14005
14006 * linux-low.c (linux_wait, linux_send_signal): Don't test
14007 an unsigned long variable for > 0 if it could be MAX_ULONG.
14008 * server.c (myresume): Likewise.
14009 * target.c (set_desired_inferior): Likewise.
14010
ccbd4912
MK
140112005-06-13 Mark Kettenis <kettenis@gnu.org>
14012
14013 * configure.ac: Simplify and improve check for socklen_t.
14014 * configure, config.in: Regenerate.
14015
f450004a
DJ
140162005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14017
14018 * acconfig.h: Remove.
14019 * configure.ac: Add a test for socklen_t. Use three-argument
14020 AC_DEFINE throughout.
14021 * config.in: Regenerated using autoheader 2.59.
14022 * configure: Regenerated.
14023
14024 * gdbreplay.c (socklen_t): Provide a default.
14025 (remote_open): Use socklen_t.
14026 * remote-utils.c (socklen_t): Provide a default.
14027 (remote_open): Use socklen_t.
14028 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14029 unsigned char.
14030
14031 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14032 char for buffers.
14033 * linux-low.c (linux_read_memory, linux_write_memory)
14034 (linux_read_auxv): Likewise.
14035 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14036 (check_mem_write): Likewise.
14037 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14038 Likewise.
14039 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14040 (registers_from_string, register_data): Likewise.
14041 * server.c (handle_query, main): Likewise.
14042 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14043 (decode_M_packet): Likewise.
14044 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14045 * target.h (struct target_ops): Update read_memory, write_memory,
14046 and read_auxv.
14047 (read_inferior_memory, write_inferior_memory): Update.
14048 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14049 to unsigned char *.
14050 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14051 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14052 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14053 linux-s390-low.c, linux-sh-low.c: Update for changes in
14054 read_inferior_memory and the_low_target->breakpoint.
14055
eee84df1
DJ
140562005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14057
14058 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14059 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14060 * configure.srv: Add powerpc64-*-linux*.
14061 * linux-ppc64-low.c: New file.
14062
45b134e5
OF
140632005-05-23 Orjan Friberg <orjanf@axis.com>
14064
14065 * linux-cris-low.c: New file with support for CRIS.
14066 * linux-crisv32-low.c: Ditto for CRISv32.
14067 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14068 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14069 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14070 reg-crisv32.o, and reg-crisv32.c to make rules.
14071 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14072 recognized targets.
14073
48d93c75
UW
140742005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14075
14076 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14077 of sizeof (PTRACE_XFER_TYPE).
14078 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14079
e013ee27
OF
140802005-05-12 Orjan Friberg <orjanf@axis.com>
14081
889bf7c5 14082 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14083 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14084 pointers for hardware watchpoint support.
14085 * linux-low.h (struct linux_target_ops): Ditto.
14086 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14087 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14088 to linux_target_ops.
14089 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14090 reply packet.
14091 * server.c (main): Recognize 'Z' and 'z' packets.
14092
b0ded00b
UW
140932005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14094
14095 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14096 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14097 (the_low_target): Add new members.
14098
8643e2ad
DJ
140992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14100
14101 * proc-service.c (ps_lgetregs): Search all_processes instead of
14102 all_threads.
14103
fc620387
DJ
141042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14105
14106 * server.c (start_inferior): Change return type to int.
14107 (attach_inferior): Change sigptr to int *.
14108 (handle_v_cont, handle_v_requests): Change signal to int *.
14109 (main): Change signal to int.
14110
141112005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14112
14113 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14114 * configure.srv: Add m32r*-*-linux*.
14115 * linux-m32r-low.c: New file.
14116
e0e76420
DJ
141172005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14118
14119 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14120
a1928bad
DJ
141212005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14122
14123 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14124 Take unsigned long arguments for PIDs.
14125 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14126 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14127 (wait_for_sigstop, linux_resume_one_process)
14128 (regsets_fetch_inferior_registers, linux_send_signal)
14129 (linux_read_auxv): Likewise. Update the types of variables holding
14130 PIDs. Update format string specifiers.
14131 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14132 * remote-utils.c (prepare_resume_reply): Likewise.
14133 * server.c (cont_thread, general_thread, step_thread)
14134 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14135 unsigned long.
14136 (handle_query): Update format specifiers.
14137 (handle_v_cont, main): Use strtoul for thread IDs.
14138 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14139 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14140 (general_thread, step_thread, thread_from_wait)
14141 (old_thread_from_wait): Update.
14142 * target.h (struct thread_resume): Use unsigned long for THREAD.
14143 (struct target_ops): Use unsigned long for arguments to attach and
14144 thread_alive.
14145
dcdb98d2
DJ
141462005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14147
14148 * acinclude.m4: Include bfd/bfd.m4 directly.
14149 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14150 <agriffis@toolchain.org>.
14151 * aclocal.m4, configure: Regenerated.
14152
bec39cab
AC
141532005-01-07 Andrew Cagney <cagney@gnu.org>
14154
14155 * configure.ac: Rename configure.in, require autoconf 2.59.
14156 * configure: Re-generate.
14157
434c4c77
DJ
141582004-12-08 Daniel Jacobowitz <dan@debian.org>
14159
14160 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14161 LIBS when finished.
14162 * aclocal.m4: Regenerated.
14163 * configure: Regenerated.
14164
db1d3e1b
AS
141652004-11-21 Andreas Schwab <schwab@suse.de>
14166
14167 * linux-m68k-low.c (m68k_num_gregs): Define.
14168 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14169 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14170 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14171 (m68k_breakpoint_at): New. Add to the_low_target.
14172
14173 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14174 srv_linux_thread_db to yes.
14175
43360365
JB
141762004-10-20 Joel Brobecker <brobecker@gnat.com>
14177
14178 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14179 (ARCH_SET_FS): Likewise.
14180 (ARCH_GET_FS): Likewise.
14181 (ARCH_GET_GS): Likewise.
14182
fd500816
DJ
141832004-10-16 Daniel Jacobowitz <dan@debian.org>
14184
14185 * linux-i386-low.c (ps_get_thread_area): New.
14186 * linux-x86-64-low.c (ps_get_thread_area): New.
14187 * linux-low.c: Include <sys/syscall.h>.
14188 (linux_kill_one_process): Don't kill the first thread here.
14189 (linux_kill): Kill the first thread here.
14190 (kill_lwp): New function.
14191 (send_sigstop, linux_send_signal): Use it.
14192 * proc-service.c: Clean up #ifdefs.
14193 (fpregset_info): Delete.
14194 (ps_lgetregs): Update and enable implementation.
14195 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14196 implementations.
14197 * remote-utils.c (struct sym_cache, symbol_cache): New.
14198 (input_interrupt): Print a clearer message.
14199 (async_io_enabled): New variable.
14200 (enable_async_io, disable_async_io): Use it. Update comments.
14201 (look_up_one_symbol): Use the symbol cache.
14202 * thread-db.c (thread_db_look_up_symbols): New function.
14203 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14204
f6de3c42
DJ
142052004-10-16 Daniel Jacobowitz <dan@debian.org>
14206
14207 * configure.in: Test for -rdynamic.
14208 * configure: Regenerated.
14209 * Makefile (INTERNAL_LDFLAGS): New.
14210 (gdbserver, gdbreplay): Use it.
14211
2c0fc042
AC
142122004-09-02 Andrew Cagney <cagney@gnu.org>
14213
14214 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14215
075b3282
DJ
142162004-03-23 Daniel Jacobowitz <drow@mvista.com>
14217
14218 * linux-low.c (linux_wait): Clear all_processes list also.
14219
fa6a77dc
DJ
142202004-03-12 Daniel Jacobowitz <drow@mvista.com>
14221
14222 * linux-low.c: Include <errno.h>. Remove extern declaration of
14223 errno.
14224
6d782a97
DJ
142252004-03-12 Daniel Jacobowitz <drow@mvista.com>
14226
14227 * gdbreplay.c, server.h, utils.c: Update copyright years.
14228
3a7fb99b
DJ
142292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14230
14231 * server.c (main): Print child status or termination signal from
14232 variable 'signal', not 'sig'.
14233
c3e735a6
DJ
142342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14235
14236 * linux-low.c (linux_read_memory): Change return type to
14237 int. Check for and return error from ptrace().
14238 * target.c (read_inferior_memory): Change return type to int. Pass
14239 back return status from the_target->read_memory().
14240 * target.h (struct target_ops): Adapt *read_memory() prototype.
14241 Update comment.
14242 (read_inferior_memory): Adapt prototype.
14243 * server.c (main): Return an error packet if
14244 read_inferior_memory() returns an error.
14245
a59d1c82
DJ
142462004-03-04 Daniel Jacobowitz <drow@mvista.com>
14247
14248 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14249 Unify with other clean targets.
14250
dc3f8883
DJ
142512004-02-29 Daniel Jacobowitz <drow@mvista.com>
14252
14253 * server.c (handle_v_cont): Call set_desired_inferior.
14254
89a208da
DJ
142552004-02-29 Daniel Jacobowitz <drow@mvista.com>
14256
14257 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14258
62ea82f5
DJ
142592004-02-29 Daniel Jacobowitz <drow@mvista.com>
14260
14261 * linux-low.c (linux_wait): Unblock async I/O.
14262 (linux_resume): Block and enable async I/O.
14263 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14264 * server.h (block_async_io, unblock_async_io): Add prototypes.
14265
6910d122
DJ
142662004-02-29 Daniel Jacobowitz <drow@mvista.com>
14267
14268 * remote-utils.c (remote_open): Print a status notice after
14269 opening a TCP port.
14270 * server.c (attach_inferior): Print a status notice after
14271 attaching.
14272
142732004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14274
14275 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14276
c89dc5d4
DJ
142772004-02-26 Daniel Jacobowitz <drow@mvista.com>
14278
14279 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14280 error packet.
14281 * server.c, target.h: Update copyright years.
14282
4b8dad4a
RM
142832004-02-25 Roland McGrath <roland@redhat.com>
14284
14285 * target.h (struct target_ops): New member `read_auxv'.
14286 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14287 * linux-low.c (linux_read_auxv): New function.
14288 (linux_target_ops): Initialize `read_auxv' member to that.
14289
d7446758
JB
142902004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14291
14292 Committed by Jim Blandy <jimb@redhat.com>.
14293
14294 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14295 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14296 instead of GPR_SIZE to distiguish s390 and s390x targets.
14297
5544ad89
DJ
142982004-01-31 Daniel Jacobowitz <drow@mvista.com>
14299
14300 * linux-low.c: Update copyright year.
14301 (check_removed_breakpoint): Clear pending_is_breakpoint.
14302 (linux_set_resume_request, linux_queue_one_thread)
14303 (resume_status_pending_p): New functions.
14304 (linux_continue_one_thread): Use process->resume.
14305 (linux_resume): Only resume threads if there are no pending events.
14306 * linux-low.h (struct process_info): Add resume request
14307 pointer.
14308
2a68b70e
DJ
143092004-01-30 Daniel Jacobowitz <drow@mvista.com>
14310
14311 * regcache.c (new_register_cache): Clear the allocated register
14312 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14313
64386c31
DJ
143142003-10-13 Daniel Jacobowitz <drow@mvista.com>
14315
14316 * linux-low.c (linux_resume): Take a struct thread_resume *
14317 argument.
14318 (linux_wait): Update call.
14319 (resume_ptr): New static variable.
14320 (linux_continue_one_thread): Renamed from
14321 linux_continue_one_process. Use resume_ptr.
14322 (linux_resume): Use linux_continue_one_thread.
14323 * server.c (handle_v_cont, handle_v_requests): New functions.
14324 (myresume): New function.
14325 (main): Handle 'v' case.
14326 * target.h (struct thread_resume): New type.
14327 (struct target_ops): Change argument of "resume" to struct
14328 thread_resume *.
14329 (myresume): Delete macro.
14330
c938e9b0
L
143312003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14332
14333 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14334 (uninstall): Support DESTDIR.
14335
7f313d07
BC
14336Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14337
14338 * configure.srv: Add xscale*linux copy of arm*linux entry.
14339
3b2fc2ea
DJ
143402003-07-24 Daniel Jacobowitz <drow@mvista.com>
14341
14342 * linux-arm-low.c (arm_reinsert_addr): New function.
14343 (the_low_target): Add arm_reinsert_addr.
14344
1c0a559e
MK
143452003-07-08 Mark Kettenis <kettenis@gnu.org>
14346
14347 * mem-break.c: Remove whitespace at end of file.
14348
43d5792c
DJ
143492003-06-28 Daniel Jacobowitz <drow@mvista.com>
14350
14351 * configure.in: Check whether we need to prototype strerror.
14352 * server.h: Optionally prototype strerror.
14353 * gdbreplay.c (perror_with_name): Use strerror.
14354 * linux-low.c (linux_attach_lwp): Use strerror.
14355 * utils.c (perror_with_name): Use strerror.
14356 * config.in, configure: Regenerated.
14357
c8a86edf
DJ
143582003-06-28 Daniel Jacobowitz <drow@mvista.com>
14359
14360 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14361 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14362
73d37363
DJ
143632003-06-20 Daniel Jacobowitz <drow@mvista.com>
14364
14365 * Makefile.in (SFILES): Update.
14366 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14367 low-sun3.c: Remove files.
14368
6ad8ae5c
DJ
143692003-06-17 Daniel Jacobowitz <drow@mvista.com>
14370
14371 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14372 (linux_detach_one_process, linux_detach): New functions.
14373 (linux_target_ops): Add linux_detach.
14374 * server.c (main): Handle 'D' packet.
14375 * target.h (struct target_ops): Add "detach" member.
14376 (detach_inferior): Define.
14377
1581182a
MK
143782003-06-13 Mark Kettenis <kettenis@gnu.org>
14379
14380 From Kelley Cook <kelleycook@wideopenwest.com>:
14381 * configure.srv: Accept i[34567]86 variants.
14382
e5379b03
DJ
143832003-06-05 Daniel Jacobowitz <drow@mvista.com>
14384
14385 * linux-low.c (linux_wait_for_event): Correct comment typos.
14386 (linux_resume_one_process): Call check_removed_breakpoint.
14387 (linux_send_signal): New function.
14388 (linux_target_ops): Add linux_send_signal.
14389 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14390 of kill.
14391 * target.h (struct target_ops): Add send_signal.
14392
2ff29de4
JB
143932003-05-29 Jim Blandy <jimb@redhat.com>
14394
14395 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14396 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14397 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14398 away part of the register's value.
14399
254787d4
DJ
144002003-03-26 Daniel Jacobowitz <drow@mvista.com>
14401
14402 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14403 (linux_wait_for_event, linux_init_signals): Likewise.
14404
94e10508
DJ
144052003-03-17 Daniel Jacobowitz <drow@mvista.com>
14406
14407 * configure.in: Check for stdlib.h.
14408 * configure: Regenerated.
14409 * config.in: Regenerated.
14410
4c0711e0
DJ
144112003-01-04 Andreas Schwab <schwab@suse.de>
14412
14413 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14414
ef66e766
AC
144152003-01-02 Andrew Cagney <ac131313@redhat.com>
14416
14417 * Makefile.in: Remove obsolete code.
14418
a1358604
DJ
144192002-11-20 Daniel Jacobowitz <drow@mvista.com>
14420
14421 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14422 defined(PT_FPR0_HI).
14423
23ce3b1c
DJ
144242002-11-17 Stuart Hughes <seh@zee2.com>
14425
14426 * linux-arm-low.c (arm_num_regs): Increase.
14427 (arm_regmap): Include status register.
14428
144292002-11-17 Daniel Jacobowitz <drow@mvista.com>
14430
14431 * linux-low.c (register_addr): Remove incorrect -1 check.
14432
a9fa9f7d
DJ
144332002-08-29 Daniel Jacobowitz <drow@mvista.com>
14434
14435 * linux-low.c (linux_create_inferior): Call setpgid. Return
14436 the new PID.
14437 (unstopped_p, linux_signal_pid): Remove.
14438 (linux_target_ops): Remove linux_signal_pid.
14439 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14440 global instead of target method.
14441 * target.h (struct target_ops): Remove signal_pid. Update comment
14442 for create_inferior.
14443 * server.c (signal_pid): New variable.
14444 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14445 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14446 (attach_inferior): Set signal_pid.
14447
17574093
DJ
144482002-08-23 Daniel Jacobowitz <drow@mvista.com>
14449
14450 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14451
144522002-08-20 Jim Blandy <jimb@redhat.com>
14453
14454 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14455 default for this.
14456
144572002-08-01 Andrew Cagney <cagney@redhat.com>
14458
14459 * Makefile.in: Make chill references obsolete.
14460
144612002-07-24 Kevin Buettner <kevinb@redhat.com>
14462
14463 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14464 * configure: Regenerate.
14465 * config.in: Regenerate.
14466
144672002-07-09 David O'Brien <obrien@FreeBSD.org>
14468
14469 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14470 (perror_with_name, remote_close, remote_open, expect, play): Static.
14471
144722002-07-04 Michal Ludvig <mludvig@suse.cz>
14473
4b8dad4a 14474 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14475 byte offsets instead of an array of indexes.
14476 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14477
144782002-06-13 Daniel Jacobowitz <drow@mvista.com>
14479
14480 * regcache.c: Add comment.
14481
144822002-06-11 Daniel Jacobowitz <drow@mvista.com>
14483
14484 * thread-db.c: New file.
14485 * proc-service.c: New file.
14486 * acinclude.m4: New file.
14487 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14488 proc-service.o, and thread-db.o.
14489 (linux-low.o): Add USE_THREAD_DB.
14490 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14491 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14492 * aclocal.m4: Regenerated.
14493 * config.in: Regenerated.
14494 * configure: Regenerated.
14495 * configure.in: Check for proc_service.h, sys/procfs.h,
14496 thread_db.h, and linux/elf.h headrs.
14497 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14498 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14499 Check for -lthread_db and thread support.
14500 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14501 PowerPC, and SuperH.
14502 * i387-fp.c: Constify arguments.
14503 * i387-fp.h: Likewise.
14504 * inferiors.c: (struct thread_info): Renamed from
14505 `struct inferior_info'. Remove PID member. Use generic inferior
14506 list header. All uses updated.
14507 (inferiors, signal_pid): Removed.
14508 (all_threads): New variable.
14509 (get_thread): Define.
14510 (add_inferior_to_list): New function.
14511 (for_each_inferior): New function.
14512 (change_inferior_id): New function.
14513 (add_inferior): Removed.
14514 (remove_inferior): New function.
14515 (add_thread): New function.
14516 (free_one_thread): New function.
14517 (remove_thread): New function.
14518 (clear_inferiors): Use for_each_inferior and free_one_thread.
14519 (find_inferior): New function.
14520 (find_inferior_id): New function.
14521 (inferior_target_data): Update argument type.
14522 (set_inferior_target_data): Likewise.
14523 (inferior_regcache_data): Likewise.
14524 (set_inferior_regcache_data): Likewise.
14525 * linux-low.c (linux_bp_reinsert): Remove.
14526 (all_processes, stopping_threads, using_thrads)
14527 (struct pending_signals, debug_threads, pid_of): New.
14528 (inferior_pid): Replace with macro.
14529 (struct inferior_linux_data): Remove.
14530 (get_stop_pc, add_process): New functions.
14531 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14532 Use add_process and add_thread.
14533 (linux_attach_lwp): New function, based on old linux_attach. Use
14534 add_process and add_thread. Set stop_expected for new threads.
14535 (linux_attach): New function.
14536 (linux_kill_one_process): New function.
14537 (linux_kill): Kill all LWPs.
14538 (linux_thread_alive): Use find_inferior_id.
14539 (check_removed_breakpoints, status_pending_p): New functions.
14540 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14541 Update. Use WNOHANG. Wait for cloned processes also. Update process
14542 struct for the found process.
14543 (linux_wait_for_event): New function.
14544 (linux_wait): Use it. Support LWPs.
14545 (send_sigstop, wait_for_sigstop, stop_all_processes)
14546 (linux_resume_one_process, linux_continue_one_process): New functions.
14547 (linux_resume): Support LWPs.
14548 (REGISTER_RAW_SIZE): Remove.
14549 (fetch_register): Use register_size instead. Call supply_register.
14550 (usr_store_inferior_registers): Likewise. Call collect_register.
14551 Fix recursive case.
14552 (regsets_fetch_inferior_registers): Improve error message.
14553 (regsets_store_inferior_registers): Add debugging.
14554 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14555 (unstopped_p, linux_signal_pid): New functions.
14556 (linux_target_ops): Add linux_signal_pid.
14557 (linux_init_signals): New function.
14558 (initialize_low): Call it. Initialize using_threads.
14559 * regcache.c (inferior_regcache_data): Add valid
14560 flag.
14561 (get_regcache): Fetch registers lazily. Add fetch argument
14562 and update all callers.
14563 (regcache_invalidate_one, regcache_invalidate): New
14564 functions.
14565 (new_register_cache): Renamed from create_register_cache.
14566 Return the new regcache.
14567 (free_register_cache): Change argument to a void *.
14568 (registers_to_string, registers_from_string): Call get_regcache
14569 with fetch flag set.
14570 (register_data): Make static. Pass fetch flag to get_regcache.
14571 (supply_register): Call get_regcache with fetch flag clear.
14572 (collect_register): Call get_regcache with fetch flag set.
14573 (collect_register_as_string): New function.
14574 * regcache.h: Update.
14575 * remote-utils.c (putpkt): Flush after debug output and use
14576 stderr.
14577 Handle input interrupts while waiting for an ACK.
14578 (input_interrupt): Use signal_pid method.
14579 (getpkt): Flush after debug output and use stderr.
14580 (outreg): Use collect_register_as_string.
14581 (new_thread_notify, dead_thread_notify): New functions.
14582 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14583 and general_thread.
14584 (look_up_one_symbol): Flush after debug output.
14585 * server.c (step_thread, server_waiting): New variables.
14586 (start_inferior): Don't use signal_pid. Update call to mywait.
14587 (attach_inferior): Update call to mywait.
14588 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14589 (main): Don't fetch/store registers explicitly. Use
14590 set_desired_inferior. Support proposed ``Hs'' packet. Update
14591 calls to mywait.
14592 * server.h: Update.
14593 (struct inferior_list, struct_inferior_list_entry): New.
14594 * target.c (set_desired_inferior): New.
14595 (write_inferior_memory): Constify.
14596 (mywait): New function.
14597 * target.h: Update.
14598 (struct target_ops): New signal_pid method.
14599 (mywait): Removed macro, added prototype.
14600
14601 * linux-low.h (regset_func): Removed.
14602 (regset_fill_func, regset_store_func): New.
14603 (enum regset_type): New.
14604 (struct regset_info): Add type field. Use new operation types.
14605 (struct linux_target_ops): stop_pc renamed to get_pc.
14606 Add decr_pc_after_break and breakpoint_at.
14607 (get_process, get_thread_proess, get_process_thread)
14608 (strut process_info, all_processes, linux_attach_lwp)
14609 (thread_db_init): New.
14610
14611 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14612 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14613 (the_low_target): Add new members.
14614 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14615 (i386_store_fpxregset): Constify.
14616 (target_regsets): Add new kind identifier.
14617 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14618 (i386_set_pc): Add debugging.
14619 (i386_breakpoint_at): New function.
14620 (the_low_target): Add new members.
14621 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14622 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14623 (mips_breakpoint_at): New.
14624 (the_low_target): Add new members.
14625 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14626 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14627 (the_low_target): Add new members.
14628 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14629 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14630 (the_low_target): Add new members.
14631 * linux-x86-64-low.c (target_regsets): Add new kind
14632 identifier.
14633
146342002-05-15 Daniel Jacobowitz <drow@mvista.com>
14635
14636 From Martin Pool <mbp@samba.org>:
14637 * server.c (gdbserver_usage): New function.
14638 (main): Call it.
14639
146402002-05-14 Daniel Jacobowitz <drow@mvista.com>
14641
14642 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14643 stop_at -> stop_pc.
14644
146452002-05-04 Andrew Cagney <ac131313@redhat.com>
14646
14647 * Makefile.in: Remove obsolete code.
14648
146492002-04-24 Michal Ludvig <mludvig@suse.cz>
14650
14651 * linux-low.c (regsets_fetch_inferior_registers),
14652 (regsets_store_inferior_registers): Removed cast to int from
14653 ptrace() calls.
14654 * regcache.h: Added declaration of struct inferior_info.
14655
146562002-04-20 Daniel Jacobowitz <drow@mvista.com>
14657
14658 * inferiors.c (struct inferior_info): Add regcache_data.
14659 (add_inferior): Call create_register_cache.
14660 (clear_inferiors): Call free_register_cache.
14661 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14662 * regcache.c (struct inferior_regcache_data): New.
14663 (registers): Remove.
14664 (get_regcache): New function.
14665 (create_register_cache, free_register_cache): New functions.
14666 (set_register_cache): Don't initialize the register cache here.
14667 (registers_to_string, registers_from_string, register_data): Call
14668 get_regcache.
14669 * regcache.h: Add prototypes.
14670 * server.h: Likewise.
14671
146722002-04-20 Daniel Jacobowitz <drow@mvista.com>
14673
14674 * mem-break.c: New file.
14675 * mem-break.h: New file.
14676 * Makefile.in: Add mem-break.o rule; update server.h
14677 dependencies.
14678 * inferiors.c (struct inferior_info): Add target_data
14679 member.
14680 (clear_inferiors): Free target_data member if set.
14681 (inferior_target_data, set_inferior_target_data): New functions.
14682 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14683 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14684 * linux-low.c (linux_bp_reinsert): New variable.
14685 (struct inferior_linux_data): New.
14686 (linux_create_inferior): Use set_inferior_target_data.
14687 (linux_attach): Likewise. Call add_inferior.
14688 (linux_wait_for_one_inferior): New function.
14689 (linux_wait): Call it.
14690 (linux_write_memory): Add const.
14691 (initialize_low): Call set_breakpoint_data.
14692 * linux-low.h (struct linux_target_ops): Add breakpoint
14693 handling members.
14694 * server.c (attach_inferior): Remove extra add_inferior
14695 call.
14696 * server.h: Include mem-break.h. Update inferior.c
14697 prototypes.
14698 * target.c (read_inferior_memory)
14699 (write_inferior_memory): New functions.
14700 * target.h (read_inferior_memory)
14701 (write_inferior_memory): Change macros to prototypes.
14702 (struct target_ops): Update comments. Add const to write_memory
14703 definition.
14704
147052002-04-11 Daniel Jacobowitz <drow@mvista.com>
14706
14707 * linux-low.c (usr_store_inferior_registers): Support
14708 registers which are allowed to fail to store.
14709 * linux-low.h (linux_target_ops): Likewise.
14710 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14711 (ppc_cannot_store_register): FPSCR may not be storable.
14712
147132002-04-09 Daniel Jacobowitz <drow@mvista.com>
14714
14715 * server.h: Include <string.h> if HAVE_STRING_H.
14716 * ChangeLog: Correct paths in last ChangeLog entry.
14717
147182002-04-09 Daniel Jacobowitz <drow@mvista.com>
14719
14720 * linux-low.h: Remove obsolete prototypes.
14721 (struct linux_target_ops): New.
14722 (extern the_low_target): New.
14723 * linux-low.c (num_regs, regmap): Remove declarations.
14724 (register_addr): Use the_low_target explicitly.
14725 (fetch_register): Likewise.
14726 (usr_fetch_inferior_registers): Likewise.
14727 (usr_store_inferior_registers): Likewise.
14728 * linux-arm-low.c (num_regs): Remove.
14729 (arm_num_regs): Define.
14730 (arm_regmap): Renamed from regmap, made static.
14731 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14732 made static.
14733 (arm_cannot_store_register): Renamed from cannot_store_register,
14734 made static.
14735 (the_low_target): New.
14736 * linux-i386-low.c (num_regs): Remove.
14737 (i386_num_regs): Define.
14738 (i386_regmap): Renamed from regmap, made static.
14739 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14740 made static.
14741 (i386_cannot_store_register): Renamed from cannot_store_register,
14742 made static.
14743 (the_low_target): New.
14744 * linux-ia64-low.c (num_regs): Remove.
14745 (ia64_num_regs): Define.
14746 (ia64_regmap): Renamed from regmap, made static.
14747 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14748 made static.
14749 (ia64_cannot_store_register): Renamed from cannot_store_register,
14750 made static.
14751 (the_low_target): New.
14752 * linux-m68k-low.c (num_regs): Remove.
14753 (m68k_num_regs): Define.
14754 (m68k_regmap): Renamed from regmap, made static.
14755 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14756 made static.
14757 (m68k_cannot_store_register): Renamed from cannot_store_register,
14758 made static.
14759 (the_low_target): New.
14760 * linux-mips-low.c (num_regs): Remove.
14761 (mips_num_regs): Define.
14762 (mips_regmap): Renamed from regmap, made static.
14763 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14764 made static.
14765 (mips_cannot_store_register): Renamed from cannot_store_register,
14766 made static.
14767 (the_low_target): New.
14768 * linux-ppc-low.c (num_regs): Remove.
14769 (ppc_num_regs): Define.
14770 (ppc_regmap): Renamed from regmap, made static.
14771 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14772 made static.
14773 (ppc_cannot_store_register): Renamed from cannot_store_register,
14774 made static.
14775 (the_low_target): New.
14776 * linux-s390-low.c (num_regs): Remove.
14777 (s390_num_regs): Define.
14778 (s390_regmap): Renamed from regmap, made static.
14779 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14780 made static.
14781 (s390_cannot_store_register): Renamed from cannot_store_register,
14782 made static.
14783 (the_low_target): New.
14784 * linux-sh-low.c (num_regs): Remove.
14785 (sh_num_regs): Define.
14786 (sh_regmap): Renamed from regmap, made static.
14787 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14788 made static.
14789 (sh_cannot_store_register): Renamed from cannot_store_register,
14790 made static.
14791 (the_low_target): New.
14792 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14793 (the_low_target): New.
14794
147952002-04-09 Daniel Jacobowitz <drow@mvista.com>
14796
14797 * Makefile.in: Add stamp-h target.
14798 * configure.in: Create stamp-h.
14799 * configure: Regenerated.
14800
148012002-04-09 Daniel Jacobowitz <drow@mvista.com>
14802
14803 * inferiors.c: New file.
14804 * target.c: New file.
14805 * target.h: New file.
14806 * Makefile.in: Add target.o and inferiors.o. Update
14807 dependencies.
14808 * linux-low.c (inferior_pid): New static variable,
14809 moved from server.c.
14810 (linux_create_inferior): Renamed from create_inferior.
14811 Call add_inferior. Return 0 on success instead of a PID.
14812 (linux_attach): Renamed from myattach.
14813 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14814 (linux_thread_alive): Renamed from mythread_alive.
14815 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14816 child dies.
14817 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14818 (regsets_store_inferior_registers): Correct error message.
14819 Add missing ``return 0''.
14820 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14821 (linux_store_registers): Renamed from store_inferior_registers.
14822 (linux_read_memory): Renamed from read_inferior_memory.
14823 (linux_write_memory): Renamed from write_inferior_memory.
14824 (linux_target_ops): New structure.
14825 (initialize_low): Call set_target_ops ().
14826 * remote-utils.c (unhexify): New function.
14827 (hexify): New function.
14828 (input_interrupt): Send signals to ``signal_pid''.
14829 * server.c (inferior_pid): Remove.
14830 (start_inferior): Update create_inferior call.
14831 (attach_inferior): Call add_inferior.
14832 (handle_query): New function.
14833 (main): Call handle_query for `q' packets.
14834 * server.h: Include "target.h". Remove obsolete prototypes.
14835 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14836
148372002-04-09 Daniel Jacobowitz <drow@mvista.com>
14838
14839 * Makefile.in: Add WARN_CFLAGS. Update configury
14840 dependencies.
14841 * configure.in: Check for <string.h>
14842 * configure: Regenerate.
14843 * config.in: Regenerate.
14844 * gdbreplay.c: Include needed system headers.
14845 (remote_open): Remove strchr prototype.
14846 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14847 * regcache.c (supply_register): Change buf argument to const void *.
14848 (supply_register_by_name): Likewise.
14849 (collect_register): Change buf argument to void *.
14850 (collect_register_by_name): Likewise.
14851 * regcache.h: Add missing prototypes.
14852 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14853 * server.c (handle_query): New function.
14854 (attached): New static variable, moved out of main.
14855 (main): Quiet longjmp clobber warnings.
14856 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14857 * utils.c (error): Remove NORETURN.
14858 (fatal): Likewise.
This page took 1.89525 seconds and 4 git commands to generate.