gdbserver: Use pattern rule for IPA objects from gdbserver/
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a8ebe3d5
SM
12017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * Makefile.in (%-ipa.o: %.c): New rule.
4 (tracepoint-ipa.o: tracepoint.c): Remove.
5 (utils-ipa.o: utils.c): Remove.
6 (remote-utils-ipa.o: remote-utils.c): Remove.
7 (regcache-ipa.o: regcache.c): Remove.
8 (i386-linux-ipa.o: i386-linux.c): Remove.
9 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
10 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
11 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
12 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
13 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
14 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
15 (amd64-linux-ipa.o: amd64-linux.c): Remove.
16 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
17 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
18 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
19 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
20 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
21 (aarch64-ipa.o: aarch64.c): Remove.
22 (s390-linux32-ipa.o: s390-linux32.c): Remove.
23 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
24 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
25 (s390-linux64-ipa.o: s390-linux64.c): Remove.
26 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
27 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
28 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
29 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
30 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
31 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
32 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
33 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
34 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
35 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
36 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
37 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
38 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
39 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
40 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
41 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
42 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
43 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
44 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
45 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
46 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
47 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
48 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
49 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
50 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
51 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
52 (tdesc-ipa.o: tdesc.c): Remove.
53 (x32-linux-ipa.o: x32-linux.c): Remove.
54 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
55 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
56
50cfacb7
SM
572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
58
59 * Makefile.in (%.o: ../arch/%.c): New rule.
60 (arm.o: ../arch/arm.c): Remove.
61 (arm-linux.o: ../arch/arm-linux.c): Remove.
62 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
63 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
64
c5a22423
SM
652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
66
67 * Makefile.in (%.o: ../nat/%.c): New rule.
68 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
69 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
70 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
71 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
72 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
73 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
74 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
75 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
76 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
77 (linux-personality.o: ../nat/linux-personality.c): Remove.
78 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
79 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
80 (x86-linux.o: ../nat/x86-linux.c): Remove.
81 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
82 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
83
6bda016b
SM
842017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
85
86 * Makefile.in (%.o: ../common/%.c): New rule.
87 (signals.o: ../common/signals.c): Remove.
88 (print-utils.o: ../common/print-utils.c): Remove.
89 (rsp-low.o: ../common/rsp-low.c): Remove.
90 (common-utils.o: ../common/common-utils.c): Remove.
91 (posix-strerror.o: ../common/posix-strerror.c): Remove.
92 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
93 (vec.o: ../common/vec.c): Remove.
94 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
95 (xml-utils.o: ../common/xml-utils.c): Remove.
96 (ptid.o: ../common/ptid.c): Remove.
97 (buffer.o: ../common/buffer.c): Remove.
98 (format.o: ../common/format.c): Remove.
99 (filestuff.o: ../common/filestuff.c): Remove.
100 (agent.o: ../common/agent.c): Remove.
101 (errors.o: ../common/errors.c): Remove.
102 (environ.o: ../common/environ.c): Remove.
103 (common-debug.o: ../common/common-debug.c): Remove.
104 (cleanups.o: ../common/cleanups.c): Remove.
105 (common-exceptions.o: ../common/common-exceptions.c): Remove.
106 (fileio.o: ../common/fileio.c): Remove.
107 (common-regcache.o: ../common/common-regcache.c): Remove.
108 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
109 (new-op.o: ../common/new-op.c): Remove.
110 (btrace-common.o: ../common/btrace-common.c): Remove.
111
21122961
SM
1122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
113
114 * Makefile.in (%.o: ../target/%.c): New rule.
115 (waitstatus.o: ../target/waitstatus.c): Remove.
116
c362e621
SM
1172017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
118
119 * Makefile.in
120 (%.c: ../regformats/%.dat,
121 (%.c: ../regformats/arm/%.dat,
122 (%.c: ../regformats/i386/%.dat,
123 (%.c: ../regformats/rs6000/%.dat): New rules.
124 (aarch64.c): Remove.
125 (reg-arm.c): Remove.
126 (arm-with-iwmmxt.c): Remove.
127 (arm-with-vfpv2.c): Remove.
128 (arm-with-vfpv3.c): Remove.
129 (arm-with-neon.c): Remove.
130 (reg-bfin.c): Remove.
131 (reg-cris.c): Remove.
132 (reg-crisv32.c): Remove.
133 (i386.c): Remove.
134 (i386-linux.c): Remove.
135 (i386-avx.c): Remove.
136 (i386-avx-linux.c): Remove.
137 (i386-avx-avx512.c): Remove.
138 (i386-avx-avx512-linux.c): Remove.
139 (i386-mpx.c): Remove.
140 (i386-mpx-linux.c): Remove.
141 (i386-avx-mpx-avx512-pku.c): Remove.
142 (i386-avx-mpx-avx512-pku-linux.c): Remove.
143 (i386-avx-mpx.c): Remove.
144 (i386-avx-mpx-linux.c): Remove.
145 (i386-mmx.c): Remove.
146 (i386-mmx-linux.c): Remove.
147 (reg-ia64.c): Remove.
148 (reg-m32r.c): Remove.
149 (reg-m68k.c): Remove.
150 (reg-cf.c): Remove.
151 (mips-linux.c): Remove.
152 (mips-dsp-linux.c): Remove.
153 (mips64-linux.c): Remove.
154 (mips64-dsp-linux.c): Remove.
155 (nios2-linux.c): Remove.
156 (powerpc-32.c): Remove.
157 (powerpc-32l.c): Remove.
158 (powerpc-altivec32l.c): Remove.
159 (powerpc-cell32l.c): Remove.
160 (powerpc-vsx32l.c): Remove.
161 (powerpc-isa205-32l.c): Remove.
162 (powerpc-isa205-altivec32l.c): Remove.
163 (powerpc-isa205-vsx32l.c): Remove.
164 (powerpc-e500l.c): Remove.
165 (powerpc-64l.c): Remove.
166 (powerpc-altivec64l.c): Remove.
167 (powerpc-cell64l.c): Remove.
168 (powerpc-vsx64l.c): Remove.
169 (powerpc-isa205-64l.c): Remove.
170 (powerpc-isa205-altivec64l.c): Remove.
171 (powerpc-isa205-vsx64l.c): Remove.
172 (s390-linux32.c): Remove.
173 (s390-linux32v1.c): Remove.
174 (s390-linux32v2.c): Remove.
175 (s390-linux64.c): Remove.
176 (s390-linux64v1.c): Remove.
177 (s390-linux64v2.c): Remove.
178 (s390-te-linux64.c): Remove.
179 (s390-vx-linux64.c): Remove.
180 (s390-tevx-linux64.c): Remove.
181 (s390x-linux64.c): Remove.
182 (s390x-linux64v1.c): Remove.
183 (s390x-linux64v2.c): Remove.
184 (s390x-te-linux64.c): Remove.
185 (s390x-vx-linux64.c): Remove.
186 (s390x-tevx-linux64.c): Remove.
187 (tic6x-c64xp-linux.c): Remove.
188 (tic6x-c64x-linux.c): Remove.
189 (tic6x-c62x-linux.c): Remove.
190 (reg-sh.c): Remove.
191 (reg-sparc64.c): Remove.
192 (reg-spu.c): Remove.
193 (amd64.c): Remove.
194 (amd64-linux.c): Remove.
195 (amd64-avx.c): Remove.
196 (amd64-avx-linux.c): Remove.
197 (amd64-avx-avx512.c): Remove.
198 (amd64-avx-avx512-linux.c): Remove.
199 (amd64-mpx.c): Remove.
200 (amd64-mpx-linux.c): Remove.
201 (amd64-avx-mpx-avx512-pku.c): Remove.
202 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
203 (amd64-avx-mpx.c): Remove.
204 (amd64-avx-mpx-linux.c): Remove.
205 (x32.c): Remove.
206 (x32-linux.c): Remove.
207 (x32-avx.c): Remove.
208 (x32-avx-linux.c): Remove.
209 (x32-avx-avx512.c): Remove.
210 (x32-avx-avx512-linux.c): Remove.
211 (reg-xtensa.c): Remove.
212 (reg-tilegx.c): Remove.
213 (reg-tilegx32.c): Remove.
214
1672e0d9
SDJ
2152017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
216
217 * Makefile.in (SFILES): Add "common/environ.c".
218 (OBJS): Add "common/environ.h".
219
239b6d10
WT
2202017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
221
222 * configure.ac: Check if the fs_base and gs_base members of
223 `struct user_regs_struct' exist.
224 * config.in: Regenerated.
225 * configure: Likewise.
226
694b382c
AT
2272017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
228
229 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
230 target_read_memory.
231 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
232 (get_next_pcs_syscall_next_pc): Likewise.
233
7dc53023
LM
2342016-12-23 Luis Machado <lgustavo@codesourcery.com>
235
236 * win32-i386-low.c: Fix incorrect reference to a couple source files.
237 * nto-x86-low.c: Likewise.
238
ad02e4fe
SM
2392016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
240
241 * Makefile.in: Include disable-implicit-rules.mk.
242
dcb07cfa
PA
2432016-11-23 Pedro Alves <palves@redhat.com>
244
245 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
246 (debug_vprintf): Use std::chrono::steady_clock instead of
247 gettimeofday. Use '.' instead of ':'.
248 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
249 (get_timestamp): Use std::chrono::steady_clock instead of
250 gettimeofday.
251
8629c02c
SM
2522016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
253
254 * Makefile.in: Fix whitespace formatting.
255
b593ecca
SM
2562016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
257
258 * Makefile.in (SFILES, OBS): Flatten list and order
259 alphabetically.
260
9986ba08
PA
2612016-11-23 Pedro Alves <palves@redhat.com>
262
263 * event-loop.c (handle_file_event): Use warning.
264 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
265 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
266 Use warning.
267
4eefa7bc
PA
2682016-11-23 Pedro Alves <palves@redhat.com>
269
270 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
271 output.
272 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
273 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
274 debug_printf and debug_flush for debug output.
275 * server.c (handle_general_set): Likewise.
276 * thread-db.c (try_thread_db_load): Use debug_printf for debug
277 output.
278
5443506e
SM
2792016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
280
281 * Makefile.in (.c.o): Replace rule with ...
282 (%.o: %.c): ... this one.
283
3b165252
SM
2842016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
285
286 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
287 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
288 make.
289 * configure.ac: Remove checks for the make program.
290 * configure: Re-generate.
291
0bcda685
PA
2922016-10-28 Pedro Alves <palves@redhat.com>
293
294 * Makefile.in (CXX_DIALECT): Get from configure.
295 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
296 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
297 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
298 * config.in: Regenerate.
299 * configure: Regenerate.
300
c3805894
YQ
3012016-10-27 Yao Qi <yao.qi@linaro.org>
302
303 * linux-low.c (linux_supports_range_stepping): Return true if
304 can_software_single_step return true.
305
89342618
YQ
3062016-10-27 Yao Qi <yao.qi@linaro.org>
307
308 * inferiors.c (find_inferior_in_random): New function.
309 * inferiors.h (find_inferior_in_random): Declare.
310 * linux-low.c (linux_wait_for_event_filtered): Call
311 find_inferior_in_random instead of find_inferior.
312
e3652c84
YQ
3132016-10-27 Yao Qi <yao.qi@linaro.org>
314
315 * linux-low.c (linux_wait_1): If single-step breakpoints are
316 inserted, remove them.
317
5a04c4cf
PA
3182016-10-26 Pedro Alves <palves@redhat.com>
319
320 * linux-low.c (handle_extended_wait): Link parent/child fork
321 threads.
322 (linux_wait_1): Unlink them.
323 (linux_set_resume_request): Ignore resume requests for
324 already-resumed and unhandled fork child threads.
325 * linux-low.h (struct lwp_info) <fork_relative>: New field.
326 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
327 New functions.
328 (handle_v_requests) <vCont>: Don't call require_running.
329 * server.h (in_queued_stop_replies): New declaration.
330
cb93dc7f
YQ
3312016-10-24 Yao Qi <yao.qi@linaro.org>
332
333 PR server/20733
334 * linux-aarch64-low.c (append_insns): Cast the return value to
335 'uint32_t *'.
336
a1078bea
YQ
3372016-10-10 Yao Qi <yao.qi@linaro.org>
338
339 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
340
1fb77080
SDJ
3412016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
342
343 * target.c (target_supports_multi_process): New function, moved
344 from...
345 * target.h (target_supports_multi_process): ... here. Remove
346 macro.
347
39b5a3b9
TT
3482016-10-05 Tom Tromey <tom@tromey.com>
349
350 PR remote/20655:
351 * tracepoint.c (handle_tracepoint_bkpts): Check
352 ipa_error_tracepoint, not ipa_stopping_tracepoint.
353
c1d0b70a
YQ
3542016-10-05 Yao Qi <yao.qi@linaro.org>
355
356 * configure.srv: Update the path of arm-*.xml files.
357
0a69eedb
YQ
3582016-10-05 Terry Guo <terry.guo@arm.com>
359 Yao Qi <yao.qi@linaro.org>
360
361 * Makefile.in: Adjust the path of rules.
362 * configure.srv: Update the path of xml files.
363 * regformats/arm-with-iwmmxt.dat: Regenerated.
364 * regformats/arm-with-neon.dat: Likewise.
365 * regformats/arm-with-vfpv2.dat: Likewise.
366 * regformats/arm-with-vfpv3.dat Likewise.
367
17e16485
YQ
3682016-09-30 Yao Qi <yao.qi@linaro.org>
369
370 PR gdbserver/20627
371 * target.c (target_stop_and_wait): Don't call
372 target_continue_no_signal, use resume_stop instead.
373
edeeb602
YQ
3742016-09-26 Yao Qi <yao.qi@linaro.org>
375
376 * linux-low.c (linux_wait_1): Call debug_exit.
377
503b1c39
PA
3782016-09-23 Pedro Alves <palves@redhat.com>
379
380 * Makefile.in (SFILES): Add common/new-op.c.
381 (OBS): Add common/new-op.o.
382 (new-op.o): New rule.
383
74172ecf
SM
3842016-09-21 Simon Marchi <simon.marchi@ericsson.com>
385
386 * .gitinore: Ignore more files.
387
fc6cda2e
YQ
3882016-09-21 Yao Qi <yao.qi@linaro.org>
389
390 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
391 23.
392
bc1e6c81
SDJ
3932016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
394
395 * server.c (start_inferior): Call target_mourn_inferior instead of
396 mourn_inferior; pass ptid_t argument to it.
397 (resume): Likewise.
398 (handle_target_event): Likewise.
399 * target.c (target_mourn_inferior): New function.
400 * target.h (mourn_inferior): Delete macro.
401
0e00e962
AA
4022016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
403
404 * linux-low.c (lwp_is_stepping): New function.
405
1d8cb77d
CL
4062016-09-06 Carl Love <cel@us.ibm.com>
407
408 * server.c (start_inferior): Fixed comment, requested comment change
409 didn't get updated correctly. Removed reference to ptrace () call as
410 it is only true on Linux systems.
411
7313bced
CL
4122016-09-06 Carl Love <cel@us.ibm.com>
413
414 * server.c (start_inferior): Do not call
415 function target_post_create_inferior () if the
416 inferior process has already exited.
417
cf6de44d
PA
4182016-09-05 Pedro Alves <palves@redhat.com>
419
420 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
421 (COMPILE.pre, CC_LD): Use CXX directly.
422 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
423 * acinclude.m4: Don't include build-with-cxx.m4.
424 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
425 * configure: Regenerate.
426
c1da6748
AT
4272016-09-02 Akash Trehan <akash.trehan123@gmail.com>
428
429 PR gdb/19495
430 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
431 call writing data to own_buf.
432
f2b9e3df
SDJ
4332016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
434
435 * target.c (mywait): Call target_wait instead of
436 the_target->wait.
437 (target_wait): New function.
438
049a8570
SDJ
4392016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
440
441 * server.c (start_inferior): New variable 'ptid'. Replace calls
442 to the_target->resume by target_continue{,_no_signal}, depending
443 on the case.
444 * target.c (target_stop_and_wait): Call target_continue_no_signal
445 instead of the_target->resume.
446 (target_continue): New function.
447
3aa5cfa0
AT
4482016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
449
450 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
451
754653a7
AZ
4522016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
453
454 PR server/20491
455 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
456 ps_prochandle.
457 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
458 * linux-arm-low.c (ps_get_thread_area): Likewise.
459 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
460 * linux-m68k-low.c (ps_get_thread_area): Likewise.
461 * linux-mips-low.c (ps_get_thread_area): Likewise.
462 * linux-nios2-low.c (ps_get_thread_area): Likewise.
463 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
464 * linux-x86-low.c (ps_get_thread_area): Likewise.
465 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
466
ed036b40
PA
4672016-08-19 Pedro Alves <palves@redhat.com>
468
469 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
470
c8ef42ee
PA
4712016-08-19 Pedro Alves <palves@redhat.com>
472
473 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
474 comment. Use memcpy instead of casting through unsigned long.
475
9c235a72
PA
4762016-08-19 Pedro Alves <palves@redhat.com>
477
478 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
479 allocating around 0x80000000.
480
201506da
PA
4812016-08-19 Pedro Alves <palves@redhat.com>
482
483 PR gdb/20415
484 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
485 (x32-avx512-linux-ipa.o): New rules.
486 * configure.ac (x86_64-*-linux*): New x32 check.
487 * configure.srv (ipa_x32_linux_regobj): New.
488 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
489 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
490 descriptions.
491 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
492 descriptions.
493 * configure: Regenerate.
494
f348d89a
PA
4952016-08-09 Pedro Alves <palves@redhat.com>
496
497 PR gdb/18653
498 * Makefile.in (OBS): Add signals-state-save-restore.o.
499 (signals-state-save-restore.o): New rule.
500 * config.in: Regenerate.
501 * configure: Regenerate.
502 * linux-low.c: Include "signals-state-save-restore.h".
503 (linux_create_inferior): Call
504 restore_original_signals_state.
505 * server.c: Include "dispositions-save-restore.h".
506 (captured_main): Call save_original_signals_state.
507
1baf5149
PA
5082016-08-05 Pedro Alves <palves@redhat.com>
509
510 * configure: Regenerate.
511
fcd4a73d
YQ
5122016-08-04 Yao Qi <yao.qi@linaro.org>
513
514 * linux-low.c (regsets_fetch_inferior_registers): Check
515 errno is ESRCH or not.
516
979659d0
YQ
5172016-08-02 Yao Qi <yao.qi@linaro.org>
518
519 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
520 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
521 (thread_db_load_search): Update.
522 (try_thread_db_load_1): Don't look for td_ta_event_addr,
523 td_ta_set_event and td_ta_event_getmsg.
524
6598661d
PA
5252016-07-26 Pedro Alves <palves@redhat.com>
526
527 PR server/20414
528 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
529 of unsigned long for 64-bit registers and use uint32_t instead of
530 unsigned int for 32-bit registers.
531
9cf12d57
PA
5322016-07-26 Pedro Alves <palves@redhat.com>
533
534 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
535 to 'ptrace'.
536
305450ed
TT
5372016-07-21 Tom Tromey <tom@tromey.com>
538
539 * configure: Rebuild.
540
2583da7c
YQ
5412016-07-21 Yao Qi <yao.qi@linaro.org>
542
543 * mem-break.c (find_gdb_breakpoint): Cast bp to
544 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
545
21536b36
YQ
5462016-07-21 Yao Qi <yao.qi@linaro.org>
547
548 * server.c (handle_v_requests): Support s and S actions
549 if target_supports_software_single_step return true.
550
8901d193
YQ
5512016-07-21 Yao Qi <yao.qi@linaro.org>
552
553 * linux-low.c (resume_stopped_resumed_lwps): If resume request
554 is resume_step, call maybe_hw_step.
555 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
556 and unstop them.
557 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
558 breakpoints or not.
559 (proceed_one_lwp): If resume request is resume_step, install
560 reinsert breakpoints and call maybe_hw_step.
561
0e9a339e
YQ
5622016-07-21 Yao Qi <yao.qi@linaro.org>
563
564 * linux-low.c (proceed_one_lwp): Declare.
565 (linux_resume_one_thread): Remove local variable 'step'.
566 Lift code enqueue signal. Call proceed_one_lwp instead of
567 linux_resume_one_lwp.
568
4281b351
YQ
5692016-07-21 Yao Qi <yao.qi@linaro.org>
570
571 * linux-low.c (linux_resume_one_thread): Call
572 enqueue_pending_signal.
573
984a2c04
YQ
5742016-07-21 Yao Qi <yao.qi@linaro.org>
575
576 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
577 * inferiors.c (do_restore_current_thread_cleanup): New function.
578 (make_cleanup_restore_current_thread): Likewise.
579 * linux-low.c (install_software_single_step_breakpoints): Call
580 make_cleanup_restore_current_thread. Switch current_thread to
581 thread.
582
bec903c9
YQ
5832016-07-21 Yao Qi <yao.qi@linaro.org>
584
585 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
586 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
587 (clone_one_breakpoint): Likewise.
588 (delete_reinsert_breakpoints): Change parameter to thread.
589 Callers updated.
590 (has_reinsert_breakpoints): Likewise.
591 (uninsert_reinsert_breakpoints): Likewise.
592 (reinsert_reinsert_breakpoints): Likewise.
593 * mem-break.h (set_reinsert_breakpoint): Update declaration.
594 (delete_reinsert_breakpoints): Likewise.
595 (reinsert_reinsert_breakpoints): Likewise.
596 (uninsert_reinsert_breakpoints): Likewise.
597 (has_reinsert_breakpoints): Likewise.
598
63c40ec7
YQ
5992016-07-21 Yao Qi <yao.qi@linaro.org>
600
601 * inferiors.c (get_thread_process): Make parameter const.
602 * inferiors.h (get_thread_process): Update declaration.
603 * mem-break.c (clone_all_breakpoints): Remove all parameters.
604 Add new parameters child_thread and parent_thread. Callers
605 updated.
606 * mem-break.h (clone_all_breakpoints): Update declaration.
607
9aa76cd0
YQ
6082016-07-21 Yao Qi <yao.qi@linaro.org>
609
610 * mem-break.c (struct breakpoint) <cond_list>: Remove.
611 <command_list, handler>: Remove.
612 (struct gdb_breakpoint): New.
613 (struct other_breakpoint): New.
614 (struct reinsert_breakpoint): New.
615 (is_gdb_breakpoint): New function.
616 (any_persistent_commands): Update command_list if
617 is_gdb_breakpoint returns true.
618 (set_breakpoint): Create breakpoints according to their types.
619 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
620 (set_gdb_breakpoint_1): Likewise.
621 (set_gdb_breakpoint): Likewise.
622 (clear_breakpoint_conditions): Change parameter type to
623 'struct gdb_breakpoint *'.
624 (clear_breakpoint_commands): Likewise.
625 (clear_breakpoint_conditions_and_commands): Likewise.
626 (add_condition_to_breakpoint): Likewise.
627 (add_breakpoint_condition): Likewise.
628 (add_commands_to_breakpoint): Likewise.
629 (check_breakpoints): Check other_breakpoint.
630 (clone_one_breakpoint): Clone breakpopint according to its type.
631 * mem-break.h (struct gdb_breakpoint): Declare.
632 (set_gdb_breakpoint): Update declaration.
633 (clear_breakpoint_conditions_and_commands): Likewise.
634 (add_breakpoint_condition): Likewise.
635 (add_breakpoint_commands): Likewise.
636 * server.c (process_point_options): Change parameter type to
637 'struct gdb_breakpoint *'.
638
811f8301
YQ
6392016-07-21 Yao Qi <yao.qi@linaro.org>
640
641 * mem-break.c (set_breakpoint_at): Rename it to ...
642 (set_breakpoint_type_at): ... it.
643 (set_breakpoint_at): Call set_breakpoint_type_at.
644 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
645 * mem-break.h (set_breakpoint_at): Update comments.
646
b1c51e36
CLT
6472016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
648
649 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
650 to buf parameter.
651 (nios2_store_gregset): Likewise.
652
ced2dffb
PA
6532016-07-01 Pedro Alves <palves@redhat.com>
654 Antoine Tremblay <antoine.tremblay@ericsson.com>
655
656 * linux-low.c: Change interface to take the target lwp_info
657 pointer directly and return void. Handle detaching from a zombie
658 thread.
659 (linux_detach_lwp_callback): New function.
660 (linux_detach): Detach from the leader thread after detaching from
661 the clone threads.
662
2ac09a5b
YQ
6632016-06-28 Yao Qi <yao.qi@linaro.org>
664
665 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
666 for variable new_offset.
667 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
668 (aarch64_ftrace_insn_reloc_cb): Likewise.
669 (aarch64_ftrace_insn_reloc_tb): Likewise.
670 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
671 PRIx64 instead of PRIx32.
672
79e7fd4f
YQ
6732016-06-28 Yao Qi <yao.qi@linaro.org>
674
675 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
676 (the_low_target): Install arm_get_syscall_trapinfo.
677
061fc021
YQ
6782016-06-28 Yao Qi <yao.qi@linaro.org>
679
680 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
681 function.
682 (the_low_target): Install aarch64_get_syscall_trapinfo.
683
4cc32bec
YQ
6842016-06-28 Yao Qi <yao.qi@linaro.org>
685
686 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
687 Callers updated.
688 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
689 Remove parameter sysno.
690 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
691 sysret.
692
782c1122
AA
6932016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
694
695 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
696 (s390_emit_ne_goto): Likewise.
697 (s390_emit_lt_goto): Likewise.
698 (s390_emit_le_goto): Likewise.
699 (s390_emit_gt_goto): Likewise.
700 (s390_emit_ge_goto): Likewise.
701 (s390x_emit_eq_goto): Likewise.
702 (s390x_emit_ne_goto): Likewise.
703 (s390x_emit_lt_goto): Likewise.
704 (s390x_emit_le_goto): Likewise.
705 (s390x_emit_gt_goto): Likewise.
706 (s390x_emit_ge_goto): Likewise.
707 (s390_emit_ops_impl): Mark variable static.
708 (s390x_emit_ops): Likewise.
709
2e7b624b
YQ
7102016-06-17 Yao Qi <yao.qi@linaro.org>
711
712 * linux-low.c (handle_extended_wait): Call
713 uninsert_reinsert_breakpoints for the parent process. Remove
714 reinsert breakpoints from the child process. Reinsert them to
715 the parent process when vfork is done.
716 * mem-break.c (uninsert_reinsert_breakpoints): New function.
717 (reinsert_reinsert_breakpoints): New function.
718 * mem-break.h (uninsert_reinsert_breakpoints): Declare
719 (reinsert_reinsert_breakpoints): Declare.
720
8a81c5d7
YQ
7212016-06-17 Yao Qi <yao.qi@linaro.org>
722
723 * linux-low.c (handle_extended_wait): If the parent is doing
724 step-over, remove the reinsert breakpoints from the forked child.
725
f50bf8e5
YQ
7262016-06-17 Yao Qi <yao.qi@linaro.org>
727
728 * linux-low.c (unsuspend_all_lwps): Declare.
729 (linux_low_filter_event): If thread exited, call finish_step_over.
730 If step-over is finished, unsuspend other threads.
731
8376a3cb
YQ
7322016-06-17 Yao Qi <yao.qi@linaro.org>
733
734 * linux-low.c (linux_resume_one_lwp_throw): Assert
735 has_reinsert_breakpoints returns false.
736 * mem-break.c (delete_disabled_breakpoints): Assert
737 bp type isn't reinsert_breakpoint.
738
f79b145d
YQ
7392016-06-17 Yao Qi <yao.qi@linaro.org>
740
741 * linux-low.c (maybe_hw_step): New function.
742 (linux_resume_one_lwp_throw): Call maybe_hw_step.
743 (finish_step_over): Switch current_thread to lwp temporarily,
744 and assert has_reinsert_breakpoints returns true.
745 (proceed_one_lwp): Call maybe_hw_step.
746 * mem-break.c (has_reinsert_breakpoints): New function.
747 * mem-break.h (has_reinsert_breakpoints): Declare.
748
0ae534d2
JT
7492016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
750
751 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
752
fcdad592
YQ
7532016-05-17 Yao Qi <yao.qi@linaro.org>
754
755 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
756 instead of find_inferior.
757
9e784964
YQ
7582016-05-05 Yao Qi <yao.qi@linaro.org>
759
760 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
761 Initialize res to zero.
762
cf2ebb6e
YQ
7632016-05-05 Yao Qi <yao.qi@linaro.org>
764
765 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
766 to uint32_t.
767
c1aebf87
UW
7682016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
769
770 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
771 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
772 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
773
35fd2deb 7742016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 775 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
776
777 * tracepoint.c (write_inferior_int8): New function.
778 (cmd_qtenable_disable): Write enable flag using
779 write_inferior_int8.
780
484b3c32
YQ
7812016-04-25 Yao Qi <yao.qi@linaro.org>
782
783 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
784 (need_step_over_p): Return zero if the LWP has pending signals
785 can be delivered on software single step target.
786
85ba7d86
YQ
7872016-04-25 Yao Qi <yao.qi@linaro.org>
788
789 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
790 return instead of error.
791
3539aa13
YQ
7922016-04-22 Yao Qi <yao.qi@linaro.org>
793
794 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
795 to 23.
796
5b061e98
YQ
7972016-04-22 Yao Qi <yao.qi@linaro.org>
798
799 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
800 signal when stepping over breakpoint with software single
801 step.
802
3451269c
PA
8032016-04-21 Pedro Alves <palves@redhat.com>
804
805 * linux-s390-low.c (s390_collect_ptrace_register)
806 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
807 add casts.
808 (s390_check_regset): Use void * instead of gdb_byte *.
809
a2358508
PA
8102016-04-20 Pedro Alves <palves@redhat.com>
811
812 * configure: Renegerate.
813
6885166d
YQ
8142016-04-20 Yao Qi <yao.qi@linaro.org>
815
816 * linux-aarch32-low.c: Include "arch/arm-linux.h".
817 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
818 number 16.
819 (arm_store_gregset): Likewise.
820
2b863f51
WT
8212016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
822
823 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
824 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
825 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
826 (amd64-avx-mpx-linux.c): New rules.
827 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
828 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
829 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
830 (srv_amd64_regobj): Add amd64-avx-mpx.o.
831 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
832 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
833 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
834 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
835 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
836 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
837 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
838 * linux-x86-low.c (x86_linux_read_description): Add case for
839 X86_XSTATE_AVX_MPX_MASK.
840 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
841 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
842 init_registers_i386_avx_mpx_linux.
843 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
844 (initialize_low_tracepoint): Call
845 init_registers_i386_avx_mpx_linux.
846 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
847 (initialize_low_tracepoint): Call
848 init_registers_amd64_avx_mpx_linux.
849 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
850 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
851 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
852 declarations.
853
9b30624b
PA
8542016-04-18 Pedro Alves <palves@redhat.com>
855
856 * configure: Regenerate.
857
45e3745e
AT
8582016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
859
860 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
861 (aarch64_emit_sub): Likewise.
862
2afc13ff
PA
8632016-04-12 Pedro Alves <palves@redhat.com>
864
865 * utils.c (prepare_to_throw_exception): Delete.
866
6e774b13
SM
8672016-04-05 Simon Marchi <simon.marchi@ericsson.com>
868
869 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
870
4dca19f8
MK
8712016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
872
873 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
874
d0a9981f
MK
8752016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
876
877 * linux-aarch64-ipa.c: Add <elf.h> include.
878 * linux-ppc-ipa.c: Add <elf.h> include.
879 * linux-s390-ipa.c: Add <elf.h> include.
880
252db07e
MK
8812016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
882
883 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
884 (get_raw_reg_ptr): Likewise.
885 (get_trace_state_variable_value_ptr): Likewise.
886 (set_trace_state_variable_value_ptr): Likewise.
887 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
888 char *.
889
14e2b6d9
MK
8902016-03-31 Wei-cheng Wang <cole945@gmail.com>
891 Marcin Kościelnicki <koriakin@0x04.net>
892
893 PR/17221
894 * linux-ppc-low.c (emit_insns): New function.
895 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
896 (ppc_emit_prologue): New function.
897 (ppc_emit_epilogue): New function.
898 (ppc_emit_add): New function.
899 (ppc_emit_sub): New function.
900 (ppc_emit_mul): New function.
901 (ppc_emit_lsh): New function.
902 (ppc_emit_rsh_signed): New function.
903 (ppc_emit_rsh_unsigned): New function.
904 (ppc_emit_ext): New function.
905 (ppc_emit_zero_ext): New function.
906 (ppc_emit_log_not): New function.
907 (ppc_emit_bit_and): New function.
908 (ppc_emit_bit_or): New function.
909 (ppc_emit_bit_xor): New function.
910 (ppc_emit_bit_not): New function.
911 (ppc_emit_equal): New function.
912 (ppc_emit_less_signed): New function.
913 (ppc_emit_less_unsigned): New function.
914 (ppc_emit_ref): New function.
915 (ppc_emit_const): New function.
916 (ppc_emit_reg): New function.
917 (ppc_emit_pop): New function.
918 (ppc_emit_stack_flush): New function.
919 (ppc_emit_swap): New function.
920 (ppc_emit_stack_adjust): New function.
921 (ppc_emit_call): New function.
922 (ppc_emit_int_call_1): New function.
923 (ppc_emit_void_call_2): New function.
924 (ppc_emit_if_goto): New function.
925 (ppc_emit_goto): New function.
926 (ppc_emit_eq_goto): New function.
927 (ppc_emit_ne_goto): New function.
928 (ppc_emit_lt_goto): New function.
929 (ppc_emit_le_goto): New function.
930 (ppc_emit_gt_goto): New function.
931 (ppc_emit_ge_goto): New function.
932 (ppc_write_goto_address): New function.
933 (ppc_emit_ops_impl): New static variable.
934 (ppc64v1_emit_prologue): New function.
935 (ppc64v2_emit_prologue): New function.
936 (ppc64_emit_epilogue): New function.
937 (ppc64_emit_add): New function.
938 (ppc64_emit_sub): New function.
939 (ppc64_emit_mul): New function.
940 (ppc64_emit_lsh): New function.
941 (ppc64_emit_rsh_signed): New function.
942 (ppc64_emit_rsh_unsigned): New function.
943 (ppc64_emit_ext): New function.
944 (ppc64_emit_zero_ext): New function.
945 (ppc64_emit_log_not): New function.
946 (ppc64_emit_bit_and): New function.
947 (ppc64_emit_bit_or): New function.
948 (ppc64_emit_bit_xor): New function.
949 (ppc64_emit_bit_not): New function.
950 (ppc64_emit_equal): New function.
951 (ppc64_emit_less_signed): New function.
952 (ppc64_emit_less_unsigned): New function.
953 (ppc64_emit_ref): New function.
954 (ppc64_emit_const): New function.
955 (ppc64v1_emit_reg): New function.
956 (ppc64v2_emit_reg): New function.
957 (ppc64_emit_pop): New function.
958 (ppc64_emit_stack_flush): New function.
959 (ppc64_emit_swap): New function.
960 (ppc64v1_emit_call): New function.
961 (ppc64v2_emit_call): New function.
962 (ppc64v1_emit_int_call_1): New function.
963 (ppc64v2_emit_int_call_1): New function.
964 (ppc64v1_emit_void_call_2): New function.
965 (ppc64v2_emit_void_call_2): New function.
966 (ppc64_emit_if_goto): New function.
967 (ppc64_emit_eq_goto): New function.
968 (ppc64_emit_ne_goto): New function.
969 (ppc64_emit_lt_goto): New function.
970 (ppc64_emit_le_goto): New function.
971 (ppc64_emit_gt_goto): New function.
972 (ppc64_emit_ge_goto): New function.
973 (ppc64v1_emit_ops_impl): New static variable.
974 (ppc64v2_emit_ops_impl): New static variable.
975 (ppc_emit_ops): New function.
976 (linux_low_target): Wire in ppc_emit_ops.
977
a2174ba4
MK
9782016-03-31 Wei-cheng Wang <cole945@gmail.com>
979 Marcin Kościelnicki <koriakin@0x04.net>
980
981 PR/17221
982 * Makefile.in: Add powerpc-*-ipa.o
983 * configure.srv: Add ipa_obj for powerpc*-linux.
984 * linux-ppc-ipa.c: New file.
985 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
986 includes.
987 (PPC_FIELD): New macro.
988 (PPC_SEXT): New macro.
989 (PPC_OP6): New macro.
990 (PPC_BO): New macro.
991 (PPC_LI): New macro.
992 (PPC_BD): New macro.
993 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
994 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
995 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
996 (ppc_get_thread_area): New function.
997 (is_elfv2_inferior): New function.
998 (gen_ds_form): New function.
999 (GEN_STD): New macro.
1000 (GEN_STDU): New macro.
1001 (GEN_LD): New macro.
1002 (GEN_LDU): New macro.
1003 (gen_d_form): New function.
1004 (GEN_ADDI): New macro.
1005 (GEN_ADDIS): New macro.
1006 (GEN_LI): New macro.
1007 (GEN_LIS): New macro.
1008 (GEN_ORI): New macro.
1009 (GEN_ORIS): New macro.
1010 (GEN_LWZ): New macro.
1011 (GEN_STW): New macro.
1012 (GEN_STWU): New macro.
1013 (gen_xfx_form): New function.
1014 (GEN_MFSPR): New macro.
1015 (GEN_MTSPR): New macro.
1016 (GEN_MFCR): New macro.
1017 (GEN_MTCR): New macro.
1018 (GEN_SYNC): New macro.
1019 (GEN_LWSYNC): New macro.
1020 (gen_x_form): New function.
1021 (GEN_OR): New macro.
1022 (GEN_MR): New macro.
1023 (GEN_LWARX): New macro.
1024 (GEN_STWCX): New macro.
1025 (GEN_CMPW): New macro.
1026 (gen_md_form): New function.
1027 (GEN_RLDICL): New macro.
1028 (GEN_RLDICR): New macro.
1029 (gen_i_form): New function.
1030 (GEN_B): New macro.
1031 (GEN_BL): New macro.
1032 (gen_b_form): New function.
1033 (GEN_BNE): New macro.
1034 (GEN_LOAD): New macro.
1035 (GEN_STORE): New macro.
1036 (gen_limm): New function.
1037 (gen_atomic_xchg): New function.
1038 (gen_call): New function.
1039 (ppc_relocate_instruction): New function.
1040 (ppc_install_fast_tracepoint_jump_pad): New function.
1041 (ppc_get_min_fast_tracepoint_insn_len): New function.
1042 (ppc_get_ipa_tdesc_idx): New function.
1043 (the_low_target): Wire in the new functions.
1044 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1045 tdescs.
1046 * linux-ppc-tdesc.h: New file.
1047
a13c4696
MK
10482016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1049
1050 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1051 (alloc_jump_pad_buffer): New function.
1052 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1053 (alloc_jump_pad_buffer): New function.
1054 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1055 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1056 (alloc_jump_pad_buffer): New function.
1057 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1058 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1059 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1060 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1061
1cda1512
MK
10622016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1063
1064 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1065 * linux-amd64-ipa.c: Likewise.
1066 * linux-i386-ipa.c: Likewise.
1067 * linux-s390-ipa.c: Likewise.
1068 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1069 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1070 set_trace_state_variable_value_ptr.
1071 (struct ipa_sym_addresses): Likewise.
1072 (symbol_list): Likewise.
1073 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1074 accessing gdb_collect directly.
1075 (gdb_collect_ptr_type): New typedef.
1076 (get_raw_reg_ptr_type): New typedef.
1077 (get_trace_state_variable_value_ptr_type): New typedef.
1078 (set_trace_state_variable_value_ptr_type): New typedef.
1079 (gdb_collect_ptr): New global.
1080 (get_raw_reg_ptr): New global.
1081 (get_trace_state_variable_value_ptr): New global.
1082 (set_trace_state_variable_value_ptr): New global.
1083 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1084 accessing get_raw_reg directly.
1085 (get_get_tsv_func_addr): Likewise for
1086 get_trace_state_variable_value_ptr.
1087 (get_set_tsv_func_addr): Likewise for
1088 set_trace_state_variable_value_ptr.
1089 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1090
72fb5488
SM
10912016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1092
1093 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1094
28170b88
MK
10952016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1096
1097 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1098 packets.
1099 (relocate_instruction): Remove own_buf.
1100 * server.c (own_buf): Make global.
1101 (handle_v_requests): Make global.
1102 * server.h (own_buf): New declaration.
1103 (handle_v_requests): New prototype.
1104
f39e8743
MK
11052016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1106
1107 PR 18377
1108 * linux-s390-low.c (add_insns): New function.
1109 (s390_emit_prologue): New function.
1110 (s390_emit_epilogue): New function.
1111 (s390_emit_add): New function.
1112 (s390_emit_sub): New function.
1113 (s390_emit_mul): New function.
1114 (s390_emit_lsh): New function.
1115 (s390_emit_rsh_signed): New function.
1116 (s390_emit_rsh_unsigned): New function.
1117 (s390_emit_ext): New function.
1118 (s390_emit_log_not): New function.
1119 (s390_emit_bit_and): New function.
1120 (s390_emit_bit_or): New function.
1121 (s390_emit_bit_xor): New function.
1122 (s390_emit_bit_not): New function.
1123 (s390_emit_equal): New function.
1124 (s390_emit_less_signed): New function.
1125 (s390_emit_less_unsigned): New function.
1126 (s390_emit_ref): New function.
1127 (s390_emit_if_goto): New function.
1128 (s390_emit_goto): New function.
1129 (s390_write_goto_address): New function.
1130 (s390_emit_litpool): New function.
1131 (s390_emit_const): New function.
1132 (s390_emit_call): New function.
1133 (s390_emit_reg): New function.
1134 (s390_emit_pop): New function.
1135 (s390_emit_stack_flush): New function.
1136 (s390_emit_zero_ext): New function.
1137 (s390_emit_swap): New function.
1138 (s390_emit_stack_adjust): New function.
1139 (s390_emit_set_r2): New function.
1140 (s390_emit_int_call_1): New function.
1141 (s390_emit_void_call_2): New function.
1142 (s390_emit_eq_goto): New function.
1143 (s390_emit_ne_goto): New function.
1144 (s390_emit_lt_goto): New function.
1145 (s390_emit_le_goto): New function.
1146 (s390_emit_gt_goto): New function.
1147 (s390_emit_ge_goto): New function.
1148 (s390x_emit_prologue): New function.
1149 (s390x_emit_epilogue): New function.
1150 (s390x_emit_add): New function.
1151 (s390x_emit_sub): New function.
1152 (s390x_emit_mul): New function.
1153 (s390x_emit_lsh): New function.
1154 (s390x_emit_rsh_signed): New function.
1155 (s390x_emit_rsh_unsigned): New function.
1156 (s390x_emit_ext): New function.
1157 (s390x_emit_log_not): New function.
1158 (s390x_emit_bit_and): New function.
1159 (s390x_emit_bit_or): New function.
1160 (s390x_emit_bit_xor): New function.
1161 (s390x_emit_bit_not): New function.
1162 (s390x_emit_equal): New function.
1163 (s390x_emit_less_signed): New function.
1164 (s390x_emit_less_unsigned): New function.
1165 (s390x_emit_ref): New function.
1166 (s390x_emit_if_goto): New function.
1167 (s390x_emit_const): New function.
1168 (s390x_emit_call): New function.
1169 (s390x_emit_reg): New function.
1170 (s390x_emit_pop): New function.
1171 (s390x_emit_stack_flush): New function.
1172 (s390x_emit_zero_ext): New function.
1173 (s390x_emit_swap): New function.
1174 (s390x_emit_stack_adjust): New function.
1175 (s390x_emit_int_call_1): New function.
1176 (s390x_emit_void_call_2): New function.
1177 (s390x_emit_eq_goto): New function.
1178 (s390x_emit_ne_goto): New function.
1179 (s390x_emit_lt_goto): New function.
1180 (s390x_emit_le_goto): New function.
1181 (s390x_emit_gt_goto): New function.
1182 (s390x_emit_ge_goto): New function.
1183 (s390_emit_ops): New function.
1184 (struct linux_target_ops): Fill in emit_ops hook.
1185
abd9baf9
MK
11862016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1187
1188 PR 18377
1189 * Makefile.in: Add s390 IPA files.
1190 * configure.srv: Build IPA for s390.
1191 * linux-s390-ipa.c: New file.
1192 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1193 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1194 (tdesc_s390_linux32): Likewise.
1195 (init_registers_s390_linux32v1): Likewise.
1196 (tdesc_s390_linux32v1): Likewise.
1197 (init_registers_s390_linux32v2): Likewise.
1198 (tdesc_s390_linux32v2): Likewise.
1199 (init_registers_s390_linux64): Likewise.
1200 (tdesc_s390_linux64): Likewise.
1201 (init_registers_s390_linux64v1): Likewise.
1202 (tdesc_s390_linux64v1): Likewise.
1203 (init_registers_s390_linux64v2): Likewise.
1204 (tdesc_s390_linux64v2): Likewise.
1205 (init_registers_s390_te_linux64): Likewise.
1206 (tdesc_s390_te_linux64): Likewise.
1207 (init_registers_s390_vx_linux64): Likewise.
1208 (tdesc_s390_vx_linux64): Likewise.
1209 (init_registers_s390_tevx_linux64): Likewise.
1210 (tdesc_s390_tevx_linux64): Likewise.
1211 (init_registers_s390x_linux64): Likewise.
1212 (tdesc_s390x_linux64): Likewise.
1213 (init_registers_s390x_linux64v1): Likewise.
1214 (tdesc_s390x_linux64v1): Likewise.
1215 (init_registers_s390x_linux64v2): Likewise.
1216 (tdesc_s390x_linux64v2): Likewise.
1217 (init_registers_s390x_te_linux64): Likewise.
1218 (tdesc_s390x_te_linux64): Likewise.
1219 (init_registers_s390x_vx_linux64): Likewise.
1220 (tdesc_s390x_vx_linux64): Likewise.
1221 (init_registers_s390x_tevx_linux64): Likewise.
1222 (tdesc_s390x_tevx_linux64): Likewise.
1223 (have_hwcap_s390_vx): New static variable.
1224 (s390_arch_setup): Fill have_hwcap_s390_vx.
1225 (s390_get_thread_area): New function.
1226 (s390_ft_entry_gpr_esa): New const.
1227 (s390_ft_entry_gpr_zarch): New const.
1228 (s390_ft_entry_misc): New const.
1229 (s390_ft_entry_fr): New const.
1230 (s390_ft_entry_vr): New const.
1231 (s390_ft_main_31): New const.
1232 (s390_ft_main_64): New const.
1233 (s390_ft_exit_fr): New const.
1234 (s390_ft_exit_vr): New const.
1235 (s390_ft_exit_misc): New const.
1236 (s390_ft_exit_gpr_esa): New const.
1237 (s390_ft_exit_gpr_zarch): New const.
1238 (append_insns): New function.
1239 (s390_relocate_instruction): New function.
1240 (s390_install_fast_tracepoint_jump_pad): New function.
1241 (s390_get_min_fast_tracepoint_insn_len): New function.
1242 (s390_get_ipa_tdesc_idx): New function.
1243 (struct linux_target_ops): Wire in the above functions.
1244 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1245 * linux-s390-tdesc.h: New file.
1246
a4105d04
MK
12472016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1248
1249 * linux-s390-low.c (s390_supports_tracepoints): New function.
1250 (struct linux_target_ops): Fill supports_tracepoints hook.
1251
35ac8b3e
YQ
12522016-03-18 Yao Qi <yao.qi@linaro.org>
1253
1254 * linux-low.c (lwp_signal_can_be_delivered): New function.
1255 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1256
94610ec4
YQ
12572016-03-18 Yao Qi <yao.qi@linaro.org>
1258
1259 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1260 0 if signal is enqueued. Remove 'signal' from one debugging
1261 message. Move one debugging message to some lines below.
1262 Remove code setting 'signal' to 0.
1263
80aea927
YQ
12642016-03-18 Yao Qi <yao.qi@linaro.org>
1265
1266 * linux-low.c (linux_low_filter_event): Remove redundant
1267 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1268
b04fd3be
MK
12692016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1270
1271 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1272 (struct linux_target_ops): Wire in the above.
1273
c40c8d4b
YQ
12742016-03-03 Yao Qi <yao.qi@linaro.org>
1275
1276 * linux-low.c: Update comments to start_step_over.
1277
0f8288ae
YQ
12782016-03-03 Yao Qi <yao.qi@linaro.org>
1279
1280 PR server/19736
1281 * linux-low.c (handle_extended_wait): Set child suspended
1282 if event_lwp->bp_reinsert isn't zero.
1283
fdbd04a8
YQ
12842016-03-02 Yao Qi <yao.qi@linaro.org>
1285
1286 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1287 enqueue_pending_signal.
1288
6896a8fa
MK
12892016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1290
1291 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1292 is actually loaded.
1293
ab503087
MK
12942016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1295
1296 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1297 (s390_regmap_3264) [!__s390x__]: New global.
1298 (s390_collect_ptrace_register): Skip map entries containing -1.
1299 (s390_supply_ptrace_register): Ditto.
1300 (s390_fill_gprs_high): New function.
1301 (s390_store_gprs_high): New function.
1302 (s390_regsets): Add NT_S390_HIGH_GPRS.
1303 (s390_get_hwcap): Enable on 31-bit.
1304 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1305 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1306 Detect NT_S390_HIGH_GPRS.
1307 (s390_usrregs_info_3264): Enable on 31-bit.
1308 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1309 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1310
ae91f625
MK
13112016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1312
1313 PR gdb/13808
1314 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1315 * configure.srv: Ditto.
1316 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1317 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1318 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1319 (init_registers_amd64_linux): Remove prototype.
1320 (tdesc_amd64_linux): Remove declaration.
1321 (get_ipa_tdesc): New function.
1322 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1323 initialize remaining tdescs.
1324 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1325 (init_registers_i386_linux): Remove prototype.
1326 (tdesc_i386_linux): Remove declaration.
1327 (get_ipa_tdesc): New function.
1328 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1329 initialize remaining tdescs.
1330 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1331 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1332 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1333 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1334 (x86_get_ipa_tdesc_idx): New function.
1335 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1336 * linux-x86-tdesc.h: New file.
1337 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1338 (target_get_ipa_tdesc_idx): New macro.
1339 * tracepoint.c (ipa_tdesc_idx): New macro.
1340 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1341 (symbol_list): Add ipa_tdesc_idx.
1342 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1343 (ipa_tdesc): Remove.
1344 (ipa_tdesc_idx): New variable.
1345 (get_context_regcache): Use get_ipa_tdesc.
1346 (gdb_collect): Ditto.
1347 (gdb_probe): Ditto.
1348 * tracepoint.h (get_ipa_tdesc): New prototype.
1349 (ipa_tdesc): Remove.
1350
e7ad2f14
PA
13512016-02-24 Pedro Alves <palves@redhat.com>
1352
1353 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1354 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1355 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1356 Factor out common code between the USE_SIGTRAP_SIGINFO and
1357 !USE_SIGTRAP_SIGINFO blocks.
1358 (linux_low_filter_event): Call save_stop_reason instead of
1359 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1360 Update comments.
1361 (linux_wait_1): Update comments.
1362
657f9cde
WW
13632016-02-24 Wei-cheng Wang <cole945@gmail.com>
1364
1365 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1366 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1367 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1368 ppc_insert_point, ppc_remove_point.
1369
b00b61e1
MK
13702016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1371
1372 * linux-s390-low.c (s390_supports_z_point_type): New function.
1373 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1374
553cb527
YQ
13752016-02-16 Yao Qi <yao.qi@linaro.org>
1376
1377 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1378 PC. Get pc from regcache_read_pc.
1379
a5652c21
YQ
13802016-02-12 Yao Qi <yao.qi@linaro.org>
1381
1382 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1383 or linux_get_pc_32bit.
1384 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1385
ed443b61
YQ
13862016-02-12 Yao Qi <yao.qi@linaro.org>
1387
1388 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1389 arm_linux_get_next_pcs_fixup.
1390
020ecd38
MK
13912016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1392
1393 * tracepoint.c (x_tracepoint_action_download): Change
1394 write_inferior_data_ptr to write_inferior_data_pointer.
1395 (cmd_qtstart): Likewise.
1396 (write_inferior_data_ptr): Remove.
1397 (download_agent_expr): Change write_inferior_data_ptr to
1398 write_inferior_data_pointer.
1399 (download_tracepoint_1): Likewise.
1400 (download_tracepoint): Likewise.
1401 (download_trace_state_variables): Likewise.
1402
7cae9051
WW
14032016-02-11 Wei-cheng Wang <cole945@gmail.com>
1404 Marcin Kościelnicki <koriakin@0x04.net>
1405
1406 * tracepoint.c (struct tracepoint_action_ops): Remove.
1407 (struct tracepoint_action): Remove ops.
1408 (m_tracepoint_action_download, r_tracepoint_action_download)
1409 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1410 size and offset accordingly.
1411 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1412 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1413 (tracepoint_action_send, tracepoint_action_download): New functions.
1414 Helpers for trace action handlers.
1415 (add_tracepoint_action): Remove setup actions ops.
1416 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1417
9f6a71b4
YQ
14182016-02-10 Yao Qi <yao.qi@linaro.org>
1419
1420 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1421
1e94266c
SM
14222016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1423
1424 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1425 to AC_OUTPUT.
1426 * configure: Regenerate.
1427
8adce034
SM
14282016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1429
1430 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1431 void * to gdb_byte *.
1432 * linux-low.c (siginfo_fixup): Likewise.
1433 (linux_xfer_siginfo): Likewise.
1434 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1435 Likewise.
1436 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1437
93813b37
WT
14382016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1439
1440 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1441 to srv_tgtobj.
1442 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1443 to srv_tgtobj.
1444 * linux-x86-low.c [__x86_64__]: Include
1445 "nat/amd64-linux-siginfo.h".
1446 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1447 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1448 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1449 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1450 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1451 (cpt_si_fd, si_timerid, si_overrun): Move from
1452 nat/amd64-linux-siginfo.c.
1453 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1454
8424cc97
SM
14552016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1456
1457 * server.c (skip_to_semicolon): Remove.
1458 (process_point_options): Use strchrnul instead of
1459 skip_to_semicolon.
1460
4d18591b
YQ
14612016-01-26 Yao Qi <yao.qi@linaro.org>
1462
1463 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1464 * linux-low.c (install_software_single_step_breakpoints): Don't
1465 call regcache_read_pc.
1466 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1467 argument pc.
1468
d8020970
YQ
14692016-01-26 Yao Qi <yao.qi@linaro.org>
1470
1471 * linux-low.c (install_software_single_step_breakpoints): Call
1472 regcache_read_pc instead of get_pc.
1473
8b207339
YQ
14742016-01-26 Yao Qi <yao.qi@linaro.org>
1475
1476 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1477 (unblock_async_io): Rename to ...
1478 (block_unblock_async_io): ... it. New function.
1479 (enable_async_io): Don't install SIGIO handler. Unblock it
1480 instead.
1481 (disable_async_io): Don't ignore SIGIO. Block it instead.
1482 (initialize_async_io): Install SIGIO handler. Don't call
1483 unblock_async_io.
1484
18879fef
YQ
14852016-01-26 Yao Qi <yao.qi@linaro.org>
1486
1487 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1488 first character is '\003', call *the_target->request_interrupt.
1489
a0f8e08a
YQ
14902016-01-25 Yao Qi <yao.qi@linaro.org>
1491
1492 * remote-utils.c (new_thread_notify): Remove.
1493 (dead_thread_notify): Likewise.
1494 * remote-utils.h (new_thread_notify): Remove declaration.
1495 (dead_thread_notify): Likewise.
1496
cc5fd9ab
MK
14972016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1498
1499 * gdb.trace/pending.exp: Fix expected message on continue.
1500
99e8eb11
MK
15012016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1502
1503 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1504 it works properly on big-endian machines where sizeof (CORE_ADDR)
1505 != sizeof (void *).
1506
a994041d
PA
15072016-01-21 Pedro Alves <palves@redhat.com>
1508
1509 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1510 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1511 * configure: Regenerate.
1512
f7a6a40d
YQ
15132016-01-21 Yao Qi <yao.qi@linaro.org>
1514
1515 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1516 is_thumb and set it according to CPSR saved on the stack.
1517 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1518 arm_sigreturn_next_pc.
1519
6f69e520
YQ
15202016-01-18 Yao Qi <yao.qi@linaro.org>
1521
1522 * linux-low.c (linux_set_pc_64bit): New function.
1523 (linux_get_pc_64bit): New function.
1524 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1525 Declare.
1526 * linux-sparc-low.c (debug_threads): Remove declaration.
1527 (sparc_get_pc): Remove.
1528 (the_low_target): Use linux_get_pc_64bit instead of
1529 sparc_get_pc.
1530 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1531 (the_low_target): Use linux_get_pc_64bit and
1532 linux_set_pc_64bit.
1533
276d4552
YQ
15342016-01-18 Yao Qi <yao.qi@linaro.org>
1535
1536 * linux-arm-low.c (debug_threads): Remove declaration.
1537 (arm_get_pc, arm_set_pc): Remove.
1538 (the_low_target): Use linux_get_pc_32bit and
1539 linux_set_pc_32bit.
1540 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1541 (the_low_target): Use linux_get_pc_32bit and
1542 linux_set_pc_32bit.
1543 * linux-cris-low.c (debug_threads): Remove declaration.
1544 (cris_get_pc, cris_set_pc,): Remove.
1545 (the_low_target): Use linux_get_pc_32bit and
1546 linux_set_pc_32bit.
1547 * linux-crisv32-low.c (debug_threads): Remove declaration.
1548 (cris_get_pc, cris_set_pc): Remove.
1549 (the_low_target): Use linux_get_pc_32bit and
1550 linux_set_pc_32bit.
1551 * linux-low.c: Include inttypes.h.
1552 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1553 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1554 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1555 (the_low_target): Use linux_get_pc_32bit and
1556 linux_set_pc_32bit.
1557 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1558 (the_low_target): Use linux_get_pc_32bit and
1559 linux_set_pc_32bit.
1560 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1561 (the_low_target): Use linux_get_pc_32bit and
1562 linux_set_pc_32bit.
1563 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1564 (the_low_target): Use linux_get_pc_32bit and
1565 linux_set_pc_32bit.
1566 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1567 (the_low_target): Use linux_get_pc_32bit and
1568 linux_set_pc_32bit.
1569
eb0edac8
GB
15702016-01-18 Gary Benson <gbenson@redhat.com>
1571
1572 * configure.ac (AC_FUNC_FORK): New check.
1573 * config.in: Regenerate.
1574 * configure: Likewise.
1575
1b451dda
YQ
15762016-01-14 Yao Qi <yao.qi@linaro.org>
1577
1578 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1579 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1580 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1581 arm_get_next_pcs_ctor.
1582
82075af2
JS
15832016-01-12 Josh Stone <jistone@redhat.com>
1584 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1585
1586 * inferiors.h: Include "gdb_vecs.h".
1587 (struct process_info): Add syscalls_to_catch.
1588 * inferiors.c (remove_process): Free syscalls_to_catch.
1589 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1590 syscall_return stops.
1591 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1592 * server.c (handle_general_set): Handle QCatchSyscalls.
1593 (handle_query): Report support for QCatchSyscalls.
1594 * target.h (struct target_ops): Add supports_catch_syscall.
1595 (target_supports_catch_syscall): New macro.
1596 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1597 (struct lwp_info): Add syscall_state.
1598 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1599 Maintain syscall_state and syscalls_to_catch across exec.
1600 (get_syscall_trapinfo): New function, proxy to the_low_target.
1601 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1602 (linux_low_filter_event): Toggle syscall_state entry/return for
1603 syscall traps, and set it ignored for all others.
1604 (gdb_catching_syscalls_p): New function.
1605 (gdb_catch_this_syscall_p): New function.
1606 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1607 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1608 (linux_supports_catch_syscall): New function.
1609 (linux_target_ops): Install it.
1610 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1611 (the_low_target): Install it.
1612
8f13a3ce
MF
16132016-01-12 Mike Frysinger <vapier@gentoo.org>
1614
1615 * acinclude.m4: Include new ../warning.m4 file.
1616 * configure: Regenerated.
1617 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1618
5b3da067
MF
16192016-01-12 Mike Frysinger <vapier@gentoo.org>
1620
1621 * ax.c (is_goto_target): Mark static.
1622 * linux-low.c (register_addr): Likewise.
1623 (linux_fetch_registers, linux_store_registers): Likewise.
1624 * mem-break.c (any_persistent_commands): Fix old prototype.
1625 (add_commands_to_breakpoint): Mark static.
1626 * regcache.c (find_register_by_name): Delete unused func.
1627 * remote-utils.c (hex_or_minus_one): Mark static.
1628 * server.c (monitor_show_help): Mark static.
1629 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1630 handle_v_requests): Likewise.
1631
bc504a31
PA
16322016-01-12 Pedro Alves <palves@redhat.com>
1633
1634 Remove use of the registered trademark symbol throughout.
1635
5a0dd67a
YQ
16362016-01-08 Yao Qi <yao.qi@linaro.org>
1637
1638 * remote-utils.c (getpkt): If c is '\003', call target hook
1639 request_interrupt.
1640
b2ca446f
YQ
16412016-01-06 Yao Qi <yao.qi@linaro.org>
1642
1643 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1644 linux-aarch32-low.c.
1645 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1646 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1647 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1648 (thumb2_breakpoint): Declare.
1649 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1650 linux-aarch32-low.h.
1651 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1652 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1653 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1654
edd88788
JB
16552016-01-01 Joel Brobecker <brobecker@adacore.com>
1656
1657 * gdbreplay.c (gdbreplay_version): Change copyright year in
1658 version message.
1659 * server.c (gdbserver_version): Likewise.
1660
65da7f14
PP
16612015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1662
1663 * server.c (crc32_table): Delete.
1664 (crc32): Use libiberty's xcrc32 function.
1665
4abd5ed2
JB
16662015-12-22 Joel Brobecker <brobecker@adacore.com>
1667
1668 * lynx-low.c (lynx_delete_thread_callback): New function.
1669 (lynx_mourn): Properly delete our process and all of its
1670 threads. Remove call to clear_inferiors.
1671
0e50fe5c
JB
16722015-12-22 Joel Brobecker <brobecker@adacore.com>
1673
1674 * target.c (thread_search_callback): Add check that
1675 the thread_stopped target callback is not NULL before
1676 calling it.
1677
35adc03f
YQ
16782015-12-21 Yao Qi <yao.qi@linaro.org>
1679
1680 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1681 arm breakpoint.
1682
bd2b2909
AT
16832015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1684
1685 * server.c (handle_query): Call target_supports_software_single_step.
1686
7fe5e27e
AT
16872015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1688
1689 * linux-low.c (single_step): New function.
1690 (linux_resume_one_lwp_throw): Call single_step.
1691 (start_step_over): Likewise.
1692
d9311bfa
AT
16932015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1694
1695 * Makefile.in (SFILES): Append arch/arm-linux.c,
1696 arch/arm-get-next-pcs.c.
1697 (arm-linux.o): New rule.
1698 (arm-get-next-pcs.o): New rule.
1699 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1700 arm-linux.o.
1701 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1702 to linux-aarch32-low.c.
1703 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1704 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1705 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1706 (thumb2_breakpoint_len): Likewise.
1707 (arm_is_thumb_mode): Make non-static.
1708 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1709 from linux-aarch32-low.c.
1710 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1711 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1712 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1713 (thumb2_breakpoint_len): Likewise.
1714 (arm_is_thumb_mode): New declaration.
1715 * linux-arm-low.c: Include arch/arm-linux.h
1716 aarch/arm-get-next-pcs.h, sys/syscall.h.
1717 (get_next_pcs_ops): New struct.
1718 (get_next_pcs_addr_bits_remove): New function.
1719 (get_next_pcs_is_thumb): New function.
1720 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1721 (arm_sigreturn_next_pc): Likewise.
1722 (get_next_pcs_syscall_next_pc): Likewise.
1723 (arm_gdbserver_get_next_pcs): Likewise.
1724 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1725 Initialize.
1726 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1727 * server.h: Include gdb_vecs.h.
1728
68ce2059
AT
17292015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1730
1731 * Makefile.in (SFILES): Append common/common-regcache.c.
1732 (OBS): Append common-regcache.o.
1733 (common-regcache.o): New rule.
1734 * regcache.c (init_register_cache): Initialize cache to
1735 REG_UNAVAILABLE.
1736 (regcache_raw_read_unsigned): New function.
1737 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1738 register_status enum.
1739
fa5308bd
AT
17402015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1741
1742 * linux-aarch64-low.c (the_low_targets): Rename
1743 breakpoint_reinsert_addr to get_next_pcs.
1744 * linux-arm-low.c (the_low_targets): Likewise.
1745 * linux-bfin-low.c (the_low_targets): Likewise.
1746 * linux-cris-low.c (the_low_targets): Likewise.
1747 * linux-crisv32-low.c (the_low_targets): Likewise.
1748 * linux-low.c (can_software_single_step): Likewise.
1749 (install_software_single_step_breakpoints): New function.
1750 (start_step_over): Use install_software_single_step_breakpoints.
1751 * linux-low.h: New CORE_ADDR vector.
1752 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1753 get_next_pcs.
1754 * linux-mips-low.c (the_low_targets): Likewise.
1755 * linux-nios2-low.c (the_low_targets): Likewise.
1756 * linux-sparc-low.c (the_low_targets): Likewise.
1757
4a6ed09b
PA
17582015-12-17 Pedro Alves <palves@redhat.com>
1759
1760 * linux-low.c (linux_kill_one_lwp): Remove references to
1761 LinuxThreads.
1762 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1763 to 'kill'.
1764 (linux_init_signals): Delete.
1765 (initialize_low): Adjust.
1766 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1767
7544db95
PA
17682015-12-16 Pedro Alves <palves@redhat.com>
1769
1770 * configure.ac (compiler warning flags): When testing a
1771 -Wno-foo option, check whether -Wfoo works instead.
1772 * configure: Regenerate.
1773
8020350c
DB
17742015-12-11 Don Breazeal <donb@codesourcery.com>
1775
1776 * server.c (process_serial_event): Don't exit from gdbserver
1777 in remote mode if there are still active inferiors.
1778
db91f502
YQ
17792015-12-11 Yao Qi <yao.qi@linaro.org>
1780
1781 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1782 arm_breakpoint_at if the process is 32-bit.
1783
b37a6290
YQ
17842015-12-11 Yao Qi <yao.qi@linaro.org>
1785
1786 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1787 arm breakpoint.
1788
17b1509a
YQ
17892015-12-07 Yao Qi <yao.qi@linaro.org>
1790
1791 * configure.srv: Append arm.o to srv_tgtobj for
1792 aarch64*-*-linux* target.
1793 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1794 from linux-arm-low.c.
1795 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1796 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1797 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1798 (thumb2_breakpoint_len): Likewise.
1799 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1800 (arm_breakpoint_kinds): Likewise.
1801 (arm_breakpoint_kind_from_pc): Likewise.
1802 (arm_sw_breakpoint_from_kind): Likewise.
1803 (arm_breakpoint_kind_from_current_state): Likewise.
1804 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1805 (arm_sw_breakpoint_from_kind): Declare.
1806 (arm_breakpoint_kind_from_current_state): Declare.
1807 (arm_breakpoint_at): Declare.
1808 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1809 arm_sw_breakpoint_from_kind if process is 32-bit.
1810 (aarch64_breakpoint_kind_from_pc): New function.
1811 (aarch64_breakpoint_kind_from_current_state): New function.
1812 (the_low_target): Initialize fields breakpoint_kind_from_pc
1813 and breakpoint_kind_from_current_state.
1814 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1815 linux-aarch32-low.c.
1816 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1817 (arm_breakpoint, arm_breakpoint_len): Likewise.
1818 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1819 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1820 (arm_is_thumb_mode): Likewise.
1821 (arm_breakpoint_at): Likewise.
1822 (arm_breakpoint_kind_from_pc): Likewise.
1823 (arm_sw_breakpoint_from_kind): Likewise.
1824 (arm_breakpoint_kind_from_current_state): Likewise.
1825
1826 Revert:
1827 2015-08-04 Yao Qi <yao.qi@linaro.org>
1828
1829 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1830 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1831 * server.c (extended_protocol): Remove "static".
1832 * server.h (extended_protocol): Declare it.
1833
ece66d65
JS
18342015-12-04 Josh Stone <jistone@redhat.com>
1835
1836 * target.h (struct target_ops) <arch_setup>: Rename to ...
1837 (struct target_ops) <post_create_inferior>: ... this.
1838 (target_arch_setup): Rename to ...
1839 (target_post_create_inferior): ... this, calling post_create_inferior.
1840 * server.c (start_inferior): Update target_arch_setup calls to
1841 target_post_create_inferior.
1842 * linux-low.c (linux_low_ptrace_options): Forward declare.
1843 (linux_arch_setup): Update its comment for general use.
1844 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1845 (struct linux_target_ops): Use linux_post_create_inferior.
1846 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1847 to post_create_inferior.
1848 * nto-low.c (struct nto_target_ops): Likewise.
1849 * spu-low.c (struct spu_target_ops): Likewise.
1850 * win32-low.c (struct win32_target_ops): Likewise.
1851
e58c48b4
AT
18522015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1853
1854 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1855
fbec8956
AT
18562015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1857
1858 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1859 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1860 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1861 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1862 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1863 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1864 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1865 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1866 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1867 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1868 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1869 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1870
9b4c5f87
AT
18712015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1872
1873 * linux-low.c (linux_look_up_symbols): Don't call
1874 linux_supports_traceclone.
1875 * linux-low.h (thread_db_init): Remove use_events argument.
1876 * thread-db.c (thread_db_use_event): Remove global variable.
1877 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1878 (struct thread_db) <td_create_bp>: Remove field.
1879 (thread_db_create_event): Remove function.
1880 (thread_db_enable_reporting): Likewise.
1881 (find_one_thread): Don't check for thread_db_use_events.
1882 (attach_thread): Likewise.
1883 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1884 (try_thread_db_load_1): Don't check for thread_db_use_events.
1885 (thread_db_init): Remove use_events argument and thread events
1886 handling.
1887 (remove_thread_event_breakpoints): Remove function.
1888 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1889
7d00775e
AT
18902015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1891
1892 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1893 New function.
1894 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1895 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1896 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1897 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1898 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1899 Initialize.
1900 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1901 New function.
1902 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1903 * linux-low.c (can_hardware_single_step): Use
1904 supports_hardware_single_step.
1905 (can_software_single_step): New function.
1906 (start_step_over): Call can_software_single_step.
1907 (linux_supports_hardware_single_step): New function.
1908 (struct target_ops) <supports_software_single_step>: Initialize.
1909 * linux-low.h (struct linux_target_ops)
1910 <supports_hardware_single_step>: Initialize.
1911 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1912 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1913 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1914 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1915 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1916 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1917 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1918 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1919 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1920 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1921 Initialize.
1922 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1923 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1924 Initialize.
1925 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1926 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1927 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1928 New function.
1929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1930 * target.h (struct target_ops): <supports_software_single_step>:
1931 New field.
1932 (target_supports_software_single_step): New macro.
1933
2d97cd35
AT
19342015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1935
1936 * linux-low.c (linux_wait_1): Fix pc advance condition.
1937 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1938 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1939
769ef81f
AT
19402015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1941
1942 * linux-arm-low.c (arm_is_thumb_mode): New function.
1943 (arm_breakpoint_at): Use arm_is_thumb_mode.
1944 (arm_breakpoint_kind_from_current_state): New function.
1945 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1946 Initialize.
1947 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1948 (linux_breakpoint_kind_from_current_state): New function.
1949 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1950 * linux-low.h (struct linux_target_ops)
1951 <breakpoint_kind_from_current_state>: New field.
1952 * target.h (struct target_ops): Likewise.
1953 (target_breakpoint_kind_from_current_state): New macro.
1954
1bebeeca
PA
19552015-11-30 Pedro Alves <palves@redhat.com>
1956
1957 * linux-low.c (linux_resume): Wake up the event loop before
1958 returning.
1959
a67a9fae
PA
19602015-11-30 Pedro Alves <palves@redhat.com>
1961
1962 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1963 check.
1964 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1965 to -1.
1966 * target.c (struct thread_search): New structure.
1967 (thread_search_callback): New function.
1968 (prev_general_thread): New global.
1969 (prepare_to_access_memory, done_accessing_memory): New functions.
1970 * target.h (prepare_to_access_memory, done_accessing_memory):
1971 Replace macros with function declarations.
1972
f2faf941
PA
19732015-11-30 Pedro Alves <palves@redhat.com>
1974
1975 PR 14618
1976 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1977 report TARGET_WAITKIND_NO_RESUMED.
1978 * remote-utils.c (prepare_resume_reply): Handle
1979 TARGET_WAITKIND_NO_RESUMED.
1980 * server.c (report_no_resumed): New global.
1981 (handle_query) <qSupported>: Handle "no-resumed+". Report
1982 "no-resumed+" support.
1983 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1984 return error if the client doesn't support no-resumed events.
1985 (push_stop_notification): New function.
1986 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1987 events if the client supports them.
1988
a681f9c9
PA
19892015-11-30 Pedro Alves <palves@redhat.com>
1990
1991 * linux-low.c (thread_still_has_status_pending_p): Don't check
1992 vCont;t here.
1993 (lwp_resumed): New function.
1994 (status_pending_p_callback): Return early if the LWP is not
1995 supposed to be resumed.
1996
65706a29
PA
19972015-11-30 Pedro Alves <palves@redhat.com>
1998
1999 * linux-low.c (handle_extended_wait): Assert that the LWP's
2000 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2001 thread create events, leave the new child's status pending.
2002 (linux_low_filter_event): If GDB wants to hear about thread exit
2003 events, leave the LWP marked dead and don't delete it.
2004 (linux_wait_for_event_filtered): Don't check for thread exit.
2005 (filter_exit_event): New function.
2006 (linux_wait_1): Use it, when returning an exit event.
2007 (linux_resume_one_lwp_throw): Assert that the LWP's
2008 waitstatus is TARGET_WAITKIND_IGNORE.
2009 * remote-utils.c (prepare_resume_reply): Handle
2010 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2011 * server.c (report_thread_events): New global.
2012 (handle_general_set): Handle QThreadEvents.
2013 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2014 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2015 TARGET_WAITKIND_THREAD_EXITED.
2016 * server.h (report_thread_events): Declare.
2017
56cf4bed
PA
20182015-11-30 Pedro Alves <palves@redhat.com>
2019
2020 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2021 the thread's last_resume_kind was resume_stop.
2022
500c1d85
PA
20232015-11-30 Pedro Alves <palves@redhat.com>
2024
2025 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2026 before returning.
2027
de979965
PA
20282015-11-30 Pedro Alves <palves@redhat.com>
2029
2030 * server.c (handle_v_requests): Handle vCtrlC.
2031
34c65914
PA
20322015-11-30 Pedro Alves <palves@redhat.com>
2033
2034 * gdbthread.h (find_any_thread_of_pid): Declare.
2035 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2036 functions.
2037 * server.c (handle_query): If current_thread is NULL, look for
2038 another thread of the selected process.
2039
79efa585 20402015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2041 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2042
2043 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2044 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2045 name in reply.
2046 * target.h (struct target_ops) <thread_name>: New field.
2047 (target_thread_name): New macro.
2048
80d82c19
JB
20492015-11-23 Joel Brobecker <brobecker@adacore.com>
2050
2051 * regcache.h (regcache_invalidate_pid): Add declaration.
2052 * regcache.c (regcache_invalidate_pid): New function, extracted
2053 from regcache_invalidate.
2054 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2055 Add trivial documentation comment.
2056 * lynx-low.c: Use regcache_invalidate_pid instead of
2057 regcache_invalidate.
2058
64da5dd5
JB
20592015-11-23 Joel Brobecker <brobecker@adacore.com>
2060
2061 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2062 and Elf64_auxv_t if the target is Android.
2063
37ce4055
DE
20642015-11-22 Doug Evans <xdje42@gmail.com>
2065
2066 * target.h: #include <sys/types.h>.
2067
06e03fff
PA
20682015-11-19 Pedro Alves <palves@redhat.com>
2069
2070 * linux-low.c (linux_process_qsupported): Change prototype.
2071 Adjust.
2072 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2073 Change prototype.
2074 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2075 and adjust to loop over all features.
2076 * server.c (handle_query) <qSupported>: Adjust to call
2077 target_process_qsupported once, passing it a vector of unprocessed
2078 features.
2079 * target.h (struct target_ops) <process_qsupported>: Change
2080 prototype.
2081 (target_process_qsupported): Adjust.
2082
9a084706
PA
20832015-11-19 Pedro Alves <palves@redhat.com>
2084
2085 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2086 mode.
2087 * configure: Regenerate.
2088
dad44a1f
PA
20892015-11-19 Pedro Alves <palves@redhat.com>
2090
2091 * configure: Regenerate.
2092
231c0592
YQ
20932015-11-19 Yao Qi <yao.qi@linaro.org>
2094
2095 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2096 type to uint32_t.
2097
6c1c9a8b
YQ
20982015-11-19 Yao Qi <yao.qi@linaro.org>
2099
2100 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2101 (struct aarch64_operand): Move enum out.
2102
9caa3311
YQ
21032015-11-19 Yao Qi <yao.qi@linaro.org>
2104
2105 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2106 struct user_fpsimd_state *.
2107 (aarch64_store_fpregset): Likewise.
2108
6a69a054
YQ
21092015-11-19 Yao Qi <yao.qi@linaro.org>
2110
2111 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2112 struct user_pt_regs *.
2113 (aarch64_store_gregset): Likewise.
2114
1798301e
PA
21152015-11-18 Pedro Alves <palves@redhat.com>
2116
2117 * Makefile.in (all_object_files): Add $IPA_OBJS.
2118
ce7715e2
PA
21192015-11-17 Pedro Alves <palves@redhat.com>
2120
2121 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2122 GDB_SIGNAL_0 and gdb_signal_to_string.
2123
c0879059
PA
21242015-11-17 Pedro Alves <palves@redhat.com>
2125
2126 * win32-low.c (handle_output_debug_string): Remove parameter.
2127 (win32_kill): Remove our_status local and adjust call to
2128 handle_output_debug_string.
2129 (get_child_debug_event): Adjust call to
2130 handle_output_debug_string.
2131
1996e237
SM
21322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2133
2134 * linux-mips-low.c (mips_fill_gregset): Add cast.
2135 (mips_store_gregset): Likewise.
2136 (mips_fill_fpregset): Likewise.
2137 (mips_store_fpregset): Likewise.
2138
cbec665b
SM
21392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2140
2141 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2142 priv.
2143
eb3e3c67
SM
21442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2145
2146 * linux-mips-low.c (mips_linux_new_thread): Change type of
2147 watch_type to enum target_hw_bp_type.
2148
171de4b8
SM
21492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2150
2151 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2152 Change return type to arm_hwbp_type.
2153
04248ead
SM
21542015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2155
2156 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2157 (arm_store_gregset): Likewise.
2158 * linux-arm-low.c (arm_get_hwcap): Likewise.
2159 (arm_read_description): Likewise.
2160
04b3479c
SM
21612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2162
2163 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2164
2bc84e8a
SM
21652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2166
2167 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2168 (ppc_fill_vsxregset): Likewise.
2169 (ppc_store_vsxregset): Likewise.
2170 (ppc_fill_vrregset): Likewise.
2171 (ppc_store_vrregset): Likewise.
2172 (ppc_fill_evrregset): Likewise.
2173 (ppc_store_evrregset): Likewise.
2174
e6c5bb05
SM
21752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2176
2177 * linux-ppc-low.c (ppc_usrregs_info): Remove
2178 forward-declaration.
2179 (ppc_arch_setup): Move lower in file.
2180
7ea45d72
SM
21812015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2182
2183 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2184 (ps_pdwrite): Likewise.
2185
69291610
HW
21862015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2187
2188 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2189 to after assert checks.
2190
b42945fd
SM
21912015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2192
2193 * proc-service.c (ps_pdread): Add/adjust casts.
2194 (ps_pdwrite): Add/adjust casts.
2195
d6f85c84
SM
21962015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2197
2198 * server.c (handle_search_memory_1): Cast return value of
2199 memmem.
2200
f98cd059
SM
22012015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2202
2203 * server.c (write_qxfer_response): Change type of data to
2204 gdb_byte *.
2205
d2412fa5
PA
22062015-10-29 Pedro Alves <palves@redhat.com>
2207
2208 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2209
c17414a2
PA
22102015-10-29 Pedro Alves <palves@redhat.com>
2211
2212 * tracepoint.c (clear_installed_tracepoints): Add casts.
2213
e053fbc4
PA
22142015-10-29 Pedro Alves <palves@redhat.com>
2215
2216 * server.c (handle_v_cont, process_serial_event): Add enum
2217 gdb_signal casts to signal parsing code.
2218
add67df8
PA
22192015-10-29 Pedro Alves <palves@redhat.com>
2220
2221 * linux-low.h (NULL_REGSET): Define.
2222 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2223 * linux-arm-low.c (arm_regsets): Likewise.
2224 * linux-crisv32-low.c (cris_regsets): Likewise.
2225 * linux-m68k-low.c (m68k_regsets): Likewise.
2226 * linux-mips-low.c (mips_regsets): Likewise.
2227 * linux-nios2-low.c (nios2_regsets): Likewise.
2228 * linux-ppc-low.c (ppc_regsets): Likewise.
2229 * linux-s390-low.c (s390_regsets): Likewise.
2230 * linux-sh-low.c (sh_regsets): Likewise.
2231 * linux-sparc-low.c (sparc_regsets): Likewise.
2232 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2233 * linux-tile-low.c (tile_regsets): Likewise.
2234 * linux-x86-low.c (x86_regsets): Likewise.
2235 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2236
50bc912a
PA
22372015-10-29 Pedro Alves <palves@redhat.com>
2238
2239 * linux-low.h (NULL_REGSET): Define.
2240 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2241 * linux-arm-low.c (arm_regsets): Likewise.
2242 * linux-crisv32-low.c (cris_regsets): Likewise.
2243 * linux-m68k-low.c (m68k_regsets): Likewise.
2244 * linux-mips-low.c (mips_regsets): Likewise.
2245 * linux-nios2-low.c (nios2_regsets): Likewise.
2246 * linux-ppc-low.c (ppc_regsets): Likewise.
2247 * linux-s390-low.c (s390_regsets): Likewise.
2248 * linux-sh-low.c (sh_regsets): Likewise.
2249 * linux-sparc-low.c (sparc_regsets): Likewise.
2250 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2251 * linux-tile-low.c (tile_regsets): Likewise.
2252 * linux-x86-low.c (x86_regsets): Likewise.
2253 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2254
682b2546
DE
22552015-10-26 Doug Evans <dje@google.com>
2256
2257 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2258
963843d4
DE
22592015-10-26 Doug Evans <dje@google.com>
2260
2261 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2262
d41401ac
DE
22632015-10-26 Doug Evans <dje@google.com>
2264
2265 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2266 for debug_printf.
2267 (attach_thread, find_new_threads_callback): Ditto.
2268
3db28855
AT
22692015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2270
2271 * mem-break.h (set_breakpoint_data): Remove.
2272
fb78e89c
AT
22732015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2274
2275 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2276 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2277 (initialize_low): Remove set_breakpoint_data call.
2278 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2279 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2280 (initialize_low): Remove set_breakpoint_data call.
2281 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2282 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2283 (initialize_low): Remove set_breakpoint_data call.
2284
2e6ee069
AT
22852015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2286
2287 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2288 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2289 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2290 * target.h (target_breakpoint_kind_from_pc): New macro.
2291
1652a986
AT
22922015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2293
2294 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2295 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2296 the default breakpoint kind.
2297
abeead09
AT
22982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2299
2300 * linux-arm-low.c (arm_supports_z_point_type): Add software
2301 breakpoint support.
2302
b0b4b501
AT
23032015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2304
2305 * linux-arm-low.c: Refactor breakpoint definitions.
2306 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2307 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2308
8689682c
AT
23092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2310
2311 * Makefile.in: Add arm.c/o.
2312 * configure.srv: Likewise.
2313 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2314 (arm_breakpoint_kind_from_pc): New function.
2315 (arm_sw_breakpoint_from_kind): Return proper kind.
2316 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2317
27165294
AT
23182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2319
2320 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2321 removal.
2322 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2323 (struct raw_breakpoint) <size>: Remove.
2324 (struct raw_breakpoint) <kind>: Add.
2325 (bp_size): New function.
2326 (bp_opcode): Likewise.
2327 (find_raw_breakpoint_at): Adjust for kind.
2328 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2329 (remove_memory_breakpoint): Adjust for kind call bp_size.
2330 (set_raw_breakpoint_at): Adjust for kind.
2331 (set_breakpoint): Likewise.
2332 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2333 (delete_raw_breakpoint): Adjust for kind.
2334 (delete_breakpoint): Likewise.
2335 (find_gdb_breakpoint): Likewise.
2336 (set_gdb_breakpoint_1): Likewise.
2337 (set_gdb_breakpoint): Likewise.
2338 (delete_gdb_breakpoint_1): Likewise.
2339 (delete_gdb_breakpoint): Likewise.
2340 (uninsert_raw_breakpoint): Likewise.
2341 (reinsert_raw_breakpoint): Likewise.
2342 (set_breakpoint_data): Remove.
2343 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2344 (check_mem_read): Adjust for kind call bp_size.
2345 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2346 (clone_one_breakpoint): Adjust for kind.
2347 * mem-break.h (set_gdb_breakpoint): Likewise.
2348 (delete_gdb_breakpoint): Likewise.
2349 * server.c (process_serial_event): Likewise.
2350
dd373349
AT
23512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2352
2353 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2354 (struct linux_target_ops) <breakpoint>: Remove.
2355 (struct linux_target_ops) <breakpoint_len>: Remove.
2356 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2358 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2359 (arm_sw_breakpoint_from_kind): New function.
2360 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2361 (struct linux_target_ops) <breakpoint>: Remove.
2362 (struct linux_target_ops) <breakpoint_len>: Remove.
2363 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2364 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2365 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2366 (struct linux_target_ops) <breakpoint>: Remove.
2367 (struct linux_target_ops) <breakpoint_len>: Remove.
2368 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2369 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2370 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2371 (struct linux_target_ops) <breakpoint>: Remove.
2372 (struct linux_target_ops) <breakpoint_len>: Remove.
2373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2374 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2375 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2376 and sw_breakpoint_from_kind to increment the pc.
2377 (linux_breakpoint_kind_from_pc): New function.
2378 (linux_sw_breakpoint_from_kind): New function.
2379 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2380 (initialize_low): Call breakpoint_kind_from_pc and
2381 sw_breakpoint_from_kind to replace breakpoint_data/len.
2382 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2383 New field.
2384 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2385 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2386 (struct linux_target_ops) <breakpoint>: Remove.
2387 (struct linux_target_ops) <breakpoint_len>: Remove.
2388 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2389 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2390 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2391 (struct linux_target_ops) <breakpoint>: Remove.
2392 (struct linux_target_ops) <breakpoint_len>: Remove.
2393 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2394 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2395 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2396 (struct linux_target_ops) <breakpoint>: Remove.
2397 (struct linux_target_ops) <breakpoint_len>: Remove.
2398 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2399 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2400 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2401 (struct linux_target_ops) <breakpoint>: Remove.
2402 (struct linux_target_ops) <breakpoint_len>: Remove.
2403 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2404 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2405 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2406 (struct linux_target_ops) <breakpoint>: Remove.
2407 (struct linux_target_ops) <breakpoint_len>: Remove.
2408 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2409 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2410 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2411 (struct linux_target_ops) <breakpoint>: Remove.
2412 (struct linux_target_ops) <breakpoint_len>: Remove.
2413 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2414 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2415 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2416 (struct linux_target_ops) <breakpoint>: Remove.
2417 (struct linux_target_ops) <breakpoint_len>: Remove.
2418 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2419 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2420 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2421 (struct linux_target_ops) <breakpoint>: Remove.
2422 (struct linux_target_ops) <breakpoint_len>: Remove.
2423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2425 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2426 (struct linux_target_ops) <breakpoint>: Remove.
2427 (struct linux_target_ops) <breakpoint_len>: Remove.
2428 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2429 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2430 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2431 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2432 (struct linux_target_ops) <breakpoint>: Remove.
2433 (struct linux_target_ops) <breakpoint_len>: Remove.
2434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2436 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2437 (struct linux_target_ops) <breakpoint>: Remove.
2438 (struct linux_target_ops) <breakpoint_len>: Remove.
2439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2441
4cd98a19
AT
24422015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2443
2444 * linux-cris-low.c (cris_get_pc): Remove void arg.
2445
774ee6d2
AR
24462015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2447
2448 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2449 variable name.
2450
833dcd29
AR
24512015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2452
2453 * inferiors.c (thread_pid_matches_callback): New function.
2454 (find_thread_process): New function.
2455 (remove_thread): Reset current_thread.
2456 (remove_process): Assert threads have been removed first.
2457
8d689ee5
YQ
24582015-10-15 Yao Qi <yao.qi@linaro.org>
2459
2460 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2461 if it is 3.
2462 (aarch64_remove_point): Likewise.
2463 * regcache.c (regcache_register_size): New function.
2464
1c2e1515
YQ
24652015-10-12 Yao Qi <yao.qi@linaro.org>
2466
2467 * linux-aarch64-low.c: Update all callers as emit_load_store
2468 is renamed to aarch64_emit_load_store.
2469
e1c587c3
YQ
24702015-10-12 Yao Qi <yao.qi@linaro.org>
2471
2472 * linux-aarch64-low.c: Update all callers of function renaming
2473 from emit_insn to aarch64_emit_insn.
2474
b6542f81
YQ
24752015-10-12 Yao Qi <yao.qi@linaro.org>
2476
2477 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2478 arch/aarch64-insn.h.
2479 (struct aarch64_memory_operand): Likewise.
2480 (ENCODE): Likewise.
2481 (emit_insn): Move to arch/aarch64-insn.c.
2482 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2483 (emit_load_store): Move to arch/aarch64-insn.c.
2484 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2485 (can_encode_int32): Remove.
2486
246994ce
YQ
24872015-10-12 Yao Qi <yao.qi@linaro.org>
2488
2489 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2490 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2491 (aarch64_relocate_instruction): Likewise.
2492 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2493 (struct aarch64_insn_visitor): Likewise.
2494
0badd99f
YQ
24952015-10-12 Yao Qi <yao.qi@linaro.org>
2496
2497 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2498 (struct aarch64_insn_visitor): New.
2499 (struct aarch64_insn_relocation_data): New.
2500 (aarch64_ftrace_insn_reloc_b): New function.
2501 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2502 (aarch64_ftrace_insn_reloc_cb): Likewise.
2503 (aarch64_ftrace_insn_reloc_tb): Likewise.
2504 (aarch64_ftrace_insn_reloc_adr): Likewise.
2505 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2506 (aarch64_ftrace_insn_reloc_others): Likewise.
2507 (visitor): New.
2508 (aarch64_relocate_instruction): Use visitor.
2509
dfaffe9d
YQ
25102015-10-12 Yao Qi <yao.qi@linaro.org>
2511
2512 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2513 int. Add argument buf.
2514 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2515 aarch64_relocate_instruction.
2516
70b439f0
YQ
25172015-10-12 Yao Qi <yao.qi@linaro.org>
2518
2519 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2520 argument insn. Remove local variable insn. Don't call
2521 target_read_uint32.
2522 (aarch64_install_fast_tracepoint_jump_pad): Call
2523 target_read_uint32.
2524
7781c06f
YQ
25252015-09-30 Yao Qi <yao.qi@linaro.org>
2526
2527 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2528 (emit_load_store_pair): Likewise.
2529
9a3c8263
SM
25302015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2531
2532 * dll.c (match_dll): Add cast(s).
2533 (unloaded_dll): Likewise.
2534 * linux-low.c (second_thread_of_pid_p): Likewise.
2535 (delete_lwp_callback): Likewise.
2536 (count_events_callback): Likewise.
2537 (select_event_lwp_callback): Likewise.
2538 (linux_set_resume_request): Likewise.
2539 * server.c (accumulate_file_name_length): Likewise.
2540 (emit_dll_description): Likewise.
2541 (handle_qxfer_threads_worker): Likewise.
2542 (visit_actioned_threads): Likewise.
2543 * thread-db.c (any_thread_of): Likewise.
2544 * tracepoint.c (same_process_p): Likewise.
2545 (match_blocktype): Likewise.
2546 (build_traceframe_info_xml): Likewise.
2547
224c3ddb
SM
25482015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2549
2550 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2551 assignment.
2552 (gdb_unparse_agent_expr): Likewise.
2553 * hostio.c (require_data): Likewise.
2554 (handle_pread): Likewise.
2555 * linux-low.c (disable_regset): Likewise.
2556 (fetch_register): Likewise.
2557 (store_register): Likewise.
2558 (get_dynamic): Likewise.
2559 (linux_qxfer_libraries_svr4): Likewise.
2560 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2561 (set_fast_tracepoint_jump): Likewise.
2562 (uninsert_fast_tracepoint_jumps_at): Likewise.
2563 (reinsert_fast_tracepoint_jumps_at): Likewise.
2564 (validate_inserted_breakpoint): Likewise.
2565 (clone_agent_expr): Likewise.
2566 * regcache.c (init_register_cache): Likewise.
2567 * remote-utils.c (putpkt_binary_1): Likewise.
2568 (decode_M_packet): Likewise.
2569 (decode_X_packet): Likewise.
2570 (look_up_one_symbol): Likewise.
2571 (relocate_instruction): Likewise.
2572 (monitor_output): Likewise.
2573 * server.c (handle_search_memory): Likewise.
2574 (handle_qxfer_exec_file): Likewise.
2575 (handle_qxfer_libraries): Likewise.
2576 (handle_qxfer): Likewise.
2577 (handle_query): Likewise.
2578 (handle_v_cont): Likewise.
2579 (handle_v_run): Likewise.
2580 (captured_main): Likewise.
2581 * target.c (write_inferior_memory): Likewise.
2582 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2583 * tracepoint.c (init_trace_buffer): Likewise.
2584 (add_tracepoint_action): Likewise.
2585 (add_traceframe): Likewise.
2586 (add_traceframe_block): Likewise.
2587 (cmd_qtdpsrc): Likewise.
2588 (cmd_qtdv): Likewise.
2589 (cmd_qtstatus): Likewise.
2590 (response_source): Likewise.
2591 (response_tsv): Likewise.
2592 (cmd_qtnotes): Likewise.
2593 (gdb_collect): Likewise.
2594 (initialize_tracepoint): Likewise.
2595
afbe19f8
PL
25962015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2597
2598 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2599 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2600 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2601 <NOP>: New.
2602 (enum aarch64_condition_codes): New enum.
2603 (w0): New static global.
2604 (fp): Likewise.
2605 (lr): Likewise.
2606 (struct aarch64_memory_operand) <type>: New
2607 MEMORY_OPERAND_POSTINDEX type.
2608 (postindex_memory_operand): New helper function.
2609 (emit_ret): New function.
2610 (emit_load_store_pair): New function, factored out of emit_stp
2611 with support for MEMORY_OPERAND_POSTINDEX.
2612 (emit_stp): Rewrite using emit_load_store_pair.
2613 (emit_ldp): New function.
2614 (emit_load_store): Likewise.
2615 (emit_ldr): Mention post-index instruction in comment.
2616 (emit_ldrh): New function.
2617 (emit_ldrb): New function.
2618 (emit_ldrsw): Mention post-index instruction in comment.
2619 (emit_str): Likewise.
2620 (emit_subs): New function.
2621 (emit_cmp): Likewise.
2622 (emit_and): Likewise.
2623 (emit_orr): Likewise.
2624 (emit_orn): Likewise.
2625 (emit_eor): Likewise.
2626 (emit_mvn): Likewise.
2627 (emit_lslv): Likewise.
2628 (emit_lsrv): Likewise.
2629 (emit_asrv): Likewise.
2630 (emit_mul): Likewise.
2631 (emit_sbfm): Likewise.
2632 (emit_sbfx): Likewise.
2633 (emit_ubfm): Likewise.
2634 (emit_ubfx): Likewise.
2635 (emit_csinc): Likewise.
2636 (emit_cset): Likewise.
2637 (emit_nop): Likewise.
2638 (emit_ops_insns): New helper function.
2639 (emit_pop): Likewise.
2640 (emit_push): Likewise.
2641 (aarch64_emit_prologue): New function.
2642 (aarch64_emit_epilogue): Likewise.
2643 (aarch64_emit_add): Likewise.
2644 (aarch64_emit_sub): Likewise.
2645 (aarch64_emit_mul): Likewise.
2646 (aarch64_emit_lsh): Likewise.
2647 (aarch64_emit_rsh_signed): Likewise.
2648 (aarch64_emit_rsh_unsigned): Likewise.
2649 (aarch64_emit_ext): Likewise.
2650 (aarch64_emit_log_not): Likewise.
2651 (aarch64_emit_bit_and): Likewise.
2652 (aarch64_emit_bit_or): Likewise.
2653 (aarch64_emit_bit_xor): Likewise.
2654 (aarch64_emit_bit_not): Likewise.
2655 (aarch64_emit_equal): Likewise.
2656 (aarch64_emit_less_signed): Likewise.
2657 (aarch64_emit_less_unsigned): Likewise.
2658 (aarch64_emit_ref): Likewise.
2659 (aarch64_emit_if_goto): Likewise.
2660 (aarch64_emit_goto): Likewise.
2661 (aarch64_write_goto_address): Likewise.
2662 (aarch64_emit_const): Likewise.
2663 (aarch64_emit_call): Likewise.
2664 (aarch64_emit_reg): Likewise.
2665 (aarch64_emit_pop): Likewise.
2666 (aarch64_emit_stack_flush): Likewise.
2667 (aarch64_emit_zero_ext): Likewise.
2668 (aarch64_emit_swap): Likewise.
2669 (aarch64_emit_stack_adjust): Likewise.
2670 (aarch64_emit_int_call_1): Likewise.
2671 (aarch64_emit_void_call_2): Likewise.
2672 (aarch64_emit_eq_goto): Likewise.
2673 (aarch64_emit_ne_goto): Likewise.
2674 (aarch64_emit_lt_goto): Likewise.
2675 (aarch64_emit_le_goto): Likewise.
2676 (aarch64_emit_gt_goto): Likewise.
2677 (aarch64_emit_ge_got): Likewise.
2678 (aarch64_emit_ops_impl): New static global variable.
2679 (aarch64_emit_ops): New target function, return
2680 &aarch64_emit_ops_impl.
2681 (struct linux_target_ops): Install it.
2682
bb903df0
PL
26832015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2684
2685 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2686 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2687 aarch64-ipa.o.
2688 * linux-aarch64-ipa.c: New file.
2689 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2690 and endian.h.
2691 (aarch64_get_thread_area): New target method.
2692 (extract_signed_bitfield): New helper function.
2693 (aarch64_decode_ldr_literal): New function.
2694 (enum aarch64_opcodes): New enum.
2695 (struct aarch64_register): New struct.
2696 (struct aarch64_operand): New struct.
2697 (x0): New static global.
2698 (x1): Likewise.
2699 (x2): Likewise.
2700 (x3): Likewise.
2701 (x4): Likewise.
2702 (w2): Likewise.
2703 (ip0): Likewise.
2704 (sp): Likewise.
2705 (xzr): Likewise.
2706 (aarch64_register): New helper function.
2707 (register_operand): Likewise.
2708 (immediate_operand): Likewise.
2709 (struct aarch64_memory_operand): New struct.
2710 (offset_memory_operand): New helper function.
2711 (preindex_memory_operand): Likewise.
2712 (enum aarch64_system_control_registers): New enum.
2713 (ENCODE): New macro.
2714 (emit_insn): New helper function.
2715 (emit_b): New function.
2716 (emit_bcond): Likewise.
2717 (emit_cb): Likewise.
2718 (emit_tb): Likewise.
2719 (emit_blr): Likewise.
2720 (emit_stp): Likewise.
2721 (emit_ldp_q_offset): Likewise.
2722 (emit_stp_q_offset): Likewise.
2723 (emit_load_store): Likewise.
2724 (emit_ldr): Likewise.
2725 (emit_ldrsw): Likewise.
2726 (emit_str): Likewise.
2727 (emit_ldaxr): Likewise.
2728 (emit_stxr): Likewise.
2729 (emit_stlr): Likewise.
2730 (emit_data_processing_reg): Likewise.
2731 (emit_data_processing): Likewise.
2732 (emit_add): Likewise.
2733 (emit_sub): Likewise.
2734 (emit_mov): Likewise.
2735 (emit_movk): Likewise.
2736 (emit_mov_addr): Likewise.
2737 (emit_mrs): Likewise.
2738 (emit_msr): Likewise.
2739 (emit_sevl): Likewise.
2740 (emit_wfe): Likewise.
2741 (append_insns): Likewise.
2742 (can_encode_int32_in): New helper function.
2743 (aarch64_relocate_instruction): New function.
2744 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2745 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2746 (struct linux_target_ops): Install aarch64_get_thread_area,
2747 aarch64_install_fast_tracepoint_jump_pad and
2748 aarch64_get_min_fast_tracepoint_insn_len.
2749
787749ea
PL
27502015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2751
2752 * Makefile.in (aarch64-insn.o): New rule.
2753 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2754
9812b2e6
YQ
27552015-09-21 Yao Qi <yao.qi@linaro.org>
2756
2757 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2758
18fe412b
YQ
27592015-09-21 Yao Qi <yao.qi@linaro.org>
2760
2761 * tracepoint.c (max_jump_pad_size): Remove.
2762
a0cc84cd
YQ
27632015-09-18 Yao Qi <yao.qi@linaro.org>
2764
2765 * linux-aarch64-low.c: Don't include sys/uio.h.
2766 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2767
d78908cf
WW
27682015-09-16 Wei-cheng Wang <cole945@gmail.com>
2769
2770 * tracepoint.c (eval_result_type): Change prototype.
2771 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2772
d57e0d50
PA
27732015-09-15 Pedro Alves <palves@redhat.com>
2774
2775 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2776 Check whether to report exec events instead of checking whether
2777 multiprocess is enabled.
2778
5a676acc
PA
27792015-09-15 Pedro Alves <palves@redhat.com>
2780
2781 PR remote/18965
2782 * remote-utils.c (prepare_resume_reply): Merge
2783 TARGET_WAITKIND_VFORK_DONE switch case with the
2784 TARGET_WAITKIND_FORKED case.
2785
7c5d0fad
YQ
27862015-09-15 Yao Qi <yao.qi@linaro.org>
2787
2788 * server.c (handle_query): Check string comparison using
2789 "else if" instead of "if".
2790
750ce8d1
YQ
27912015-09-15 Yao Qi <yao.qi@linaro.org>
2792
2793 * server.c (vCont_supported): New global variable.
2794 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2795 matches. Append ";vContSupported+" to own_buf.
2796 (handle_v_requests): Append ";s;S" to own_buf if target supports
2797 hardware single step or vCont_supported is false.
2798 (capture_main): Set vCont_supported to zero.
2799
70b90b91
YQ
28002015-09-15 Yao Qi <yao.qi@linaro.org>
2801
2802 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2803 it to ...
2804 (linux_supports_hardware_single_step): ... New function.
2805 (linux_target_ops): Update.
2806 * lynx-low.c (lynx_target_ops): Set field
2807 supports_hardware_single_step to target_can_do_hardware_single_step.
2808 * nto-low.c (nto_target_ops): Likewise.
2809 * spu-low.c (spu_target_ops): Likewise.
2810 * win32-low.c (win32_target_ops): Likewise.
2811 * target.c (target_can_do_hardware_single_step): New function.
2812 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2813 Remove. <supports_hardware_single_step>: New field.
2814 (target_supports_conditional_breakpoints): Remove.
2815 (target_supports_hardware_single_step): New macro.
2816 (target_can_do_hardware_single_step): Declare.
2817 * server.c (handle_query): Use target_supports_hardware_single_step
2818 instead of target_supports_conditional_breakpoints.
2819
ade90bde
YQ
28202015-09-15 Yao Qi <yao.qi@linaro.org>
2821
2822 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2823 function.
2824 (struct linux_target_ops the_low_target): Install
2825 aarch64_linux_siginfo_fixup.
2826
94585166
DB
28272015-09-11 Don Breazeal <donb@codesourcery.com>
2828 Luis Machado <lgustavo@codesourcery.com>
2829
2830 * linux-low.c (linux_mourn): Static declaration.
2831 (linux_arch_setup): Move in front of
2832 handle_extended_wait.
2833 (linux_arch_setup_thread): New function.
2834 (handle_extended_wait): Handle exec events. Call
2835 linux_arch_setup_thread. Make event_lwp argument a
2836 pointer-to-a-pointer.
2837 (check_zombie_leaders): Do not check stopped threads.
2838 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2839 (linux_low_filter_event): Add lwp and thread for exec'ing
2840 non-leader thread if leader thread has been deleted.
2841 Refactor code into linux_arch_setup_thread and call it.
2842 Pass child lwp pointer by reference to handle_extended_wait.
2843 (linux_wait_for_event_filtered): Update comment.
2844 (linux_wait_1): Prevent clobbering exec event status.
2845 (linux_supports_exec_events): New function.
2846 (linux_target_ops) <supports_exec_events>: Initialize new member.
2847 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2848 new member.
2849 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2850 * server.c (report_exec_events): New global variable.
2851 (handle_query): Handle qSupported query for exec-events feature.
2852 (captured_main): Initialize report_exec_events.
2853 * server.h (report_exec_events): Declare new global variable.
2854 * target.h (struct target_ops) <supports_exec_events>: New
2855 member.
2856 (target_supports_exec_events): New macro.
2857 * win32-low.c (win32_target_ops) <supports_exec_events>:
2858 Initialize new member.
2859
0568462b
MM
28602015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2861
2862 * linux-low.c (linux_low_enable_btrace): Remove.
2863 (linux_target_ops): Replace linux_low_enable_btrace with
2864 linux_enable_btrace.
2865
39edd165
YQ
28662015-09-03 Yao Qi <yao.qi@linaro.org>
2867
2868 * linux-aarch64-low.c (aarch64_insert_point): Call
2869 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2870 returns true.
2871
1db33b5a
UW
28722015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2873
2874 * linux-low.c (check_stopped_by_breakpoint): Use
2875 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2876
ab290430
PA
28772015-08-27 Pedro Alves <palves@redhat.com>
2878
2879 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2880
8d749320
SM
28812015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2882
6711b7f8
SM
2883 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2884 the XNEW-family equivalent.
8d749320
SM
2885 (compile_bytecodes): Likewise.
2886 * dll.c (loaded_dll): Likewise.
2887 * event-loop.c (append_callback_event): Likewise.
2888 (create_file_handler): Likewise.
2889 (create_file_event): Likewise.
2890 * hostio.c (handle_open): Likewise.
2891 * inferiors.c (add_thread): Likewise.
2892 (add_process): Likewise.
2893 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2894 * linux-arm-low.c (arm_new_process): Likewise.
2895 (arm_new_thread): Likewise.
2896 * linux-low.c (add_to_pid_list): Likewise.
2897 (linux_add_process): Likewise.
2898 (handle_extended_wait): Likewise.
2899 (add_lwp): Likewise.
2900 (enqueue_one_deferred_signal): Likewise.
2901 (enqueue_pending_signal): Likewise.
2902 (linux_resume_one_lwp_throw): Likewise.
2903 (linux_resume_one_thread): Likewise.
2904 (linux_read_memory): Likewise.
2905 (linux_write_memory): Likewise.
2906 * linux-mips-low.c (mips_linux_new_process): Likewise.
2907 (mips_linux_new_thread): Likewise.
2908 (mips_add_watchpoint): Likewise.
2909 * linux-x86-low.c (initialize_low_arch): Likewise.
2910 * lynx-low.c (lynx_add_process): Likewise.
2911 * mem-break.c (set_raw_breakpoint_at): Likewise.
2912 (set_breakpoint): Likewise.
2913 (add_condition_to_breakpoint): Likewise.
2914 (add_commands_to_breakpoint): Likewise.
2915 (clone_agent_expr): Likewise.
2916 (clone_one_breakpoint): Likewise.
2917 * regcache.c (new_register_cache): Likewise.
2918 * remote-utils.c (look_up_one_symbol): Likewise.
2919 * server.c (queue_stop_reply): Likewise.
2920 (start_inferior): Likewise.
2921 (queue_stop_reply_callback): Likewise.
2922 (handle_target_event): Likewise.
2923 * spu-low.c (fetch_ppc_memory): Likewise.
2924 (store_ppc_memory): Likewise.
2925 * target.c (set_target_ops): Likewise.
2926 * thread-db.c (thread_db_load_search): Likewise.
2927 (try_thread_db_load_1): Likewise.
2928 * tracepoint.c (add_tracepoint): Likewise.
2929 (add_tracepoint_action): Likewise.
2930 (create_trace_state_variable): Likewise.
2931 (cmd_qtdpsrc): Likewise.
2932 (cmd_qtro): Likewise.
2933 (add_while_stepping_state): Likewise.
2934 * win32-low.c (child_add_thread): Likewise.
2935 (get_image_name): Likewise.
2936
ed8b7b42
YQ
29372015-08-25 Yao Qi <yao.qi@linaro.org>
2938
2939 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2940
db3cb7cb
YQ
29412015-08-25 Yao Qi <yao.qi@linaro.org>
2942
2943 * Makefile.in (aarch64-linux.o): New rule.
2944 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2945 srv_tgtobj.
2946 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2947 (aarch64_init_debug_reg_state): Make it extern.
2948 (aarch64_linux_prepare_to_resume): Remove.
2949
f6011a1c
YQ
29502015-08-25 Yao Qi <yao.qi@linaro.org>
2951
2952 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2953 lwp_arch_private_info and ptid_of_lwp.
2954
88e2cf7e
YQ
29552015-08-25 Yao Qi <yao.qi@linaro.org>
2956
2957 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2958 Find proc_info by find_process_pid. All callers updated.
2959
5e35436e
YQ
29602015-08-25 Yao Qi <yao.qi@linaro.org>
2961
2962 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2963 Remove.
2964 (debug_reg_change_callback): Remove.
2965 (aarch64_notify_debug_reg_change): Remove.
2966
4a8a7965
YQ
29672015-08-25 Yao Qi <yao.qi@linaro.org>
2968
2969 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2970 Call current_lwp_ptid.
2971
32a271ee
YQ
29722015-08-25 Yao Qi <yao.qi@linaro.org>
2973
2974 * linux-aarch64-low.c (debug_reg_change_callback): Use
2975 debug_printf.
2976
0d51c8d7
YQ
29772015-08-25 Yao Qi <yao.qi@linaro.org>
2978
2979 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2980
31a43dd5
YQ
29812015-08-25 Yao Qi <yao.qi@linaro.org>
2982
2983 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2984
8ee52567
YQ
29852015-08-25 Yao Qi <yao.qi@linaro.org>
2986
2987 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2988 the code.
2989
ff3f0f45
YQ
29902015-08-25 Yao Qi <yao.qi@linaro.org>
2991
2992 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2993 Remove.
2994 (debug_reg_change_callback): Remove argument entry and add argument
2995 lwp. Remove local variable thread. Don't print thread id in the
2996 debugging output. Don't check whether pid of thread equals to pid.
2997 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2998 iterate_over_lwps instead find_inferior.
2999
3d40fbb5
PA
30002015-08-24 Pedro Alves <palves@redhat.com>
3001
3002 * inferiors.c (get_first_process): New function.
3003 * inferiors.h (get_first_process): New declaration.
3004 * remote-utils.c (read_ptid): Default to the first process in the
3005 list, instead of to the current thread's process.
3006
438e1e42
PA
30072015-08-24 Pedro Alves <palves@redhat.com>
3008
3009 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3010 * event-loop.c: Likewise.
3011 * remote-utils.c: Likewise.
3012 * tracepoint.c: Likewise.
3013
a8c6d4fc
PA
30142015-08-24 Pedro Alves <palves@redhat.com>
3015
3016 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3017 ptid_get_lwp.
3018
99b0bb12
PA
30192015-08-21 Pedro Alves <palves@redhat.com>
3020
3021 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3022 instead of literal 1.
3023
f8904751
PA
30242015-08-21 Pedro Alves <palves@redhat.com>
3025
3026 * tdesc.c (default_description): Explicitly zero-initialize.
3027
465a859e
PA
30282015-08-21 Pedro Alves <palves@redhat.com>
3029
3030 PR gdb/18749
3031 * inferiors.c (remove_thread): Discard any pending stop reply for
3032 this thread.
3033 * server.c (remove_all_on_match_pid): Rename to ...
3034 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3035 instead of a pid.
3036 (discard_queued_stop_replies): Change parameter to a ptid. Now
3037 extern.
3038 (handle_v_kill, kill_inferior_callback, captured_main)
3039 (process_serial_event): Adjust.
3040 * server.h (discard_queued_stop_replies): Declare.
3041
f0db101d
PA
30422015-08-21 Pedro Alves <palves@redhat.com>
3043
3044 * linux-low.c (wait_for_sigstop): Always switch to no thread
3045 selected if the previously current thread dies.
3046 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3047 process instead of the current thread's.
3048 * remote-utils.c (input_interrupt): Don't check if there's no
3049 current thread.
3050 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3051 current thread to the general thread fails, error out.
3052 (handle_qxfer_auxv, handle_qxfer_libraries)
3053 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3054 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3055 (handle_query): Check if there's a thread selected instead of
3056 checking whether there's any thread in the thread list.
3057 (handle_qxfer_threads, handle_qxfer_btrace)
3058 (handle_qxfer_btrace_conf): Don't error out early if there's no
3059 thread in the thread list.
3060 (handle_v_cont, myresume): Don't set the current thread to the
3061 continue thread.
3062 (process_serial_event) <Hg handling>: Also set thread_id if the
3063 previous general thread is still alive.
3064 (process_serial_event) <g/G handling>: If setting the current
3065 thread to the general thread fails, error out.
3066 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3067 thread's lwp instead of the current thread's.
3068 * target.c (set_desired_thread): If the desired thread was not
3069 found, leave the current thread pointing to NULL. Return an int
3070 (boolean) indicating success.
3071 * target.h (set_desired_thread): Change return type to int.
3072
40045d91
MF
30732015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3074
3075 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3076 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3077 #includes.
3078 (ps_get_thread_area): New function.
3079
45face3b
GB
30802015-08-19 Gary Benson <gbenson@redhat.com>
3081
3082 * hostio.c (handle_pread): Do not attempt to read more data
3083 than hostio_reply_with_data can fit in a packet.
3084
16d5f642
JB
30852015-08-18 Joel Brobecker <brobecker@adacore.com>
3086
3087 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3088
a738da3a
MF
30892015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3090
3091 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3092
33ebda9d
PA
30932015-08-06 Pedro Alves <palves@redhat.com>
3094
3095 * tracepoint.c (expr_eval_result): Now an int.
3096
a44892be
PA
30972015-08-06 Pedro Alves <palves@redhat.com>
3098
3099 * gdbthread.h (struct regcache): Forward declare.
3100 (struct thread_info) <regcache_data>: Now a struct regcache
3101 pointer.
3102 * inferiors.c (inferior_regcache_data)
3103 (set_inferior_regcache_data): Now work with struct regcache
3104 pointers.
3105 * inferiors.h (struct regcache): Forward declare.
3106 (inferior_regcache_data, set_inferior_regcache_data): Now work
3107 with struct regcache pointers.
3108 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3109 (free_register_cache_thread): Remove struct regcache pointer
3110 casts.
3111
608a1e46
PA
31122015-08-06 Pedro Alves <palves@redhat.com>
3113
3114 * server.c (captured_main): On error, print the exception message
3115 to stderr, and if run_once is set, throw a quit.
3116
f0ce0d3a
PA
31172015-08-06 Pedro Alves <palves@redhat.com>
3118
3119 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3120 the current thread.
3121
bf47e248
PA
31222015-08-06 Pedro Alves <palves@redhat.com>
3123
3124 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3125 reading beyond the passed in buffer length.
3126
b6b9ffcc
PL
31272015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3128
3129 * tracepoint.c (symbol_list) <required>: Remove.
3130
863d01bd
PA
31312015-08-06 Pedro Alves <palves@redhat.com>
3132
3133 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3134 count if stopping and suspending threads.
3135 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3136 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3137 (linux_detach): Complete an ongoing step-over.
3138 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3139 throughout.
3140 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3141 (linux_wait_1): If passing a signal to the inferior after
3142 finishing a step-over, unsuspend and re-resume all lwps. If we
3143 see a single-step event but the thread should be continuing, don't
3144 pass the trap to gdb.
3145 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3146 internal_error instead of gdb_assert.
3147 (enqueue_pending_signal): New function.
3148 (check_ptrace_stopped_lwp_gone): Add debug output.
3149 (start_step_over): Use internal_error instead of gdb_assert.
3150 (complete_ongoing_step_over): New function.
3151 (linux_resume_one_thread): Don't resume a suspended thread.
3152 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3153 it stepping.
3154
00db26fa
PA
31552015-08-06 Pedro Alves <palves@redhat.com>
3156
3157 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3158 (linux_thread_alive): Use lwp_is_marked_dead.
3159 (extended_event_reported): Delete.
3160 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3161 instead of extended_event_reported.
3162 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3163 as well.
3164 (lwp_is_marked_dead): New function.
3165 (lwp_running): Use lwp_is_marked_dead.
3166 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3167 comment.
3168
ad071a30
PA
31692015-08-06 Pedro Alves <palves@redhat.com>
3170
3171 * linux-low.c (linux_wait_1): Move fork event output out of the
3172 !report_to_gdb check. Pass event_child->waitstatus to
3173 target_waitstatus_to_string instead of ourstatus.
3174
524b57e6
YQ
31752015-08-04 Yao Qi <yao.qi@linaro.org>
3176
3177 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3178 if current_thread is 32 bit.
3179
6085d6f6
YQ
31802015-08-04 Yao Qi <yao.qi@linaro.org>
3181
3182 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3183 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3184 * server.c (extended_protocol): Remove "static".
3185 * server.h (extended_protocol): Declare it.
3186
8a7e4587
YQ
31872015-08-04 Yao Qi <yao.qi@linaro.org>
3188
3189 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3190 both aarch64 and aarch32.
3191 (aarch64_set_pc): Likewise.
3192
3b53ae99
YQ
31932015-08-04 Yao Qi <yao.qi@linaro.org>
3194
3195 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3196 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3197 arm-with-neon.xml to srv_xmlfiles.
3198 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3199 (is_64bit_tdesc): New function.
3200 (aarch64_linux_read_description): New function.
3201 (aarch64_arch_setup): Call aarch64_linux_read_description.
3202 (regs_info): Rename to regs_info_aarch64.
3203 (aarch64_regs_info): Return right regs_info.
3204 (initialize_low_arch): Call initialize_low_arch_aarch32.
3205
bd9e6534
YQ
32062015-08-04 Yao Qi <yao.qi@linaro.org>
3207
3208 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3209 * linux-aarch32-low.c: New file.
3210 * linux-aarch32-low.h: New file.
3211 * linux-arm-low.c (arm_fill_gregset): Move it to
3212 linux-aarch32-low.c.
3213 (arm_store_gregset): Likewise.
3214 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3215 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3216 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3217 (regs_info): Rename to regs_info_arm.
3218 (arm_regs_info): Return regs_info_aarch32 if
3219 have_ptrace_getregset is 1 and target description is
3220 arm_with_neon or arm_with_vfpv3.
3221 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3222 Call initialize_low_arch_aarch32 instead.
3223
ded48a5e
YQ
32242015-08-04 Yao Qi <yao.qi@linaro.org>
3225
3226 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3227 * linux-low.c: ... here.
3228 * linux-low.h (have_ptrace_getregset): Declare it.
3229
96e9210f
PA
32302015-08-04 Pedro Alves <palves@redhat.com>
3231
3232 * thread-db.c (struct thread_db): Use new typedefs.
3233 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3234 CHK calls.
3235 (disable_thread_event_reporting): Cast result of dlsym to
3236 destination function pointer type.
3237 (thread_db_mourn): Use td_ta_delete_ftype.
3238
af60a1ef
SL
32392015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3240
3241 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3242 arch variant.
3243 (CDX_BREAKPOINT): Define for R2.
3244 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3245 (the_low_target): Add comments.
3246
e8b41681
YQ
32472015-07-30 Yao Qi <yao.qi@linaro.org>
3248
3249 * linux-arm-low.c (arm_hwcap): Remove it.
3250 (arm_read_description): New local variable arm_hwcap. Don't
3251 set arm_hwcap to zero.
3252
89abb039
YQ
32532015-07-30 Yao Qi <yao.qi@linaro.org>
3254
3255 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3256 Use regcache->tdesc instead.
3257 (arm_store_wmmxregset): Likewise.
3258 (arm_fill_vfpregset): Likewise.
3259 (arm_store_vfpregset): Likewise.
3260
deca266c
YQ
32612015-07-30 Yao Qi <yao.qi@linaro.org>
3262
3263 * linux-arm-low.c: Include arch/arm.h.
3264 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3265 (arm_store_gregset): Likewise.
3266
aa58a496
SM
32672015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3268
3269 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3270 ptrace's 4th parameter.
3271
50904b25
YQ
32722015-07-27 Yao Qi <yao.qi@linaro.org>
3273
3274 * configure.srv (case aarch64*-*-linux*): Don't set
3275 srv_linux_usrregs.
3276
5826e159
PA
32772015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3278
3279 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3280 sys/ptrace.h.
3281 * linux-arm-low.c: Likewise.
3282 * linux-cris-low.c: Likewise.
3283 * linux-crisv32-low.c: Likewise.
3284 * linux-low.c: Likewise.
3285 * linux-m68k-low.c: Likewise.
3286 * linux-mips-low.c: Likewise.
3287 * linux-nios2-low.c: Likewise.
3288 * linux-s390-low.c: Likewise.
3289 * linux-sparc-low.c: Likewise.
3290 * linux-tic6x-low.c: Likewise.
3291 * linux-tile-low.c: Likewise.
3292 * linux-x86-low.c: Likewise.
3293
54019719
PA
32942015-07-24 Pedro Alves <palves@redhat.com>
3295
3296 * config.in: Regenerate.
3297 * configure: Regenerate.
3298
eb7aa561
PA
32992015-07-24 Pedro Alves <palves@redhat.com>
3300
3301 * acinclude.m4: Include ../ptrace.m4.
3302 * configure.ac: Call GDB_AC_PTRACE.
3303 * config.in, configure: Regenerate.
3304
55d7b841
YQ
33052015-07-24 Yao Qi <yao.qi@linaro.org>
3306
3307 * linux-low.c (linux_create_inferior): Remove setting to
3308 proc->priv->new_inferior.
3309 (linux_attach): Likewise.
3310 (linux_low_filter_event): Likewise.
3311 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3312
c06cbd92
YQ
33132015-07-24 Yao Qi <yao.qi@linaro.org>
3314
3315 * linux-low.c (linux_arch_setup): New function.
3316 (linux_low_filter_event): If proc->tdesc is NULL and
3317 proc->attached is true, call the_low_target.arch_setup.
3318 Otherwise, keep status pending, and return.
3319 (linux_resume_one_lwp_throw): Don't call get_pc if
3320 thread->while_stepping isn't NULL. Don't call
3321 get_thread_regcache if proc->tdesc is NULL.
3322 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3323 (linux_target_ops): Install arch_setup.
3324 * server.c (start_inferior): Call the_target->arch_setup.
3325 * target.h (struct target_ops) <arch_setup>: New field.
3326 (target_arch_setup): New marco.
3327 * lynx-low.c (lynx_target_ops): Update.
3328 * nto-low.c (nto_target_ops): Update.
3329 * spu-low.c (spu_target_ops): Update.
3330 * win32-low.c (win32_target_ops): Update.
3331
5ae3ebba
YQ
33322015-07-24 Yao Qi <yao.qi@linaro.org>
3333
3334 * linux-low.c (linux_add_process): Don't set
3335 proc->priv->new_inferior.
3336 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3337 (linux_attach): Likewise.
3338
eb97750b
YQ
33392015-07-24 Yao Qi <yao.qi@linaro.org>
3340
3341 * server.c (start_inferior): Code refactor.
3342
51aee833
YQ
33432015-07-24 Yao Qi <yao.qi@linaro.org>
3344
3345 * server.c (process_serial_event): Set general_thread.
3346
af1b22f3
YQ
33472015-07-21 Yao Qi <yao.qi@linaro.org>
3348
3349 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3350 aarch64_linux_get_debug_reg_capacity.
3351
554717a3
YQ
33522015-07-17 Yao Qi <yao.qi@linaro.org>
3353
3354 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3355 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3356 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3357 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3358 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3359 (AARCH64_HWP_ALIGNMENT): Likewise.
3360 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3361 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3362 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3363 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3364 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3365 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3366 (struct aarch64_debug_reg_state): Likewise.
3367 (struct arch_lwp_info): Likewise.
3368 (aarch64_align_watchpoint): Likewise.
3369 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3370 (aarch64_watchpoint_length): Likewise.
3371 (aarch64_point_encode_ctrl_reg): Likewise
3372 (aarch64_point_is_aligned): Likewise.
3373 (aarch64_align_watchpoint): Likewise.
3374 (aarch64_linux_set_debug_regs):
3375 (aarch64_dr_state_insert_one_point): Likewise.
3376 (aarch64_dr_state_remove_one_point): Likewise.
3377 (aarch64_handle_breakpoint): Likewise.
3378 (aarch64_handle_aligned_watchpoint): Likewise.
3379 (aarch64_handle_unaligned_watchpoint): Likewise.
3380 (aarch64_handle_watchpoint): Likewise.
3381
c67ca4de
YQ
33822015-07-17 Yao Qi <yao.qi@linaro.org>
3383
3384 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3385 and don't aarch64_get_debug_reg_state. All callers update.
3386 (aarch64_handle_aligned_watchpoint): Likewise.
3387 (aarch64_handle_unaligned_watchpoint): Likewise.
3388 (aarch64_handle_watchpoint): Likewise.
3389 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3390 (aarch64_remove_point): Likewise.
3391
25abf979
YQ
33922015-07-17 Yao Qi <yao.qi@linaro.org>
3393
3394 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3395 debug_printf.
3396 (aarch64_handle_unaligned_watchpoint): Likewise.
3397
db1ff28b
JK
33982015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3399
3400 Revert the previous 3 commits:
3401 Move gdb_regex* to common/
3402 Move linux_find_memory_regions_full & co.
3403 gdbserver build-id attribute generator
3404
700ca40f
JK
34052015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3406 Jan Kratochvil <jan.kratochvil@redhat.com>
3407
3408 gdbserver build-id attribute generator.
3409 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3410 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3411 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3412 (find_phdr): New.
3413 (get_dynamic): Use find_pdhr to traverse program headers.
3414 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3415 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3416 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3417 (get_hex_build_id): New.
3418 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3419 to reply XML document.
3420
9904185c
JK
34212015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3422 Jan Kratochvil <jan.kratochvil@redhat.com>
3423
3424 * target.c: Include target/target-utils.h and fcntl.h.
3425 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3426 (target_fileio_read_stralloc): New functions.
3427
6e5b4429
JK
34282015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3429
3430 * Makefile.in (OBS): Add gdb_regex.o.
3431 (gdb_regex.o): New.
3432 * config.in: Rebuilt.
3433 * configure: Rebuilt.
3434
ddc98fbf
JK
34352015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3436 Jan Kratochvil <jan.kratochvil@redhat.com>
3437
3438 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3439 * Makefile.in (OBS): Add target-utils.o.
3440 (linux-maps.o, target-utils.o): New.
3441 * configure.srv (srv_linux_obj): Add linux-maps.o.
3442
e57bb7a0
PL
34432015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3444
3445 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3446 function, return 1.
3447 (the_low_target): Install it.
3448
586b02a9
PA
34492015-07-14 Pedro Alves <palves@redhat.com>
3450
3451 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3452 Instead, ignore ECHILD, and throw an error for other errnos.
3453
58c1b36c
PA
34542015-07-10 Pedro Alves <palves@redhat.com>
3455
3456 * event-loop.c (struct callback_event) <data>: Change type to
3457 gdb_client_data instance instead of gdb_client_data pointer.
3458 (append_callback_event): Adjust.
3459
421530db
PL
34602015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3461
3462 * linux-aarch64-low.c: Add comments for each linux_target_ops
3463 method. Remove comments already covered in target_ops and
3464 linux_target_ops definitions.
3465 (the_low_target): Add comments for each unimplemented method.
3466
c2d65f38
YQ
34672015-07-09 Yao Qi <yao.qi@linaro.org>
3468
3469 * linux-aarch64-low.c (aarch64_regmap): Remove.
3470 (aarch64_usrregs_info): Remove.
3471 (regs_info): Set field usrregs to NULL.
3472
b20a6524
MM
34732015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3474
3475 * linux-low.c: Include "rsp-low.h"
3476 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3477 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3478 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3479 (handle_btrace_enable_pt): New.
3480 (handle_btrace_general_set): Support "pt".
3481 (handle_btrace_conf_general_set): Support "pt:size".
3482
96c97461
PL
34832015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3484
3485 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3486 Z_PACKET_SW_BP.
3487
37d66942
PL
34882015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3489
3490 * linux-aarch64-low.c: Remove comment about endianness.
3491 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3492 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3493 memcmp.
3494
dc06243f
GB
34952015-06-24 Gary Benson <gbenson@redhat.com>
3496
3497 * linux-i386-ipa.c (stdint.h): Do not include.
3498 * lynx-i386-low.c (stdint.h): Likewise.
3499 * lynx-ppc-low.c (stdint.h): Likewise.
3500 * mem-break.c (stdint.h): Likewise.
3501 * thread-db.c (stdint.h): Likewise.
3502 * tracepoint.c (stdint.h): Likewise.
3503 * win32-low.c (stdint.h): Likewise.
3504
124e13d9
SM
35052015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3506
3507 * server.c (write_qxfer_response): Update call to
3508 remote_escape_output.
3509
909c2cda
JK
35102015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3511 Jan Kratochvil <jan.kratochvil@redhat.com>
3512
3513 Merge multiple hex conversions.
3514 * gdbreplay.c (tohex): Rename to 'fromhex'.
3515 (logchar): Use fromhex.
3516
24c05f46
JK
35172015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3518
3519 * server.c (handle_qxfer_libraries): Set `version' attribute for
3520 <library-list>.
3521
14d2069a
GB
35222015-06-10 Gary Benson <gbenson@redhat.com>
3523
3524 * target.h (struct target_ops) <multifs_open>: New field.
3525 <multifs_unlink>: Likewise.
3526 <multifs_readlink>: Likewise.
3527 * linux-low.c (nat/linux-namespaces.h): New include.
3528 (linux_target_ops): Initialize the_target->multifs_open,
3529 the_target->multifs_unlink and the_target->multifs_readlink.
3530 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3531 * hostio.c (hostio_fs_pid): New static variable.
3532 (hostio_handle_new_gdb_connection): New function.
3533 (handle_setfs): Likewise.
3534 (handle_open): Use the_target->multifs_open as appropriate.
3535 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3536 (handle_readlink): Use the_target->multifs_readlink as
3537 appropriate.
3538 (handle_vFile): Handle vFile:setfs packets.
3539 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3540 after target_handle_new_gdb_connection.
3541
4b8b5e72
GB
35422015-06-10 Gary Benson <gbenson@redhat.com>
3543
3544 * configure.ac (AC_CHECK_FUNCS): Add setns.
3545 * config.in: Regenerate.
3546 * configure: Likewise.
3547 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3548 (linux-namespaces.o): New rule.
3549 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3550
3ac2e371
GB
35512015-06-09 Gary Benson <gbenson@redhat.com>
3552
3553 * hostio.c (handle_open): Process mode argument with
3554 fileio_to_host_mode.
3555
ca9b78ce
YQ
35562015-06-01 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3559 * linux-x86-low.c: Likewise.
3560
bfacd19d
DB
35612015-05-28 Don Breazeal <donb@codesourcery.com>
3562
3563 * linux-low.c (handle_extended_wait): Initialize
3564 thread_info.last_resume_kind for new fork children.
3565
452003ef
PA
35662015-05-15 Pedro Alves <palves@redhat.com>
3567
3568 * target.h (target_handle_new_gdb_connection): Rewrite using if
3569 wrapped in do/while.
3570
1041a03c
JB
35712015-05-14 Joel Brobecker <brobecker@adacore.com>
3572
3573 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3574 * configure, config.in: Regenerate.
3575 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3576 Declare typedef.
3577
c269dbdb
DB
35782015-05-12 Don Breazeal <donb@codesourcery.com>
3579
3580 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3581 PTRACE_EVENT_VFORK_DONE.
3582 (linux_low_ptrace_options, extended_event_reported): Add vfork
3583 events.
3584 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3585 and "vforkdone" for RSP 'T' Stop Reply Packet.
3586 * server.h (report_vfork_events): Declare
3587 global variable.
3588
3a8a0396
DB
35892015-05-12 Don Breazeal <donb@codesourcery.com>
3590
3591 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3592 (the_low_target) <new_fork>: Initialize new member.
3593 * linux-arm-low.c (arm_new_fork): New function.
3594 (the_low_target) <new_fork>: Initialize new member.
3595 * linux-low.c (handle_extended_wait): Call new target function
3596 new_fork.
3597 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3598 * linux-mips-low.c (mips_add_watchpoint): New function
3599 extracted from mips_insert_point.
3600 (the_low_target) <new_fork>: Initialize new member.
3601 (mips_linux_new_fork): New function.
3602 (mips_insert_point): Call mips_add_watchpoint.
3603 * linux-x86-low.c (x86_linux_new_fork): New function.
3604 (the_low_target) <new_fork>: Initialize new member.
3605
de0d863e
DB
36062015-05-12 Don Breazeal <donb@codesourcery.com>
3607
3608 * linux-low.c (handle_extended_wait): Implement return value,
3609 rename argument 'event_child' to 'event_lwp', handle
3610 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3611 (linux_low_ptrace_options): New function.
3612 (linux_low_filter_event): Call linux_low_ptrace_options,
3613 use different argument fo linux_enable_event_reporting,
3614 use return value from handle_extended_wait.
3615 (extended_event_reported): New function.
3616 (linux_wait_1): Call extended_event_reported and set
3617 status to report fork events.
3618 (linux_write_memory): Add pid to debug message.
3619 (reset_lwp_ptrace_options_callback): New function.
3620 (linux_handle_new_gdb_connection): New function.
3621 (linux_target_ops): Initialize new structure member.
3622 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3623 * lynx-low.c: Initialize new structure member.
3624 * remote-utils.c (prepare_resume_reply): Implement stop reason
3625 "fork" for "T" stop message.
3626 * server.c (handle_query): Call handle_new_gdb_connection.
3627 * server.h (report_fork_events): Declare global flag.
3628 * target.h (struct target_ops) <handle_new_gdb_connection>:
3629 New member.
3630 (target_handle_new_gdb_connection): New macro.
3631 * win32-low.c: Initialize new structure member.
3632
ddcbc397
DB
36332015-05-12 Don Breazeal <donb@codesourcery.com>
3634
3635 * mem-break.c (APPEND_TO_LIST): Define macro.
3636 (clone_agent_expr): New function.
3637 (clone_one_breakpoint): New function.
3638 (clone_all_breakpoints): New function.
3639 * mem-break.h: Declare new functions.
3640
89245bc0
DB
36412015-05-12 Don Breazeal <donb@codesourcery.com>
3642
3643 * linux-low.c (linux_supports_fork_events): New function.
3644 (linux_supports_vfork_events): New function.
3645 (linux_target_ops): Initialize new structure members.
3646 (initialize_low): Call linux_check_ptrace_features.
3647 * lynx-low.c (lynx_target_ops): Initialize new structure
3648 members.
3649 * server.c (report_fork_events, report_vfork_events):
3650 New global flags.
3651 (handle_query): Add new features to qSupported packet and
3652 response.
3653 (captured_main): Initialize new global variables.
3654 * target.h (struct target_ops) <supports_fork_events>:
3655 New member.
3656 <supports_vfork_events>: New member.
3657 (target_supports_fork_events): New macro.
3658 (target_supports_vfork_events): New macro.
3659 * win32-low.c (win32_target_ops): Initialize new structure
3660 members.
3661
835205d0
GB
36622015-05-12 Gary Benson <gbenson@redhat.com>
3663
3664 * server.c (handle_qxfer_exec_file): Use current process
3665 if annex is empty.
3666
21e94bd9
SL
36672015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3668
3669 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3670 Remove HAVE_PTRACE_GETREGS conditionals.
3671 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3672 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3673
45614f15
YQ
36742015-05-08 Yao Qi <yao.qi@linaro.org>
3675
3676 * linux-low.c (linux_supports_conditional_breakpoints): New
3677 function.
3678 (linux_target_ops): Install new target method.
3679 * lynx-low.c (lynx_target_ops): Install NULL hook for
3680 supports_conditional_breakpoints.
3681 * nto-low.c (nto_target_ops): Likewise.
3682 * spu-low.c (spu_target_ops): Likewise.
3683 * win32-low.c (win32_target_ops): Likewise.
3684 * server.c (handle_query): Check
3685 target_supports_conditional_breakpoints.
3686 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3687 New field.
3688 (target_supports_conditional_breakpoints): New macro.
3689
80ad801e
PA
36902015-05-06 Pedro Alves <palves@redhat.com>
3691
3692 PR server/18081
3693 * server.c (start_inferior): If the process exits, mourn it.
3694
819843c7
GB
36952015-04-21 Gary Benson <gbenson@redhat.com>
3696
3697 * hostio.c (fileio_open_flags_to_host): Factored out to
3698 fileio_to_host_openflags in common/fileio.c. Single use
3699 updated.
3700
a2d5a9d7
MF
37012015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3702
3703 * linux-xtensa-low.c (xtensa_fill_gregset)
3704 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3705 XCHAL_HAVE_LOOP.
3706
deb44829
MF
37072015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3708
3709 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3710 (regs_info): Replace usrregs pointer with NULL.
3711
e57f1de3
GB
37122015-04-17 Gary Benson <gbenson@redhat.com>
3713
3714 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3715 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3716 * server.c (handle_qxfer_exec_file): New function.
3717 (qxfer_packets): Add exec-file entry.
3718 (handle_query): Report qXfer:exec-file:read as supported packet.
3719
62828379
RN
37202015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3721
3722 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3723
b88bb450
GB
37242015-04-09 Gary Benson <gbenson@redhat.com>
3725
3726 * hostio-errno.c (errno_to_fileio_error): Remove function.
3727 Update caller to use remote_fileio_to_fio_error.
3728
c8f4bfdd
YQ
37292015-04-09 Yao Qi <yao.qi@linaro.org>
3730
3731 * linux-low.c (linux_insert_point): Call
3732 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3733 (linux_remove_point): Call remove_memory_breakpoint if type is
3734 raw_bkpt_type_sw.
3735 * linux-x86-low.c (x86_insert_point): Don't call
3736 insert_memory_breakpoint.
3737 (x86_remove_point): Don't call remove_memory_breakpoint.
3738
41f98f02
PA
37392015-04-01 Pedro Alves <palves@redhat.com>
3740 Cleber Rosa <crosa@redhat.com>
3741
3742 * server.c (gdbserver_usage): Reorganize and extend the usage
3743 message.
3744
2bf6fb9d
PA
37452015-03-24 Pedro Alves <palves@redhat.com>
3746
3747 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3748 output. Also dump TRAP_TRACE.
3749 (linux_low_filter_event): In debug output, distinguish a
3750 resume_stop SIGSTOP from a delayed SIGSTOP.
3751
369f6daa
GB
37522015-03-24 Gary Benson <gbenson@redhat.com>
3753
3754 * linux-x86-low.c (x86_linux_new_thread): Moved to
3755 nat/x86-linux.c.
3756 (x86_linux_prepare_to_resume): Likewise.
3757
8e5d4070
GB
37582015-03-24 Gary Benson <gbenson@redhat.com>
3759
3760 * Makefile.in (x86-linux-dregs.o): New rule.
3761 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3762 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3763 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3764 (x86_linux_dr_get): Likewise.
3765 (x86_linux_dr_set): Likewise.
3766 (update_debug_registers_callback): Likewise.
3767 (x86_linux_dr_set_addr): Likewise.
3768 (x86_linux_dr_get_addr): Likewise.
3769 (x86_linux_dr_set_control): Likewise.
3770 (x86_linux_dr_get_control): Likewise.
3771 (x86_linux_dr_get_status): Likewise.
3772 (x86_linux_update_debug_registers): Likewise.
3773
2b95d440
GB
37742015-03-24 Gary Benson <gbenson@redhat.com>
3775
3776 * linux-x86-low.c (x86_linux_update_debug_registers):
3777 New function, factored out from...
3778 (x86_linux_prepare_to_resume): ...this.
3779
14b0bc68
GB
37802015-03-24 Gary Benson <gbenson@redhat.com>
3781
3782 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3783 (x86_linux_dr_set): Likewise.
3784 (update_debug_registers_callback): Likewise.
3785 (x86_linux_dr_set_addr): Likewise.
3786 (x86_linux_dr_get_addr): Likewise.
3787 (x86_linux_dr_set_control): Likewise.
3788 (x86_linux_dr_get_control): Likewise.
3789 (x86_linux_dr_get_status): Likewise.
3790 (x86_linux_prepare_to_resume): Likewise.
3791
5dfe6ca8
GB
37922015-03-24 Gary Benson <gbenson@redhat.com>
3793
3794 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3795 Use perror_with_name. Pass string through gettext.
3796 (x86_linux_dr_set): Likewise.
3797
d33472ad
GB
37982015-03-24 Gary Benson <gbenson@redhat.com>
3799
3800 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3801 (x86_linux_dr_set_addr): ...this.
3802 (x86_dr_low_get_addr): Rename to...
3803 (x86_linux_dr_get_addr): ...this.
3804 (x86_dr_low_set_control): Rename to...
3805 (x86_linux_dr_set_control): ...this.
3806 (x86_dr_low_get_control): Rename to...
3807 (x86_linux_dr_get_control): ...this.
3808 (x86_dr_low_get_status): Rename to...
3809 (x86_linux_dr_get_status): ...this.
3810 (x86_dr_low): Update with new function names.
3811
4b134ca1
GB
38122015-03-24 Gary Benson <gbenson@redhat.com>
3813
3814 * Makefile.in (x86-linux.o): New rule.
3815 * configure.srv: Add x86-linux.o to relevant targets.
3816 * linux-low.c (lwp_set_arch_private_info): New function.
3817 (lwp_arch_private_info): Likewise.
3818 * linux-x86-low.c: Include nat/x86-linux.h.
3819 (arch_lwp_info): Removed structure.
3820 (update_debug_registers_callback):
3821 Use lwp_set_debug_registers_changed.
3822 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3823 and lwp_set_debug_registers_changed.
3824 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3825
34c703da
GB
38262015-03-24 Gary Benson <gbenson@redhat.com>
3827
3828 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3829 * linux-arm-low.c (arm_new_thread): Likewise.
3830 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3831 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3832 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3833 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3834
cff068da
GB
38352015-03-24 Gary Benson <gbenson@redhat.com>
3836
3837 * linux-low.c (ptid_of_lwp): New function.
3838 (lwp_is_stopped): Likewise.
3839 (lwp_stop_reason): Likewise.
3840 * linux-x86-low.c (update_debug_registers_callback):
3841 Use lwp_is_stopped.
3842 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3843 lwp_stop_reason.
3844
b2f7c7e8
GB
38452015-03-24 Gary Benson <gbenson@redhat.com>
3846
3847 * linux-low.h (linux_stop_lwp): Remove declaration.
3848
6d4ee8c6
GB
38492015-03-24 Gary Benson <gbenson@redhat.com>
3850
3851 * linux-low.h: Include nat/linux-nat.h.
3852 * linux-low.c (iterate_over_lwps_args): New structure.
3853 (iterate_over_lwps_filter): New function.
3854 (iterate_over_lwps): Likewise.
3855 * linux-x86-low.c (update_debug_registers_callback):
3856 Update signature to what iterate_over_lwps expects.
3857 Remove PID check that iterate_over_lwps now performs.
3858 (x86_dr_low_set_addr): Use iterate_over_lwps.
3859 (x86_dr_low_set_control): Likewise.
3860
70a0bb6b
GB
38612015-03-24 Gary Benson <gbenson@redhat.com>
3862
3863 * linux-x86-low.c (x86_debug_reg_state): New function.
3864 (x86_linux_prepare_to_resume): Use the above.
3865
7b669087
GB
38662015-03-24 Gary Benson <gbenson@redhat.com>
3867
3868 * linux-low.c (current_lwp_ptid): New function.
3869 * linux-x86-low.c: Include nat/linux-nat.h.
3870 (x86_dr_low_get_addr): Use current_lwp_ptid.
3871 (x86_dr_low_get_control): Likewise.
3872 (x86_dr_low_get_status): Likewise.
3873
eef49a3d
PA
38742015-03-20 Pedro Alves <palves@redhat.com>
3875
3876 * tracepoint.c (cmd_qtstatus): Make "str" const.
3877
b2333d22
PA
38782015-03-20 Pedro Alves <palves@redhat.com>
3879
3880 * server.c (handle_general_set): Make "req_str" const.
3881
23f238d3
PA
38822015-03-19 Pedro Alves <palves@redhat.com>
3883
3884 * linux-low.c (linux_resume_one_lwp): Rename to ...
3885 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3886 instead call perror_with_name.
3887 (check_ptrace_stopped_lwp_gone): New function.
3888 (linux_resume_one_lwp): Reimplement as wrapper around
3889 linux_resume_one_lwp_throw that swallows errors if the LWP is
3890 gone.
3891
91baf43f
PA
38922015-03-19 Pedro Alves <palves@redhat.com>
3893
3894 * linux-low.c (count_events_callback, select_event_lwp_callback):
3895 No longer check whether the thread has resume_stop as last resume
3896 kind.
3897
8bf3b159
PA
38982015-03-19 Pedro Alves <palves@redhat.com>
3899
3900 * linux-low.c (count_events_callback, select_event_lwp_callback):
3901 Use the lwp's status_pending_p field, not the thread's.
3902
b90fc188
PA
39032015-03-19 Pedro Alves <palves@redhat.com>
3904
3905 * linux-low.c (select_event_lwp_callback): Update comments to
3906 no longer mention SIGTRAP.
3907
464b0089
GB
39082015-03-18 Gary Benson <gbenson@redhat.com>
3909
3910 * server.c (handle_query): Do not report vFile:fstat as supported.
3911
aa9e327f
GB
39122015-03-11 Gary Benson <gbenson@redhat.com>
3913
3914 * hostio.c (sys/types.h): New include.
3915 (sys/stat.h): Likewise.
3916 (common-remote-fileio.h): Likewise.
3917 (handle_fstat): New function.
3918 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3919
791c0056
GB
39202015-03-11 Gary Benson <gbenson@redhat.com>
3921
3922 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3923 struct stat.st_blocks and struct stat.st_blksize.
3924 * configure: Regenerate.
3925 * config.in: Likewise.
3926 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3927 (OBS): Add common-remote-fileio.o.
3928 (common-remote-fileio.o): New rule.
3929
9a9df970
PA
39302015-03-09 Pedro Alves <palves@redhat.com>
3931
3932 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3933 'struct sockaddr' pointer in 'accept' call.
3934
9eb1356e
PA
39352015-03-09 Pedro Alves <palves@redhat.com>
3936
3937 Revert:
3938 2015-03-07 Pedro Alves <palves@redhat.com>
3939 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3940 or <winsock2.h> here. Instead include "gdb_socket.h".
3941 (remote_open): Use union gdb_sockaddr_u.
3942 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3943 or <winsock2.h> here. Instead include "gdb_socket.h".
3944 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3945 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3946 or <sys/un.h>.
3947 (init_named_socket, gdb_agent_helper_thread): Use union
3948 gdb_sockaddr_u.
3949
aac331e4
PA
39502015-03-07 Pedro Alves <palves@redhat.com>
3951
3952 * configure.ac (build_warnings): Move
3953 -Wdeclaration-after-statement to the C-specific set.
3954 * configure: Regenerate.
3955
366c75fc
PA
39562015-03-07 Pedro Alves <palves@redhat.com>
3957
3958 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3959 or <winsock2.h> here. Instead include "gdb_socket.h".
3960 (remote_open): Use union gdb_sockaddr_u.
3961 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3962 or <winsock2.h> here. Instead include "gdb_socket.h".
3963 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3964 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3965 or <sys/un.h>.
3966 (init_named_socket, gdb_agent_helper_thread): Use union
3967 gdb_sockaddr_u.
3968
492d29ea
PA
39692015-03-07 Pedro Alves <palves@redhat.com>
3970
3971 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3972 instead.
3973
60a191ed
YQ
39742015-03-06 Yao Qi <yao.qi@linaro.org>
3975
3976 * linux-aarch64-low.c (aarch64_insert_point): Use
3977 show_debug_regs as a boolean.
3978 (aarch64_remove_point): Likewise.
3979
f5771b1d
PA
39802015-03-05 Pedro Alves <palves@redhat.com>
3981
3982 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3983 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3984 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3985 * nto-low.c (nto_target_ops): Likewise.
3986 * spu-low.c (spu_target_ops): Likewise.
3987 * win32-low.c (win32_target_ops): Likewise.
3988
3e572f71
PA
39892015-03-04 Pedro Alves <palves@redhat.com>
3990
72f4393d 3991 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3992 Decide whether a breakpoint triggered based on the SIGTRAP's
3993 siginfo.si_code.
72f4393d
L
3994 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3995 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3996 (linux_low_filter_event): Check for breakpoints before checking
3997 watchpoints.
3998 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3999 siginfo.si_code.
72f4393d
L
4000 (linux_stopped_by_sw_breakpoint)
4001 (linux_supports_stopped_by_sw_breakpoint)
4002 (linux_stopped_by_hw_breakpoint)
4003 (linux_supports_stopped_by_hw_breakpoint): New functions.
4004 (linux_target_ops): Install new target methods.
3e572f71 4005
1ec68e26
PA
40062015-03-04 Pedro Alves <palves@redhat.com>
4007
4008 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4009 * server.c (swbreak_feature, hwbreak_feature): New globals.
4010 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4011 (captured_main): Clear swbreak_feature and hwbreak_feature.
4012 * server.h (swbreak_feature, hwbreak_feature): Declare.
4013 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4014 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4015 supports_stopped_by_hw_breakpoint>: New fields.
4016 (target_supports_stopped_by_sw_breakpoint)
4017 (target_stopped_by_sw_breakpoint)
4018 (target_supports_stopped_by_hw_breakpoint)
4019 (target_stopped_by_hw_breakpoint): Declare.
4020
15c66dd6
PA
40212015-03-04 Pedro Alves <palves@redhat.com>
4022
4023 enum lwp_stop_reason -> enum target_stop_reason
4024 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4025 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4026 (linux_wait_1, stuck_in_jump_pad_callback)
4027 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4028 (linux_stopped_by_watchpoint):
4029 * linux-low.h (enum lwp_stop_reason): Delete.
4030 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4031 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4032
98fc70d6
YQ
40332015-03-04 Yao Qi <yao.qi@linaro.org>
4034
4035 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4036
dd2ac174
GB
40372015-03-03 Gary Benson <gbenson@redhat.com>
4038
4039 * hostio.c (handle_vFile): Fix prefix lengths.
4040
d68e53f4
MM
40412015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4042
4043 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4044 ptr_bits.
4045
bf2d68ab
AA
40462015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4047
4048 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4049 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4050 (clean): Add "rm -f" for above C files.
4051 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4052 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4053 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4054 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4055 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4056 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4057 (init_registers_s390x_vx_linux64)
4058 (init_registers_s390x_tevx_linux64)
4059 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4060 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4061 declarations.
4062 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4063 (s390_store_vxrs_high): New functions.
4064 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4065 NT_S390_VXRS_HIGH.
4066 (s390_arch_setup): Add logic for selecting one of the new target
4067 descriptions. Activate the new vector regsets if applicable.
4068 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4069 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4070 and init_registers_s390x_tevx_linux64.
4071
c966a859
PA
40722015-03-01 Pedro Alves <palves@redhat.com>
4073
4074 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4075 parameter.
4076
4180215b
PA
40772015-02-27 Pedro Alves <palves@redhat.com>
4078
4079 * linux-x86-low.c (u_debugreg_offset): New function.
4080 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4081
749bab01
PA
40822015-02-27 Pedro Alves <palves@redhat.com>
4083
4084 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4085 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4086 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4087 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4088 (ps_lsetfpregs, ps_getpid)
4089 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4090 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4091 (ps_lsetxregs, ps_plog): Declare.
4092
3c14e5a3
PA
40932015-02-27 Pedro Alves <palves@redhat.com>
4094
4095 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4096 IP_AGENT_EXPORT_FUNC.
4097 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4098 IP_AGENT_EXPORT_FUNC.
4099 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4100 (IP_AGENT_EXPORT): Delete.
4101 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4102 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4103 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4104 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4105 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4106 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4107 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4108 (traceframe_read_count, traceframe_write_count)
4109 (traceframes_created, trace_state_variables, get_raw_reg)
4110 (get_trace_state_variable_value, set_trace_state_variable_value)
4111 (ust_loaded, helper_thread_id, cmd_buf): Use
4112 IPA_SYM_EXPORTED_NAME.
4113 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4114 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4115 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4116 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4117 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4118 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4119 EXTERN_C_PUSH/EXTERN_C_POP.
4120 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4121 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4122 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4123 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4124 (traceframe_write_count, traceframe_read_count)
4125 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4126 (about_to_request_buffer_space, get_trace_state_variable_value)
4127 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4128 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4129 EXTERN_C_PUSH/EXTERN_C_POP.
4130 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4131 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4132 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4133 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4134 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4135 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4136 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4137 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4138 Define.
4139 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4140 (IP_AGENT_EXPORT_VAR_DECL): Define.
4141 (tracing): Declare.
4142 (gdb_agent_get_raw_reg): Declare.
4143
fe978cb0
PA
41442015-02-27 Tom Tromey <tromey@redhat.com>
4145 Pedro Alves <palves@redhat.com>
4146
4147 Rename symbols whose names are reserved C++ keywords throughout.
4148
3bc3d82a
PA
41492015-02-27 Pedro Alves <palves@redhat.com>
4150
4151 * Makefile.in (COMPILER): New, get it from autoconf.
4152 (CXX): Get from autoconf instead.
4153 (COMPILE.pre): Use COMPILER.
4154 (CC-LD): Rename to ...
4155 (CC_LD): ... this. Use COMPILER.
4156 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4157 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4158 * acinclude.m4: Include build-with-cxx.m4.
4159 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4160 Disable -Werror by default if building in C++ mode.
4161 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4162 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4163 the C++ compiler. Save/restore CXXFLAGS too.
4164 * configure: Regenerate.
4165
07697489
PA
41662015-02-27 Pedro Alves <palves@redhat.com>
4167
4168 * acinclude.m4: Include libiberty.m4.
4169 * configure.ac: Call libiberty_INIT.
4170 * config.in, configure: Regenerate.
4171
9beb7c4e
PA
41722015-02-26 Pedro Alves <palves@redhat.com>
4173
4174 * linux-low.c (linux_wait_1): When incrementing the PC past a
4175 program breakpoint always use the_low_target.breakpoint_len as
4176 increment, rather than the maximum between that and
4177 the_low_target.decr_pc_after_break.
4178
8090aef2
PA
41792015-02-23 Pedro Alves <palves@redhat.com>
4180
4181 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4182 thread was doing a step-over; always adjust the PC if
4183 we stepped over a permanent breakpoint.
4184 (linux_wait_1): If we stepped over breakpoint that was on top of a
4185 permanent breakpoint, manually advance the PC past it.
4186
bc9540e8
PA
41872015-02-23 Pedro Alves <palves@redhat.com>
4188
4189 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4190 modes.
4191 (x86_fill_gregset, x86_store_gregset): Use it when handling
4192 $orig_eax.
4193
2db9a427
PA
41942015-02-20 Pedro Alves <palves@redhat.com>
4195
4196 * thread-db.c: Include "nat/linux-procfs.h".
4197 (thread_db_init): Skip listing new threads if the kernel supports
4198 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4199
afa8d396
PA
42002015-02-20 Pedro Alves <palves@redhat.com>
4201
4202 * linux-low.c (status_pending_p_callback): Use ptid_match.
4203
c9587f88
AT
42042015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4205
4206 PR breakpoints/16812
4207 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4208 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4209 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4210
b05ec7a5
AT
42112015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4212
4213 PR breakpoints/15956
4214 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4215
d33501a5
MM
42162015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4217
4218 * linux-low.c (linux_low_btrace_conf): Print size.
4219 * server.c (handle_btrace_conf_general_set): New.
4220 (hanle_general_set): Call handle_btrace_conf_general_set.
4221 (handle_query): Report Qbtrace-conf:bts:size as supported.
4222
f4abbc16
MM
42232015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4224
4225 * linux-low.c (linux_low_enable_btrace): Update parameters.
4226 (linux_low_btrace_conf): New.
4227 (linux_target_ops)<to_btrace_conf>: Initialize.
4228 * server.c (current_btrace_conf): New.
4229 (handle_btrace_enable): Rename to ...
4230 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4231 to target_enable_btrace. Update comment. Update users.
4232 (handle_qxfer_btrace_conf): New.
4233 (qxfer_packets): Add btrace-conf entry.
4234 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4235 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4236 (target_ops)<read_btrace_conf>: New.
4237 (target_enable_btrace): Update parameters.
4238 (target_read_btrace_conf): New.
4239
043c3577
MM
42402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4241
4242 * server.c (handle_btrace_general_set): Remove call to
4243 target_supports_btrace.
4244 (supported_btrace_packets): New.
4245 (handle_query): Call supported_btrace_packets.
4246 * target.h: include btrace-common.h.
4247 (btrace_target_info): Removed.
4248 (supports_btrace, target_supports_btrace): Update parameters.
4249
734b0e4b
MM
42502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4251
4252 * Makefile.in (SFILES): Add common/btrace-common.c.
4253 (OBS): Add common/btrace-common.o.
4254 (btrace-common.o): Add build rules.
4255 * linux-low: Include btrace-common.h.
4256 (linux_low_read_btrace): Use struct btrace_data. Call
4257 btrace_data_init and btrace_data_fini.
4258
d6c146e9
PA
42592015-02-06 Pedro Alves <palves@redhat.com>
4260
4261 * thread-db.c (find_new_threads_callback): Add debug output.
4262
20ba1ce6
PA
42632015-02-04 Pedro Alves <palves@redhat.com>
4264
4265 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4266 (resume_stopped_resumed_lwps): New function.
4267 (linux_wait_for_event_filtered): Use it.
4268
8cc73a39
SDJ
42692015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4270
4271 * Makefile.in (SFILES): Add linux-personality.c.
4272 (linux-personality.o): New rule.
4273 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4274 list of objects to be built.
4275 * linux-low.c: Include nat/linux-personality.h.
4276 (linux_create_inferior): Remove code to disable address space
4277 randomization (moved to ../nat/linux-personality.c). Create
4278 cleanup to disable address space randomization.
4279
fb23d554
SDJ
42802015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4281
4282 * Makefile.in (posix-strerror.o): New rule.
4283 (mingw-strerror.o): Likewise.
4284 * configure: Regenerated.
4285 * configure.ac: Source file ../common/common.host. Initialize new
4286 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4287
cdf43629
YQ
42882015-01-14 Yao Qi <yao@codesourcery.com>
4289
4290 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4291 (ppc-linux.o): New rule.
4292 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4293 * configure.ac: AC_CHECK_FUNCS(getauxval).
4294 * config.in: Re-generated.
4295 * configure: Re-generated.
4296 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4297 ppc64_64bit_inferior_p
4298
514c5338
YQ
42992015-01-14 Yao Qi <yao@codesourcery.com>
4300
4301 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4302 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4303 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4304 (PT_ORIG_R3, PT_TRAP): Likewise.
4305 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4306 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4307 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4308
3368c1e5
JB
43092015-01-10 Joel Brobecker <brobecker@adacore.com>
4310
4311 * i387-fp.c (i387_cache_to_xsave): In look over
4312 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4313 zmmh_low_space field by use of zmmh_high_space.
4314
582511be
PA
43152015-01-09 Pedro Alves <palves@redhat.com>
4316
4317 * linux-low.c (step_over_bkpt): Move higher up in the file.
4318 (handle_extended_wait): Don't store the stop_pc here.
4319 (get_stop_pc): Adjust comments and rename to ...
4320 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4321 stopped for a software breakpoint or hardware breakpoint.
4322 (thread_still_has_status_pending_p): New function.
4323 (status_pending_p_callback): Use
4324 thread_still_has_status_pending_p. If the event is no longer
4325 interesting, resume the LWP.
4326 (handle_tracepoints): Add assert.
4327 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4328 (wstatus_maybe_breakpoint): New function.
4329 (cancel_breakpoint): Delete function.
4330 (check_stopped_by_watchpoint): New function, factored out from
4331 linux_low_filter_event.
4332 (lp_status_maybe_breakpoint): Delete function.
4333 (linux_low_filter_event): Remove filter_ptid argument.
4334 Leave thread group exits pending here. Store the LWP's stop PC.
4335 Always leave events pending.
4336 (linux_wait_for_event_filtered): Pull all events out of the
4337 kernel, and leave them all pending.
4338 (count_events_callback, select_event_lwp_callback): Consider all
4339 events.
4340 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4341 (select_event_lwp): Only give preference to the stepping LWP in
4342 all-stop mode. Adjust comments.
4343 (ignore_event): New function.
4344 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4345 references to cancel_breakpoints. Adjust to renames. Also give
4346 equal priority to all LWPs that have had events in non-stop mode.
4347 If reporting a software breakpoint event, unadjust the LWP's PC.
4348 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4349 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4350 Adjust.
4351 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4352 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4353 (linux_stopped_by_watchpoint): Adjust.
4354 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4355 * linux-low.h (enum lwp_stop_reason): New.
4356 (struct lwp_info) <stop_pc>: Adjust comment.
4357 <stopped_by_watchpoint>: Delete field.
4358 <stop_reason>: New field.
4359 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4360 * mem-break.c (software_breakpoint_inserted_here)
4361 (hardware_breakpoint_inserted_here): New function.
4362 * mem-break.h (software_breakpoint_inserted_here)
4363 (hardware_breakpoint_inserted_here): Declare.
4364 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4365 (cancel_breakpoints): Delete.
4366 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4367 (upload_fast_traceframes): Remove references to
4368 cancel_breakpoints.
4369
a33e3959
PA
43702015-01-09 Pedro Alves <palves@redhat.com>
4371
4372 * thread-db.c (find_new_threads_callback): Ignore thread if the
4373 kernel thread ID is -1.
4374
8784d563
PA
43752015-01-09 Pedro Alves <palves@redhat.com>
4376
4377 * linux-low.c (linux_attach_fail_reason_string): Move to
4378 nat/linux-ptrace.c, and rename.
4379 (linux_attach_lwp): Update comment.
4380 (attach_proc_task_lwp_callback): New function.
4381 (linux_attach): Adjust to rename and use
4382 linux_proc_attach_tgid_threads.
4383 (linux_attach_fail_reason_string): Delete declaration.
4384
76f2b779
JB
43852015-01-01 Joel Brobecker <brobecker@adacore.com>
4386
4387 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4388 * server.c (gdbserver_version): Likewise.
4389
fafcc06a
SDJ
43902014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4391
4392 * remote-utils.c: Include ctype.h.
4393 (input_interrupt): Explicitly handle the case when the char
4394 received is the NUL byte. Improve the printing of non-ASCII
4395 characters.
4396
beed38b8
JB
43972014-12-16 Joel Brobecker <brobecker@adacore.com>
4398
4399 * linux-low.c (linux_low_filter_event): Update call to
4400 linux_enable_event_reporting following the addition of
4401 a new parameter to that function.
4402
bf330350
CU
44032014-12-16 Catalin Udma <catalin.udma@freescale.com>
4404
4405 PR server/17457
4406 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4407 (AARCH64_FPCR_REGNO): Likewise.
4408 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4409 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4410 (aarch64_store_fpregset): Likewise.
4411
5227d625
JB
44122014-12-15 Joel Brobecker <brobecker@adacore.com>
4413
4414 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4415 Remove FIXME comment about assumption about N.
4416
f93b65a0
JB
44172014-12-13 Joel Brobecker <brobecker@adacore.com>
4418
4419 * configure.ac: If large-file support is disabled in GDBserver,
4420 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4421 * configure: Regenerate.
4422
e5a9158d
AA
44232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4424
4425 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4426 warning upon ENODATA from ptrace.
4427 * linux-s390-low.c (s390_store_tdb): New.
4428 (s390_regsets): Add regset for NT_S390_TDB.
4429
feea5f36
AA
44302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4431
4432 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4433 without a fill_function.
4434 * linux-s390-low.c (s390_fill_last_break): Remove.
4435 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4436 (s390_arch_setup): Use regset's size instead of fill_function for
4437 loop end condition.
4438
098dbe61
AA
44392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4440
4441 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4442 the regset's store function when ptrace returned an error.
4443 * regcache.c (get_thread_regcache): Invalidate register cache
4444 before fetching inferior's registers.
4445
28eef672
AA
44462014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4447
4448 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4449 while-loop as for-loop.
4450 (regsets_store_inferior_registers): Likewise.
4451
bdca27a2
YQ
44522014-11-28 Yao Qi <yao@codesourcery.com>
4453
4454 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4455 * config.in, configure: Re-generate.
4456 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4457 is defined.
4458
9c232dda
YQ
44592014-11-21 Yao Qi <yao@codesourcery.com>
4460
4461 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4462 (AC_CHECK_HEADERS): Remove malloc.h.
4463 * configure: Re-generated.
4464 * config.in: Re-generated.
4465 * server.h: Don't include alloca.h and malloc.h.
4466 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4467 Don't include malloc.h.
4468
43968415
JB
44692014-11-17 Joel Brobecker <brobecker@adacore.com>
4470
4471 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4472 corresponding ERRNO check in same block.
4473
40e91bc7
PA
44742014-11-12 Pedro Alves <palves@redhat.com>
4475
4476 * server.c (cont_thread): Update comment.
4477 (start_inferior, attach_inferior): No longer clear cont_thread.
4478 (handle_v_cont): No longer set cont_thread.
4479 (captured_main): Clear cont_thread each time a GDB connects.
4480
c2c118cf
PA
44812014-11-12 Pedro Alves <palves@redhat.com>
4482
4483 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4484 thread, and don't resume all threads if the Hc thread has exited.
4485
78708b7c
PA
44862014-11-12 Pedro Alves <palves@redhat.com>
4487
4488 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4489 the process group instead of to a specific LWP.
4490
a2abc7de
PA
44912014-10-15 Pedro Alves <palves@redhat.com>
4492
4493 PR server/17487
4494 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4495 parameter.
4496 (arm_set_thread_context): Delete.
4497 (the_low_target): Adjust.
4498 * win32-i386-low.c (debug_registers_changed)
4499 (debug_registers_used): Delete.
4500 (update_debug_registers_callback): New function.
4501 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4502 needing to update their debug registers.
4503 (win32_get_current_dr): New function.
4504 (x86_dr_low_get_addr, x86_dr_low_get_control)
4505 (x86_dr_low_get_status): Fetch the debug register from the thread
4506 record's context.
4507 (i386_initial_stuff): Adjust.
4508 (i386_get_thread_context): Remove current_event parameter. Don't
4509 clear debug_registers_changed nor copy DR values to
4510 debug_reg_state.
4511 (i386_set_thread_context): Delete.
4512 (i386_prepare_to_resume): New function.
4513 (i386_thread_added): Mark the thread as needing to update irs
4514 debug registers.
4515 (the_low_target): Remove i386_set_thread_context and install
4516 i386_prepare_to_resume.
4517 * win32-low.c (win32_get_thread_context): Adjust.
4518 (win32_set_thread_context): Use SetThreadContext
4519 directly.
4520 (win32_prepare_to_resume): New function.
4521 (win32_require_context): New function, factored out from ...
4522 (thread_rec): ... this.
4523 (continue_one_thread): Call win32_prepare_to_resume on each thread
4524 we're about to continue.
4525 (win32_resume): Call win32_prepare_to_resume on the event thread.
4526 * win32-low.h (struct win32_thread_info)
4527 <debug_registers_changed>: New field.
4528 (struct win32_target_ops): Change prototype of set_thread_context,
4529 delete set_thread_context and add prepare_to_resume.
4530 (win32_require_context): New declaration.
4531
a442d071
GB
45322014-10-08 Gary Benson <gbenson@redhat.com>
4533
4534 * server.h: Do not include common-exceptions.h.
4535
6f1947e8
GB
45362014-10-08 Gary Benson <gbenson@redhat.com>
4537
4538 * server.h: Do not include cleanups.h.
4539
63b434a4
JH
45402014-09-30 James Hogan <james.hogan@imgtec.com>
4541
4542 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4543 mips64-dsp-linux.c.
4544
c4d9ceb6
YQ
45452014-09-23 Yao Qi <yao@codesourcery.com>
4546
4547 * linux-low.c (lp_status_maybe_breakpoint): New function.
4548 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4549 (count_events_callback): Likewise.
4550 (select_event_lwp_callback): Likewise.
4551 (cancel_breakpoints_callback): Likewise.
4552
89a5711c
DB
45532014-09-19 Don Breazeal <donb@codesourcery.com>
4554
4555 * linux-low.c (handle_extended_wait): Call
4556 linux_ptrace_get_extended_event.
4557 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4558 linux_is_extended_waitstatus.
4559
bffc0964
JB
45602014-09-16 Joel Brobecker <brobecker@adacore.com>
4561
4562 * Makefile.in (CPPFLAGS): Define.
4563 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4564 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4565
0bfdf32f
GB
45662014-09-16 Gary Benson <gbenson@redhat.com>
4567
4568 * inferiors.h (current_inferior): Renamed as...
4569 (current_thread): New variable. All uses updated.
4570 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4571 (maybe_move_out_of_jump_pad): Likewise.
4572 (cancel_breakpoint): Likewise.
4573 (linux_low_filter_event): Likewise.
4574 (wait_for_sigstop): Likewise.
4575 (linux_resume_one_lwp): Likewise.
4576 (need_step_over_p): Likewise.
4577 (start_step_over): Likewise.
4578 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4579 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4580 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4581 and save_inferior as saved_thread.
4582 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4583 saved_thread.
4584 (regcache_invalidate_thread): Likewise.
4585 * remote-utils.c (prepare_resume_reply): Likewise.
4586 * thread-db.c (thread_db_get_tls_address): Likewise.
4587 (disable_thread_event_reporting): Likewise.
4588 (remove_thread_event_breakpoints): Likewise.
4589 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4590 as saved_thread.
4591 * target.h (set_desired_inferior): Renamed as...
4592 (set_desired_thread): New declaration. All uses updated.
4593 * server.c (myresume): Updated comment to reference thread instead
4594 of inferior.
4595 (handle_serial_event): Likewise.
4596 (handle_target_event): Likewise.
4597
361c8ade
GB
45982014-09-12 Tom Tromey <tromey@redhat.com>
4599 Gary Benson <gbenson@redhat.com>
4600
4601 * regcache.h: Include common-regcache.h.
4602 (regcache_read_pc): Don't declare.
4603 * regcache.c (get_thread_regcache_for_ptid): New function.
4604
bd9269f7
GB
46052014-09-11 Tom Tromey <tromey@redhat.com>
4606 Gary Benson <gbenson@redhat.com>
4607
4608 * symbol.c: New file.
4609 * Makefile.in (SFILES): Add symbol.c.
4610 (OBS): Add symbol.o.
4611
f8c1d06b
GB
46122014-09-11 Gary Benson <gbenson@redhat.com>
4613
4614 * target.c (target_stop_ptid, target_continue_ptid): New
4615 functions.
4616
721ec300
GB
46172014-09-11 Tom Tromey <tromey@redhat.com>
4618 Gary Benson <gbenson@redhat.com>
4619
4620 * target.h: Include target/target.h.
4621 * target.c (target_read_memory, target_read_uint32)
4622 (target_write_memory): New functions.
4623
c5e92cca
GB
46242014-09-11 Gary Benson <gbenson@redhat.com>
4625
4626 * server.h (debug_hw_points): Don't declare.
4627 * server.c (debug_hw_points): Don't define. Replace all uses
4628 with show_debug_regs.
4629 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4630 all uses with show_debug_regs.
4631
2e4bb98a
EBM
46322014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4633
4634 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4635 endianness into account.
4636 (ppc_supply_ptrace_register): Likewise.
4637
ac740bc7
JH
46382014-09-03 James Hogan <james.hogan@imgtec.com>
4639
4640 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4641 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4642
97ea6506
GB
46432014-09-03 Gary Benson <gbenson@redhat.com>
4644
4645 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4646 ALL_DEBUG_ADDRESS_REGISTERS.
4647
df7e5265
GB
46482014-09-02 Gary Benson <gbenson@redhat.com>
4649
4650 * i386-low.h: Renamed as...
4651 * x86-low.h: New file. All type, function and variable name
4652 prefixes changed from "i386_" to "x86_". All references updated.
4653 * i386-low.c: Renamed as...
4654 * x86-low.c: New file. All type, function and variable name
4655 prefixes changed from "i386_" to "x86_". All references updated.
4656
ed859da7
GB
46572014-09-02 Gary Benson <gbenson@redhat.com>
4658
4659 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4660 (x86_linux_new_thread): Likewise.
4661
860789c7
GB
46622014-08-29 Gary Benson <gbenson@redhat.com>
4663
4664 * server.h (setjmp.h): Do not include.
4665 (toplevel): Do not declare.
4666 (common-exceptions.h): Include.
4667 (cleanups.h): Likewise.
4668 * server.c (toplevel): Do not define.
4669 (exit_code): New static global.
4670 (detach_or_kill_for_exit_cleanup): New function.
4671 (main): New function. Original main renamed to...
4672 (captured_main): New function.
4673 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4674
ff55e1b5
GB
46752014-08-29 Gary Benson <gbenson@redhat.com>
4676
4677 * Makefile.in (SFILES): Add common/common-exceptions.c.
4678 (OBS): Add common-exceptions.o.
4679 (common-exceptions.o): New rule.
4680 * utils.c (prepare_to_throw_exception): New function.
4681
e9bcb658
GB
46822014-08-29 Gary Benson <gbenson@redhat.com>
4683
4684 * config.in: Regenerate.
4685 * configure: Likewise.
4686
e3180625
GB
46872014-08-29 Gary Benson <gbenson@redhat.com>
4688
4689 * Makefile.in (SFILES): Add common/cleanups.c.
4690 (OBS): cleanups.o.
4691 (cleanups.o): New rule.
4692
e3d6ba5d
GB
46932014-08-29 Gary Benson <gbenson@redhat.com>
4694
4695 * utils.c (internal_vwarning): New function.
4696
7096e886
GB
46972014-08-28 Gary Benson <gbenson@redhat.com>
4698
4699 * utils.h (fatal): Remove declaration.
4700 * utils.c (fatal): Remove function.
4701
14ce3192
GB
47022014-08-28 Gary Benson <gbenson@redhat.com>
4703
4704 * tracepoint.c (gdb_agent_init): Replace fatal with
4705 perror_with_name.
4706 (initialize_tracepoint): Likewise.
4707
50278d59
GB
47082014-08-28 Gary Benson <gbenson@redhat.com>
4709
4710 * remote-utils.c (remote_prepare): Replace fatal with error.
4711
aa96c426
GB
47122014-08-28 Gary Benson <gbenson@redhat.com>
4713
4714 * linux-low.c (linux_async): Replace fatal with warning.
4715 Tidy up and return.
4716 (linux_start_non_stop): Return -1 if linux_async failed.
4717
f7160e97
GB
47182014-08-28 Gary Benson <gbenson@redhat.com>
4719
4720 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4721 gdb_assert.
4722 (i386_dr_low_get_addr): Remove vague comment.
4723 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4724 gdb_assert.
4725
38e08fca
GB
47262014-08-28 Gary Benson <gbenson@redhat.com>
4727
4728 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4729 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4730 internal_error.
4731 (linux_resume_one_lwp): Likewise.
4732 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4733 gdb_assert.
4734 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4735 with internal_error.
4736 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4737 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4738 (find_register_by_name): Replace fatal with internal_error.
4739 (find_regno): Likewise.
4740 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4741 * thread-db.c (thread_db_create_event): Likewise.
4742 (thread_db_load_search): Likewise.
4743 (try_thread_db_load_1): Likewise.
4744 * tracepoint.c (get_jump_space_head): Replace fatal with
4745 internal_error.
4746 (claim_trampoline_space): Likewise.
4747 (have_fast_tracepoint_trampoline_buffer): Likewise.
4748 (cmd_qtstart): Likewise.
4749 (stop_tracing): Likewise.
4750 (fast_tracepoint_collecting): Likewise.
4751 (target_malloc): Likewise.
4752 (download_tracepoint): Likewise.
4753 (download_trace_state_variables): Replace check with gdb_assert.
4754 (upload_fast_traceframes): Replace fatal with internal_error.
4755
34abf635
GB
47562014-08-19 Tom Tromey <tromey@redhat.com>
4757 Gary Benson <gbenson@redhat.com>
4758
4759 * Makefile.in (SFILES): Add common/common-debug.c.
4760 (OBS): Add common-debug.o.
4761 (common-debug.o): New rule.
4762 * debug.h (debug_printf): Don't declare.
4763 * debug.c (debug_printf): Renamed and rewritten as...
4764 (debug_vprintf): New function.
4765
f6e94d78
GB
47662014-08-19 Gary Benson <gbenson@redhat.com>
4767
4768 * utils.h: Do not include print-utils.h.
4769
9239eeab
GB
47702014-08-19 Tom Tromey <tromey@redhat.com>
4771 Gary Benson <gbenson@redhat.com>
4772
4773 * server.h: Add static assertion.
4774 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4775
ef87c8bb
GB
47762014-08-19 Tom Tromey <tromey@redhat.com>
4777 Gary Benson <gbenson@redhat.com>
4778
4779 * Makefile.in (SFILES): Add common/errors.c.
4780 (OBS): Add errors.o.
4781 (IPA_OBS): Add errors-ipa.o.
4782 (errors.o): New rule.
4783 (errors-ipa.o): Likewise.
4784 * utils.h (perror_with_name, error, warning): Don't declare.
4785 * utils.c (warning): Renamed and rewritten as...
4786 (vwarning): New function.
4787 (error): Renamed and rewritten as...
4788 (verror): New function.
4789 (internal_error): Renamed and rewritten as...
4790 (internal_verror): New function.
4791
bb974a24
GB
47922014-08-07 Gary Benson <gbenson@redhat.com>
4793
4794 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4795 * configure: Regenerate.
4796 * config.in: Likewise.
4797 * server.h: Do not include errno.h.
4798 * event-loop.c: Likewise.
4799 * hostio-errno.c: Likewise.
4800 * linux-low.c: Likewise.
4801 * remote-utils.c: Likewise.
4802 * spu-low.c: Likewise.
4803 * utils.c: Likewise.
4804 * gdbreplay.c: Unconditionally include errno.h.
4805
6d3d12eb
GB
48062014-08-07 Gary Benson <gbenson@redhat.com>
4807
4808 * server.h: Do not include string.h.
4809 * event-loop.c: Likewise.
4810 * linux-low.c: Likewise.
4811 * regcache.c: Likewise.
4812 * remote-utils.c: Likewise.
4813 * spu-low.c: Likewise.
4814 * utils.c: Likewise.
4815
dccbb609
GB
48162014-08-07 Gary Benson <gbenson@redhat.com>
4817
4818 * server.h: Do not include gdb_assert.h.
4819
e76df0d0
GB
48202014-08-07 Gary Benson <gbenson@redhat.com>
4821
4822 * server.h: Do not include common-utils.h.
4823
4cb9c816
GB
48242014-08-07 Gary Benson <gbenson@redhat.com>
4825
4826 * server.h: Do not include ptid.h.
4827 * notif.h: Likewise.
4828
3995eeee
GB
48292014-08-07 Gary Benson <gbenson@redhat.com>
4830
4831 * server.h: Do not include gdb_locale.h.
4832
cb9f1a9b
GB
48332014-08-07 Gary Benson <gbenson@redhat.com>
4834
4835 * server.h: Do not include gdb/signals.h.
4836 * win32-low.c: Likewise.
4837
a5fceff8
GB
48382014-08-07 Gary Benson <gbenson@redhat.com>
4839
4840 * server.h: Do not include pathmax.h.
4841
b9391142
GB
48422014-08-07 Gary Benson <gbenson@redhat.com>
4843
4844 * server.h: Do not include libiberty.h.
4845 * linux-bfin-low.c: Likewise.
4846
0e443c87
GB
48472014-08-07 Gary Benson <gbenson@redhat.com>
4848
4849 * server.h: Do not include ansidecl.h.
4850
8ebb3f56
GB
48512014-08-07 Gary Benson <gbenson@redhat.com>
4852
4853 * linux-x86-low.c: Do not include stddef.h.
4854 * lynx-ppc-low.c: Likewise.
4855 * tracepoint.c: Likewise.
4856
8980bdf6
GB
48572014-08-07 Gary Benson <gbenson@redhat.com>
4858
4859 * server.h: Do not include stdarg.h.
4860 * nto-low.c: Likewise.
4861
d7096f71
GB
48622014-08-07 Gary Benson <gbenson@redhat.com>
4863
4864 * server.h: Do not include stdlib.h.
4865 * inferiors.c: Likewise.
4866 * linux-low.c: Likewise.
4867 * regcache.c: Likewise.
4868 * spu-low.c: Likewise.
4869 * tracepoint.c: Likewise.
4870 * utils.c: Likewise.
4871
d02f550d
GB
48722014-08-07 Gary Benson <gbenson@redhat.com>
4873
4874 * server.h: Do not include stdio.h.
4875 * linux-low.c: Likewise.
4876 * remote-utils.c: Likewise.
4877 * spu-low.c: Likewise.
4878 * utils.c: Likewise.
4879 * wincecompat.c: Likewise.
4880
87f6c4e3
GB
48812014-08-06 Gary Benson <gbenson@redhat.com>
4882
4883 * regcache.c (init_register_cache): Move conditionals inside if.
4884
7089dca4
GB
48852014-08-06 Gary Benson <gbenson@redhat.com>
4886
4887 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4888
462f517e
GB
48892014-07-31 Gary Benson <gbenson@redhat.com>
4890
4891 * ax.h: Do not include server.h.
4892 * gdbthread.h: Likewise.
4893 * lynx-low.h: Likewise.
4894 * notif.h: Likewise.
4895
976411d6
GB
48962014-07-30 Gary Benson <gbenson@redhat.com>
4897
4898 * server.h: Include common-defs.h.
4899 Do not include config.h or build-gnulib-gdbserver/config.h.
4900
d41f6d8e
GB
49012014-07-30 Gary Benson <gbenson@redhat.com>
4902
4903 * hostio-errno.c: Move server.h to top of includes list.
4904 * inferiors.c: Likewise.
4905 * linux-x86-low.c: Likewise.
4906 * notif.c: Include server.h.
4907
314c6a35
TT
49082014-07-24 Tom Tromey <tromey@redhat.com>
4909 Gary Benson <gbenson@redhat.com>
4910
4911 * server.h (CORE_ADDR): Now unsigned.
4912
69ff6be5
PA
49132014-07-16 Pedro Alves <palves@redhat.com>
4914
4915 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4916
ce9e3fe7
PA
49172014-07-15 Pedro Alves <palves@redhat.com>
4918
4919 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4920 copy.
4921
e76126e8
PA
49222014-07-11 Pedro Alves <palves@redhat.com>
4923
4924 * linux-low.c (kill_wait_lwp): New function, based on
4925 kill_one_lwp_callback, but use my_waitpid directly.
4926 (kill_one_lwp_callback, linux_kill): Use it.
4927
8e9db26e
PA
49282014-06-23 Pedro Alves <palves@redhat.com>
4929
4930 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4931 before setting DR0..DR3.
4932
698b3e08
GB
49332014-06-20 Gary Benson <gbenson@redhat.com>
4934
4935 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4936 * configure: Regenerated.
4937 * config.in: Likewise.
4938
125f8a3d
GB
49392014-06-20 Gary Benson <gbenson@redhat.com>
4940
4941 * Makefile.in (SFILES): Update locations for files moved
4942 from common to nat.
4943 (object file files): Reordered.
4944
42995dbd
GB
49452014-06-20 Gary Benson <gbenson@redhat.com>
4946
4947 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4948 (i386_dr_low_set_addr): Likewise.
4949 (i386_dr_low_get_addr): Likewise.
4950 (i386_dr_low_can_set_control): Likewise.
4951 (i386_dr_low_set_control): Likewise.
4952 (i386_dr_low_get_control): Likewise.
4953 (i386_dr_low_get_status): Likewise.
4954 (i386_get_debug_register_length): Likewise.
4955 * linux-x86-low.c (i386_dr_low_set_addr):
4956 Changed signature. Made static.
4957 (i386_dr_low_get_addr): Likewise.
4958 (i386_dr_low_set_control): Likewise.
4959 (i386_dr_low_get_control): Likewise.
4960 (i386_dr_low_get_status): Likewise.
4961 (i386_dr_low): New global variable.
4962 * win32-i386-low.c (i386_dr_low_set_addr):
4963 Changed signature. Made static.
4964 (i386_dr_low_get_addr): Likewise.
4965 (i386_dr_low_set_control): Likewise.
4966 (i386_dr_low_get_control): Likewise.
4967 (i386_dr_low_get_status): Likewise.
4968 (i386_dr_low): New global variable.
4969
e1d2394b
MS
49702014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4971
4972 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4973 * Makefile.in (AR, AR_FLAGS): Define.
4974 * configure: Regenerate.
4975
3a8ee006
GB
49762014-06-19 Gary Benson <gbenson@redhat.com>
4977
4978 * Makefile.in (i386-dregs.o): New rule.
4979 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4980 * i386-low.c (target.h): Remove include.
4981 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4982 (DR_CONTROL_SHIFT): Likewise.
4983 (DR_CONTROL_SIZE): Likewise.
4984 (DR_RW_EXECUTE): Likewise.
4985 (DR_RW_WRITE): Likewise.
4986 (DR_RW_READ): Likewise.
4987 (DR_RW_IORW): Likewise.
4988 (DR_LEN_1): Likewise.
4989 (DR_LEN_2): Likewise.
4990 (DR_LEN_4): Likewise.
4991 (DR_LEN_8): Likewise.
4992 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4993 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4994 (DR_ENABLE_SIZE): Likewise.
4995 (DR_LOCAL_SLOWDOWN): Likewise.
4996 (DR_GLOBAL_SLOWDOWN): Likewise.
4997 (DR_CONTROL_RESERVED): Likewise.
4998 (I386_DR_CONTROL_MASK): Likewise.
4999 (I386_DR_VACANT): Likewise.
5000 (I386_DR_LOCAL_ENABLE): Likewise.
5001 (I386_DR_GLOBAL_ENABLE): Likewise.
5002 (I386_DR_DISABLE): Likewise.
5003 (I386_DR_SET_RW_LEN): Likewise.
5004 (I386_DR_GET_RW_LEN): Likewise.
5005 (I386_DR_WATCH_HIT): Likewise.
5006 (i386_wp_op_t): Likewise.
5007 (i386_show_dr): Likewise.
5008 (i386_length_and_rw_bits): Likewise.
5009 (i386_insert_aligned_watchpoint): Likewise.
5010 (i386_remove_aligned_watchpoint): Likewise.
5011 (i386_handle_nonaligned_watchpoint): Likewise.
5012 i386_update_inferior_debug_regs(): Likewise.
5013 (i386_dr_insert_watchpoint): Likewise.
5014 (i386_dr_remove_watchpoint): Likewise.
5015 (i386_dr_region_ok_for_watchpoint): Likewise.
5016 (i386_dr_stopped_data_address): Likewise.
5017 (i386_dr_stopped_by_watchpoint): Likewise.
5018
8f26655c
GB
50192014-06-19 Gary Benson <gbenson@redhat.com>
5020
5021 * i386-low.c (i386_dr_show): Renamed to
5022 i386_show_dr and made static. All uses updated.
5023 (i386_dr_length_and_rw_bits): Renamed to
5024 i386_length_and_rw_bits and made static.
5025 All uses updated.
5026 (i386_dr_insert_aligned_watchpoint): Renamed to
5027 i386_insert_aligned_watchpoint and made static.
5028 All uses updated.
5029 (i386_dr_remove_aligned_watchpoint): Renamed to
5030 i386_remove_aligned_watchpoint and made static.
5031 All uses updated.
5032 (i386_dr_update_inferior_debug_regs): Renamed to
5033 i386_update_inferior_debug_regs and made static.
5034 All uses updated.
5035
b9228891
GB
50362014-06-18 Gary Benson <gbenson@redhat.com>
5037
5171def3
GB
5038 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5039 (i386_dr_low_can_set_control): Likewise.
5040 (i386_get_debug_register_length): Likewise.
5041 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5042 (i386_dr_low_can_set_control): Likewise.
5043 (i386_get_debug_register_length): Likewise.
5044
50452014-06-17 Gary Benson <gbenson@redhat.com>
5046
b9228891
GB
5047 * i386-low.h (i386-dregs.h): New include.
5048 (DR_FIRSTADDR): Now in i386-dregs.h.
5049 (DR_LASTADDR): Likewise.
5050 (DR_NADDR): Likewise.
5051 (DR_STATUS): Likewise.
5052 (DR_CONTROL): Likewise.
5053 (i386_debug_reg_state): Likewise.
5054 (i386_dr_insert_watchpoint): Likewise.
5055 (i386_dr_remove_watchpoint): Likewise.
5056 (i386_dr_region_ok_for_watchpoint): Likewise.
5057 (i386_dr_stopped_data_address): Likewise.
5058 (i386_dr_stopped_by_watchpoint): Likewise.
5059 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5060
4be83cc2
GB
50612014-06-18 Gary Benson <gbenson@redhat.com>
5062
5063 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5064 i386_dr_insert_watchpoint.
5065 (i386_low_remove_watchpoint): Renamed to
5066 i386_dr_remove_watchpoint.
5067 (i386_low_region_ok_for_watchpoint): Renamed to
5068 i386_dr_region_ok_for_watchpoint.
5069 (i386_low_stopped_data_address): Renamed to
5070 i386_dr_stopped_data_address.
5071 (i386_low_stopped_by_watchpoint): Renamed to
5072 i386_dr_stopped_by_watchpoint.
5073 * i386-low.c (i386_show_dr): Renamed to
5074 i386_dr_show and made nonstatic. All uses updated.
5075 (i386_length_and_rw_bits): Renamed to
5076 i386_dr_length_and_rw_bits and made nonstatic.
5077 All uses updated.
5078 (i386_insert_aligned_watchpoint): Renamed to
5079 i386_dr_insert_aligned_watchpoint and made nonstatic.
5080 All uses updated.
5081 (i386_remove_aligned_watchpoint): Renamed to
5082 i386_dr_remove_aligned_watchpoint and made nonstatic.
5083 All uses updated.
5084 (i386_update_inferior_debug_regs): Renamed to
5085 i386_dr_update_inferior_debug_regs and made nonstatic.
5086 All uses updated.
5087 (i386_low_insert_watchpoint): Renamed to
5088 i386_dr_insert_watchpoint. All uses updated.
5089 (i386_low_remove_watchpoint): Renamed to
5090 i386_dr_remove_watchpoint. All uses updated.
5091 (i386_low_region_ok_for_watchpoint): Renamed to
5092 i386_dr_region_ok_for_watchpoint. All uses updated.
5093 (i386_low_stopped_data_address): Renamed to
5094 i386_dr_stopped_data_address. All uses updated.
5095 (i386_low_stopped_by_watchpoint): Renamed to
5096 i386_dr_stopped_by_watchpoint. All uses updated.
5097
131aa0d4
GB
50982014-06-18 Gary Benson <gbenson@redhat.com>
5099
5100 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5101 (i386_dr_low_can_set_control): Likewise.
5102 (i386_insert_aligned_watchpoint): New check.
5103
d9305f7f
GB
51042014-06-18 Gary Benson <gbenson@redhat.com>
5105
5106 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5107 Renamed to state.
5108
e927c9fc
GB
51092014-06-18 Gary Benson <gbenson@redhat.com>
5110
5111 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5112 instead of fatal and error.
5113 (i386_handle_nonaligned_watchpoint): Likewise.
5114
1b6d4134
GB
51152014-06-18 Gary Benson <gbenson@redhat.com>
5116
5117 * i386-low.c (i386_get_debug_register_length): New macro.
5118 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5119 (i386_show_dr): Use debug_printf instead of fprintf. Use
5120 phex to format values.
5121
6e62758f
GB
51222014-06-18 Gary Benson <gbenson@redhat.com>
5123
5124 * i386-low.h: Comment changes.
5125 * i386-low.c: Likewise.
5126
fc6e2f03
GB
51272014-06-18 Gary Benson <gbenson@redhat.com>
5128
5129 * i386-low.c: Whitespace changes.
5130
f9d1eeed
TT
51312014-06-12 Tom Tromey <tromey@redhat.com>
5132
5133 * utils.c (freeargv): Remove.
5134
0b04e523
TT
51352014-06-12 Tom Tromey <tromey@redhat.com>
5136
5137 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5138 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5139 (parse_debug_format_options): Likewise.
5140 (gdbserver_usage): Likewise.
5141 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5142 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5143 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5144 against libiberty.
5145 ($(LIBGNU)): Depend on libiberty.
5146 (all-lib): Recurse into all subdirs.
5147 (install-only): Invoke "install" target in subdirs.
5148 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5149 targets.
5150 * configure: Rebuild.
5151 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5152 for vasprintf, vsnprintf, or gettimeofday.
5153 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5154 srv_tgtobj.
5155
270c9937
JB
51562014-06-05 Joel Brobecker <brobecker@adacore.com>
5157
5158 * development.sh: Delete.
5159 * Makefile.in (config.status): Adjust dependency on development.sh.
5160 * configure.ac: Adjust development.sh source call.
5161 * configure: Regenerate.
5162
0a261ed8
PA
51632014-06-02 Pedro Alves <palves@redhat.com>
5164
5165 * ax.c (gdb_free_agent_expr): New function.
5166 * ax.h (gdb_free_agent_expr): New declaration.
5167 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5168 list.
5169 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5170 static.
5171 (clear_breakpoint_conditions_and_commands): New function.
5172 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5173 (clear_breakpoint_conditions_and_commands): New declaration.
5174
e9dae05e
RR
51752014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5176
5177 * linux-aarch64-low.c (asm/ptrace.h): Include.
5178
5876f503
JK
51792014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5180
5181 Fix TLS access for -static -pthread.
5182 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5183 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5184 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5185
802e8e6d
PA
51862014-05-20 Pedro Alves <palves@redhat.com>
5187
5188 * linux-aarch64-low.c (aarch64_insert_point)
5189 (aarch64_remove_point): No longer check whether the type is
5190 supported here. Adjust to new interface.
5191 (the_low_target): Install aarch64_supports_z_point_type as
5192 supports_z_point_type method.
5193 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5194 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5195 instead of a Z packet char. Adjust.
5196 (arm_supports_z_point_type): New function.
5197 (arm_insert_point, arm_remove_point): Adjust to new interface.
5198 (the_low_target): Install arm_supports_z_point_type.
5199 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5200 (cris_insert_point, cris_remove_point): Adjust to new interface.
5201 Don't check whether the type is supported here.
5202 (the_low_target): Install cris_supports_z_point_type.
5203 * linux-low.c (linux_supports_z_point_type): New function.
5204 (linux_insert_point, linux_remove_point): Adjust to new interface.
5205 * linux-low.h (struct linux_target_ops) <insert_point,
5206 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5207 raw_breakpoint pointer parameter.
5208 <supports_z_point_type>: New method.
5209 * linux-mips-low.c (mips_supports_z_point_type): New function.
5210 (mips_insert_point, mips_remove_point): Adjust to new interface.
5211 Use mips_supports_z_point_type.
5212 (the_low_target): Install mips_supports_z_point_type.
5213 * linux-ppc-low.c (the_low_target): Install NULL as
5214 supports_z_point_type method.
5215 * linux-s390-low.c (the_low_target): Install NULL as
5216 supports_z_point_type method.
5217 * linux-sparc-low.c (the_low_target): Install NULL as
5218 supports_z_point_type method.
5219 * linux-x86-low.c (x86_supports_z_point_type): New function.
5220 (x86_insert_point): Adjust to new insert_point interface. Use
5221 insert_memory_breakpoint. Adjust to new
5222 i386_low_insert_watchpoint interface.
5223 (x86_remove_point): Adjust to remove_point interface. Use
5224 remove_memory_breakpoint. Adjust to new
5225 i386_low_remove_watchpoint interface.
5226 (the_low_target): Install x86_supports_z_point_type.
5227 * lynx-low.c (lynx_target_ops): Install NULL as
5228 supports_z_point_type callback.
5229 * nto-low.c (nto_supports_z_point_type): New.
5230 (nto_insert_point, nto_remove_point): Adjust to new interface.
5231 (nto_target_ops): Install nto_supports_z_point_type.
5232 * mem-break.c: Adjust intro comment.
5233 (struct raw_breakpoint) <raw_type, size>: New fields.
5234 <inserted>: Update comment.
5235 <shlib_disabled>: Delete field.
5236 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5237 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5238 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5239 (raw_bkpt_type_to_target_hw_bp_type): New function.
5240 (find_enabled_raw_code_breakpoint_at): New function.
5241 (find_raw_breakpoint_at): New type and size parameters. Use them.
5242 (insert_memory_breakpoint): New function, based off
5243 set_raw_breakpoint_at.
5244 (remove_memory_breakpoint): New function.
5245 (set_raw_breakpoint_at): Reimplement.
5246 (set_breakpoint): New, based on set_breakpoint_at.
5247 (set_breakpoint_at): Reimplement.
5248 (delete_raw_breakpoint): Go through the_target->remove_point
5249 instead of assuming memory breakpoints.
5250 (find_gdb_breakpoint_at): Delete.
5251 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5252 (find_gdb_breakpoint): New function.
5253 (set_gdb_breakpoint_at): Delete.
5254 (z_type_supported): New function.
5255 (set_gdb_breakpoint_1): New function, loosely based off
5256 set_gdb_breakpoint_at.
5257 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5258 (delete_gdb_breakpoint_at): Delete.
5259 (delete_gdb_breakpoint_1): New function, loosely based off
5260 delete_gdb_breakpoint_at.
5261 (delete_gdb_breakpoint): New function.
5262 (clear_gdb_breakpoint_conditions): Rename to ...
5263 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5264 breakpoint.
5265 (add_condition_to_breakpoint): Make static.
5266 (add_breakpoint_condition): Take a struct breakpoint pointer
5267 instead of an address. Adjust.
5268 (gdb_condition_true_at_breakpoint): Rename to ...
5269 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5270 z_type parameter.
5271 (gdb_condition_true_at_breakpoint): Reimplement.
5272 (add_breakpoint_commands): Take a struct breakpoint pointer
5273 instead of an address. Adjust.
5274 (gdb_no_commands_at_breakpoint): Rename to ...
5275 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5276 parameter. Return true if no breakpoint was found. Change debug
5277 output.
5278 (gdb_no_commands_at_breakpoint): Reimplement.
5279 (run_breakpoint_commands): Rename to ...
5280 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5281 and change return type to boolean.
5282 (run_breakpoint_commands): New function.
5283 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5284 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5285 breakpoint. Go through the_target->remove_point instead of
5286 assuming memory breakpoint.
5287 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5288 software and hardware breakpoints.
5289 (reinsert_raw_breakpoint): Go through the_target->insert_point
5290 instead of assuming memory breakpoint.
5291 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5292 software and hardware breakpoints.
5293 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5294 Check both software and hardware breakpoints.
5295 (validate_inserted_breakpoint): Assert the breakpoint is a
5296 software breakpoint. Set the inserted flag to -1 instead of
5297 setting shlib_disabled.
5298 (delete_disabled_breakpoints): Adjust.
5299 (validate_breakpoints): Only validate software breakpoints.
5300 Adjust to inserted flag change.
5301 (check_mem_read, check_mem_write): Skip breakpoint types other
5302 than software breakpoints. Adjust to inserted flag change.
5303 * mem-break.h (enum raw_bkpt_type): New enum.
5304 (raw_breakpoint, struct process_info): Forward declare.
5305 (Z_packet_to_target_hw_bp_type): Delete declaration.
5306 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5307 (set_gdb_breakpoint, delete_gdb_breakpoint)
5308 (clear_breakpoint_conditions): New declarations.
5309 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5310 (breakpoint_inserted_here): Update comment.
5311 (add_breakpoint_condition, add_breakpoint_commands): Replace
5312 address parameter with a breakpoint pointer parameter.
5313 (gdb_breakpoint_here): Update comment.
5314 (delete_gdb_breakpoint_at): Delete.
5315 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5316 * server.c (process_point_options): Take a struct breakpoint
5317 pointer instead of an address. Adjust.
5318 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5319 delete_gdb_breakpoint.
5320 * spu-low.c (spu_target_ops): Install NULL as
5321 supports_z_point_type method.
5322 * target.h: Include mem-break.h.
5323 (struct target_ops) <prepare_to_access_memory>: Update comment.
5324 <supports_z_point_type>: New field.
5325 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5326 instead of a char. Also take a raw breakpoint pointer.
5327 * win32-arm-low.c (the_low_target): Install NULL as
5328 supports_z_point_type.
5329 * win32-i386-low.c (i386_supports_z_point_type): New function.
5330 (i386_insert_point, i386_remove_point): Adjust to new interface.
5331 (the_low_target): Install i386_supports_z_point_type.
5332 * win32-low.c (win32_supports_z_point_type): New function.
5333 (win32_insert_point, win32_remove_point): Adjust to new interface.
5334 (win32_target_ops): Install win32_supports_z_point_type.
5335 * win32-low.h (struct win32_target_ops):
5336 <supports_z_point_type>: New method.
5337 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5338 instead of a char. Also take a raw breakpoint pointer.
5339
932539e3
PA
53402014-05-20 Pedro Alves <palves@redhat.com>
5341
5342 * mem-break.h: Include break-common.h.
5343 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5344 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5345 (Z_packet_to_target_hw_bp_type): New declaration.
5346 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5347 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5348 (Z_PACKET_ACCESS_WP): Delete macros.
5349 (Z_packet_to_hw_type): Delete function.
5350 * i386-low.h: Don't include break-common.h here.
5351 (Z_packet_to_hw_type): Delete declaration.
5352 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5353 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5354 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5355 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5356 * linux-aarch64-low.c: Don't include break-common.h here.
5357 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5358 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5359 (Z_packet_to_target_hw_bp_type): Delete function.
5360 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5361 function.
5362 (mips_insert_point, mips_remove_point): Use
5363 Z_packet_to_target_hw_bp_type.
5364
4ff0d3d8
PA
53652014-05-20 Pedro Alves <palves@redhat.com>
5366
5367 * linux-aarch64-low.c: Include break-common.h.
5368 (enum target_point_type): Delete.
5369 (Z_packet_to_point_type): Rename to ...
5370 (Z_packet_to_target_hw_bp_type): ... this, and return a
5371 target_hw_bp_type instead.
5372 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5373 instead of an enum target_point_type.
5374 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5375 breakpoint type.
5376 (aarch64_dr_state_insert_one_point)
5377 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5378 (aarch64_handle_aligned_watchpoint)
5379 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5380 Take an enum target_hw_bp_type instead of an enum
5381 target_point_type.
5382 (aarch64_supports_z_point_type): New function.
5383 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5384 use Z_packet_to_target_hw_bp_type.
5385
786dc519
JB
53862014-05-20 Joel Brobecker <brobecker@adacore.com>
5387
5388 * configure.ac: Only use -Werror by default when DEVELOPMENT
5389 is true.
5390 * configure: Regenerate.
5391
9e0aa64f
JK
53922014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5393
5394 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5395 * linux-x86-low.c (X86_64_USER_REGS): New.
5396 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5397
2b577b92
YQ
53982014-04-28 Yao Qi <yao@codesourcery.com>
5399
5400 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5401 name.
5402
94611da2
PA
54032014-04-25 Pedro Alves <palves@redhat.com>
5404
5405 PR server/16255
5406 * linux-low.c (linux_attach_fail_reason_string): New function.
5407 (linux_attach_lwp): Delete.
5408 (linux_attach_lwp_1): Rename to ...
5409 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5410 argument. Remove "initial" parameter. Return int instead of
5411 void. Don't error or warn here.
5412 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5413 failure to attach to the tgid. Call warning when failing to
5414 attach to an lwp.
5415 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5416 argument. Remove "initial" parameter. Return int instead of
5417 void. Don't error or warn here.
5418 (linux_attach_fail_reason_string): New declaration.
5419 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5420 interface change. Use linux_attach_fail_reason_string.
5421
01f9f808
MS
54222014-04-24 Michael Sturm <michael.sturm@mintel.com>
5423 Walfred Tedeschi <walfred.tedeschi@intel.com>
5424
5425 * Makefile.in: Added rules to handle new files
5426 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5427 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5428 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5429 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5430 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5431 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5432 x32-avx512-linux.o.
5433 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5434 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5435 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5436 i386/x32-avx512.xml.
5437 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5438 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5439 i386/x32-avx512-linux.xml.
5440 * i387-fp.c (num_avx512_k_registers): New constant for number
5441 of K registers.
5442 (num_avx512_zmmh_low_registers): New constant for number of
5443 lower ZMM registers (0-15).
5444 (num_avx512_zmmh_high_registers): New constant for number of
5445 higher ZMM registers (16-31).
5446 (num_avx512_ymmh_registers): New contant for number of higher
5447 YMM registers (ymm16-31 added by avx521 on x86_64).
5448 (num_avx512_xmm_registers): New constant for number of higher
5449 XMM registers (xmm16-31 added by AVX512 on x86_64).
5450 (struct i387_xsave): Add space for AVX512 registers.
5451 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5452 Add code to handle AVX512 registers.
5453 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5454 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5455 prototypei from generated file.
5456 (tdesc_amd64_avx512_linux): Likewise.
5457 (init_registers_x32_avx512_linux): Likewise.
5458 (tdesc_x32_avx512_linux): Likewise.
5459 (init_registers_i386_avx512_linux): Likewise.
5460 (tdesc_i386_avx512_linux): Likewise.
5461 (x86_64_regmap): Add AVX512 registers.
5462 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5463 mask.
5464 (initialize_low_arch): Add code to initialize AVX512 registers.
5465
51aa91f9
PA
54662014-04-23 Pedro Alves <palves@redhat.com>
5467
5468 * mem-break.c (find_gdb_breakpoint_at): Make static.
5469 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5470
a4165e94
PA
54712014-04-23 Pedro Alves <palves@redhat.com>
5472
5473 * i386-low.c: Don't include break-common.h here.
5474 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5475 prototype to take target_hw_bp_type as argument instead of a Z
5476 packet char.
5477 * i386-low.h: Include break-common.h here.
5478 (Z_packet_to_hw_type): Declare.
5479 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5480 prototypes.
5481 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5482 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5483 (x86_remove_point): Convert the packet number to a
5484 target_hw_bp_type before calling i386_low_remove_watchpoint.
5485 * win32-i386-low.c (i386_insert_point): Convert the packet number
5486 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5487 (i386_remove_point): Convert the packet number to a
5488 target_hw_bp_type before calling i386_low_remove_watchpoint.
5489
b8acf843
PA
54902014-04-23 Pedro Alves <palves@redhat.com>
5491
5492 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5493
d708bcd1
PA
54942014-04-10 Pedro Alves <palves@redhat.com>
5495
5496 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5497 Check if the condition or command is NULL before checking if the
5498 breakpoint is known. On success, return true.
5499 * mem-break.h (add_breakpoint_condition): Document return.
5500 (add_breakpoint_commands): Add describing comment.
5501 * server.c (skip_to_semicolon): New function.
5502 (process_point_options): Use it.
5503
2eec7d5b
PA
55042014-04-09 Pedro Alves <palves@redhat.com>
5505
5506 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5507 to lwpid_of.
5508
fa96cb38
PA
55092014-02-27 Pedro Alves <palves@redhat.com>
5510
5511 PR 12702
5512 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5513 macros.
5514 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5515 output.
5516 (last_thread_of_process_p): Take a PID argument instead of a
5517 thread pointer.
5518 (linux_wait_for_lwp): Delete.
5519 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5520 functions.
5521 (linux_low_filter_event): New function, party factored out from
5522 linux_wait_for_event.
5523 (linux_wait_for_event): Rename to ...
5524 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5525 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5526 sigsuspend. Check for zombie leaders.
5527 (linux_wait_for_event): Reimplement as wrapper around
5528 linux_wait_for_event_filtered.
5529 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5530 a normal or signal exit is seen, it's the whole process exiting.
5531 (wait_for_sigstop): No longer a for_each_inferior callback.
5532 Rewrite on top of linux_wait_for_event_filtered.
5533 (stop_all_lwps): Call wait_for_sigstop directly.
5534 * server.c (resume, handle_target_event): Handle
5535 TARGET_WAITKIND_NO_RESUMED.
5536
d763de10
JB
55372014-02-26 Joel Brobecker <brobecker@adacore.com>
5538
5539 * win32-low.c (psapi_get_dll_name,
5540 * win32_CreateToolhelp32Snapshot): Delete.
5541 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5542 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5543 Delete.
5544 (handle_load_dll): Add function description.
5545 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5546
850a0f76
JB
55472014-02-26 Joel Brobecker <brobecker@adacore.com>
5548
5549 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5550 Add comment.
5551 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5552 base address when calling win32_add_one_solib.
5553 (handle_load_dll): Delete local variable load_addr.
5554 Remove 0x1000 offset applied to DLL base address when calling
5555 win32_add_one_solib.
5556 (handle_unload_dll): Add comment.
5557
f25b3fc3
JB
55582014-02-26 Joel Brobecker <brobecker@adacore.com>
5559
5560 * win32-low.c (win32_add_all_dlls): Renames
5561 win32_ensure_ntdll_loaded. Rewrite function documentation.
5562 Adjust implementation to always load all DLLs.
5563 Add 0x1000 offset to DLL base address when calling
5564 win32_add_one_solib.
5565 (child_initialization_done): New static global.
5566 (do_initial_child_stuff): Set child_initialization_done to
5567 zero during child initialization, and 1 after. Replace call
5568 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5569 Add comment.
5570 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5571 (handle_unload_dll): Add function documentation.
5572 (get_child_debug_event): Ignore load and unload DLL events
5573 during child initialization.
5574
d86d4aaf
DE
55752014-02-20 Doug Evans <dje@google.com>
5576
3bc32da3 5577 Remove global all_lwps.
d86d4aaf
DE
5578 * inferiors.h (ptid_of): Move here from linux-low.h.
5579 (pid_of, lwpid_of): Ditto.
5580 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5581 parameter is a struct thread_info * now.
5582 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5583 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5584 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5585 directly.
5586 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5587 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5588 * linux-arm-low.c (update_registers_callback): Update, "entry"
5589 parameter is a struct thread_info * now.
5590 Fetch lwpid from current_inferior directly.
5591 (arm_insert_point): Pass &all_threads to find_inferior instead of
5592 &all_lwps.
5593 (arm_remove_point): Ditto.
5594 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5595 (arm_prepare_to_resume): Fetch pid from thread.
5596 (arm_read_description): Fetch lwpid from current_inferior directly.
5597 * linux-low.c (all_lwps): Delete.
5598 (delete_lwp): Delete call to remove_inferior.
5599 (handle_extended_wait): Fetch lwpid from thread.
5600 (add_lwp): Don't set lwp->entry.id. Remove call to
5601 add_inferior_to_list.
5602 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5603 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5604 (kill_one_lwp_callback): Ditto.
5605 (linux_kill): Don't dereference NULL pointer.
5606 Fetch ptid,lwpid from thread.
5607 (get_detach_signal): Fetch ptid from thread.
5608 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5609 Simplify call to regcache_invalidate_thread.
5610 (delete_lwp_callback): Update, "entry" parameter is a
5611 struct thread_info * now. Fetch pid from thread.
5612 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5613 (status_pending_p_callback): Update, "entry" parameter is a
5614 struct thread_info * now. Fetch ptid from thread.
5615 (find_lwp_pid): Update, "entry" parameter is a
5616 struct thread_info * now.
5617 (linux_wait_for_lwp): Fetch pid from thread.
5618 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5619 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5620 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5621 (dequeue_one_deferred_signal): Ditto.
5622 (cancel_breakpoint): Fetch ptid from current_inferior.
5623 (linux_wait_for_event): Pass &all_threads to find_inferior,
5624 not &all_lwps. Fetch ptid, lwpid from thread.
5625 (count_events_callback): Update, "entry" parameter is a
5626 struct thread_info * now.
5627 (select_singlestep_lwp_callback): Ditto.
5628 (select_event_lwp_callback): Ditto.
5629 (cancel_breakpoints_callback): Ditto.
5630 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5631 not &all_lwps.
5632 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5633 (unsuspend_one_lwp): Update, "entry" parameter is a
5634 struct thread_info * now.
5635 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5636 not &all_lwps.
5637 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5638 Fetch lwpid from thread, not lwp.
5639 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5640 Pass &all_threads to find_inferior, not &all_lwps.
5641 (send_sigstop): Fetch lwpid from thread, not lwp.
5642 (send_sigstop_callback): Update, "entry" parameter is a
5643 struct thread_info * now.
5644 (suspend_and_send_sigstop_callback): Ditto.
5645 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5646 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5647 struct thread_info * now.
5648 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5649 from thread, lwp.
5650 (lwp_running): Update, "entry" parameter is a
5651 struct thread_info * now.
5652 (stop_all_lwps): Fetch ptid from thread.
5653 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5654 (linux_resume_one_lwp): Fetch lwpid from thread.
5655 (linux_set_resume_request): Update, "entry" parameter is a
5656 struct thread_info * now. Fetch pid, lwpid from thread.
5657 (resume_status_pending_p): Update, "entry" parameter is a
5658 struct thread_info * now.
5659 (need_step_over_p): Ditto. Fetch lwpid from thread.
5660 (start_step_over): Fetch lwpid from thread.
5661 (linux_resume_one_thread): Update, "entry" parameter is a
5662 struct thread_info * now. Fetch lwpid from thread.
5663 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5664 (proceed_one_lwp): Update, "entry" parameter is a
5665 struct thread_info * now. Fetch lwpid from thread.
5666 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5667 struct thread_info * now.
5668 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5669 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5670 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5671 directly.
5672 (regsets_store_inferior_registers): Ditto.
5673 (fetch_register, store_register): Ditto.
5674 (linux_read_memory, linux_write_memory): Ditto.
5675 (linux_request_interrupt): Ditto.
5676 (linux_read_auxv): Ditto.
5677 (linux_xfer_siginfo): Ditto.
5678 (linux_qxfer_spu): Ditto.
5679 (linux_qxfer_libraries_svr4): Ditto.
5680 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5681 moved to inferiors.h.
5682 (get_lwp): Delete.
5683 (get_thread_lwp): Update.
5684 (struct lwp_info): Delete member "entry". Simplify comment for
5685 member "thread".
5686 (all_lwps): Delete.
5687 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5688 current_inferior directly.
5689 (update_watch_registers_callback): Update, "entry" parameter is a
5690 struct thread_info * now. Fetch pid from thread.
5691 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5692 (mips_insert_point): Fetch lwpid from current_inferior.
5693 Pass &all_threads to find_inferior, not &all_lwps.
5694 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5695 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5696 directly.
5697 (mips_stopped_data_address): Ditto.
5698 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5699 directly.
5700 * linux-tile-low.c (tile_arch_setup): Ditto.
5701 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5702 (update_debug_registers_callback): Update, "entry" parameter is a
5703 struct thread_info * now. Fetch pid from thread.
5704 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5705 Pass &all_threads to find_inferior, not &all_lwps.
5706 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5707 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5708 Pass &all_threads to find_inferior, not &all_lwps.
5709 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5710 (i386_dr_low_get_status): Ditto.
5711 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5712 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5713 (x86_linux_read_description): Ditto.
5714 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5715
3b8361aa
DE
57162014-02-20 Doug Evans <dje@google.com>
5717
5718 * inferiors.c (get_first_inferior): Fix buglet.
5719
f7667f0d
DE
57202014-02-19 Doug Evans <dje@google.com>
5721
5722 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5723 * inferiors.c (add_thread): Change result type to struct thread_info *.
5724 All callers updated.
5725 (add_lwp): Call add_thread here instead of in callers.
5726 All callers updated.
5727 * linux-low.h (get_lwp_thread): Rewrite.
5728 (struct lwp_info): New member "thread".
5729
b3312d80
DE
57302014-02-19 Doug Evans <dje@google.com>
5731
5732 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5733 All callers updated.
5734
ecc6f45c
DE
57352014-02-19 Doug Evans <dje@google.com>
5736
5737 * inferiors.c (add_thread): Fix whitespace.
5738
649ebbca
DE
57392014-02-19 Doug Evans <dje@google.com>
5740
5741 * dll.c (clear_dlls): Replace accessing list implemention details
5742 with API function.
5743 * gdbthread.h (get_first_thread): Declare.
5744 * inferiors.c (for_each_inferior_with_data): New function.
5745 (get_first_thread): New function.
5746 (find_thread_ptid): Simplify.
5747 (get_first_inferior): New function.
5748 (clear_list): Delete.
5749 (one_inferior_p): New function.
5750 (clear_inferior_list): New function.
5751 (clear_inferiors): Update.
5752 * inferiors.h (for_each_inferior_with_data): Declare.
5753 (clear_inferior_list): Declare.
5754 (one_inferior_p): Declare.
5755 (get_first_inferior): Declare.
5756 * linux-low.c (linux_wait_for_event): Replace accessing list
5757 implemention details with API function.
5758 * server.c (target_running): Ditto.
5759 (accumulate_file_name_length): New function.
5760 (emit_dll_description): New function.
5761 (handle_qxfer_libraries): Replace accessing list implemention
5762 details with API function.
5763 (handle_qxfer_threads_worker): New function.
5764 (handle_qxfer_threads_proper): Replace accessing list implemention
5765 details with API function.
5766 (handle_query): Ditto.
5767 (visit_actioned_threads_callback_ftype): New typedef.
5768 (visit_actioned_threads_data): New struct.
5769 (visit_actioned_threads): Rewrite to be find_inferior callback.
5770 (resume): Call find_inferior.
5771 (handle_status): Replace accessing list implemention
5772 details with API function.
5773 (process_serial_event): Replace accessing list implemention details
5774 with API function.
5775 * target.c (set_desired_inferior): Replace accessing list implemention
5776 details with API function.
5777 * tracepoint.c (same_process_p): New function.
5778 (gdb_agent_about_to_close): Replace accessing list implemention
5779 details with API function.
5780 * win32-low.c (child_delete_thread): Replace accessing list
5781 implemention details with API function.
5782 (match_dll_by_basename): New function.
5783 (dll_is_loaded_by_basename): New function.
5784 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5785 details call to dll_is_loaded_by_basename.
5786
80894984
DE
57872014-02-19 Doug Evans <dje@google.com>
5788
5789 * dll.h (struct dll_info): Add comment.
5790 * gdbthread.h (struct thread_info): Add comment.
5791 (current_ptid): Simplify.
5792 * inferiors.c (add_process): Update.
5793 (remove_process): Update.
5794 * inferiors.h (struct process_info): Rename member "head" to "entry".
5795 * linux-low.c (delete_lwp): Update.
5796 (add_lwp): Update.
5797 (last_thread_of_process_p): Update.
5798 (kill_one_lwp_callback, linux_kill): Update.
5799 (status_pending_p_callback): Update.
5800 (wait_for_sigstop): Update. Simplify read of ptid.
5801 (start_step_over): Update.
5802 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5803 (get_lwp_thread): Update.
5804 (struct lwp_info): Rename member "head" to "entry".
5805 * regcache.h (inferior_list_entry): Delete.
5806 * server.c (kill_inferior_callback): Update.
5807 (detach_or_kill_inferior_callback): Update.
5808 (print_started_pid): Update.
5809 (print_attached_pid): Update.
5810 (process_serial_event): Simplify read of ptid.
5811 * thread-db.c (thread_db_create_event): Update.
5812 (thread_db_get_tls_address): Update.
5813 * win32-low.c (current_inferior_ptid): Simplify.
5814
46917d26
TT
58152014-02-19 Tom Tromey <tromey@redhat.com>
5816
5817 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5818 argument.
5819 (target_supports_btrace): Update.
5820
0759a81e
YQ
58212014-02-14 Yao Qi <yao@codesourcery.com>
5822
5823 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5824 (rsp-low-ipa.o): New target.
5825
a7191e8b
TT
58262014-02-12 Tom Tromey <tromey@redhat.com>
5827
5828 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5829 convert_ascii_to_int.
5830 * regcache.c (registers_to_string): Likewise.
5831 * remote-utils.c (decode_M_packet): Likewise.
5832 * server.c (process_serial_event): Likewise.
5833
ff0e980e
TT
58342014-02-12 Tom Tromey <tromey@redhat.com>
5835
5836 * server.c (handle_query, handle_v_run): Use hex2bin, not
5837 unhexify.
5838 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5839
e9371aff
TT
58402014-02-12 Tom Tromey <tromey@redhat.com>
5841
5842 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5843 convert_int_to_ascii.
5844 * regcache.c (registers_to_string, collect_register_as_string):
5845 Likewise.
5846 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5847 Likewise.
5848 * server.c (process_serial_event): Likewise.
5849 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5850 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5851
971dc0b8
TT
58522014-02-12 Tom Tromey <tromey@redhat.com>
5853
5854 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5855 bin2hex, not hexify.
5856 * tracepoint.c (cmd_qtstatus): Likewise.
5857
0a822afb
TT
58582014-02-12 Tom Tromey <tromey@redhat.com>
5859
5860 * remote-utils.c (monitor_output): Pass explicit length to
5861 hexify.
5862
9c3d6531
TT
58632014-02-12 Tom Tromey <tromey@redhat.com>
5864
5865 * tracepoint.c: Include rsp-low.h.
5866 * server.c: Include rsp-low.h.
5867 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5868 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5869 declare.
5870 * remote-utils.c: Include rsp-low.h.
5871 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5872 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5873 (convert_int_to_ascii, convert_ascii_to_int): Move to
5874 common/rsp-low.c.
5875 * regcache.c: Include rsp-low.h.
5876 * ax.c: Include rsp-low.h.
5877 * Makefile.in (SFILES): Add common/rsp-low.c.
5878 (OBS): Add rsp-low.o.
5879 (rsp-low.o): New target.
5880
01fd3ea5
TT
58812014-02-12 Tom Tromey <tromey@redhat.com>
5882
5883 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5884 Include print-utils.h.
5885 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5886 (plongest, thirty_two, phex_nz): Remove.
5887 * Makefile.in (SFILES): Add common/print-utils.c.
5888 (OBS): Add print-utils.o.
5889 (print-utils-ipa.o): New target.
5890 (print-utils.o): New target.
5891 (IPA_OBJS): Add print-utils-ipa.o.
5892
e99dc820
TT
58932014-02-06 Tom Tromey <tromey@redhat.com>
5894
5895 * Makefile.in (SFILES): Fix indentation.
5896
ee1e2d4f
DE
58972014-02-05 Doug Evans <dje@google.com>
5898
5899 * linux-low.c (linux_wait_for_event): Improve comment.
5900 (linux_wait_1): Keep current_inferior in sync with event_child.
5901
f5a02773
DE
59022014-01-22 Doug Evans <dje@google.com>
5903
5904 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5905
87ce2a04
DE
59062014-01-22 Doug Evans <dje@google.com>
5907
5908 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5909 * configure: Regenerate.
5910 * config.in: Regenerate.
5911 * Makefile.in (SFILES): Add debug.c.
5912 (OBS): Add debug.o.
5913 * debug.c: New file.
5914 * debug.h: New file.
5915 * linux-aarch64-low.c (*): Update all debugging printfs to use
5916 debug_printf instead of fprintf.
5917 * linux-arm-low.c (*): Ditto.
5918 * linux-cris-low.c (*): Ditto.
5919 * linux-crisv32-low.c (*): Ditto.
5920 * linux-m32r-low.c (*): Ditto.
5921 * linux-sparc-low.c (*): Ditto.
5922 * linux-x86.c (*): Ditto.
5923 * linux-low.c (*): Ditto.
5924 (linux_wait_1): Add calls to debug_enter, debug_exit.
5925 (linux_wait): Remove redundant debugging printf.
5926 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5927 (linux_resume, unstop_all_lwps): Ditto.
5928 * mem-break.c (*): Update all debugging printfs to use
5929 debug_printf instead of fprintf.
5930 * remote-utils.c (*): Ditto.
5931 * thread-db.c (*): Ditto.
5932 * server.c #include <ctype.h>, "gdb_vecs.h".
5933 (debug_threads): Moved to debug.c.
5934 (*): Update all debugging printfs to use debug_printf instead of
5935 fprintf.
5936 (start_inferior): Replace call to fflush with call to debug_flush.
5937 (monitor_show_help): Mention set debug-format.
5938 (parse_debug_format_options): New function.
5939 (handle_monitor_command): Handle "monitor set debug-format".
5940 (gdbserver_usage): Mention --debug-format.
5941 (main): Parse --debug-format.
5942 * server.h (debug_threads): Declaration moved to debug.h.
5943 #include "debug.h".
5944 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5945 trace_debug_1 that uses debug_printf.
5946 (tracepoint_look_up_symbols): Update all debugging printfs to use
5947 debug_printf instead of fprintf.
5948
e671835b
BS
59492014-01-20 Baruch Siach <baruch@tkos.co.il>
5950
5951 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5952 sys/ptrace.h.
5953
b5737fa9
PA
59542014-01-17 Pedro Alves <palves@redhat.com>
5955
ea38d2a9 5956 PR build/16445
c7faa97a
PA
5957 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5958 defined after including gdb_proc_service.h.
b5737fa9 5959
40ed484e
DE
59602014-01-16 Doug Evans <dje@google.com>
5961
5962 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5963 (match_dll): Use it.
5964
969c39fb
MM
59652014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5966
5967 * target.h (target_ops) <read_btrace>: Change parameters and
5968 return type to allow error reporting.
5969 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5970 trace reading errors on.
5971 * linux-low.c (linux_low_read_btrace): Pass trace reading
5972 errors on.
5973 (linux_low_disable_btrace): New.
5974
ab7f45ba
DE
59752014-01-15 Doug Evans <dje@google.com>
5976
5977 * inferiors.c (thread_id_to_gdb_id): Delete.
5978 * inferiors.h (thread_id_to_gdb_id): Delete.
5979
66af0f44
EZ
59802014-01-13 Eli Zaretskii <eliz@gnu.org>
5981
5982 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5983 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5984 versions.
5985
9939e131
PA
59862014-01-08 Pedro Alves <palves@redhat.com>
5987
5988 * server.c (handle_status): Don't discard previous queued stop
5989 replies or thread's pending status here.
5990 (main) <disconnection>: Do it here instead.
5991
b7ea362b
PA
59922014-01-08 Pedro Alves <palves@redhat.com>
5993
5994 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5995 * server.c (visit_actioned_threads, handle_pending_status): New
5996 function.
5997 (handle_v_cont): Factor out parts to ...
5998 (resume): ... this new function. If in all-stop, and a thread
5999 being resumed has a pending status, report it without actually
6000 resuming.
6001 (myresume): Adjust to use the new 'resume' function.
6002 (clear_pending_status_callback, set_pending_status_callback)
6003 (find_status_pending_thread_callback): New functions.
6004 (handle_status): Handle the case of multiple threads having
6005 interesting statuses to report. Report threads' real last signal
6006 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6007 with an interesting thread to report the status for, instead of
6008 always reporting the status of the first thread.
6009
28498c42
JB
60102014-01-01 Joel Brobecker <brobecker@adacore.com>
6011
6012 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6013 * gdbreplay.c (gdbreplay_version): Likewise.
6014
f45c82da
YZ
60152013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6016
6017 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6018 iov.iov_len with the real length in use.
6019
379a5e2d
JB
60202013-12-13 Joel Brobecker <brobecker@adacore.com>
6021
6022 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6023 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6024 for all targets that use win32-low.c.
6025 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6026 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6027
4210d83e
PA
60282013-12-13 Pedro Alves <palves@redhat.com>
6029
6030 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6031 if equal to TARGET_WAITKIND_LOADED.
6032 * win32-low.c (cached_status): New static global.
6033 (win32_wait): Add declaration.
6034 (do_initial_child_stuff): Flush all initial pending debug events
6035 up to the initial breakpoint.
6036 (win32_wait): If CACHED_STATUS was set, return that instead
6037 of doing a real wait. Remove the code resuming the execution
6038 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6039 during the initial phase. Also remove the code changing
6040 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6041 TARGET_WAITKIND_STOPPED.
6042
e7f0d979
YQ
60432013-12-11 Yao Qi <yao@codesourcery.com>
6044
6045 * notif.c (handle_notif_ack): Return 0 if no notification
6046 matches.
6047
ebcf782c
DE
60482013-11-20 Doug Evans <dje@google.com>
6049
6050 * linux-low.c (linux_set_resume_request): Fix comment.
6051
20ad9378
DE
60522013-11-20 Doug Evans <dje@google.com>
6053
6054 * linux-low.c (resume_status_pending_p): Tweak comment.
6055
a196ebeb
WT
60562013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6057
6058 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6059 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6060 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6061 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6062 (srv_amd64_regobj): Add amd64-mpx.o.
6063 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6064 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6065 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6066 * i387-fp.c (num_pl_bnd_register) Added constant.
6067 (num_pl_bnd_cfg_registers) Added constant.
6068 (struct i387_xsave) Added reserved area and MPX fields.
6069 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6070 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6071 function.
6072 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6073 (init_registers_amd64_mpx_linux): Declare new function.
6074 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6075 (x86_64_regmap): Add MPX registers.
6076 (x86_linux_read_description): Add MPX case.
6077 (initialize_low_arch): Initialize MPX targets.
6078
0080a2f6
TT
60792013-11-18 Tom Tromey <tromey@redhat.com>
6080
6081 * configure: Rebuild.
6082 * configure.ac: Don't check for stdlib.h.
6083 * gdbreplay.c: Unconditionally include stdlib.h.
6084
2978b111
TT
60852013-11-18 Tom Tromey <tromey@redhat.com>
6086
6087 * config.in: Rebuild.
6088 * configure: Rebuild.
6089 * configure.ac: Don't use AC_HEADER_DIRENT.
6090
a3d08894
TT
60912013-11-18 Tom Tromey <tromey@redhat.com>
6092
6093 * server.h: Don't check HAVE_STRING_H.
6094 * gdbreplay.c: Don't check HAVE_STRING_H.
6095 * configure: Rebuild.
6096
0a5dd17d
TT
60972013-11-18 Tom Tromey <tromey@redhat.com>
6098
6099 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6100 LIBGNU.
6101
1bd2f0ba
TT
61022013-11-08 Tom Tromey <tromey@redhat.com>
6103
6104 * configure, config.in: Rebuild.
6105 * configure.ac: Remove unused configury.
6106
3266f10b
TT
61072013-11-08 Tom Tromey <tromey@redhat.com>
6108
6109 * acinclude.m4: Include common.m4, codeset.m4.
6110 * configure, config.in: Rebuild.
6111 * configure.ac: Use GDB_AC_COMMON.
6112
6682d959
AA
61132013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6114
6115 * linux-s390-low.c (HWCAP_S390_TE): New define.
6116 (s390_arch_setup): Consider the TE field in the HWCAP for
6117 determining 'have_regset_tdb'.
6118
fd0a4d76
SDJ
61192013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6120
6121 PR gdb/16014
6122 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6123 call to sizeof.
6124
1a3d890b
PA
61252013-10-02 Pedro Alves <palves@redhat.com>
6126
6127 * server.c (process_serial_event): Don't output "GDBserver
6128 exiting" if GDB is connected through stdio.
6129 * target.c (mywait): Likewise, be silent if GDB is connected
6130 through stdio.
6131
97ad4581
JB
61322013-10-01 Joel Brobecker <brobecker@adacore.com>
6133
6134 * lynx-low.c (lynx_add_threads_after_attach): New function.
6135 (lynx_attach): Remove call to add_thread. Add call to
6136 lynx_add_threads_after_attach instead.
6137
5b4e221c
MF
61382013-09-28 Mike Frysinger <vapier@gentoo.org>
6139
6140 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6141 * config.in, configure: Regenerated.
6142
ee47b2f8
YQ
61432013-09-18 Yao Qi <yao@codesourcery.com>
6144
6145 PR server/15959
6146 * server.c (start_inferior): Clear 'resume_info'.
6147
d6707650 61482013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6149
d6707650
JW
6150 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6151 for each register.
6152
9243dd0e 61532013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6154
9243dd0e
JW
6155 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6156 linux-tile-low.o to srv_tgtobj.
6157
c623a6ef
WN
61582013-09-16 Will Newton <will.newton@linaro.org>
6159
6160 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6161 out regs.
6162
fb71d39e
PA
61632013-09-06 Pedro Alves <palves@redhat.com>
6164
6165 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6166 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6167 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6168 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6169 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6170 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6171
8e7e9910
PA
61722013-09-06 Pedro Alves <palves@redhat.com>
6173
6174 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6175 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6176
7c3a12ca
PA
61772013-09-06 Pedro Alves <palves@redhat.com>
6178
6179 * linux-amd64-ipa.c: Include tracepoint.h.
6180 * linux-i386-ipa.c: Include tracepoint.h.
6181
8eb3d7b6
RW
61822013-09-06 Ricard Wanderlof <ricardw@axis.com>
6183
6184 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6185 (ps_get_thread_area): New function.
6186
eddddb9d
RW
61872013-09-06 Ricard Wanderlof <ricardw@axis.com>
6188
6189 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6190 (initialize_low_arch): Call init_registers_crisv32 rather than
6191 init_register_crisv32.
6192
533b0600
PA
61932013-09-05 Pedro Alves <palves@redhat.com>
6194
6195 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6196 to ...
6197 * hostio.h: ... this new file.
6198 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6199 win32-low.c: Include hostio.h.
6200
0ce3d3b5
PA
62012013-09-05 Pedro Alves <palves@redhat.com>
6202
6203 * server.h (gdb_client_data, handler_func, callback_handler_func)
6204 (delete_file_handler, add_file_handler, append_callback_event)
6205 (delete_callback_event, start_event_loop, initialize_event_loop):
6206 Move to event-loop.h and include it.
6207 * event-loop.h: New file.
6208
799cdc37
PA
62092013-09-05 Pedro Alves <palves@redhat.com>
6210
6211 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6212 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6213 (loaded_dll, unloaded_dll): Move to ...
6214 * dll.h: ... this new file.
6215 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6216
6a6bbd9d
PA
62172013-09-05 Pedro Alves <palves@redhat.com>
6218
6219 * server.h (current_process, get_thread_process, all_processes)
6220 (add_inferior_to_list, for_each_inferior, current_inferior)
6221 (remove_inferior, add_process, remove_process, find_process_pid)
6222 (have_started_inferiors_p, have_attached_inferiors_p)
6223 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6224 (clear_inferiors, find_inferior, find_inferior_id)
6225 (inferior_target_data, set_inferior_target_data)
6226 (inferior_regcache_data, set_inferior_regcache_data): Move to
6227 inferiors.h, and include it.
6228 * inferiors.h: New file.
6229
f699aaba
PA
62302013-09-05 Pedro Alves <palves@redhat.com>
6231
6232 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6233 Move ...
72f4393d 6234 * ax.h: ... here.
f699aaba 6235
c144c7a0
PA
62362013-09-05 Pedro Alves <palves@redhat.com>
6237
6238 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6239 tracepoint.h.
6240 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6241 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6242 (handle_tracepoint_general_set, handle_tracepoint_query)
6243 (tracepoint_finished_step, tracepoint_was_hit)
6244 (release_while_stepping_state_list, current_traceframe)
6245 (in_readonly_region, traceframe_read_mem)
6246 (fetch_traceframe_registers, traceframe_read_sdata)
6247 (traceframe_read_info, struct fast_tpoint_collect_status)
6248 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6249 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6250 (supply_fast_tracepoint_registers)
6251 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6252 (ipa_tdesc, claim_trampoline_space)
6253 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6254 (agent_mem_read, agent_get_trace_state_variable_value)
6255 (agent_set_trace_state_variable_value, agent_tsv_read)
6256 (agent_mem_read_string, get_raw_reg_func_addr)
6257 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6258 * tracepoint.h: ... this new file.
6259
ff42e6ab
PA
62602013-09-05 Pedro Alves <palves@redhat.com>
6261
6262 * server.h (perror_with_name, error, fatal, warning, paddress)
6263 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6264 include it.
6265 * utils.h: New file.
6266
541af0f4
PA
62672013-09-05 Pedro Alves <palves@redhat.com>
6268
6269 * server.h (remote_debug, noack_mode, transport_is_reliable)
6270 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6271 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6272 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6273 (write_enn, initialize_async_io, enable_async_io)
6274 (disable_async_io, check_remote_input_interrupt_request)
6275 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6276 (dead_thread_notify, prepare_resume_reply)
6277 (decode_address_to_semicolon, decode_address, decode_m_packet)
6278 (decode_M_packet, decode_X_packet, decode_xfer_write)
6279 (decode_search_memory_packet, unhexify, hexify)
6280 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6281 (look_up_one_symbol, relocate_instruction)
6282 (monitor_output): Move to remote-utils.h, and include it.
6283 * remote-utils.h: New file.
6284
eebdf26b
PA
62852013-09-05 Pedro Alves <palves@redhat.com>
6286
6287 * server.h (_): Delete.
6288
3aafd2ff
PA
62892013-09-02 Pedro Alves <palves@redhat.com>
6290
6291 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6292 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6293 allocated.
6294 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6295
cee83bcb
PM
62962013-09-02 Pierre Muller <muller@sourceware.org>
6297
6298 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6299 or WriteProcessMemory complete successfully and handle
6300 ERROR_PARTIAL_COPY error.
6301
9a13b2fa
PA
63022013-09-02 Pedro Alves <palves@redhat.com>
6303
6304 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6305 error instead of EIO.
6306
602e3198
JK
63072013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6308
6309 PR server/15604
6310 * linux-low.c: Include filestuff.h.
6311 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6312 * lynx-low.c: Include filestuff.h.
6313 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6314 * server.c: Include filestuff.h.
6315 (main): Call notice_open_fds.
6316 * spu-low.c: Include filestuff.h.
6317 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6318
96d7229d
LM
63192013-08-22 Luis Machado <lgustavo@codesourcery.com>
6320
6321 * Makefile.in: Explain why ../target and ../nat are not
6322 listed as include file search paths.
6323 (linux-waitpid.o): New object file rule.
6324 * configure.srv (srv_native_linux_obj): New variable.
6325 Replace all occurrences of linux native object files with
6326 $srv_native_linux_obj.
6327 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6328 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6329 (linux_enable_event_reporting): Remove declaration.
6330 (my_waitpid): Moved to common/linux-waitpid.c.
6331 (linux_wait_for_event): Pass ptid when calling
6332 linux_enable_event_reporting.
6333 (linux_supports_tracefork_flag): Remove.
6334 (linux_enable_event_reporting): Likewise.
6335 (linux_tracefork_grandchild): Remove.
6336 (STACK_SIZE): Moved to common/linux-ptrace.c.
6337 (linux_tracefork_child): Remove.
6338 (linux_test_for_tracefork): Remove.
6339 (linux_look_up_symbols): Call linux_supports_traceclone.
6340 (initialize_low): Remove call to linux_test_for_tracefork.
6341 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6342 common/linux-ptrace.h.
6343 (PTRACE_TYPE_ARG4): Likewise.
6344 Include linux-ptrace.h.
6345
32940073
PA
63462013-08-21 Pedro Alves <palves@redhat.com>
6347
6348 * config.in: Renegerate.
6349
33b60d58 63502013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6351
33b60d58
LM
6352 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6353 (SFILES): Remove $(srcdir)/common/target-common.c and
6354 add $(srcdir)/target/waitstatus.c.
6355 (OBS): Remove target-common.o and add waitstatus.o.
6356 (server_h): Remove $(srcdir)/../common/target-common.h and
6357 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6358 and $(srcdir)/../target/waitstatus.h.
6359 (target-common.o): Remove.
6360 (waitstatus.o): New target object file.
6361 * target.h: Do not include target-common.h and
6362 include target/resume.h, target/wait.h and
6363 target/waitstatus.h.
6364
b8e1b30e
LM
63652013-08-13 Luis Machado <lgustavo@codesourcery.com>
6366
6367 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6368 to PTRACE_TYPE_ARG3.
6369 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6370 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6371 PTRACE_TYPE_ARG4.
6372 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6373 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6374
7a60ad40
YQ
63752013-07-27 Jie Zhang <jie@codesourcery.com>
6376 Daniel Jacobowitz <dan@codesourcery.com>
6377 Yao Qi <yao@codesourcery.com>
6378
6379 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6380 (mips-linux-watch.o): New rule.
6381 (mips_linux_watch_h): New variable.
6382 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6383 srv_tgtobj.
6384 * linux-mips-low.c: Include mips-linux-watch.h.
6385 (struct arch_process_info, struct arch_lwp_info): New.
6386 (update_watch_registers_callback): New function.
6387 (mips_linux_new_process, mips_linux_new_thread) New functions.
6388 (mips_linux_prepare_to_resume, mips_insert_point): New
6389 functions.
6390 (mips_remove_point, mips_stopped_by_watchpoint): New
6391 functions.
6392 (rsp_bp_type_to_target_hw_bp_type): New function.
6393 (mips_stopped_data_address): New function.
6394 (the_low_target): Add watchpoint support functions.
6395
de6f69ad
YQ
63962013-07-27 Yao Qi <yao@codesourcery.com>
6397
6398 * i386-low.c: Include break-common.h.
6399 (enum target_hw_bp_type): Remove.
6400
3360c0bf
LM
64012013-07-24 Luis Machado <lgustavo@codesourcery.com>
6402
6403 * Makefile.in (SFILES): /common/target-common.c.
6404 (OBS): Add target-common.o.
6405 (server_h): Add $(srcdir)/../common/target-common.h.
6406 (target-common.o): New target.
6407 * server.c (queue_stop_reply_callback): Free
6408 status string after use.
6409 * target.c (target_waitstatus_to_string): Remove.
6410 * target.h: Include target-common.h.
6411 (resume_kind): Likewise.
6412 (target_waitkind): Likewise.
6413 (target_waitstatus): Likewise.
6414 (TARGET_WNOHANG): Likewise.
6415
bd885420
YQ
64162013-07-04 Yao Qi <yao@codesourcery.com>
6417
6418 * Makefile.in (host_alias): Use @host_noncanonical@.
6419 (target_alias): Use @target_noncanonical@.
6420 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6421 ACX_NONCANONICAL_HOST.
6422 * configure: Regenerated.
6423
6424 Revert:
6425 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6426
6427 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6428 * configure: Rebuild.
6429 * Makefile.in (version_host, version_target): Get from configure.
6430 (version.c): Use $(version_host) and $(version_target).
6431
17ef446e
PA
64322013-07-03 Pedro Alves <palves@redhat.com>
6433
6434 * Makefile.in (config.status): Depend on development.sh.
6435 * acinclude.m4: Include libmcheck.m4.
6436 * configure: Regenerate.
6437
7a9a7487
MG
64382013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6439
6440 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6441 attribute inside the parentheses.
6442 (winapi_DebugSetProcessKillOnExit): Ditto.
6443 (winapi_DebugBreakProcess): Ditto.
6444 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6445
49b64de6
MG
64462013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6447
6448 * notif.h (notif_event): Add a dummy member to avoid compiler
6449 errors.
6450
d5749ee7
PA
64512013-07-01 Pedro Alves <palves@redhat.com>
6452
6453 * hostio.c (HOSTIO_PATH_MAX): Define.
6454 (require_filename, handle_open, handle_unlink, handle_readlink):
6455 Use it.
6456
d8d2a3ee
PA
64572013-07-01 Pedro Alves <palves@redhat.com>
6458
6459 * server.h: Include "pathmax.h".
6460 * linux-low.c: Don't include sys/param.h.
6461 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6462 MAXPATHLEN.
6463 * win32-low.c: Don't include sys/param.h.
6464 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6465
bc7dea8d
PA
64662013-07-01 Pedro Alves <palves@redhat.com>
6467
6468 * event-loop.c: Don't check HAVE_UNISTD_H before including
6469 <unistd.h>.
6470 * gdbreplay.c: Likewise.
6471 * remote-utils.c: Likewise.
6472 * server.c: Likewise.
6473 * configure.ac: Don't check for unistd.h.
6474 * configure: Regenerate.
6475
d6c2da54
TT
64762013-06-28 Tom Tromey <tromey@redhat.com>
6477
6478 * Makefile.in (version.c): Use version.in, not
6479 common/version.in.
6480
257b6bec
MG
64812013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6482
6483 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6484 * configure: Rebuild.
6485 * Makefile.in (version_host, version_target): Get from configure.
6486 (version.c): Use $(version_host) and $(version_target).
6487
86ebe149
DK
64882013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6489
6490 Fix trace-status to output user name without trailing colon.
6491 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6492
f30aa5af
DK
64932013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6494
6495 Fix trace-status to output proper start-time and stop-time.
6496 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6497 output start time and stop time in hex as gdb expects.
6498
28a93511
YQ
64992013-06-26 Pedro Alves <pedro@codesourcery.com>
6500
6501 * tracepoint.c (build_traceframe_info_xml): Output trace state
6502 variables present in the trace buffer.
6503
01208463
TT
65042013-06-24 Tom Tromey <tromey@redhat.com>
6505
6506 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6507 create-version.sh.
6508 (version.o): Remove.
6509 * gdbreplay.c: Include version.h.
6510 (version, host_name): Don't declare.
6511 * server.h: Include version.h.
6512 (version, host_name): Don't declare.
6513
760256f9
PA
65142013-06-12 Pedro Alves <palves@redhat.com>
6515
6516 * linux-x86-low.c (linux_is_elf64): Delete global.
6517 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6518 with local linux_pid_exe_is_elf_64_file use.
6519
030031ee
PA
65202013-06-11 Pedro Alves <palves@redhat.com>
6521
6522 * linux-low.c (regset_disabled, disable_regset): New functions.
6523 (regsets_fetch_inferior_registers)
6524 (regsets_store_inferior_registers): Use them.
6525 (initialize_regsets_info); Don't allocate the disabled_regsets
6526 array here.
6527 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6528 comment.
6529
5da6eb0a
PA
65302013-06-11 Pedro Alves <palves@redhat.com>
6531
6532 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6533 xmalloc.
6534
7e5aaa09
PA
65352013-06-11 Pedro Alves <palves@redhat.com>
6536
6537 * linux-x86-low.c (initialize_low_arch): Call
6538 init_registers_x32_avx_linux.
6539
d878444c
JK
65402013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6541
6542 Fix compatibility with Android Bionic.
6543 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6544 it is not empty.
6545
3aee8918
PA
65462013-06-07 Pedro Alves <palves@redhat.com>
6547
5f2b57b5 6548 PR server/14823
3aee8918
PA
6549 * Makefile.in (OBS): Add tdesc.o.
6550 (IPA_OBJS): Add tdesc-ipa.o.
6551 (tdesc-ipa.o): New rule.
6552 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6553 interface.
6554 * linux-low.c (new_inferior): Delete.
6555 (disabled_regsets, num_regsets): Delete.
6556 (linux_add_process): Adjust to set the new per-process
6557 new_inferior flag.
6558 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6559 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6560 was a stop. When calling arch_setup, switch the current inferior
6561 to the thread that got an event.
6562 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6563 (regsets_fetch_inferior_registers)
6564 (regsets_store_inferior_registers): New regsets_info parameter.
6565 Adjust to use it.
6566 (linux_register_in_regsets): New regs_info parameter. Adjust to
6567 use it.
6568 (register_addr, fetch_register, store_register): New usrregs_info
6569 parameter. Adjust to use it.
6570 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6571 parameter regs_info. Adjust to use it.
6572 (linux_fetch_registers): Get the current inferior's regs_info, and
6573 adjust to use it.
6574 (linux_store_registers): Ditto.
6575 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6576 (initialize_low): Don't initialize the target_regsets here. Call
6577 initialize_low_arch.
6578 * linux-low.h (target_regsets): Delete declaration.
6579 (struct regsets_info): New.
6580 (struct usrregs_info): New.
6581 (struct regs_info): New.
6582 (struct process_info_private) <new_inferior>: New field.
6583 (struct linux_target_ops): Delete the num_regs, regmap, and
6584 regset_bitmap fields. New field regs_info.
6585 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6586 * i387-fp.c (num_xmm_registers): Delete.
6587 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6588 calls to new interface.
6589 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6590 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6591 Infer the number of xmm registers from the regcache's target
6592 description.
6593 * i387-fp.h (num_xmm_registers): Delete.
6594 * inferiors.c (add_thread): Don't install the thread's regcache
6595 here.
6596 * proc-service.c (gregset_info): Fetch the current inferior's
6597 regs_info. Adjust to use it.
6598 * regcache.c: Include tdesc.h.
6599 (register_bytes, reg_defs, num_registers)
6600 (gdbserver_expedite_regs): Delete.
6601 (get_thread_regcache): If the thread doesn't have a regcache yet,
6602 create one, instead of aborting gdbserver.
6603 (regcache_invalidate_one): Rename to ...
6604 (regcache_invalidate_thread): ... this.
6605 (regcache_invalidate_one): New.
6606 (regcache_invalidate): Only invalidate registers of the current
6607 process.
6608 (init_register_cache): Add target_desc parameter, and use it.
6609 (new_register_cache): Ditto. Assert the target description has a
6610 non zero registers_size.
6611 (regcache_cpy): Add assertions. Adjust.
6612 (realloc_register_cache, set_register_cache): Delete.
6613 (registers_to_string, registers_from_string): Adjust.
6614 (find_register_by_name, find_regno, find_register_by_number)
6615 (register_cache_size): Add target_desc parameter, and use it.
6616 (free_register_cache_thread, free_register_cache_thread_one)
6617 (regcache_release, register_cache_size): New.
6618 (register_size): Add target_desc parameter, and use it.
6619 (register_data, supply_register, supply_register_zeroed)
6620 (supply_regblock, supply_register_by_name, collect_register)
6621 (collect_register_as_string, collect_register_by_name): Adjust.
6622 * regcache.h (struct target_desc): Forward declare.
6623 (struct regcache) <tdesc>: New field.
6624 (init_register_cache, new_register_cache): Add target_desc
6625 parameter.
6626 (regcache_invalidate_thread): Declare.
6627 (regcache_invalidate_one): Delete declaration.
6628 (regcache_release): Declare.
6629 (find_register_by_number, register_cache_size, register_size)
6630 (find_regno): Add target_desc parameter.
6631 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6632 declarations.
6633 * remote-utils.c: Include tdesc.h.
6634 (outreg, prepare_resume_reply): Adjust.
6635 * server.c: Include tdesc.h.
6636 (gdbserver_xmltarget): Delete declaration.
6637 (get_features_xml, process_serial_event): Adjust.
6638 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6639 declare.
6640 (struct process_info) <tdesc>: New field.
6641 (ipa_tdesc): Declare.
6642 * tdesc.c: New file.
6643 * tdesc.h: New file.
6644 * tracepoint.c: Include tdesc.h.
6645 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6646 (get_context_regcache): Adjust to pass ipa_tdesc down.
6647 (do_action_at_tracepoint): Adjust to get the register cache size
6648 from the context regcache's description.
6649 (traceframe_walk_blocks): Adjust to get the register cache size
6650 from the current trace frame's description.
6651 (traceframe_get_pc): Adjust to get current trace frame's
6652 description and pass it down.
6653 (gdb_collect): Adjust to get the register cache size from the
6654 IPA's description.
6655 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6656 (gdbserver_xmltarget): Delete.
6657 (initialize_low_tracepoint): Set the ipa's target description.
6658 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6659 (initialize_low_tracepoint): Set the ipa's target description.
6660 * linux-x86-low.c: Include tdesc.h.
6661 [__x86_64__] (is_64bit_tdesc): New.
6662 (ps_get_thread_area, x86_get_thread_area): Use it.
6663 (i386_cannot_store_register): Rename to ...
6664 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6665 (i386_cannot_fetch_register): Rename to ...
6666 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6667 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6668 to new interface.
6669 (target_regsets): Rename to ...
6670 (x86_regsets): ... this.
6671 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6672 interface.
6673 (x86_siginfo_fixup): Use is_64bit_tdesc.
6674 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6675 (tdesc_x32_avx_linux, tdesc_x32_linux)
6676 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6677 Declare.
6678 (x86_linux_update_xmltarget): Delete.
6679 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6680 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6681 (AMD64_LINUX_USER64_CS): New.
6682 (x86_linux_read_description): New, based on
6683 x86_linux_update_xmltarget.
6684 (same_process_callback): New.
6685 (x86_arch_setup_process_callback): New.
6686 (x86_linux_update_xmltarget): New.
6687 (x86_regsets_info): New.
6688 (amd64_linux_regs_info): New.
6689 (i386_linux_usrregs_info): New.
6690 (i386_linux_regs_info): New.
6691 (x86_linux_regs_info): New.
6692 (x86_arch_setup): Reimplement.
6693 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6694 (x86_emit_ops): Ditto.
6695 (the_low_target): Adjust. Install x86_linux_regs_info,
6696 x86_cannot_fetch_register, and x86_cannot_store_register.
6697 (initialize_low_arch): New.
6698 * linux-ia64-low.c (tdesc_ia64): Declare.
6699 (ia64_fetch_register): Adjust.
6700 (ia64_usrregs_info, regs_info): New globals.
6701 (ia64_regs_info): New function.
6702 (the_low_target): Adjust.
6703 (initialize_low_arch): New function.
6704 * linux-sparc-low.c (tdesc_sparc64): Declare.
6705 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6706 Adjust.
6707 (sparc_arch_setup): New function.
6708 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6709 (the_low_target): Adjust.
6710 (initialize_low_arch): New function.
6711 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6712 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6713 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6714 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6715 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6716 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6717 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6718 (tdesc_powerpc_isa205_vsx64l): Declare.
6719 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6720 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6721 (ppc_set_pc, ppc_get_hwcap): Adjust.
6722 (ppc_usrregs_info): Forward declare.
6723 (!__powerpc64__) ppc_regmap_adjusted: New global.
6724 (ppc_arch_setup): Adjust to the current process'es target
6725 description.
6726 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6727 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6728 (ppc_store_evrregset): Adjust.
6729 (target_regsets): Rename to ...
6730 (ppc_regsets): ... this, and make static.
6731 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6732 (ppc_regs_info): New function.
6733 (the_low_target): Adjust.
6734 (initialize_low_arch): New function.
6735 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6736 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6737 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6738 (tdesc_s390x_linux64v2): Declare.
6739 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6740 (s390_fill_gregset, s390_store_last_break): Adjust.
6741 (target_regsets): Rename to ...
6742 (s390_regsets): ... this, and make static.
6743 (s390_get_pc, s390_set_pc): Adjust.
6744 (s390_get_hwcap): New target_desc parameter, and use it.
6745 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6746 (s390_arch_setup): Adjust to set the current process'es target
6747 description. Don't adjust the regmap.
6748 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6749 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6750 (regs_info_3264): New globals.
6751 (s390_regs_info): New function.
6752 (the_low_target): Adjust.
6753 (initialize_low_arch): New function.
6754 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6755 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6756 [__mips64] (init_registers_mips_linux)
6757 (init_registers_mips_dsp_linux): Delete defines.
6758 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6759 (have_dsp): New global.
6760 (mips_read_description): New, based on mips_arch_setup.
6761 (mips_arch_setup): Reimplement.
6762 (get_usrregs_info): New function.
6763 (mips_cannot_fetch_register, mips_cannot_store_register)
6764 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6765 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6766 (target_regsets): Rename to ...
6767 (mips_regsets): ... this, and make static.
6768 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6769 (dsp_regs_info, regs_info): New globals.
6770 (mips_regs_info): New function.
6771 (the_low_target): Adjust.
6772 (initialize_low_arch): New function.
6773 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6774 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6775 Declare.
6776 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6777 (arm_read_description): New, with bits factored from
6778 arm_arch_setup.
6779 (arm_arch_setup): Reimplement.
6780 (target_regsets): Rename to ...
6781 (arm_regsets): ... this, and make static.
6782 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6783 (arm_regs_info): New function.
6784 (the_low_target): Adjust.
6785 (initialize_low_arch): New function.
6786 * linux-m68k-low.c (tdesc_m68k): Declare.
6787 (target_regsets): Rename to ...
6788 (m68k_regsets): ... this, and make static.
6789 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6790 (m68k_regs_info): New function.
6791 (m68k_arch_setup): New function.
6792 (the_low_target): Adjust.
6793 (initialize_low_arch): New function.
6794 * linux-sh-low.c (tdesc_sharch): Declare.
6795 (target_regsets): Rename to ...
6796 (sh_regsets): ... this, and make static.
6797 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6798 (sh_regs_info, sh_arch_setup): New functions.
6799 (the_low_target): Adjust.
6800 (initialize_low_arch): New function.
6801 * linux-bfin-low.c (tdesc_bfin): Declare.
6802 (bfin_arch_setup): New function.
6803 (bfin_usrregs_info, regs_info): New globals.
6804 (bfin_regs_info): New function.
6805 (the_low_target): Adjust.
6806 (initialize_low_arch): New function.
6807 * linux-cris-low.c (tdesc_cris): Declare.
6808 (cris_arch_setup): New function.
6809 (cris_usrregs_info, regs_info): New globals.
6810 (cris_regs_info): New function.
6811 (the_low_target): Adjust.
6812 (initialize_low_arch): New function.
6813 * linux-cris-low.c (tdesc_crisv32): Declare.
6814 (cris_arch_setup): New function.
6815 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6816 (cris_regs_info): New function.
6817 (the_low_target): Adjust.
6818 (initialize_low_arch): New function.
6819 * linux-m32r-low.c (tdesc_m32r): Declare.
6820 (m32r_arch_setup): New function.
6821 (m32r_usrregs_info, regs_info): New globals.
6822 (m32r_regs_info): Adjust.
6823 (initialize_low_arch): New function.
6824 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6825 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6826 (tic6x_usrregs_info): Forward declare.
6827 (tic6x_read_description): New function, based on ...
6828 (tic6x_arch_setup): ... this. Reimplement.
6829 (target_regsets): Rename to ...
6830 (tic6x_regsets): ... this, and make static.
6831 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6832 (tic6x_regs_info): New function.
6833 (the_low_target): Adjust.
6834 (initialize_low_arch): New function.
6835 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6836 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6837 (target_regsets): Rename to ...
6838 (xtensa_regsets): ... this, and make static.
6839 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6840 globals.
6841 (xtensa_arch_setup, xtensa_regs_info): New functions.
6842 (the_low_target): Adjust.
6843 (initialize_low_arch): New function.
6844 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6845 (nios2_arch_setup): Set the current process'es tdesc.
6846 (target_regsets): Rename to ...
6847 (nios2_regsets): ... this.
6848 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6849 (nios2_regs_info): New function.
6850 (the_low_target): Adjust.
6851 (initialize_low_arch): New function.
a261b8f5
PA
6852 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6853 (aarch64_arch_setup): Set the current process'es tdesc.
6854 (target_regsets): Rename to ...
6855 (aarch64_regsets): ... this.
6856 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6857 (aarch64_regs_info): New function.
6858 (the_low_target): Adjust.
6859 (initialize_low_arch): New function.
3aee8918
PA
6860 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6861 globals.
6862 (target_regsets): Rename to ...
6863 (tile_regsets): ... this.
6864 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6865 (tile_regs_info): New function.
6866 (tile_arch_setup): Set the current process'es tdesc.
6867 (the_low_target): Adjust.
6868 (initialize_low_arch): New function.
6869 * spu-low.c (tdesc_spu): Declare.
6870 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6871 * win32-arm-low.c (tdesc_arm): Declare.
6872 (arm_arch_setup): New function.
6873 (the_low_target): Install arm_arch_setup instead of
6874 init_registers_arm.
6875 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6876 (init_windows_x86): Rename to ...
6877 (i386_arch_setup): ... this. Set `win32_tdesc'.
6878 (the_low_target): Adjust.
6879 * win32-low.c (win32_tdesc): New global.
6880 (child_add_thread): Don't create the thread cache here.
6881 (do_initial_child_stuff): Set the new process'es tdesc.
6882 * win32-low.h (struct target_desc): Forward declare.
6883 (win32_tdesc): Declare.
6884 * lynx-i386-low.c (tdesc_i386): Declare global.
6885 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6886 * lynx-low.c (lynx_tdesc): New global.
6887 (lynx_add_process): Set the new process'es tdesc.
6888 * lynx-low.h (struct target_desc): Forward declare.
6889 (lynx_tdesc): Declare global.
6890 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6891 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6892 * nto-low.c (nto_tdesc): New global.
6893 (do_attach): Set the new process'es tdesc.
6894 * nto-low.h (struct target_desc): Forward declare.
6895 (nto_tdesc): Declare.
6896 * nto-x86-low.c (tdesc_i386): Declare.
6897 (nto_x86_arch_setup): Set `nto_tdesc'.
6898
b1fbec62
GB
68992013-06-04 Gary Benson <gbenson@redhat.com>
6900
6901 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6902 to qSupported response when appropriate.
6903 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6904 with nonzero-length annex.
6905 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6906 arguments supplied in annex.
6907
d1ec4ce7
DE
69082013-05-31 Doug Evans <dje@google.com>
6909
ac44adcb 6910 PR server/15594
d1ec4ce7
DE
6911 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6912 64 bits in 64-cross-32 environment.
6913
9b25f2d3
PA
69142013-05-28 Pedro Alves <palves@redhat.com>
6915
6916 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6917 (aarch64-without-fpu.c): Delete rule.
6918 * configure.srv (aarch64*-*-linux*): Remove references to
6919 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6920 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6921 declaration.
6922
6740dc9c
PA
69232013-05-24 Pedro Alves <palves@redhat.com>
6924
6925 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6926 instead of strchr/decode_address. Error if the range isn't split
6927 with a ','. Don't assume there's be a ':' in the action.
6928
c2d6af84
PA
69292013-05-23 Yao Qi <yao@codesourcery.com>
6930 Pedro Alves <palves@redhat.com>
6931
6932 * linux-low.c (lwp_in_step_range): New function.
6933 (linux_wait_1): If the thread was range stepping and stopped
6934 outside the stepping range, report the stop to GDB. Otherwise,
6935 continue stepping. Add range stepping debug output.
6936 (linux_set_resume_request): Copy the step range from the resume
6937 request to the lwp.
6938 (linux_supports_range_stepping): New.
6939 (linux_target_ops) <supports_range_stepping>: Set to
6940 linux_supports_range_stepping.
6941 * linux-low.h (struct linux_target_ops)
6942 <supports_range_stepping>: New field.
6943 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6944 * linux-x86-low.c (x86_supports_range_stepping): New.
6945 (the_low_target) <supports_range_stepping>: Set to
6946 x86_supports_range_stepping.
6947 * server.c (handle_v_cont): Handle 'r' action.
6948 (handle_v_requests): Append ";r" if the target supports range
6949 stepping.
6950 * target.h (struct thread_resume) <step_range_start,
6951 step_range_end>: New fields.
6952 (struct target_ops) <supports_range_stepping>:
6953 New field.
6954 (target_supports_range_stepping): New macro.
6955
58794e1a
JB
69562013-05-17 Joel Brobecker <brobecker@adacore.com>
6957
6958 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6959 confusion in comment.
6960
d631c5a7
JB
69612013-05-17 Joel Brobecker <brobecker@adacore.com>
6962
6963 * lynx-low.c (struct process_info_private): New type.
6964 (lynx_add_process): New function.
6965 (lynx_create_inferior, lynx_attach): Replace calls to
6966 add_process by calls to lynx_add_process.
6967 (lynx_resume): If PTID is null, then try using
6968 current_process()->private->last_wait_event_ptid.
6969 Add comments.
6970 (lynx_clear_inferiors): Delete. The contents of that function
6971 has been inlined in lynx_mourn;
6972 (lynx_wait_1): Save the ptid in the process's private data.
6973 (lynx_mourn): Free the process' private data. Replace call
6974 to lynx_clear_inferiors by call to clear_inferiors.
6975
96f7a20f
YQ
69762013-05-17 Yao Qi <yao@codesourcery.com>
6977
6978 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6979 the right place.
6980
db0dfaa0
LM
69812013-05-16 Luis Machado <lgustavo@codesourcery.com>
6982
6983 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6984 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6985 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6986 PT_TEXT_END_ADDR guards. Update comments.
6987 (linux_target_op) <read_offsets>: Conditionally define to
6988 linux_read_offsets if the target is UCLIBC and if it defines
6989 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6990
68f5f838
SL
69912013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6992 Andrew Jenner <andrew@codesourcery.com>
6993
6994 * Makefile.in (SFILES): Add linux-nios2-low.c.
6995 (clean): Add action to delete nios2-linux.c.
6996 (nios2-linux.c): New rule.
6997 * configure.srv: Add nios2*-*-linux*.
6998 * linux-nios2-low.c: New.
6999
1ebff1fd
HAQ
70002013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7001
7002 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7003
f6150862
HZ
70042013-04-25 Hui Zhu <hui@codesourcery.com>
7005
7006 PR gdb/15186
f6150862
HZ
7007 * ax.c (ax_printf): Add fflush.
7008
614c279d
TT
70092013-04-22 Tom Tromey <tromey@redhat.com>
7010
7011 * Makefile.in (SFILES): Add filestuff.c.
7012 (OBS): Add filestuff.o.
7013 (filestuff.o): New target.
7014 * config.in, configure: Rebuild.
7015 * configure.ac: Check for fdwalk, pipe2.
7016
7d4e5717
PA
70172013-04-17 Pedro Alves <palves@redhat.com>
7018
7019 * configure.ac (USE_THREAD_DB): Delete variable.
7020 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7021 Don't AC_SUBST USE_THREAD_DB.
7022 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7023 * config.in, configure: Regenerate.
7024
d5c93e41
PA
70252013-04-16 Pedro Alves <palves@redhat.com>
7026
7027 * linux-low.h (struct lwp_info) <thread_known>: Move under
7028 the USE_THREAD_DB #ifdef.
7029
04f5fe89
PA
70302013-04-16 Pedro Alves <palves@redhat.com>
7031
7032 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7033 (linux-low.o): Delete rule.
7034 * linux-low.h: Always include "gdb_thread_db.h" instead of
7035 conditionally including thread_db.h.
7036 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7037 HAVE_THREAD_DB_H.
7038
480b27bf
JK
70392013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7040
7041 * Makefile.in (install-only): Fix make install regression.
7042
43662968
JK
70432013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7044
7045 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7046 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7047 installation.
7048 * gdbserver.1: Remove.
7049
3e74e146
PA
70502013-03-22 Pedro Alves <palves@redhat.com>
7051
7052 * linux-low.c (handle_extended_wait): Don't call
7053 linux_enable_event_reporting.
7054
a8347a2a
TT
70552013-03-15 Tony Theodore <tonyt@logyst.com>
7056
7057 PR build/9098:
7058 * Makefile.in (SHELL): Use @SHELL@.
7059
eeb56fa7
SDJ
70602013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7061
7062 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7063 compiler warning.
7064
4fa7e2ff
JB
70652013-03-13 Joel Brobecker <brobecker@adacore.com>
7066
7067 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7068 Remove extraneous NULL element.
7069
8ddb1965
YQ
70702013-03-13 Yao Qi <yao@codesourcery.com>
7071
7072 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7073 'V' block in trace frame.
7074
9accd112
MM
70752013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7076
7077 * target.h (struct target_ops): Add btrace ops.
7078 (target_supports_btrace): New macro.
7079 (target_enable_btrace): New macro.
7080 (target_disable_btrace): New macro.
7081 (target_read_btrace): New macro.
7082 * gdbthread.h (struct thread_info): Add btrace field.
7083 * server.c: Include btrace-common.h.
7084 (handle_btrace_general_set): New function.
7085 (handle_btrace_enable): New function.
7086 (handle_btrace_disable): New function.
7087 (handle_general_set): Call handle_btrace_general_set.
7088 (handle_qxfer_btrace): New function.
7089 (struct qxfer qxfer_packets[]): Add btrace entry.
7090 * inferiors.c (remove_thread): Disable btrace.
7091 * linux-low: Include linux-btrace.h.
7092 (linux_low_enable_btrace): New function.
7093 (linux_low_read_btrace): New function.
7094 (linux_target_ops): Add btrace ops.
7095 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7096 Add srv_linux_btrace=yes.
7097 (x86_64-*-linux*): Add linux-btrace.o.
7098 Add srv_linux_btrace=yes.
7099 * configure.ac: Define HAVE_LINUX_BTRACE.
7100 * config.in: Regenerated.
7101 * configure: Regenerated.
7102
5cc22e4c
MM
71032013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7104
7105 * server.c (handle_qxfer): Preserve error message if -3 is
7106 returned.
7107 (qxfer): Document the -3 return value.
7108
7c97f91e
MM
71092013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7110
7111 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7112 (linux_btrace_h): New variable.
7113 (linux-btrace.o): New rule.
7114
be9a119c 71152013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7116 Hafiz Abid Qadeer <abidh@codesourcery.com>
7117
7118 * tracepoint.c (trace_buffer_size): New global.
7119 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7120 (init_trace_buffer): Change to one-argument function. Allocate
7121 trace buffer memory.
7122 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7123 handle QTBuffer:size packet.
7124 (cmd_bigqtbuffer_size): New function.
7125 (initialize_tracepoint): Call init_trace_buffer with
7126 DEFAULT_TRACE_BUFFER_SIZE.
7127 * server.c (handle_query): Add QTBuffer:size in the
7128 supported packets.
7129
e64f7499
YQ
71302013-03-07 Yao Qi <yao@codesourcery.com>
7131
7132 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7133 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7134 of -1.
7135 (cmd_qtsp): Adjust condition. Do post increment.
7136 Set cur_action and cur_step_action back to 0.
7137
f0ae6fc3
PA
71382013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7139
7140 PR server/15236
7141 * linux-low.c (linux_write_memory): Return early success if LEN is
7142 zero.
7143
b5b0b0af
CV
71442013-03-05 Corinna Vinschen <vinschen@redhat.de>
7145
334ad4a8 7146 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7147
589bc927
TT
71482013-02-28 Tom Tromey <tromey@redhat.com>
7149
7150 * configure.ac: Invoke AC_SYS_LARGEFILE.
7151 * configure, config.in: Rebuild.
7152
dfe07582
CV
71532013-02-28 Corinna Vinschen <vinschen@redhat.com>
7154
7155 * win32-low.c: Throughout, fix format strings and casts of
7156 printf-like functions to avoid type related warnings on all
7157 platforms.
7158 (get_child_debug_event): Print dwDebugEventCode as hex since
7159 that's how it's usually documented.
7160
736cd585
YQ
71612013-02-28 Yao Qi <yao@codesourcery.com>
7162
7163 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7164 pulongest.
7165
e1f58301
JW
71662013-02-27 Jiong Wang <jiwang@tilera.com>
7167
7168 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7169 (reg-tilegx32.c): New rule.
7170 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7171 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7172 different register info initializer according to elf class.
7173 (init_registers_tilgx32): New function. The tilegx32 register info
7174 initializer.
7175 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7176 (tile_store_gregset): Likewise.
7177
d171ca78
YQ
71782013-02-27 Yao Qi <yao@codesourcery.com>
7179
7180 * server.c (process_point_options): Print debug message when
7181 debug_threads is true.
7182
282bbdf3
YQ
71832013-02-26 Yao Qi <yao@codesourcery.com>
7184
7185 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7186
aca22551
PA
71872013-02-19 Pedro Alves <palves@redhat.com>
7188 Kai Tietz <ktietz@redhat.com>
7189
7190 PR gdb/15161
7191
7192 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7193 instead of strtoul to extract address from packet.
7194 (process_serial_event) <'z'>: Likewise.
7195
4f3cee1c
YQ
71962013-02-18 Yao Qi <yao@codesourcery.com>
7197
7198 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7199
8e1d55a3
PA
72002013-02-14 Pedro Alves <palves@redhat.com>
7201
7202 Plug memory leak.
7203
7204 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7205 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7206
458820da
PA
72072013-02-14 Pedro Alves <palves@redhat.com>
7208
7209 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7210
baea0dae
PA
72112013-02-14 Pedro Alves <palves@redhat.com>
7212
7213 * tracepoint.c (save_string): Delete.
7214 (add_tracepoint_action): Use savestring instead of save_string.
7215
0b1afbb3
PA
72162013-02-12 Pedro Alves <palves@redhat.com>
7217
7218 * linux-xtensa-low.c: Ditto.
7219 * xtensa-xtregs.c: Ditto.
7220
8a4ac37e
PA
72212013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7222
7223 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7224 thread_db.
7225
148de6bb
MS
72262013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7227
7228 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7229 aarch64_num_wp_regs and aarch64_num_bp_regs to
7230 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7231
55fac6e0
MS
72322013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7233
7234 * linux-aarch64-low.c (ps_get_thread_area): Replace
7235 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7236
176eb98c
MS
72372013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7238 Marcus Shawcroft <marcus.shawcroft@arm.com>
7239 Nigel Stephens <nigel.stephens@arm.com>
7240 Yufeng Zhang <yufeng.zhang@arm.com>
7241
7242 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7243 (aarch64.c, aarch64-without-fpu.c): New targets.
7244 * configure.srv (aarch64*-*-linux*): New.
7245 * linux-aarch64-low.c: New file.
7246
56f7af9c
MS
72472013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7248
43aaf8b6 7249 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7250 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7251 (dequeue_one_deferred_signal, linux_resume_one_thread)
7252 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7253 (linux_tracefork_grandchild, linux_test_for_tracefork)
7254 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7255 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7256 where the argument is 0.
7257
60f662b0
YQ
72582013-01-25 Yao Qi <yao@codesourcery.com>
7259
7260 * event-loop.c: Include "queue.h".
7261 (gdb_event_p): New typedef.
7262 (struct gdb_event) <next_event>: Remove.
7263 (event_queue): Change to QUEUE(gdb_event_p).
7264 (async_queue_event): Remove.
7265 (gdb_event_xfree): New.
7266 (initialize_event_loop): New.
7267 (process_event): Use API from QUEUE.
7268 (wait_for_event): Likewise.
7269 * server.c (main): Call initialize_event_loop.
7270 * server.h (initialize_event_loop): Declare.
7271
5ae4861a
YQ
72722013-01-18 Yao Qi <yao@codesourcery.com>
7273
7274 * ax.h (struct eval_agent_expr_context): New.
7275 (gdb_eval_agent_expr): Update declaration.
7276 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7277 TFRAME. Add new argument CTX.
7278 * server.h (struct eval_agent_expr_context): Declare.
7279 (agent_mem_read, agent_tsv_read): Update declaration.
7280 (agent_mem_read_string): Likewise.
7281 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7282 (add_traceframe_block): Add new argument TPOINT.
7283 Increase TPOINT->traceframe_usage.
7284 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7285 eval_tracepoint_agent_expr.
7286 (condition_true_at_tracepoint): Likewise.
7287 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7288 (agent_mem_read_string, agent_tsv_read): Likewise.
7289
85e00e85
YQ
72902013-01-16 Yao Qi <yao@codesourcery.com>
7291
7292 * linux-low.c (linux_resume_one_lwp): Don't check
7293 'lwp->bp_reinsert != 0'.
7294
4039cf45
JB
72952013-01-07 Joel Brobecker <brobecker@adacore.com>
7296 Pedro Alves <palves@redhat.com>
7297
7298 * lynx-low.c (ptrace_request_to_str): Define a temporary
7299 macro and use it to simplify this function's implementation.
7300
9044dee2
JB
73012013-01-07 Joel Brobecker <brobecker@adacore.com>
7302
7303 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7304 sets errno.
7305
e6352c8f
JB
73062013-01-07 Joel Brobecker <brobecker@adacore.com>
7307
7308 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7309
50681a27
JB
73102013-01-07 Joel Brobecker <brobecker@adacore.com>
7311
7312 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7313
3f6e77ef
JB
73142013-01-07 Joel Brobecker <brobecker@adacore.com>
7315
7316 * lynx-low.c (lynx_resume): Use the resume_info parameter
7317 to determine the ptid for the lynx_ptrace call, unless
7318 it is equal to minus_one_ptid, in which case we use the
7319 ptid of the current_inferior.
7320 (lynx_wait_1): After having received a thread create/exit
7321 event, resume the inferior's execution using the signaling
7322 thread's ptid, rather than the old ptid.
7323
7fda33ae
JB
73242013-01-07 Joel Brobecker <brobecker@adacore.com>
7325
7326 * lynx-low.c (lynx_resume): Delete variable ret.
7327
b9786c74
JB
73282013-01-01 Joel Brobecker <brobecker@adacore.com>
7329
7330 * gdbreplay.c (gdbreplay_version): Update copyright year.
7331 * server.c (gdbserver_version): Likewise.
7332
8b93d60f
JB
73332012-12-17 Joel Brobecker <brobecker@adacore.com>
7334
7335 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7336 new thread.
7337
037335a7
JB
73382012-12-17 Joel Brobecker <brobecker@adacore.com>
7339
7340 * lynx-low.c (ptrace_request_to_str): Add handling for
7341 PTRACE_GETTRACESIG.
7342
52d4cbd8
JB
73432012-12-17 Joel Brobecker <brobecker@adacore.com>
7344
7345 * lynx-low.c (lynx_attach): Delete variable new_process.
7346
ab8f6ca9
JB
73472012-12-17 Joel Brobecker <brobecker@adacore.com>
7348
7349 * lynx-low.c (lynx_create_inferior): Delete variable
7350 new_process.
7351
78cbc024
JB
73522012-12-17 Joel Brobecker <brobecker@adacore.com>
7353
7354 * lynx-low.c (ptrace_request_to_str): Do not handle
7355 PTRACE_GETTHREADLIST if this macro does not exist.
7356
14a00470
YQ
73572012-12-15 Yao Qi <yao@codesourcery.com>
7358
7359 * Makefile.in (OBS): Add notif.o.
7360 * notif.c, notif.h: New.
7361 * server.c: Include "notif.h".
7362 (struct vstop_notif) <next>: Remove.
7363 <base>: New field.
7364 (queue_stop_reply): Update.
7365 (push_event, send_next_stop_reply): Remove.
7366 (discard_queued_stop_replies): Update.
7367 (notif_stop): New variable.
7368 (handle_v_stopped): Remove.
7369 (handle_v_requests): Don't call handle_v_stopped. Call
7370 handle_ack_notif instead.
7371 (queue_stop_reply_callback): Call notif_event_enque instead
7372 of queue_stop_reply.
7373 (handle_status): Don't call send_next_stop_reply, call
7374 notif_write_event instead.
7375 (kill_inferior_callback): Likewise.
7376 (detach_or_kill_inferior_callback): Likewise.
7377 (main): Call initialize_notif.
7378 (process_serial_event): Call QUEUE_is_empty.
7379 (handle_target_event): Call notif_push instead of push event.
7380 * server.h (push_event): Remove declaration.
7381
61c125b9
TT
73822012-12-10 Tom Tromey <tromey@redhat.com>
7383
7384 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7385 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7386 macros.
7387 (.c.o): Rewrite.
7388 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7389 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7390 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7391 (amd64-linux-ipa.o, ax.o): Rewrite.
7392 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7393 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7394 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7395 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7396 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7397 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7398 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7399 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7400 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7401 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7402 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7403 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7404 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7405 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7406 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7407 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7408 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7409 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7410 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7411 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7412 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7413 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7414 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7415 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7416 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7417 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7418 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7419 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7420 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7421 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7422 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7423 (reg-tilegx.o): Remove.
7424 (all_object_files): New macro.
7425 Include .deps files.
7426 * aclocal.m4, configure: Rebuild.
7427 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7428 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7429 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7430
e90e9ad9
TT
74312012-12-05 Tom Tromey <tromey@redhat.com>
7432
7433 PR gdb/14917:
7434 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7435
02d403bf 74362012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7437
7438 * configure.ac: Check for linux/perf_event.h.
7439 * config.in: Regenerated.
7440 * configure: Regenerated.
7441
0270a750
PA
74422012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7443
7444 * hostio.c (handle_readlink): Decrease buffer size
7445 parameter passed to readlink by one byte.
7446
8c29b58e
YQ
74472012-11-26 Yao Qi <yao@codesourcery.com>
7448
7449 * configure.ac (build_warnings): Append '-Wempty-body'.
7450 * configure: Regenerated.
7451 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7452 body.
7453
8bdce1ff
PM
74542012-11-15 Pierre Muller <muller@sourceware.org>
7455
7456 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7457 * config.in: Regenerate.
7458 * configure: Regenerate.
7459 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7460 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7461 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7462 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7463 header.
7464 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7465 instead of <sys/wait.h> header.
7466 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7467
02d403bf 74682012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7469
7470 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7471 (various make rules): Remove -DGDBSERVER
7472
fbd5db48
YQ
74732012-11-09 Yao Qi <yao@codesourcery.com>
7474
7475 * spu-low.c (current_ptid): Move it to ..
7476 * gdbthread.h: ... here. New.
7477 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7478 * server.c (myresume, process_serial_event): Likewise.
7479 * thread-db.c (thread_db_find_new_threads): Likewise.
7480 * tracepoint.c (run_inferior_command): Likewise.
7481
b3dc46ff
AB
74822012-10-01 Andrew Burgess <aburgess@broadcom.com>
7483
7484 * server.c (handle_search_memory_1): Include access length in
7485 warning message.
7486
07c04788
HPN
74872012-09-05 Michael Brandt <michael.brandt@axis.com>
7488
7489 * linux-crisv32-low.c: Fix compile errors.
7490
918d227b
YQ
74912012-09-04 Yao Qi <yao@codesourcery.com>
7492
7493 * tracepoint.c (cmd_qtsv): Adjust debug message.
7494 Don't check CUR_TPOINT.
7495
18c1b81a
YQ
74962012-08-28 Yao Qi <yao@codesourcery.com>
7497
7498 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7499 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7500 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7501 Remove declarations of xmalloc, xreallloc, xstrdup and
7502 freeargv.
7503 * Makefile.in (libiberty_h): New.
7504 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7505 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7506
dc82f37b
YQ
75072012-08-23 Yao Qi <yao@codesourcery.com>
7508
7509 * server.h: Remove declaration of 'xsnprintf'.
7510
406b1477
KS
75112012-08-22 Keith Seitz <keiths@redhat.com>
7512
7513 * server.h: Include build-gnulib-gbserver/config.h.
7514 * gdbreplay.c: Likewise.
7515
e6712ff1
DE
75162012-08-08 Doug Evans <dje@google.com>
7517
7518 * Makefile.in (SFILES): Add gdb_vecs.c.
7519 (OBS): Add gdb_vecs.o.
7520 (gdb_vecs_h, host_defs_h): New variables.
7521 (thread-db.o): Add $(gdb_vecs_h) dependency.
7522 (gdb_vecs.o): New rule.
7523 * thread-db.c: #include "gdb_vecs.h".
7524 (thread_db_load_search): Use a vector to iterate over path elements.
7525 Handle text appearing after "$pdir".
7526
7527 * configure.ac: Add check for strstr.
7528 * config.in: Regenerate.
7529 * configure: Regenerate.
7530
7c3270ae
UW
75312012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7532
7533 * hostio.c (handle_pread): If pread fails, fall back to attempting
7534 lseek/read.
7535 (handle_pwrite): Likewise for pwrite.
7536
b62e2b27
UW
75372012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7538
7539 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7540 between unsupported TYPE and unimplementable ADDR/LEN combination.
7541 (arm_insert_point): Act on new return value.
7542
78a99e91
PA
75432012-07-31 Pedro Alves <palves@redhat.com>
7544
7545 * server.c (process_point_options): Only skip tokens if we find
7546 one that is unrecognized. Don't treat 'X' specially while
7547 skipping unrecognized tokens.
7548
fcf303ab
UW
75492012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7550
7551 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7552 to 4-byte-align HW breakpoint addresses for Thumb.
7553
7255706c
YQ
75542012-07-27 Yao Qi <yao@codesourcery.com>
7555
7556 PR remote/14161.
7557
7558 * server.h: Declare gdb_agent_about_to_close.
7559 * target.c (kill_inferior): Include "agent.h".
7560 New. Send command 'kill'.
7561 * target.h (kill_inferior): Removed macro.
7562 * tracepoint.c (gdb_agent_about_to_close): New.
7563 (gdb_agent_helper_thread): Handle command 'close'.
7564 Wait endlessly until the inferior stops.
7565 Install gdb_agent_remove_socket to atexit hook.
7566 (agent_socket_name): New static variable.
7567 (gdb_agent_socket_init): Replace local variable 'name' with
7568 'agent_socket_name'.
7569 (gdb_agent_remove_socket): New.
7570
5a3f286f
YQ
75712012-07-27 Yao Qi <yao@codesourcery.com>
7572
7573 * server.c (process_point_options): Stop at 'X' when parsing.
7574
961bd387
ME
75752012-07-19 Michael Eager <eager@eagercon.com>
7576
a261b8f5 7577 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7578 to hw_execute.
7579 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7580 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7581 hardware breakpoint.
7582
aa7c7447
JK
75832012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7584
7585 * gdbserver/linux-low.c (initialize_low): Call
7586 linux_ptrace_init_warnings.
7587
7f216e7c
DE
75882012-07-02 Doug Evans <dje@google.com>
7589
7590 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7591 pointer to int.
7592
d3ce09f5
SS
75932012-07-02 Stan Shebs <stan@codesourcery.com>
7594
7595 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7596 (ax.o): Add it to build rule.
7597 (ax-ipa.o): Ditto.
7598 (OBS): Add format.o.
7599 (IPA_OBS): Add format.o.
7600 * server.c (handle_query): Claim support for breakpoint commands.
7601 (process_point_options): Add command case.
7602 (process_serial_event): Leave running if there are printfs in
7603 effect.
7604 * mem-break.h (any_persistent_commands): Declare.
7605 (add_breakpoint_commands): Declare.
7606 (gdb_no_commands_at_breakpoint): Declare.
7607 (run_breakpoint_commands): Declare.
7608 * mem-break.c (struct point_command_list): New struct.
7609 (struct breakpoint): New field command_list.
7610 (any_persistent_commands): New function.
7611 (add_commands_to_breakpoint): New function.
7612 (add_breakpoint_commands): New function.
7613 (gdb_no_commands_at_breakpoint): New function.
7614 (run_breakpoint_commands): New function.
7615 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7616 locally.
7617 * ax.c: Include format.h.
7618 (ax_printf): New function.
7619 (gdb_eval_agent_expr): Add printf opcode.
7620
2f8f6aed
YQ
76212012-06-13 Yao Qi <yao@codesourcery.com>
7622
7623 * server.c (start_inferior): Remove duplicated writes to fields
7624 'last_resume_kind' and 'last_status' of 'current_inferior'.
7625
0c9070b3
YQ
76262012-06-12 Yao Qi <yao@codesourcery.com>
7627 Pedro Alves <palves@redhat.com>
7628
7629 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7630 comment.
7631 * server.c (handle_v_cont): Extend comment.
7632
c52daf70
YQ
76332012-06-11 Yao Qi <yao@codesourcery.com>
7634
7635 * linux-low.c (linux_attach): Add 'static'.
7636
d38bbb0a
YQ
76372012-06-06 Yao Qi <yao@codesourcery.com>
7638
7639 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7640
89dc0afd
JK
76412012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7642
7643 Fix gcc -flto compilation warning.
7644 * server.c (main): Make variable multi_mode and attach volatile.
7645
75f62ce7
TJB
76462012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7647
7648 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7649 if the platform doesn't know about it.
7650
65f479b6
PA
76512012-05-30 Jeff Kenton <jkenton@tilera.com>
7652
7653 * Makefile.in (SFILES): Add linux-tile-low.c.
7654 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7655 * configure.srv: Handle tilegx-*-linux*.
7656 * linux-tile-low.c: New file.
7657
0c5bf5a9
JK
76582012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7659
7660 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7661
a493e3e2
PA
76622012-05-24 Pedro Alves <palves@redhat.com>
7663
7664 PR gdb/7205
7665
43aaf8b6 7666 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7667
2ea28649
PA
76682012-05-24 Pedro Alves <palves@redhat.com>
7669
7670 PR gdb/7205
7671
7672 Replace target_signal with gdb_signal throughout.
7673
8d409d16
MR
76742012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7675
7676 * linux-low.c (linux_store_registers): Avoid the copying sequence
7677 when no data has been retrieved by ptrace.
7678
23512c01
MGD
76792012-05-22 Will Deacon <will.deacon@arm.com>
7680
7681 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7682 Include asm/ptrace.h.
7683 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7684 already defined.
7685
4934b29e
MR
76862012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7687
7688 * linux-low.c (linux_store_registers): Don't re-retrieve data
7689 with ptrace that has already been obtained from /proc. Always
7690 copy any data retrieved with ptrace to the buffer supplied.
7691
bde24c0a
PA
76922012-05-11 Yao Qi <yao@codesourcery.com>
7693 Pedro Alves <palves@redhat.com>
7694
7695 * linux-low.c (enum stopping_threads_kind): New.
7696 (stopping_threads): Change type to `enum stopping_threads_kind'.
7697 (handle_extended_wait): If stopping and suspending threads, leave
7698 the new_lwp suspended too.
7699 (linux_wait_for_event): Adjust.
7700 (stop_all_lwps): Set `stopping_threads' to
7701 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7702 whether we're suspending threads or just stopping them. Assert no
7703 recursion happens.
7704
623b6bdf
YQ
77052012-04-29 Yao Qi <yao@codesourcery.com>
7706
7707 * server.h: Move some code to ...
7708 * gdbthread.h: ... here. New.
7709 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7710 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7711 (nto-low.o, win32-low.o): Likewise.
7712 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7713 * regcache.c, remote-utils.c, server.c: Likewise.
7714 * target.c, tracepoint.c, win32-low.c: Likewise.
7715
f15f9948
TJB
77162012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7717
7718 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7719 (PTRACE_ARG4_TYPE): Likewise.
7720 (PTRACE_XFER_TYPE): Likewise.
7721 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7722 ptrace to PTRACE_ARG3_TYPE.
7723 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7724 (PTRACE_ARG4_TYPE): Likewise.
7725 (PTRACE_XFER_TYPE): Likewise.
7726 (linux_detach_one_lwp): Cast fourth argument of
7727 ptrace to long then PTRACE_ARG4_TYPE.
7728 (regsets_fetch_inferior_registers): Cast third argument of
7729 ptrace to long then PTRACE_ARG3_TYPE.
7730 (regsets_store_inferior_registers): Likewise.
7731
38ea300a
PA
77322012-04-20 Pedro Alves <palves@redhat.com>
7733
7734 * configure: Regenerate.
7735
c971b7fa
PA
77362012-04-19 Pedro Alves <palves@redhat.com>
7737
43aaf8b6 7738 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7739 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7740 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7741 (all, install-only, uninstall, clean-info, all-lib, clean): No
7742 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7743 (maintainer-clean realclean distclean): Use subdir_do.
7744 (subdir_do): New.
7745 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7746 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7747 * acinclude.m4: Include acx_configure_dir.m4.
7748 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7749 calls. Call AC_PROG_RANLIB. Configure gnulib using
7750 ACX_CONFIGURE_DIR.
7751 (GNULIB): New.
7752 (GNULIB_STDINT_H): Adjust.
7753 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7754 * gdbreplay.c: Include build-gnulib/config.h.
7755 * server.h: Likewise.
7756 * aclocal.m4: Regenerate.
7757 * config.in: Regenerate.
7758 * configure: Regenerate.
c971b7fa 7759
809277f8
PA
77602012-04-19 Pedro Alves <palves@redhat.com>
7761
7762 * Makefile.in (LIBGNU, INCGNU): Adjust.
7763 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7764 (all, install-only, uninstall, clean-info, all-lib, clean)
7765 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7766 * configure.ac: Adjust AC_OUTPUT output.
7767 * aclocal.m4: Regenerate.
7768 * configure: Regenerate.
7769
fd9bb8b8
PA
77702012-04-19 Pedro Alves <palves@redhat.com>
7771
7772 * Makefile.in (generated_files): New.
7773 (server_h): Remove the explicit dependency on config.h, and depend
7774 on $generated_files.
7775
1c298c66
PA
77762012-04-19 Pedro Alves <palves@redhat.com>
7777
7778 * Makefile.in (INCGNU): Add -Ignulib.
7779
57c4b50b
PA
77802012-04-19 Pedro Alves <palves@redhat.com>
7781
7782 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7783 (INCGNU): ... this, and spell out -I here.
7784 (GNULIB_LIB): Rename to ...
7785 (LIBGNU): ... this.
7786 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7787
1030e047
PA
77882012-04-19 Pedro Alves <palves@redhat.com>
7789
7790 * config.in: Regenerate.
7791
447d4319
PA
77922012-04-19 Pedro Alves <palves@redhat.com>
7793
7794 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7795 * server.h (memmem): Remove declaration.
7796 * config.in: Regenerate.
7797 * configure: Regenerate.
7798
aad9eab9
YQ
77992012-04-19 Yao Qi <yao@codesourcery.com>
7800
7801 * Makefile.in (SFILES): Add common/vec.c.
7802 (OBS): Add vec.o.
7803 (vec.o): New rule.
7804
3e10640f
YQ
78052012-04-19 Yao Qi <yao@codesourcery.com>
7806
7807 * remote-utils.c (prepare_resume_reply): Replace with macro
7808 target_core_of_thread.
7809 * server.c (handle_qxfer_threads_proper): Likewise.
7810 * target.h (traget_core_of_thread): New macro.
7811
71622373
PA
78122012-04-18 Pedro Alves <palves@redhat.com>
7813
7814 * aclocal.m4: Regenerate.
7815 * configure: Regenerate.
7816
80d26939
YQ
78172012-04-16 Yao Qi <yao@codesourcery.com>
7818
7819 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7820 duplicated on address.
7821
42476b70
YQ
78222012-04-16 Yao Qi <yao@codesourcery.com>
7823
7824 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7825 (struct tracepoint_action_ops) <send>: New field.
7826 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7827 (agent_expr_send, x_tracepoint_action_send): New.
7828 (l_tracepoint_action_send): New.
7829 (cmd_qtdp): Download and install tracepoint
7830 according to `use_agent'.
7831 (run_inferior_command): Add one more parameter `len'.
7832 Update callers.
7833 (tracepoint_send_agent): New.
7834 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7835
7bc83639
YQ
78362012-04-16 Yao Qi <yao@codesourcery.com>
7837
7838 * tracepoint.c (download_tracepoints): Moved to ...
7839 (cmd_qtstart): ... here.
7840
5f18041e
YQ
78412012-04-14 Yao Qi <yao@codesourcery.com>
7842
7843 * tracepoint.c: Include inttypes.h.
7844 (struct collect_memory_action): Use sized types.
7845 (struct tracepoint): Likewise.
7846 (cmd_qtdp, stop_tracing): Update print specifiers.
7847 (cmd_qtp, response_tracepoint): Likewise.
7848 (collect_data_at_tracepoint): Likewise.
7849 (collect_data_at_step): Likewise.
7850
55a8c076
YQ
78512012-04-14 Yao Qi <yao@codesourcery.com>
7852
7853 Import gnulib module inttypes.
7854 * aclocal.m4, config.in, configure: Regenerated.
7855
dc750257
YQ
78562012-04-14 Yao Qi <yao@codesourcery.com>
7857
7858 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7859 Makefile and config.status at last.
7860
0ab5faf9
YQ
78612012-04-13 Yao Qi <yao@codesourcery.com>
7862
7863 * tracepoint.c: Include stdint.h unconditionally.
7864
18f5fd81
TJB
78652012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7866
7867 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7868 on BFD_HAVE_SYS_PROCFS_TYPE.
7869 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7870 * configure: Regenerate.
7871 * config.in: Likewise.
7872
4d47af5c
L
78732012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7874
7875 * Makefile.in (clean): Also remove x32.c x32-linux.c
7876 x32-avx.c x32-avx-linux.c.
7877 (x32.o): New target.
7878 (x32.c): Likewise.
7879 (x32-linux.o): Likewise.
7880 (x32-linux.c): Likewise.
7881 (x32-avx.o): Likewise.
7882 (x32-avx.c): Likewise.
7883 (x32-avx-linux.o): Likewise.
7884 (x32-avx-linux.c): Likewise.
7885
7886 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7887 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7888 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7889 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7890 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7891 i386/x32-avx-linux.xml.
7892
7893 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7894 (init_registers_x32_avx_linux): Likwise.
7895 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7896 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7897
ecedbe58
PA
78982012-04-13 Pedro Alves <palves@redhat.com>
7899
7900 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7901 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7902 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7903 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7904 the sub-make.
7905
c92b5177
L
79062012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7907
7908 * linux-x86-low.c (compat_x32_clock_t): New.
7909 (compat_x32_siginfo_t): Likewise.
7910 (compat_x32_siginfo_from_siginfo): Likewise.
7911 (siginfo_from_compat_x32_siginfo): Likewise.
7912 (linux_is_elf64): Likewise.
7913 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7914 and siginfo_from_compat_x32_siginfo for x32.
7915 (x86_arch_setup): Set linux_is_elf64.
7916
214d508e
L
79172012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7918
7919 PR gdb/13969
7920 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7921 e_machine field.
7922 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7923 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7924 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7925 compatible with process.
7926
c9a1864a
YQ
79272012-04-12 Yao Qi <yao@codesourcery.com>
7928
7929 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7930 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7931 (install-only, install-info, clean): Handle sub dir gnulib.
7932 (all-lib, am--refresh): New targets.
7933 (memmem.o): Remove target.
7934 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7935 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7936 (AC_REPLACE_FUNCS): Remove memmem.
7937 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7938 (AC_OUTPUT): Generate Makefile in gnulib/.
7939 * aclocal.m4, config.in, configure: Regenerated.
7940
367ba2c2
MR
79412012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7942
7943 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7944
9d236627
PA
79452012-04-05 Pedro Alves <palves@redhat.com>
7946
7947 -Werror=strict-aliasing
7948
7949 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7950 pointer.
7951
111217b3
PA
79522012-04-04 Pedro Alves <palves@redhat.com>
7953
7954 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7955 (sparc_store_gregset_from_stack, sparc_store_gregset)
7956 (sparc_breakpoint_at): Fix formatting.
7957
8365dcf5
TJB
79582012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7959
7960 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7961 are available.
7962 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7963 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7964 * config.in: Regenerate.
7965 * configure: Likewise.
7966
689cc2ae
PA
79672012-03-29 Pedro Alves <palves@redhat.com>
7968
7969 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7970 Correct ptrace arguments.
7971
c14dfd32
PA
79722012-03-28 Pedro Alves <palves@redhat.com>
7973
7974 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7975 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7976 (IA64_FR1_REGNUM): New defines.
7977 (ia64_fetch_register): New.
7978 (the_low_target): Install it.
7979 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7980 field.
7981 * linux-low.c (linux_fetch_registers): Try the
7982 the_low_target.fetch_register hook first.
7983
7984 * linux-arm-low.c (the_low_target): Adjust.
7985 * linux-bfin-low.c (the_low_target): Adjust.
7986 * linux-cris-low.c (the_low_target): Adjust.
7987 * linux-crisv32-low.c (the_low_target): Adjust.
7988 * linux-m32r-low.c (the_low_target): Adjust.
7989 * linux-m68k-low.c (the_low_target): Adjust.
7990 * linux-mips-low.c (the_low_target): Adjust.
7991 * linux-ppc-low.c (the_low_target): Adjust.
7992 * linux-s390-low.c (the_low_target): Adjust.
7993 * linux-sh-low.c (the_low_target): Adjust.
7994 * linux-sparc-low.c (the_low_target): Adjust.
7995 * linux-tic6x-low.c (the_low_target): Adjust.
7996 * linux-x86-low.c (the_low_target): Adjust.
7997 * linux-xtensa-low.c (the_low_target): Adjust.
7998
63c88e13
PA
79992012-03-26 Pedro Alves <palves@redhat.com>
8000
8001 * server.c (handle_qxfer_libraries): Don't bail early if
8002 the_target->qxfer_libraries_svr4 is not NULL.
8003
fb723180
PA
80042012-03-26 Pedro Alves <palves@redhat.com>
8005
8006 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8007
0afae3cf
PA
80082012-03-23 Pedro Alves <palves@redhat.com>
8009
8010 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8011 "library-list-svr4" element's start tag when the the DSO list is
8012 empty.
8013
485f1ee4
PA
80142012-03-23 Pedro Alves <palves@redhat.com>
8015
8016 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8017 a variable whose type size is the same as the inferior's pointer
8018 size.
8019
a5362b9a
TS
80202012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8021
8022 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8023 struct siginfo.
8024 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8025 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8026 * linux-low.h: Include <signal.h>.
8027 (struct siginfo): Remove forward declaration.
8028 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8029 struct siginfo.
8030
d226c142
MF
80312012-03-21 Mike Frysinger <vapier@gentoo.org>
8032
8033 * .gitignore: Ignore more files.
8034
122f36ef
PA
80352012-03-19 Pedro Alves <palves@redhat.com>
8036 Jan Kratochvil <jan.kratochvil@redhat.com>
8037
8038 * server.c (cont_thread, general_thread): Add describing comments.
8039 (start_inferior): Clear `cont_thread'.
8040 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8041 of a process.
8042
fc3e5175
YQ
80432012-03-15 Yao Qi <yao@codesourcery.com>
8044
8045 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8046 handling to ...
8047 (cmd_qtdp): ... here.
8048
8d0d92cd
YQ
80492012-03-15 Yao Qi <yao@codesourcery.com>
8050
8051 * tracepoint.c (struct tracepoint_action_ops): New.
8052 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8053 (m_tracepoint_action_download): New.
8054 (r_tracepoint_action_download): New.
8055 (x_tracepoint_action_download): New.
8056 (l_tracepoint_action_download): New.
8057 (add_tracepoint_action): Install `action->ops' according type.
8058 (download_tracepoint_1): Move code `download' function pointer
8059 of various tracepoint_action_ops.
8060
87b0bb13
JK
80612012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8062
8063 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8064 linux_ptrace_attach_warnings.
8065
5f572dec
JK
80662012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8067
8068 * Makefile.in (linux-ptrace.o): New.
8069 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8070 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8071 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8072 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8073 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8074 of these targets.
8075 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8076
f4647387
YQ
80772012-03-08 Yao Qi <yao@codesourcery.com>
8078 Pedro Alves <palves@redhat.com>
8079
8080 Fix PR server/13392.
8081 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8082 offset of JMP insn.
8083 * tracepoint.c (remove_tracepoint): New.
8084 (cmd_qtdp): Call remove_tracepoint when failed to install.
8085
9b224c5e
PA
80862012-03-07 Pedro Alves <palves@redhat.com>
8087
8088 * linux-low.c (get_detach_signal): New.
8089 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8090 Pass on pending signals to PTRACE_DETACH. Check the result of the
8091 ptrace call.
8092 * server.c (program_signals, program_signals_p): New.
8093 (handle_general_set): Handle QProgramSignals.
8094 * server.h (program_signals, program_signals_p): Declare.
8095
e237a7e2
JK
80962012-03-05 Pedro Alves <palves@redhat.com>
8097 Jan Kratochvil <jan.kratochvil@redhat.com>
8098
8099 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8100 New comment why.
8101
5808517f
YQ
81022012-03-03 Yao Qi <yao@codesourcery.com>
8103
8104 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8105 agent_look_up_symbols.
8106
58b4daa5
YQ
81072012-03-03 Yao Qi <yao@codesourcery.com>
8108
8109 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8110 (linux-x86-low.o): Likewise.
8111 * server.h: Remove in_process_agent_loaded.
8112 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8113 common/agent.c.
8114 Update callers.
8115
8ffcbaaf
YQ
81162012-03-03 Yao Qi <yao@codesourcery.com>
8117
8118 * tracepoint.c (gdb_agent_capability): New global.
8119 (in_process_agent_loaded_ust): Renamed to
8120 `in_process_agent_supports_ust'.
8121 Update callers.
8122 (in_process_agent_supports_ust): Call agent_capability_check.
8123 (clear_installed_tracepoints): Assert that agent supports
8124 agent.
8125
d1feda86
YQ
81262012-03-03 Yao Qi <yao@codesourcery.com>
8127
8128 * linux-low.c (linux_supports_agent): New.
8129 (linux_target_ops): Initialize field `supports_agent' with
8130 linux_supports_agent.
8131 * target.h (struct target_ops) <supports_agent>: New.
8132 (target_supports_agent): New macro.
8133 * server.c (handle_general_set): Handle packet 'QAgent'.
8134 (handle_query): Send `QAgent+'.
8135 * Makefile.in (server.o): Depends on agent.h.
8136
2fa291ac
YQ
81372012-03-03 Yao Qi <yao@codesourcery.com>
8138
8139 * Makefile.in (OBS): Add agent.o.
8140 Add new rule for agent.o.
8141 Track dependence of tracepoint.c on agent.h.
8142 * tracepoint.c (run_inferior_command_1):
8143 (run_inferior_command): Call agent_run_command.
8144 (gdb_ust_connect_sync_socket): Deleted. Move it to
8145 common/agent.c.
8146 (resume_thread, stop_thread): Likewise.
8147 (gdb_ust_socket_init): Renamed to ...
8148 (gdb_agent_socket_init): ... New.
8149 (gdb_ust_thread): Renamed to ...
8150 (gdb_agent_helper_thread): ... New.
8151 (gdb_ust_init): Move some code to ...
8152 (gdb_agent_init): ... here. New.
8153 [HAVE_UST]: Call gdb_ust_init.
8154 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8155 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8156 * config.in, configure: Regenerated.
8157
05044653
PA
81582012-03-02 Pedro Alves <palves@redhat.com>
8159
8160 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8161 * linux-low.c (struct simple_pid_list): New.
8162 (stopped_pids): New a struct simple_pid_list pointer.
8163 (add_to_pid_list, pull_pid_from_list): New.
8164 (handle_extended_wait): Don't assume the first signal new children
8165 report is SIGSTOP. Adjust call to pull_pid_from_list.
8166 (linux_wait_for_lwp): Adjust.
8167
8d00225b
YQ
81682012-03-02 Yao Qi <yao@codesourcery.com>
8169
8170 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8171 debug log.
8172
19560ba5
YQ
81732012-03-02 Yao Qi <yao@codesourcery.com>
8174
8175 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8176 `stop_pc' and `tpoint'. Update caller.
8177
1faeff08
MR
81782012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8179
8180 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8181 * linux-low.c (use_linux_regsets): New macro.
8182 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8183 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8184 (linux_register_in_regsets): New function.
8185 (usr_fetch_inferior_registers): Skip registers covered by
8186 regsets.
8187 (usr_store_inferior_registers): Likewise.
8188 (usr_fetch_inferior_registers): New macro.
8189 (usr_store_inferior_registers): Likewise.
8190 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8191 (linux_store_registers): Likewise.
8192 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8193 prototype.
8194 (init_registers_mips64_dsp_linux): Likewise.
8195 (init_registers_mips_linux): New macro.
8196 (init_registers_mips_dsp_linux): Likewise.
8197 (mips_dsp_num_regs): Likewise.
8198 (DSP_BASE, DSP_CONTROL): New fallback macros.
8199 (mips_base_regs): New macro.
8200 (mips_regmap): Use it. Fix the size.
8201 (mips_dsp_regmap): New variable.
8202 (mips_dsp_regset_bitmap): Likewise.
8203 (mips_arch_setup): New function.
8204 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8205 than mips_regmap.
8206 (mips_cannot_store_register): Likewise.
8207 (the_low_target): Update .arch_setup, .num_regs and .regmap
8208 initializers. Add .regset_bitmap initializer.
8209 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8210 initializer.
8211 * linux-bfin-low.c (the_low_target): Likewise.
8212 * linux-cris-low.c (the_low_target): Likewise.
8213 * linux-crisv32-low.c (the_low_target): Likewise.
8214 * linux-ia64-low.c (the_low_target): Likewise.
8215 * linux-m32r-low.c (the_low_target): Likewise.
8216 * linux-m68k-low.c (the_low_target): Likewise.
8217 * linux-ppc-low.c (the_low_target): Likewise.
8218 * linux-s390-low.c (the_low_target): Likewise.
8219 * linux-sh-low.c (the_low_target): Likewise.
8220 * linux-sparc-low.c (the_low_target): Likewise.
8221 * linux-tic6x-low.c (the_low_target): Likewise.
8222 * linux-x86-low.c (the_low_target): Likewise.
8223 * linux-xtensa-low.c (the_low_target): Likewise.
8224 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8225 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8226 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8227 srv_xmlfiles.
8228 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8229 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8230
c03e6ccc
YQ
82312012-02-29 Yao Qi <yao@codesourcery.com>
8232 Pedro Alves <palves@redhat.com>
8233
8234 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8235 `step_over_finished' is true.
8236
644cebc9
PA
82372012-02-27 Pedro Alves <palves@redhat.com>
8238
8239 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8240 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8241
c14d7ab2
PA
82422012-02-27 Pedro Alves <palves@redhat.com>
8243
8244 PR server/9684
8245 * linux-low.c (pid_is_stopped): New.
8246 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8247
412c89dd
LM
82482012-02-25 Luis Machado <lgustavo@codesourcery.com>
8249
8250 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8251 of conditions.
8252
b745defe
MR
82532012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8254
8255 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8256
9f3a5c85
LM
82572012-02-24 Luis Machado <lgustavo@codesourcery>
8258
8259 * server.c (handle_query): Advertise support for target-side
8260 breakpoint condition evaluation.
8261 (process_point_options): New function.
8262 (process_serial_event): When inserting a breakpoint, check for
8263 a target-side condition that should be evaluated.
8264
8265 * mem-break.c: Include regcache.h and ax.h.
8266 (point_cond_list_t): New data structure.
8267 (breakpoint) <cond_list>: New field.
8268 (find_gdb_breakpoint_at): Make non-static.
8269 (delete_gdb_breakpoint_at): Clear any target-side
8270 conditions.
8271 (clear_gdb_breakpoint_conditions): New function.
8272 (add_condition_to_breakpoint): Likewise.
8273 (add_breakpoint_condition): Likewise.
8274 (gdb_condition_true_at_breakpoint): Likewise.
8275 (gdb_breakpoint_here): Return result directly instead
8276 of going through a local variable.
8277
8278 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8279 (clear_gdb_breakpoint_conditions): Likewise.
8280 (add_breakpoint_condition): Likewise.
8281 (gdb_condition_true_at_breakpoint): Likewise.
8282
8283 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8284 (need_step_over_p): Take target-side breakpoint condition into
8285 consideration.
8286
5e1dc496
LM
82872012-02-24 Luis Machado <lgustavo@codesourcery>
8288
8289 * server.h: Include tracepoint.h.
8290 (agent_mem_read, agent_get_trace_state_variable_value,
8291 agent_set_trace_state_variable_value,
8292 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8293 get_set_tsv_func_addr): New prototypes.
8294
8295 * ax.h: New include file.
8296 * ax.c: New source file.
8297
8298 * tracepoint.c: Include ax.h.
8299 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8300 agent_expr, eval_result_type): Move to ax.h.
8301 (parse_agent_expr): Rename to ...
8302 (gdb_parse_agent_expr): ... this, make it non-static and move
8303 to ax.h.
8304 (unparse_agent_expr) Rename to ...
8305 (gdb_unparse_agent_expr): ... this, make it non-static and move
8306 to ax.h.
8307 (eval_agent_expr): Rename to ...
8308 (eval_tracepoint_agent_expr): ... this.
8309 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8310 forward declarations.
8311 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8312 (agent_get_trace_state_variable_value): New function.
8313 (agent_set_trace_state_variable_value): New function.
8314 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8315 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8316 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8317 (condition_true_at_tracepoint): Likewise.
8318 (parse_agent_expr): Rename to ...
8319 (gdb_parse_agent_expr): ... this and move to ax.c.
8320 (unparse_agent_expr): Rename to ...
8321 (gdb_unparse_agent_expr): ... this and move to ax.c.
8322 (gdb_agent_op_name): Move to ax.c.
8323 (eval_agent_expr): Rename to ...
8324 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8325 and move to ax.c.
8326 (eval_tracepoint_agent_expr): New function.
8327 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8328 non-static.
5e1dc496
LM
8329 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8330 ax.c.
8331 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8332 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8333 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8334 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8335 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8336 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8337 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8338 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8339 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8340 (compile_bytecodes): Remove forward declaration.
8341 (is_goto_target): Move to ax.c.
8342 (compile_bytecodes): Move to ax.c and call
8343 agent_get_trace_state_variable_value (...) and
8344 agent_set_trace_state_variable_value (...).
8345
8346 * Makefile.in: Update ax.c and IPA dependencies.
8347
277e4e52
PA
83482012-02-24 Pedro Alves <palves@redhat.com>
8349
8350 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8351 (cmd_bigqtbuffer_circular): ... this. Only handle
8352 'QTBuffer:circular:'.
8353 (handle_tracepoint_general_set): Adjust.
8354
bf4c19f7
YQ
83552012-02-16 Yao Qi <yao@codesourcery.com>
8356
8357 * inferiors.c: Move code to ...
8358 * dll.c: .... here. New.
8359 * server.h: Declare clear_dlls.
8360 * Makefile.in (SFILES): Add dll.c.
8361 (OBS): Add dll.o
8362 (dll.o): New rule.
8363
d73f2619
YQ
83642012-02-11 Yao Qi <yao@codesourcery.com>
8365
8366 * server.c: (handle_monitor_command): Add a new parameter
8367 `own_buf'.
8368 (handle_query): Update caller.
8369
f8255c2a
JB
83702012-02-09 Joel Brobecker <brobecker@adacore.com>
8371
8372 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8373 * configure, config.in: Regenerate.
8374 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8375 is not defined.
8376
da84f473
PA
83772012-02-02 Pedro Alves <palves@redhat.com>
8378
8379 Try SIGKILL first, then PTRACE_KILL.
8380 * linux-low.c (linux_kill_one_lwp): New.
8381 (linux_kill_one_lwp): Rename to ...
8382 (kill_one_lwp_callback): ... this. Use the new
8383 linux_kill_one_lwp.
8384
e886a173
PA
83852012-02-02 Pedro Alves <palves@redhat.com>
8386
8387 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8388 inferior.
8389
be07f1a2
PA
83902012-01-27 Pedro Alves <palves@redhat.com>
8391
8392 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8393 (elf_64_file_p): Make static.
8394 (linux_pid_exe_is_elf_64_file): New.
8395 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8396 Delete declarations.
8397 (linux_pid_exe_is_elf_64_file): Declare.
8398 * linux-x86-low.c (x86_arch_setup): Use
8399 linux_pid_exe_is_elf_64_file.
8400
d8301ad1
JK
84012012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8402
8403 * linux-low.c (linux_wait_for_event_1): Rename to ...
8404 (linux_wait_for_event): ... here and merge it with former
8405 linux_wait_for_event - new variable wait_ptid, use it.
8406 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8407
01b17894
PA
84082012-01-23 Pedro Alves <palves@redhat.com>
8409
8410 * server.c (main): Avoid yet another case of infinite loop while
8411 detaching/killing after a longjmp.
8412
e825046f
JK
84132012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8414
8415 Code cleanup.
8416 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8417
b9e7b9c3
UW
84182012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8419
8420 * hostio.c (handle_readlink): New function.
8421 (handle_vFile): Call it to handle "vFile:readlink" packets.
8422
901f9912
UW
84232012-01-20 Pedro Alves <palves@redhat.com>
8424 Ulrich Weigand <ulrich.weigand@linaro.org>
8425
8426 * server.c (handle_v_requests): Only support vAttach and vRun to
8427 start multiple processes when in extended protocol mode.
8428
fc1ab1a0
PA
84292012-01-17 Pedro Alves <palves@redhat.com>
8430
8431 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8432 memalign plus mprotect to allocate the scratch buffer.
8433
7d5d4e98
PA
84342012-01-13 Pedro Alves <palves@redhat.com>
8435
8436 * server.c (attach_inferior): Clear `cont_thread'.
8437
f128d5e9
PA
84382012-01-13 Pedro Alves <palves@redhat.com>
8439
8440 * server.c (main): Avoid infinite loop while detaching/killing
8441 after a longjmp.
8442
06db92f0
DE
84432012-01-09 Doug Evans <dje@google.com>
8444
8445 * server.c (start_inferior): Set last_ptid in --wrapper case.
8446
32d92999
YQ
84472012-01-06 Yao Qi <yao@codesourcery.com>
8448
8449 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8450 defined.
8451 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8452
5e0a92a9
YQ
84532012-01-04 Yao Qi <yao@codesourcery.com>
8454
8455 * tracepoint.c (cmd_qtdp): Print debug message
8456 for static tracepoint.
8457
ae639e8c
YQ
84582012-01-04 Yao Qi <yao@codesourcery.com>
8459
8460 * tracepoint.c (trace_vdebug): Differentiate debug message
8461 between gdbserver and IPA.
8462
f72429c5
YQ
84632012-01-03 Yao Qi <yao@codesourcery.com>
8464
8465 * tracepoint.c (tracepoint_was_hit): Don't collect for
8466 static tracepoint.
8467
12c3e59c
JB
84682012-01-02 Joel Brobecker <brobecker@adacore.com>
8469
8470 * terminal.h: Reformat copyright header.
8471
67827812
JB
84722012-01-02 Joel Brobecker <brobecker@adacore.com>
8473
8474 * server.c (gdbserver_version): Update copyright year.
8475 * gdbreplay.c (gdbreplay_version): Likewise.
8476
3e52c33d
JK
84772011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8478
8479 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8480
8481 Revert:
8482 2011-12-18 Hui Zhu <teawater@gmail.com>
8483 * linux-low.c (linux_create_inferior): Save return value to ret.
8484
66f1260e
HZ
84852011-12-18 Hui Zhu <teawater@gmail.com>
8486
8487 * linux-low.c (linux_create_inferior): Save return value to ret.
8488
e77616d7
DE
84892011-12-16 Doug Evans <dje@google.com>
8490
e7b06c57
DE
8491 * linux-low.c (linux_create_inferior): If stdio connection,
8492 redirect stdin from /dev/null, stdout to stderr.
8493 * remote-utils.c (remote_is_stdio): New static global.
8494 (remote_connection_is_stdio): New function.
8495 (remote_prepare): Handle stdio connection.
8496 (remote_open): Ditto.
8497 (remote_close): Don't close stdin for stdio connections.
8498 (read_prim,write_prim): New functions. Replace all calls to
8499 read/write to these.
8500 * server.c (main): Watch for "-" argument. Move call to
8501 remote_prepare before start_inferior.
8502 * server.h (STDIO_CONNECTION_NAME): New macro.
8503 (remote_connection_is_stdio): Declare.
8504
e77616d7
DE
8505 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8506 in debugging output.
8507
82067193
YQ
85082011-12-15 Yao Qi <yao@codesourcery.com>
8509
8510 * tracepoint.c: Include sys/syscall.h.
8511 (gdb_ust_thread): Remove preprocessor conditional.
8512
82bfbe7e
PA
85132011-12-14 Pedro Alves <pedro@codesourcery.com>
8514
8515 * linux-low.c (linux_detach_one_lwp): Call
8516 the_low_target.prepare_to_resume before detaching.
8517
712c6575
YQ
85182011-12-14 Yao Qi <yao@codesourcery.com>
8519
8520 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8521 of write.
8522
d54d1edf
YQ
85232011-12-14 Yao Qi <yao@codesourcery.com>
8524
8525 * i386-low.c (i386_low_stopped_data_address): Initialize local
8526 variable `control'.
8527
6210a125
PA
85282011-12-13 Pedro Alves <pedro@codesourcery.com>
8529
8530 PR remote/13492
8531
8532 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8533 DR_CONTROL unless necessary. Extend comments.
8534 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8535 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8536
2ece8244
YQ
85372011-12-13 Yao Qi <yao@codesourcery.com>
8538
8539 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8540 macros.
8541 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8542
784867a5
JK
85432011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8544
8545 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8546 Print new debug message for such case.
8547
6bf36717
JK
85482011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8549
8550 Fix overlapping memcpy.
8551 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8552 the read_inferior_memory transfer.
8553 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8554 write_inferior_memory transfer.
8555 (set_fast_tracepoint_jump): New variable buf. Use it for the
8556 read_inferior_memory and write_inferior_memory transfers.
8557 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8558 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8559 Use it for the write_inferior_memory transfer.
8560 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8561 buffers.
8562
50275556
MR
85632011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8564
8565 * linux-low.c (fetch_register, store_register): Make code
8566 consistent, fix formatting.
8567
7325beb4
MR
85682011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8569
8570 * linux-low.c (usr_store_inferior_registers): Factor out code
8571 to handle individual registers into...
8572 (store_register): ... this new function.
8573
c642a434
UW
85742011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8575
8576 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8577 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8578 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8579 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8580 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8581 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8582 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8583 (srv_xmlfiles): Add new XML files.
8584
8585 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8586 and <sys/uio.h>.
8587 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8588 (init_registers_s390_linux32v1): Add prototype.
8589 (init_registers_s390_linux32v2): Likewise.
8590 (init_registers_s390_linux64v1): Likewise.
8591 (init_registers_s390_linux64v2): Likewise.
8592 (init_registers_s390x_linux64v1): Likewise.
8593 (init_registers_s390x_linux64v2): Likewise.
8594 (s390_num_regs): Increment to 52.
8595 (s390_regmap): Add orig_r2 register.
8596 (s390_num_regs_3264): Increment to 68.
8597 (s390_regmap_3264): Add orig_r2 register.
8598 (s390_collect_ptrace_register): Handle orig_r2 register.
8599 (s390_supply_ptrace_register): Likewise.
8600 (s390_fill_last_break): New function.
8601 (s390_store_last_break): Likewise.
8602 (s390_fill_system_call): New function.
8603 (s390_store_system_call): Likewise.
8604 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8605 register sets.
8606 (s390_check_regset): New function.
8607 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8608 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8609 Update target_regsets for available register sets.
8610
2268b414
JK
86112011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8612 Jan Kratochvil <jan.kratochvil@redhat.com>
8613
8614 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8615 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8616 New.
8617 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8618 * linux-low.h (struct process_info_private): New member r_debug.
8619 * server.c (handle_qxfer_libraries): Call
8620 the_target->qxfer_libraries_svr4.
8621 (handle_qxfer_libraries_svr4): New function.
8622 (qxfer_packets): New entry "libraries-svr4".
8623 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8624 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8625 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8626 PACKET_qXfer_libraries_svr4.
8627
d6db1fab
UW
86282011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8629
8630 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8631 PSW address/mask between 8-byte and 16-byte formats.
8632 (s390_supply_ptrace_register): Likewise.
8633 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8634 basic addressing mode bit.
8635
242f5f1c
SS
86362011-11-24 Stan Shebs <stan@codesourcery.com>
8637
8638 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8639
f196051f
SS
86402011-11-17 Stan Shebs <stan@codesourcery.com>
8641
8642 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8643 (tracing_start_time): New global.
8644 (tracing_stop_time): New global.
8645 (tracing_user_name): New global.
8646 (tracing_notes): New global.
8647 (tracing_stop_note): New global.
8648 (cmd_qtstart): Set traceframe_usage, start_time.
8649 (stop_tracing): Set stop_time.
8650 (cmd_qtstatus): Report additional status.
8651 (cmd_qtp): New function.
8652 (handle_tracepoint_query): Call it.
8653 (cmd_qtnotes): New function.
8654 (handle_tracepoint_general_set): Call it.
8655 (get_timestamp): Rename from tsv_get_timestamp.
8656
405f8e94
SS
86572011-11-14 Stan Shebs <stan@codesourcery.com>
8658 Kwok Cheung Yeung <kcy@codesourcery.com>
8659
8660 * linux-x86-low.c (small_jump_insn): New.
8661 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8662 trampoline and error message, build a trampoline and issue a small
8663 jump instruction to it.
8664 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8665 trampoline and error message.
8666 (x86_get_min_fast_tracepoint_insn_len): New.
8667 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8668 * linux-low.h (struct linux_target_ops): Add arguments to
8669 install_fast_tracepoint_jump_pad operation, add new operation.
8670 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8671 arguments.
8672 (linux_get_min_fast_tracepoint_insn_len): New function.
8673 (linux_target_op): Add new operation.
8674 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8675 (gdb_trampoline_buffer_end): Ditto.
8676 (gdb_trampoline_buffer_error): Ditto.
8677 (struct ipa_sym_addresses): Add fields for new IPA variables.
8678 (symbol_list): Add entries for new IPA variables.
8679 (struct tracepoint): Add fields to hold the address range of the
8680 trampoline used by the tracepoint.
8681 (trampoline_buffer_head): New static variable.
8682 (trampoline_buffer_tail): Ditto.
8683 (claim_trampoline_space): New function.
8684 (have_fast_tracepoint_trampoline_buffer): New function.
8685 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8686 structure.
8687 (install_fast_tracepoint): Ditto, also add error buffer argument.
8688 (cmd_qtminftpilen): New function.
8689 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8690 (fast_tracepoint_from_trampoline_address): New function.
8691 (fast_tracepoint_collecting): Handle trampoline as part of jump
8692 pad space.
8693 (set_trampoline_buffer_space): New function.
8694 (initialize_tracepoint): Initialize new IPA variables.
8695 * target.h (struct target_ops): Add arguments to
8696 install_fast_tracepoint_jump_pad operation, add new
8697 get_min_fast_tracepoint_insn_len operation.
8698 (target_get_min_fast_tracepoint_insn_len): New.
8699 (install_fast_tracepoint_jump_pad): Add arguments.
8700 * server.h (IPA_BUFSIZ): Define.
8701 * linux-i386-ipa.c: Include extra header files.
8702 (initialize_fast_tracepoint_trampoline_buffer): New function.
8703 (initialize_low_tracepoint): Call it.
8704 * server.h (set_trampoline_buffer_space): Declare.
8705 (claim_trampoline_space): Ditto.
8706 (have_fast_tracepoint_trampoline_buffer): Ditto.
8707
1e4d1764
YQ
87082011-11-14 Yao Qi <yao@codesourcery.com>
8709
8710 * server.c (handle_query): Handle InstallInTrace for qSupported.
8711 * tracepoint.c (add_tracepoint): Sort list.
8712 (install_tracepoint, download_tracepoint): New.
8713 (cmd_qtdp): Call them to install and download tracepoints.
8714 (sort_tracepoints): Removed.
8715 (cmd_qtstart): Update.
8716
5c73ff4e
YQ
87172011-11-14 Yao Qi <yao@codesourcery.com>
8718
8719 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8720 * mem-break.h: Declare.
8721 * tracepoint.c (cmd_qtstart): Move some code to ...
8722 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8723 New.
8724 (download_tracepoints): Move some code to ...
8725 (download_tracepoint_1): ... here. New.
8726
86a30030
YQ
87272011-11-08 Yao Qi <yao@codesourcery.com>
8728
8729 * remote-utils.c (relocate_instruction): A comment fix.
8730
8d26e50c
JB
87312011-11-07 Joel Brobecker <brobecker@adacore.com>
8732
8733 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8734 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8735 dr_status_mirror and dr_control_mirror from debug_reg_state.
8736 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8737 (i386_initial_stuff): Remove use of deleted globals.
8738 (i386_get_thread_context, i386_set_thread_context,
8739 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8740 from debug_reg_state.
8741
a59306a3
YQ
87422011-11-05 Yao Qi <yao@codesourcery.com>
8743
8744 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8745 address as TPOINT's.
8746
3065dfb6
SS
87472011-11-02 Stan Shebs <stan@codesourcery.com>
8748
8749 * tracepoint.c (agent_mem_read_string): New function.
8750 (eval_agent_expr): Call it for tracenz.
8751 * server.c (handle_query): Report support for tracenz.
8752
fd0d8c7c
YQ
87532011-11-02 Yao Qi <yao@codesourcery.com>
8754
8755 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8756
609086b1
YQ
87572011-11-02 Yao Qi <yao@codesourcery.com>
8758
8759 * target.h: Fix a typo in comment.
8760
b9fd1791
PA
87612011-10-31 Pedro Alves <pedro@codesourcery.com>
8762
8763 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8764 clobber the breakpoints' shadows with fast tracepoint jumps.
8765 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8766 * target.c (write_inferior_memory): Also pass MYADDR down to
8767 check_mem_write.
8768
03583c20
UW
87692011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8770
8771 * configure.ac: Check support for personality routine.
8772 * configure: Regenerate.
8773 * config.in: Likewise.
8774 * linux-low.c: Include <sys/personality.h>.
8775 Define ADDR_NO_RANDOMIZE if necessary.
8776 (linux_create_inferior): Disable address space randomization when
8777 forking inferior, if requested.
8778 (linux_supports_disable_randomization): New function.
8779 (linux_target_ops): Install it.
8780 * server.h (disable_randomization): Declare.
8781 * server.c (disable_randomization): New global variable.
8782 (handle_general_set): Handle QDisableRandomization.
8783 (handle_query): Likewise for qSupported.
8784 (main): Support --disable-randomization and --no-disable-randomization
8785 command line arguments.
8786 * target.h (struct target_ops): Add supports_disable_randomization.
8787 (target_supports_disable_randomization): New macro.
8788
723b724b
MF
87892011-09-29 Mike Frysinger <vapier@gentoo.org>
8790
8791 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8792 ifdef check.
8793 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8794 [!PT_GETDSBT] (target_loadmap): New definition.
8795 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8796 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8797 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8798 and PT_GETDSBT to LINUX_LOADMAP.
8799 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8800 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8801
55329a5c 88022011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8803
8804 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8805 (arm_linux_hwbp_cap): New static variable.
8806 (arm_linux_get_hwbp_cap): Replace by ...
8807 (arm_linux_init_hwbp_cap): ... this new function.
8808 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8809 (arm_linux_get_hw_watchpoint_count): Likewise.
8810 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8811 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8812 (arm_prepare_to_resume): Use perror_with_name instead of error.
8813
55329a5c 88142011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8815
8816 * linux-arm-low.c: Include <signal.h>.
8817 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8818 (struct arm_linux_hwbp_cap): New data type.
8819 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8820 (struct arm_linux_hw_breakpoint): New data type.
8821 (MAX_BPTS, MAX_WPTS): Define.
8822 (struct arch_process_info, struct arch_lwp_info): New data types.
8823 (arm_linux_get_hwbp_cap): New function.
8824 (arm_linux_get_hw_breakpoint_count): Likewise.
8825 (arm_linux_get_hw_watchpoint_count): Likewise.
8826 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8827 (arm_hwbp_control_initialize): Likewise.
8828 (arm_hwbp_control_is_enabled): Likewise.
8829 (arm_hwbp_control_is_initialized): Likewise.
8830 (arm_hwbp_control_disable): Likewise.
8831 (arm_linux_hw_breakpoint_equal): Likewise.
8832 (arm_linux_hw_point_initialize): Likewise.
8833 (struct update_registers_data): New data structure.
8834 (update_registers_callback: New function.
8835 (arm_insert_point): Likewise.
8836 (arm_remove_point): Likewise.
8837 (arm_stopped_by_watchpoint): Likewise.
8838 (arm_stopped_data_address): Likewise.
8839 (arm_new_process): Likewise.
8840 (arm_new_thread): Likewise.
8841 (arm_prepare_to_resume): Likewise.
8842 (the_low_target): Register arm_insert_point, arm_remove_point,
8843 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8844 arm_new_thread, and arm_prepare_to_resume.
8845
6b9801d4
SS
88462011-09-15 Stan Shebs <stan@codesourcery.com>
8847
8848 * server.h (struct emit_ops): Add compare-goto fields.
8849 * tracepoint.c (gdb_agent_op_sizes): New table.
8850 (emit_eq_goto): New function.
8851 (emit_ne_goto): New function.
8852 (emit_lt_goto): New function.
8853 (emit_le_goto): New function.
8854 (emit_gt_goto): New function.
8855 (emit_ge_goto): New function.
8856 (is_goto_target): New function.
8857 (compile_bytecodes): Recognize special cases of compare-goto
8858 combinations and call specialized emitters for them.
8859 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8860 (amd64_emit_ne_goto): New function.
8861 (amd64_emit_lt_goto): New function.
8862 (amd64_emit_le_goto): New function.
8863 (amd64_emit_gt_goto): New function.
8864 (amd64_emit_ge_goto): New function.
8865 (amd64_emit_ops): Add the new functions.
8866 (i386_emit_eq_goto): New function.
8867 (i386_emit_ne_goto): New function.
8868 (i386_emit_lt_goto): New function.
8869 (i386_emit_le_goto): New function.
8870 (i386_emit_gt_goto): New function.
8871 (i386_emit_ge_goto): New function.
8872 (i386_emit_ops): Add the new functions.
8873
bf15cbda
SS
88742011-09-08 Stan Shebs <stan@codesourcery.com>
8875
8876 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8877 (i386_emit_epilogue): Restore %ebx.
8878
943ca1dd
JZ
88792011-08-31 Jie Zhang <jzhang918@gmail.com>
8880
8881 * server.c (step_thread): Remove definition.
8882 (process_serial_event): Don't handle Hs.
8883 * server.h (step_thread): Remove declaration.
8884 * target.c (set_desired_inferior): Remove use of step_thread.
8885
e3deef73
LM
88862011-08-24 Luis Machado <lgustavo@codesourcery.com>
8887
8888 * linux-low.c: Include linux-procfs.h.
8889 (linux_attach_lwp_1): Update comments.
8890 (linux_attach): Scan for existing threads when attaching to a
8891 process that is the tgid.
8892 * Makefile.in: Update dependencies.
8893
13da1c97
LM
88942011-08-24 Luis Machado <lgustavo@codesourcery.com>
8895
8896 * configure.srv: Add linux-procfs.o dependencies.
8897
881127c9
YQ
88982011-08-14 Yao Qi <yao@codesourcery.com>
8899
8900 * target.h (struct target_ops): Fix indent.
8901 * win32-low.c (win32_target_ops): Fix comment.
8902
58dbd541
YQ
89032011-08-14 Andrew Jenner <andrew@codesourcery.com>
8904 Yao Qi <yao@codesourcery.com>
8905
8906 * Makefile.in (clean): Remove tic6x-*.c files.
8907 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8908 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8909 (tic6x-c64xp-linux.c): Likewise.
8910 * configure.srv: Add support for tic6x-*-uclinux.
8911 * linux-tic6x-low.c: New.
8912 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8913
78d85199
YQ
89142011-08-14 Andrew Stubbs <ams@codesourcery.com>
8915 Yao Qi <yao@codesourcery.com>
8916
8917 * target.h (struct target_ops): Add read_loadmap.
8918 * linux-low.c (struct target_loadseg): New type.
8919 (struct target_loadmap): New type.
8920 (linux_read_loadmap): New function.
8921 (linux_target_ops): Add linux_read_loadmap.
8922 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8923 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8924 to NULL.
78d85199 8925
a959a88d
EZ
89262011-08-05 Eli Zaretskii <eliz@gnu.org>
8927
8928 * win32-low.c: Include <stdint.h>.
8929
1ced966e
PA
89302011-07-22 Pedro Alves <pedro@codesourcery.com>
8931
8932 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8933 to the inferior here.
8934 (i386_remove_aligned_watchpoint): Ditto.
8935 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8936 fit part of the watchpoint in the debug registers.
8937 (i386_update_inferior_debug_regs): New.
8938 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8939 registers, and only update the inferior on success.
8940 (i386_low_remove_watchpoint): Ditto.
8941
d26e3629
KY
89422011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8943
8944 * linux-low.c (compare_ints, unique, list_threads, show_process,
8945 linux_core_of_thread): Delete.
8946 (linux_target_ops): Change linux_core_of_thread to
8947 linux_common_core_of_thread.
8948 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8949 * utils.c (malloc_failure): Change type of argument.
8950 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8951 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8952 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8953 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8954 (IPA_OBJS): Add common-utils-ipa.o.
8955 (ptid_h, linux_osdata_h): New macros.
8956 (server_h): Add common/common-utils.h, common/xml-utils.h,
8957 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8958 common/ptid.h.
8959 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8960 ptid.o, buffer.o): New rules.
8961 (linux-low.o): Add common/linux-osdata.h as a dependency.
8962 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8963 * configure.ac: Add AC_HEADER_DIRENT check.
8964 * config.in: Regenerate.
8965 * configure: Regenerate.
8966 * remote-utils.c (xml_escape_text): Delete.
8967 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8968 buffer_xml_printf): Move to common/buffer.c.
8969 * server.c (main): Remove call to initialize_inferiors.
8970 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8971 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8972 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8973 internal_error, gdb_assert, gdb_assert_fail): Delete.
8974 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8975 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8976 common/buffer.h.
8977 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8978 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8979 initialize_inferiors): Delete.
8980
2275a1a7
PA
89812011-07-20 Pedro Alves <pedro@codesourcery.com>
8982
8983 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8984 symbol error.
8985
0a5b1e09
PA
89862011-05-31 Pedro Alves <pedro@codesourcery.com>
8987
8988 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8989 assertion.
8990 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8991
6938fd34
YQ
89922011-05-26 Yao Qi <yao@codesourcery.com>
8993
8994 * Makefile.in (thread-db.o): Track dependence to
8995 common/gdb_thread_db.h.
8996 * thread-db.c: include gdb_thread_db.h from right place.
8997
b481f9e0
TT
89982011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8999
9000 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9001 __FILE__ and __LINE__ to internal_error.
9002
98a5dd13
DE
90032011-05-13 Doug Evans <dje@google.com>
9004
9005 * thread-db.c (try_thread_db_load_from_sdir): New function.
9006 (try_thread_db_load_from_dir): New function.
9007 (thread_db_load_search): Handle $sdir, ignore $pdir.
9008 Remove trying of system directories if search of
9009 libthread-db-search-path fails, that is now done via $sdir.
9010
d248b706
KY
90112011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9012
9013 * server.c (handle_query): Add EnableDisableTracepoints to the list
9014 of supported features.
43aaf8b6 9015 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9016 tracepoints.
43aaf8b6
PA
9017 (cmd_qtenable_disable): New.
9018 (cmd_qtstart): Install tracepoints even if disabled.
9019 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9020 receiving a QTEnable or QTDisable packet.
9021 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9022 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9023 tracepoints.
9024 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9025
84e578fb
DE
90262011-05-10 Doug Evans <dje@google.com>
9027
9028 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9029
71f55dd8
DE
90302011-05-04 Doug Evans <dje@google.com>
9031
9032 * linux-low.c (linux_join): Skip process lookup.
9033 * spu-low.c (spu_join): Ditto.
9034 * server.c (join_inferiors_callback): Delete.
9035 (process_serial_event): For 'D' packet (detach) call join_inferior
9036 directly.
9037
4d393d60
JM
90382011-05-04 Joseph Myers <joseph@codesourcery.com>
9039
9040 * README: Don't mention xscale*-*-linux*.
9041 * configure.srv (xscale*-*-linux*): Don't handle target.
9042
b00ad6ff
NF
90432011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9044
9045 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9046 casting pointers.
9047 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9048 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9049 (i386_emit_void_call_2): Likewise.
9050
af96c192
YQ
90512011-04-26 Yao Qi <yao@codesourcery.com>
9052
43aaf8b6
PA
9053 * linux-low.c: Move common macros to linux-ptrace.h.
9054 Include linux-ptrace.h.
af96c192
YQ
9055 * Makefile.in (linux_ptrace_h): New.
9056 (linux-low.o): Depends on linux-ptrace.h.
9057
03f2bd59
JK
90582011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9059
9060 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9061 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9062 (remote_prepare): New function with most of the TCP code from ...
9063 (remote_open): ... here. Detect PORT here unconditionally. Move also
9064 setting transport_is_reliable.
9065 * server.c (run_once): New variable.
9066 (gdbserver_usage): Document it.
9067 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9068 the first run if RUN_ONCE.
9069 * server.h (run_once, remote_prepare): New declarations.
9070
7a9dd1b2
TT
90712011-04-19 Tom Tromey <tromey@redhat.com>
9072
9073 * win32-low.c (handle_load_dll): Remove duplicate "the".
9074
81239425
PM
90752011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9076
9077 Remove support for old Cygwin 1.5 versions.
9078 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9079 function to avoid warning.
9080 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9081 warning.
9082
9e0627f1
PM
90832011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9084
9085 * gdbserver/server.h (Macro _): Define it if not available.
9086
588eebee
MS
90872011-03-14 Michael Snyder <msnyder@vmware.com>
9088
348af9f7 9089 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9090
43f70d4c
JB
90912011-03-10 Joel Brobecker <brobecker@adacore.com>
9092
9093 * Makefile.in (maintainer-clean realclean distclean): Remove
9094 "make ... subdir_do" command.
9095
348af9f7
MS
90962011-03-10 Michael Snyder <msnyder@vmware.com>
9097
9098 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9099
9100 * server.c (handle_v_run): Free alloced buffer on early return.
9101
e637a4f5
YQ
91022011-03-09 Yao Qi <yao@codesourcery.com>
9103
9104 Revert:
9105 2011-03-04 Yao Qi <yao@codesourcery.com>
9106
9107 * Makefile.in: Remove GNU make feature --directory.
9108
9109 2011-03-05 Yao Qi <yao@codesourcery.com>
9110
9111 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9112 (subdir_do): New make target. Copied from gdb/Makefile.
9113 (maintainer-clean, realclean, distclean, clean): Call corresponding
9114 make targets in common/Makefile.
9115
9116 2011-02-11 Yao Qi <yao@codesourcery.com>
9117
9118 * configure.ac: Call AC_PROG_RANLIB.
9119 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9120 * configure: Regenerate.
9121
e6edda56
JK
91222011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9123
9124 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9125
e5141119
JB
91262011-03-06 Yao Qi <yao@codesourcery.com>
9127
9128 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9129
64794aa4
JB
91302011-03-05 Yao Qi <yao@codesourcery.com>
9131
9132 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9133 (subdir_do): New make target. Copied from gdb/Makefile.
9134 (maintainer-clean, realclean, distclean, clean): Call corresponding
9135 make targets in common/Makefile.
9136
7a762829
YQ
91372011-03-04 Yao Qi <yao@codesourcery.com>
9138
9139 * Makefile.in: Remove GNU make feature --directory.
9140
348af9f7
MS
91412011-03-04 Michael Snyder <msnyder@vmware.com>
9142
9143 * server.c (queue_stop_reply): Call xmalloc not malloc.
9144
91452011-03-02 Michael Snyder <msnyder@vmware.com>
9146
9147 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9148
9f72fee2
MS
91492011-02-28 Michael Snyder <msnyder@vmware.com>
9150
588eebee
MS
9151 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9152 (cmd_qtframe): Ditto.
9153 (cmd_qtbuffer): Ditto.
9154 (cmd_bigqtbuffer): Ditto.
9155
9f72fee2
MS
9156 * utils.c (decimal2str): Initialize 'width' to nine, then
9157 don't mess with it.
9158
8040bd49
UW
91592011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9160
9161 * hostio.c (require_data): Free *data, not data.
9162
7e52cbd0
JK
91632011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9164
9165 * hostio.c (require_data): Use free, not xfree.
9166
9130f83e
MS
91672011-02-27 Michael Snyder <msnyder@vmware.com>
9168
4b812f4e
MS
9169 * server.c (handle_query): Discard unused value.
9170
9130f83e
MS
9171 * hostio.c (require_data): Free malloc memory before returning
9172 error.
9173
69d37113
MS
91742011-02-26 Michael Snyder <msnyder@vmware.com>
9175
9176 * linux-low.c (list_threads): Call closedir for dirent.
9177
35f5825a
MS
91782011-02-27 Michael Snyder <msnyder@vmware.com>
9179
2a589cef
MS
9180 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9181 a case statement falls through.
9182
0adea5f7
MS
9183 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9184
35f5825a
MS
9185 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9186 in comparison.
9187
238f1c74
MS
91882011-02-26 Michael Snyder <msnyder@vmware.com>
9189
9190 * utils.c (decimal2str): Eliminate dead code and dead param.
9191 (pulongest): Drop dead param from call to decimal2str.
9192 (plongest): Ditto.
9193
633ff500
JB
91942011-02-24 Joel Brobecker <brobecker@adacore.com>
9195
9196 Revert the following patch (not approved yet):
9197 2011-02-21 Hui Zhu <teawater@gmail.com>
9198 * tracepoint.c (tp_printf): New function.
9199 (eval_agent_expr): Handle gdb_agent_op_printf.
9200
f9c6ff72
HZ
92012011-02-21 Hui Zhu <teawater@gmail.com>
9202
9203 * tracepoint.c (tp_printf): New function.
9204 (eval_agent_expr): Handle gdb_agent_op_printf.
9205
94d5e490
TT
92062011-02-18 Tom Tromey <tromey@redhat.com>
9207
9208 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9209 (tracepoint.o): Likewise.
9210 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9211 (gdb_agent_op_names): Likewise.
9212
c7f96d2b
TT
92132011-02-18 Tom Tromey <tromey@redhat.com>
9214
9215 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9216 gdb_agent_op_rot>: New constants.
9217 (gdb_agent_op_names): Add pick and roll.
9218 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9219 cases.
9220
0feedb2c
JK
92212011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9222
9223 * aclocal.m4: Regenerated with aclocal-1.11.1.
9224
b3b9301e
PA
92252011-02-14 Pedro Alves <pedro@codesourcery.com>
9226
9227 * server.c (handle_qxfer_traceframe_info): New.
9228 (qxfer_packets): Register "traceframe-info".
9229 (handle_query): Report support for qXfer:traceframe-info:read+.
9230 * tracepoint.c (match_blocktype): New.
9231 (traceframe_find_block_type): Rename to ...
9232 (traceframe_walk_blocks): ... this. Add callback filter argument,
9233 and use it.
9234 (traceframe_find_block_type): New, reimplemented on top of
9235 traceframe_walk_blocks.
9236 (build_traceframe_info_xml): New.
9237 (traceframe_read_info): New.
9238 * server.h (traceframe_read_info): Declare.
9239
4f3e6fb7
YQ
92402011-02-11 Yao Qi <yao@codesourcery.com>
9241
9242 * configure.ac: Call AC_PROG_RANLIB.
9243 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9244 * configure: Regenerate.
9245
764880b7
PA
92462011-02-07 Pedro Alves <pedro@codesourcery.com>
9247
9248 * server.c (gdb_read_memory): Change return semantics to allow
9249 partial transfers.
9250 (handle_search_memory_1): Adjust.
9251 (process_serial_event) <'m' packet>: Handle partial transfers.
9252 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9253
1c79eb8a
PA
92542011-01-28 Pedro Alves <pedro@codesourcery.com>
9255
9256 * regcache.c (init_register_cache): Initialize
9257 regcache->register_status.
9258 (free_register_cache): Release regcache->register_status.
9259 (regcache_cpy): Copy register_status.
9260 (registers_to_string): Print 'x's for unavailable registers.
9261 (supply_register): Mark the register's status valid or
9262 unavailable, depending on whether a buffer was passed in or not.
9263 (supply_register_zeroed): New.
9264 (supply_regblock): Mark the registers' status valid or
9265 unavailable, depending on whether a buffer was passed in or not.
9266 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9267 (struct regcache): New `register_status' field.
9268 (supply_register_zeroed): Declare.
9269 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9270 supply_register_zeroed, rather than passing a NULL buffer to
9271 supply_register.
9272 * tracepoint.c (fetch_traceframe_registers): Update comment.
9273
85724a0e
PA
92742011-01-28 Pedro Alves <pedro@codesourcery.com>
9275
9276 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9277 buffer explicit.
9278
d08aafef
PA
92792011-01-25 Pedro Alves <pedro@codesourcery.com>
9280
9281 * server.h (decode_xfer_write): Change prototype.
9282 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9283 and don't extract the annex here.
9284 * server.c (decode_xfer_read): Remove `annex' parameter,
9285 and don't extract the annex here.
9286 (decode_xfer): New.
9287 (struct qxfer): New.
9288 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9289 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9290 (handle_qxfer_statictrace): New functions, abstracted out from
9291 handle_query, and made to use the struct qxfer interface.
9292 (handle_threads_qxfer_proper): Rename to ...
9293 (handle_qxfer_threads_proper): ... this.
9294 (handle_threads_qxfer): Rename to ...
9295 (handle_qxfer_threads): ... this. Adjust.
9296 (qxfer_packets): New array.
9297 (handle_qxfer): New function.
9298 (handle_query): Use handle_qxfer.
9299
493e2a69
MS
93002011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9301
9302 * gdbreplay.c: Shorten lines of >= 80 columns.
9303 * linux-low.c: Ditto.
9304 * linux-ppc-low.c: Ditto.
9305 * linux-s390-low.c: Ditto.
9306 * linux-sparc-low.c: Ditto.
9307 * linux-x86-low.c: Ditto.
9308 * linux-xtensa-low.c: Ditto.
9309 * mem-break.c: Ditto.
9310 * nto-low.c: Ditto.
9311 * regcache.h: Ditto.
9312 * remote-utils.c: Ditto.
9313 * server.c: Ditto.
9314 * server.h: Ditto.
9315 * thread-db.c: Ditto.
9316 * tracepoint.c: Ditto.
9317 * utils.c: Ditto.
9318 * win32-low.h: Ditto.
9319
44944448
JB
93202011-01-05 Joel Brobecker <brobecker@adacore.com>
9321
9322 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9323 update.
9324
71ce852c
JB
93252011-01-01 Joel Brobecker <brobecker@adacore.com>
9326
9327 * server.c (gdbserver_version): Update copyright year in version
9328 output.
9329 * gdbreplay.c (gdbreplay_version): Ditto.
9330
eb826dc6
MF
93312010-12-29 Jie Zhang <jie.zhang@analog.com>
9332
9333 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9334 * linux-bfin-low.c: New file.
9335 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9336 PT_DATA_ADDR for BFIN targets.
9337 * Makefile.in (SFILES): Add linux-bfin-low.c.
9338 (clean): Remove reg-bfin.c.
9339 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9340 * README: Mention supported Blackfin targets.
9341
39ab222a
MF
93422010-12-23 Mike Frysinger <vapier@gentoo.org>
9343
9344 * .gitignore: New file.
9345
a1f2ce7d
MF
93462010-11-16 Mike Frysinger <vapier@gentoo.org>
9347
9348 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9349
f474844c
JZ
93502010-10-22 Jie Zhang <jie@codesourcery.com>
9351
9352 * Makefile.in: Add FLAGS_TO_PASS variable.
9353 (install): Remove dependency of install-only and recursively
9354 invoke make for install-only.
9355
f1048712
DE
93562010-10-04 Doug Evans <dje@google.com>
9357
9358 * Makefile.in (uninstall): Use $(DESTDIR).
9359
b53a1623
PA
93602010-09-24 Pedro Alves <pedro@codesourcery.com>
9361
e6ee044d
PA
9362 PR gdb/11842
9363
b53a1623
PA
9364 * linux-x86-low.c (compat_siginfo_from_siginfo)
9365 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9366 si_code is < 0. Check for si_code == SI_TIMER before checking for
9367 si_code < 0.
9368
fa1bd1e4
JB
93692010-09-13 Joel Brobecker <brobecker@adacore.com>
9370
9371 * lynx-i386-low.c: New file.
9372 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9373
47fac8f8
JB
93742010-09-13 Joel Brobecker <brobecker@adacore.com>
9375
9376 * lynx-low.c (ptrace_request_to_str): Remove handling for
9377 request values that have been removed in LynxOS 5.x.
9378
1adfc54d
JB
93792010-09-13 Joel Brobecker <brobecker@adacore.com>
9380
9381 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9382 <ptrace.h>
9383
c2a66c29
NS
93842010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9385
9386 * configure.ac: Add --enable-inprocess-agent option.
9387 * configure: Rebuilt.
9388
32fcada3
YQ
93892010-09-06 Yao Qi <yao@codesourcery.com>
9390
9391 * linux-low.c (linux_kill): Remove unused variable.
9392 (linux_stabilize_threads): Likewise.
9393 * server.c (start_inferior): Likewise.
9394 (queue_stop_reply_callback): Likewise.
9395 * tracepoint.c (do_action_at_tracepoint): Likewise.
9396
0cccb683
YQ
93972010-09-06 Yao Qi <yao@codesourcery.com>
9398
9399 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9400 on return.
9401
423ec54c
JK
94022010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9403
9404 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9405
12ac6819
PA
94062010-09-06 Pedro Alves <pedro@codesourcery.com>
9407
9408 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9409 "$(IPA_DEPFILES)".
9410
8ed54b31
JB
94112010-09-01 Joel Brobecker <brobecker@adacore.com>
9412
9413 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9414 gdbserver/lynx-ppc-low.c: New files.
9415 * Makefile.in (lynx_low_h): New variable.
9416 (lynx-low.o, lynx-ppc-low.o): New rules.
9417 * configure.ac: On LynxOS, link with -lnetinet.
9418 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9419 * configure: regenerate.
9420
bb0116a4
JB
94212010-09-01 Joel Brobecker <brobecker@adacore.com>
9422
9423 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9424 * configure.ac: Add check for vasprintf and vsnprintf.
9425 * configure, config.in: Regenerate.
9426 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9427
a778ab81 94282010-09-01 Joel Brobecker <brobecker@adacore.com>
9429
9430 * gdbreplay.c: Move include of alloca.h up, next to include of
9431 malloc.h.
9432 * server.h: Add include of malloc.h.
9433 * mem-break.c: Remove include of malloc.h.
9434 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9435
8b034a19 94362010-09-01 Joel Brobecker <brobecker@adacore.com>
9437
9438 * Makefile.in (memmem.o): Build with -Wno-error.
9439
94402010-09-01 Joel Brobecker <brobecker@adacore.com>
9441
9442 * utils.c (xsnprintf): Make non-static.
9443 * server.h: Add xsnprintf declaration.
9444 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9445 replace calls to snprintf by calls to xsnprintf throughout.
9446
94472010-09-01 Joel Brobecker <brobecker@adacore.com>
9448
9449 * configure.ac: Add configure check for alloca.
9450 * configure, config.in: Regenerate.
9451 * server.h: Include alloca.h if it exists.
9452 * gdbreplay.c: Include alloca.h if it exists.
9453
1a981360
PA
94542010-08-28 Pedro Alves <pedro@codesourcery.com>
9455
9456 * linux-low.c (__SIGRTMIN): Define if not already defined.
9457 (linux_create_inferior): Check for __ANDROID__ rather than
9458 __SIGRTMIN.
9459 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9460 are already deferred.
9461 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9462 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9463 stopped and already has a pending signal to report.
9464 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9465 a pending signal to report or is moving out of a jump pad.
9466 (linux_init_signals): Check for __ANDROID__ rather than
9467 __SIGRTMIN.
9468
b4d51a55
PA
94692010-08-28 Pedro Alves <pedro@codesourcery.com>
9470
9471 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9472 debug_threads check. Avoid a linear search when not doing debug
9473 output.
9474
ec48365d
PA
94752010-08-27 Pedro Alves <pedro@codesourcery.com>
9476
9477 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9478 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9479 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9480 (process_event): Change local fd's type to gdb_fildes_t.
9481 (create_file_handler): Adjust prototype.
9482 (delete_file_handler): Adjust prototype.
9483 (handle_file_event): Adjust prototype. Use pfildes.
9484 (create_file_event): Adjsut prototype.
9485 * remote-utils.c (remote_desc, listen_desc): Change type to
9486 gdb_fildes_t.
9487 * server.h: New gdb_fildes_t typedef.
9488 [USE_WIN32API]: Include winsock2.h.
9489 (delete_file_handler, add_file_handler): Adjust prototypes.
9490 (pfildes): Declare.
9491 * utils.c (pfildes): New.
9492
854d88f0
PA
94932010-08-27 Pedro Alves <pedro@codesourcery.com>
9494
9495 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9496 * configure: Regenerate.
9497
0146f85b
PA
94982010-08-27 Pedro Alves <pedro@codesourcery.com>
9499
9500 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9501 (linux_done_accessing_memory): ... this.
9502 (linux_target_ops): Adjust.
9503 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9504 * nto-low.c (nto_target_ops): Adjust comment.
9505 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9506 * spu-low.c (spu_target_ops): Adjust comment.
9507 * target.h (target_ops): Rename unprepare_to_access_memory field
9508 to done_accessing_memory.
9509 (unprepare_to_access_memory): Rename to ...
9510 (done_accessing_memory): ... this.
9511
90d74c30
PA
95122010-08-26 Pedro Alves <pedro@codesourcery.com>
9513
9514 * linux-low.c (linux_prepare_to_access_memory): New.
9515 (linux_unprepare_to_access_memory): New.
9516 (linux_target_ops): Install them.
9517 * server.c (read_memory): Rename to ...
9518 (gdb_read_memory): ... this. Use
9519 prepare_to_access_memory/prepare_to_access_memory.
9520 (write_memory): Rename to ...
9521 (gdb_write_memory): ... this. Use
9522 prepare_to_access_memory/prepare_to_access_memory.
9523 (handle_search_memory_1): Adjust.
9524 (process_serial_event): Adjust.
9525 * target.h (struct target_ops): New fields
9526 prepare_to_access_memory and unprepare_to_access_memory.
9527 (prepare_to_access_memory, unprepare_to_access_memory): New.
9528 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9529 prepare_to_access_memory/prepare_to_access_memory.
9530 * nto-low.c (nto_target_ops): Adjust.
9531 * spu-low.c (spu_target_ops): Adjust.
9532 * win32-low.c (win32_target_ops): Adjust.
9533
fd467969
PA
95342010-08-26 Pedro Alves <pedro@codesourcery.com>
9535
9536 * Makefile.in (WARN_CFLAGS): Get it from configure.
9537 (WERROR_CFLAGS): New.
9538 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9539 * configure.ac: Introduce --enable-werror, which adds -Werror to
9540 the compiler command line. Enabled by default. Disable with
9541 --disable-werror. Add -Wdeclaration-after-statement
9542 Wpointer-arith and -Wformat-nonliteral to warning flags.
9543 * configure: Regenerate.
9544
331e2f5f
PA
95452010-08-26 Pedro Alves <pedro@codesourcery.com>
9546
9547 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9548
e581f2b4
PA
95492010-08-26 Pedro Alves <pedro@codesourcery.com>
9550
9551 * gdbreplay.c (remote_error): New.
9552 (gdbchar): New.
9553 (expect): Use gdbchar. Check for error reading from GDB.
9554 Clarify sync error output.
9555 (play): Check for errors writing to GDB.
9556 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9557 * remote-utils.c (getpkt): Check for errors writing to the remote
9558 descriptor.
9559
3c11dd79
PA
95602010-08-25 Pedro Alves <pedro@codesourcery.com>
9561
9562 * linux-low.c (linux_wait_1): Move non-debugging code out of
9563 `debug_threads' control.
9564
d20a8ad9
PA
95652010-08-25 Pedro Alves <pedro@codesourcery.com>
9566
9567 * linux-low.c (linux_wait_1): Don't set last_status here.
9568 * server.c (push_event, queue_stop_reply_callback): Assert we're
9569 not pushing a TARGET_WAITKIND_IGNORE event.
9570 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9571 (myresume, handle_target_event): Set the thread's last_resume_kind
9572 and last_status from the target returned status.
9573
964e4306
PA
95742010-08-25 Pedro Alves <pedro@codesourcery.com>
9575
9576 PR threads/10729
9577
9578 * linux-x86-low.c (update_debug_registers_callback): New.
9579 (i386_dr_low_set_addr): Use it.
9580 (i386_dr_low_get_addr): New.
9581 (i386_dr_low_set_control): Use update_debug_registers_callback.
9582 (i386_dr_low_get_control): New.
9583 (i386_dr_low_get_status): Adjust.
9584 * linux-low.c (linux_stop_lwp): New.
9585 * linux-low.h (linux_stop_lwp): Declare.
9586
9587 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9588 argument instead of a i386_debug_reg_state.
9589 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9590 a i386_debug_reg_state.
9591 (i386_insert_aligned_watchpoint): Adjust.
9592 (i386_remove_aligned_watchpoint): Adjust.
9593 (i386_low_stopped_data_address): Read the debug registers from the
9594 inferior instead of from the mirrors.
9595 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9596 (i386_dr_low_get_addr): Declare.
9597 (i386_dr_low_get_control): Declare.
9598 (i386_dr_low_get_status): Change prototype.
9599
9600 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9601 (i386_dr_low_get_addr): New.
9602 (i386_dr_low_get_control): New.
9603 (i386_dr_low_get_status): Adjust prototype. Return
9604 dr_status_mirror.
9605 (i386_initial_stuff): Clear dr_status_mirror and
9606 dr_control_mirror.
9607 (i386_get_thread_context): Adjust.
9608 (i386_set_thread_context): Adjust.
9609 (i386_thread_added): Adjust.
9610
5f21a75b
PA
96112010-08-24 Pedro Alves <pedro@codesourcery.com>
9612
9613 * linux-low.h (linux_thread_area): Delete declaration.
9614
3e4c1235
TS
96152010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9616
9617 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9618 after its termination.
9619
1971b033
PA
96202010-08-09 Pedro Alves <pedro@codesourcery.com>
9621
9622 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9623 (gdb_wants_all_stopped): Delete.
9624 (linux_wait_1): Don't call them.
9625 * server.c (handle_v_cont): Tag all threads as want-stopped.
9626 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9627 stopped as "client-wants-stopped".
9628
310444ac
PA
96292010-07-31 Pedro Alves <pedro@codesourcery.com>
9630
9631 * Makefile.in (signals_h): New.
9632 (server_h): Depend on it.
9633 (server.o): Don't depend on $(signals_def).
9634 (signals.o): Depend on $(signals_def).
9635
a19cae16
JK
96362010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9637
9638 * Makefile.in (signals_def): New.
9639 (server_h): Append include/gdb/signals.h and signals_def.
9640 (server.o): Append signals_def.
9641
30d50328
JK
96422010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9643
9644 * server.c (handle_target_event): Use target_signal_to_host for
9645 resume_info.sig initialization.
9646 * target.h (struct thread_resume) <sig>: New comment.
9647
5c3216e2
OS
96482010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9649
c6f46ca0
OS
9650 * server.c (handle_query): strcpy() the returned string from paddress()
9651 instead of sprintf().
5c3216e2
OS
9652 * utils.c (paddress): Return phex_nz().
9653
6bd31874
JB
96542010-07-07 Joel Brobecker <brobecker@adacore.com>
9655
9656 * server.c (handle_v_cont): Call mourn_inferior if process
9657 just exited.
9658 (myresume): Likewise.
9659
0fb4aa4b
PA
96602010-07-01 Pedro Alves <pedro@codesourcery.com>
9661
9662 Static tracepoints, and integration with UST.
9663
9664 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9665 * mem-break.c (uninsert_all_breakpoints)
9666 (reinsert_all_breakpoints): New.
9667 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9668 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9669 (gdb_agent_ust_loaded, helper_thread_id)
9670 (gdb_agent_helper_thread_id): New macros.
9671 (struct ipa_sym_addresses): Add addr_ust_loaded,
9672 addr_helper_thread_id, addr_cmd_buf.
9673 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9674 (in_process_agent_loaded_ust): New.
9675 (write_e_ust_not_loaded): New.
9676 (maybe_write_ipa_ust_not_loaded): New.
9677 (struct collect_static_trace_data_action): New.
9678 (enum tracepoint_type) <static_tracepoint>: New.
9679 (struct tracepoint) <handle>: Mention static tracepoints.
9680 (struct static_tracepoint_ctx): New.
9681 (CMD_BUF_SIZE): New.
9682 (add_tracepoint_action): Handle static tracepoint actions.
9683 (unprobe_marker_at): New.
9684 (clear_installed_tracepoints): Handle static tracepoints.
9685 (cmd_qtdp): Handle static tracepoints.
9686 (probe_marker_at): New.
9687 (cmd_qtstart): Handle static tracepoints.
9688 (response_tracepoint): Handle static tracepoints.
9689 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9690 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9691 (get_context_regcache): Handle static tracepoints.
9692 (do_action_at_tracepoint): Handle static tracepoint actions.
9693 (traceframe_find_block_type): Handle static trace data blocks.
9694 (traceframe_read_sdata): New.
9695 (download_tracepoints): Download static tracepoint actions.
9696 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9697 (GDB_PROBE_NAME): New.
9698 (ust_ops): New.
9699 (GET_UST_SYM): New.
9700 (USTF): New.
9701 (dlsym_ust): New.
9702 (ust_marker_to_static_tracepoint): New.
9703 (gdb_probe): New.
9704 (collect_ust_data_at_tracepoint): New.
9705 (gdb_ust_probe): New.
9706 (UNIX_PATH_MAX, SOCK_DIR): New.
9707 (gdb_ust_connect_sync_socket): New.
9708 (resume_thread, stop_thread): New.
9709 (run_inferior_command): New.
9710 (init_named_socket): New.
9711 (gdb_ust_socket_init): New.
9712 (cstr_to_hexstr): New.
9713 (next_st): New.
9714 (first_marker, next_marker): New.
9715 (response_ust_marker): New.
9716 (cmd_qtfstm, cmd_qtsstm): New.
9717 (unprobe_marker_at, probe_marker_at): New.
9718 (cmd_qtstmat, gdb_ust_thread): New.
9719 (gdb_ust_init): New.
9720 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9721 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9722 (ST_REGENTRY): New.
9723 (x86_64_st_collect_regmap): New.
9724 (X86_64_NUM_ST_COLLECT_GREGS): New.
9725 (AMD64_RIP_REGNUM): New.
9726 (supply_static_tracepoint_registers): New.
9727 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9728 (ST_REGENTRY): New.
9729 (i386_st_collect_regmap): New.
9730 (i386_NUM_ST_COLLECT_GREGS): New.
9731 (supply_static_tracepoint_registers): New.
9732 * server.c (handle_query): Handle qXfer:statictrace:read.
9733 <qSupported>: Report support for StaticTracepoints, and
9734 qXfer:statictrace:read features.
9735 * server.h (traceframe_read_sdata)
9736 (supply_static_tracepoint_registers): Declare.
9737 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9738 (unpack_varlen_hex): Include in IPA build.
9739 * Makefile.in (ustlibs, ustinc): New.
9740 (IPA_OBJS): Add remote-utils-ipa.o.
9741 ($(IPA_LIB)): Link -ldl and -lpthread.
9742 (UST_CFLAGS): New.
9743 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9744 * config.in, configure: Regenerate.
9745
9e4344e5
PA
97462010-06-20 Ian Lance Taylor <iant@google.com>
9747 Pedro Alves <pedro@codesourcery.com>
9748
9749 * linux-x86-low.c (always_true): Delete.
9750 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9751 trying to fool the compiler with always_true.
9752
c6beb2cb
PA
97532010-06-20 Pedro Alves <pedro@codesourcery.com>
9754
9755 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9756 conditions in gdbserver.
9757
d2ed6730
UW
97582010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9759
9760 * spu-low.c (spu_read_memory): Wrap around local store limit.
9761 (spu_write_memory): Likewise.
9762
4e29fb54
PA
97632010-06-15 Pedro Alves <pedro@codesourcery.com>
9764
9765 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9766 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9767 LONGEST uses.
9768 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9769 uses.
9770 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9771 uses with LONGEST uses.
9772
6a271cae
PA
97732010-06-14 Stan Shebs <stan@codesourcery.com>
9774 Pedro Alves <pedro@codesourcery.com>
9775
9776 Bytecode compiler.
9777
9778 * linux-x86-low.c: Include limits.h.
9779 (add_insns): New.
9780 (always_true): New.
9781 (EMIT_ASM): New.
9782 (EMIT_ASM32): New.
9783 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9784 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9785 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9786 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9787 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9788 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9789 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9790 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9791 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9792 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9793 (amd64_emit_void_call_2): New.
9794 (amd64_emit_ops): New.
9795 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9796 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9797 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9798 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9799 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9800 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9801 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9802 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9803 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9804 (i386_emit_stack_adjust, i386_emit_int_call_1)
9805 (i386_emit_void_call_2): New.
9806 (i386_emit_ops): New.
9807 (x86_emit_ops): New.
9808 (the_low_target): Install x86_emit_ops.
9809 * server.h (struct emit_ops): New.
9810 (get_raw_reg_func_addr): Declare.
9811 (current_insn_ptr, emit_error): Declare.
9812 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9813 (set_trace_state_variable_value): New defines.
9814 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9815 addr_get_trace_state_variable_value and
9816 addr_set_trace_state_variable_value.
9817 (symbol_list): New fields for get_raw_reg,
9818 get_trace_state_variable_value and set_trace_state_variable_value.
9819 (condfn): New typedef.
9820 (struct tracepoint): New field `compiled_cond'.
9821 (do_action_at_tracepoint): Clear compiled_cond.
9822 (get_trace_state_variable_value, set_trace_state_variable_value):
9823 Export in the IPA.
9824 (condition_true_at_tracepoint): If there's a compiled condition,
9825 run that.
9826 (current_insn_ptr, emit_error): New globals.
9827 (struct bytecode_address): New.
9828 (get_raw_reg_func_addr): New.
9829 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9830 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9831 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9832 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9833 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9834 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9835 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9836 (compile_tracepoint_condition, compile_bytecodes): New.
9837 * target.h (emit_ops): Forward declare.
9838 (struct target_ops): New field emit_ops.
9839 (target_emit_ops): New.
9840 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9841 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9842 * linux-low.c (linux_emit_ops): New.
9843 (linux_target_ops): Install it.
9844 * linux-low.h (struct linux_target_ops): New field emit_ops.
9845
92b72907
UW
98462010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9847
9848 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9849 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9850
fa593d66
PA
98512010-06-01 Pedro Alves <pedro@codesourcery.com>
9852 Stan Shebs <stan@codesourcery.com>
9853
9854 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9855 (all): Depend on $(extra_libraries).
9856 (install-only): Install the IPA.
9857 (IPA_OBJS, IPA_LIB): New.
9858 (clean): Remove the IPA lib.
9859 (IPAGENT_CFLAGS): New.
9860 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9861 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9862 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9863 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9864 * configure.ac: Check for atomic builtins support in the compiler.
9865 (IPA_DEPFILES, extra_libraries): Define.
9866 * configure.srv (ipa_obj): Add description.
9867 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9868 (i[34567]86-*-linux*): Set ipa_obj.
9869 (x86_64-*-linux*): Set ipa_obj.
9870 * linux-low.c (stabilizing_threads): New.
9871 (supports_fast_tracepoints): New.
9872 (linux_detach): Stabilize threads before detaching.
9873 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9874 the lwp is either not stabilizing, or is moving out of a jump pad.
9875 (linux_fast_tracepoint_collecting): New.
9876 (maybe_move_out_of_jump_pad): New.
9877 (enqueue_one_deferred_signal): New.
9878 (dequeue_one_deferred_signal): New.
9879 (linux_wait_for_event_1): If moving out of a jump pad, defer
9880 pending signals to later.
9881 (linux_stabilize_threads): New.
9882 (linux_wait_1): Check if threads need moving out of jump pads, and
9883 do it if so.
9884 (stuck_in_jump_pad_callback): New.
9885 (move_out_of_jump_pad_callback): New.
9886 (lwp_running): New.
9887 (linux_resume_one_lwp): Handle moving out of jump pads.
9888 (linux_set_resume_request): Dequeue deferred signals.
9889 (need_step_over_p): Also step over fast tracepoint jumps.
9890 (start_step_over): Also uninsert fast tracepoint jumps.
9891 (finish_step_over): Also reinsert fast tracepoint jumps.
9892 (linux_install_fast_tracepoint_jump): New.
9893 (linux_target_ops): Install linux_stabilize_threads and
9894 linux_install_fast_tracepoint_jump_pad.
9895 * linux-low.h (linux_target_ops) <get_thread_area,
9896 install_fast_tracepoint_jump_pad>: New fields.
9897 (struct lwp_info) <collecting_fast_tracepoint,
9898 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9899 (linux_get_thread_area): Declare.
9900 * linux-x86-low.c (jump_insn): New.
9901 (x86_get_thread_area): New.
9902 (append_insns): New.
9903 (push_opcode): New.
9904 (amd64_install_fast_tracepoint_jump_pad): New.
9905 (i386_install_fast_tracepoint_jump_pad): New.
9906 (x86_install_fast_tracepoint_jump_pad): New.
9907 (the_low_target): Install x86_get_thread_area and
9908 x86_install_fast_tracepoint_jump_pad.
9909 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9910 (struct fast_tracepoint_jump): New.
9911 (fast_tracepoint_jump_insn): New.
9912 (fast_tracepoint_jump_shadow): New.
9913 (find_fast_tracepoint_jump_at): New.
9914 (fast_tracepoint_jump_here): New.
9915 (delete_fast_tracepoint_jump): New.
9916 (set_fast_tracepoint_jump): New.
9917 (uninsert_fast_tracepoint_jumps_at): New.
9918 (reinsert_fast_tracepoint_jumps_at): New.
9919 (set_breakpoint_at): Use write_inferior_memory.
9920 (uninsert_raw_breakpoint): Use write_inferior_memory.
9921 (check_mem_read): Mask out fast tracepoint jumps.
9922 (check_mem_write): Mask out fast tracepoint jumps.
9923 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9924 (set_fast_tracepoint_jump): Declare.
9925 (delete_fast_tracepoint_jump)
9926 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9927 (reinsert_fast_tracepoint_jumps_at): Declare.
9928 * regcache.c: Don't compile many functions when building the
9929 in-process agent library.
9930 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9931 the register buffer in the heap.
9932 (free_register_cache): If the register buffer isn't owned by the
9933 regcache, don't free it.
9934 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9935 pre-existing register caches.
9936 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9937 type.
9938 (convert_ascii_to_int): : Constify `from' parameter type.
9939 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9940 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9941 the needed buffer in-place.
9942 (relocate_instruction): New.
9943 * server.c (handle_query) <qSymbols>: If the target supports
9944 tracepoints, give it a chance of looking up symbols. Report
9945 support for fast tracepoints.
9946 (handle_status): Stabilize threads.
9947 (process_serial_event): Adjust.
9948 * server.h (struct fast_tracepoint_jump): Forward declare.
9949 (struct process_info) <fast_tracepoint_jumps>: New field.
9950 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9951 (decode_X_packet, decode_M_packet): Adjust.
9952 (relocate_instruction): Declare.
9953 (in_process_agent_loaded): Declare.
9954 (tracepoint_look_up_symbols): Declare.
9955 (struct fast_tpoint_collect_status): Declare.
9956 (fast_tracepoint_collecting): Declare.
9957 (force_unlock_trace_buffer): Declare.
9958 (handle_tracepoint_bkpts): Declare.
9959 (initialize_low_tracepoint)
9960 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9961 * target.h (struct target_ops) <stabilize_threads,
9962 install_fast_tracepoint_jump_pad>: New fields.
9963 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9964 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9965 [HAVE_STDINT_H]: Include stdint.h.
9966 (trace_debug_1): Rename to ...
9967 (trace_vdebug): ... this.
9968 (trace_debug): Rename to ...
9969 (trace_debug_1): ... this. Add `level' parameter.
9970 (trace_debug): New.
9971 (ATTR_USED, ATTR_NOINLINE): New.
9972 (IP_AGENT_EXPORT): New.
9973 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9974 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9975 (about_to_request_buffer_space, trace_buffer_is_full)
9976 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9977 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9978 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9979 (traceframe_write_count, traceframes_created)
9980 (trace_state_variables)
9981 New renaming defines.
9982 (struct ipa_sym_addresses): New.
9983 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9984 (symbol_list): New.
9985 (ipa_sym_addrs): New.
9986 (all_tracepoint_symbols_looked_up): New.
9987 (in_process_agent_loaded): New.
9988 (write_e_ipa_not_loaded): New.
9989 (maybe_write_ipa_not_loaded): New.
9990 (tracepoint_look_up_symbols): New.
9991 (debug_threads) [IN_PROCESS_AGENT]: New.
9992 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9993 (UNKNOWN_SIDE_EFFECTS): New.
9994 (stop_tracing): New.
9995 (flush_trace_buffer): New.
9996 (stop_tracing_bkpt): New.
9997 (flush_trace_buffer_bkpt): New.
9998 (read_inferior_integer): New.
9999 (read_inferior_uinteger): New.
10000 (read_inferior_data_pointer): New.
10001 (write_inferior_data_pointer): New.
10002 (write_inferior_integer): New.
10003 (write_inferior_uinteger): New.
10004 (struct collect_static_trace_data_action): Delete.
10005 (enum tracepoint_type): New.
10006 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10007 <actions_str, step_actions, step_actions_str>: Only include in
10008 GDBserver.
fa593d66
PA
10009 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10010 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10011 (tracepoints): Use IP_AGENT_EXPORT.
10012 (last_tracepoint): Don't include in the IPA.
10013 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10014 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10015 (alloced_trace_state_variables): New.
10016 (trace_state_variables): Use IP_AGENT_EXPORT.
10017 (traceframe_t): Delete unused variable.
10018 (circular_trace_buffer): Don't include in the IPA.
10019 (trace_buffer_start): Delete.
10020 (struct trace_buffer_control): New.
10021 (trace_buffer_free): Delete.
10022 (struct ipa_trace_buffer_control): New.
10023 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10024 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10025 New.
10026 (trace_buffer_ctrl): New.
10027 (TRACE_BUFFER_CTRL_CURR): New.
10028 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10029 Reimplement as macros.
10030 (trace_buffer_wrap): Delete.
10031 (traceframe_write_count, traceframe_read_count)
10032 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10033 (struct tracepoint_hit_ctx) <type>: New field.
10034 (struct fast_tracepoint_ctx): New.
10035 (memory_barrier): New.
10036 (cmpxchg): New.
10037 (record_tracepoint_error): Update atomically in the IPA.
10038 (clear_inferior_trace_buffer): New.
10039 (about_to_request_buffer_space): New.
10040 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10041 updating the same buffer.
10042 (add_tracepoint): Default the tracepoint's type to trap
10043 tracepoint, and orig_size to -1.
10044 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10045 internal variables.
10046 (create_trace_state_variable): New parameter `gdb'. Handle it.
10047 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10048 (cmd_qtdp): Handle fast tracepoints.
10049 (cmd_qtdv): Adjust.
10050 (max_jump_pad_size): New.
10051 (gdb_jump_pad_head): New.
10052 (get_jump_space_head): New.
10053 (claim_jump_space): New.
10054 (sort_tracepoints): New.
10055 (MAX_JUMP_SIZE): New.
10056 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10057 IPA.
10058 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10059 support. Upload fast traceframes, and delete internal IPA
10060 breakpoints.
10061 (stop_tracing_handler): New.
10062 (flush_trace_buffer_handler): New.
10063 (cmd_qtstop): Upload fast tracepoints.
10064 (response_tracepoint): Handle fast tracepoints.
10065 (tracepoint_finished_step): Upload fast traceframes. Set the
10066 tracepoint hit context's tracepoint type.
10067 (handle_tracepoint_bkpts): New.
10068 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10069 type. Add comment about fast tracepoints.
10070 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10071 non-existing action_str field.
10072 (get_context_regcache): Handle fast tracepoints.
10073 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10074 to the regcache.
10075 (fast_tracepoint_from_jump_pad_address): New.
10076 (fast_tracepoint_from_ipa_tpoint_address): New.
10077 (collecting_t): New.
10078 (force_unlock_trace_buffer): New.
10079 (fast_tracepoint_collecting): New.
10080 (collecting): New.
10081 (gdb_collect): New.
10082 (write_inferior_data_ptr): New.
10083 (target_tp_heap): New.
10084 (target_malloc): New.
10085 (download_agent_expr): New.
10086 (UALIGN): New.
10087 (download_tracepoints): New.
10088 (download_trace_state_variables): New.
10089 (upload_fast_traceframes): New.
10090 (IPA_FIRST_TRACEFRAME): New.
10091 (IPA_NEXT_TRACEFRAME_1): New.
10092 (IPA_NEXT_TRACEFRAME): New.
10093 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10094 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10095 (gdb_jump_pad_buffer_end): New.
10096 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10097 (initialize_tracepoint): Adjust.
10098 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10099 buffer. Initialize the low module.
10100 * utils.c (PREFIX, TOOLNAME): New.
10101 (malloc_failure): Use PREFIX.
10102 (error): In the IPA, an error causes an exit.
10103 (fatal, warning): Use PREFIX.
10104 (internal_error): Use TOOLNAME.
10105 (NUMCELLS): Increase to 10.
10106 * configure, config.in: Regenerate.
10107
d149dd1d
PA
101082010-06-01 Pedro Alves <pedro@codesourcery.com>
10109
10110 * server.c (handle_query) <qSupported>: Do two passes over the
10111 qSupported string to avoid nesting strtok.
10112
f6528abd
JK
101132010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10114
10115 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10116 (CDEPS): New.
10117 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10118 -Wl,--dynamic-list.
10119 * configure: Regenerate.
10120 * proc-service.list: New.
10121
ca2a87a0
JK
101222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10123
10124 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10125 New comment.
10126
363a6e9f
OS
101272010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10128
10129 * gdbreplay.c (remote_open): Check error return from socket() call by
10130 its equality to -1 not by it being negative.
10131 * remote-utils.c (remote_open): Likewise.
10132
d23b6cb1
PA
101332010-05-23 Pedro Alves <pedro@codesourcery.com>
10134
10135 * config.h: Regenerate.
10136
28d3cf85
MK
101372010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10138
10139 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10140 doesn't provide PTRACE_GET_THREAD_AREA.
10141
fea36a59
MK
101422010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10143
10144 * linux-m68k-low.c: Include <asm/ptrace.h>
10145 (ps_get_thread_area): Implement.
10146
24b066ba
DE
101472010-05-03 Doug Evans <dje@google.com>
10148
10149 * event-loop.c (struct callback_event): New struct.
10150 (callback_list): New global.
10151 (append_callback_event, delete_callback_event): New functions.
10152 (process_callback): New function.
10153 (start_event_loop): Call it.
10154 * remote-utils.c (NOT_SCHEDULED): Define.
10155 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10156 moved out of readchar.
10157 (readchar): Rewrite. Call reschedule before returning.
10158 (reset_readchar): New function.
10159 (remote_close): Call it.
10160 (process_remaining, reschedule): New functions.
10161 * server.h (callback_handler_func): New typedef.
10162 (append_callback_event, delete_callback_event): Declare.
10163
9836d6ea
PA
101642010-05-03 Pedro Alves <pedro@codesourcery.com>
10165
10166 * proc-service.c (ps_pglobal_lookup): Use
10167 thread_db_look_up_one_symbol.
10168 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10169 parameter. Use it instead of all_symbols_looked_up.
10170 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10171 field.
10172 (all_symbols_looked_up): Don't declare.
10173 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10174 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10175 field.
10176 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10177 Set all_symbols_looked_up here.
10178 (thread_db_look_up_one_symbol): New.
10179 (thread_db_get_tls_address): Adjust.
10180 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10181 thread_db object on the heap, and tentatively set it in the
10182 process structure.
10183 (thread_db_init): Don't set all_symbols_looked_up here.
10184 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10185
7984d532
PA
101862010-05-03 Pedro Alves <pedro@codesourcery.com>
10187
10188 * linux-low.c (linux_kill, linux_detach): Adjust.
10189 (status_pending_p_callback): Remove redundant statement. Check
10190 for !TARGET_WAITIKIND_IGNORE, instead of
10191 TARGET_WAITKIND_STOPPED.
10192 (handle_tracepoints): Make sure LWP is locked. Adjust.
10193 (linux_wait_for_event_1): Adjust.
10194 (linux_cancel_breakpoints): New.
10195 (unsuspend_one_lwp): New.
10196 (unsuspend_all_lwps): New.
10197 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10198 (send_sigstop_callback): Change return type to int, add new
10199 `except' parameter and handle it.
10200 (suspend_and_send_sigstop_callback): New.
10201 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10202 pass them down. If SUSPEND, also increment the lwp's suspend
10203 count.
10204 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10205 (need_step_over_p): Don't consider suspended LWPs.
10206 (start_step_over): Adjust.
10207 (proceed_one_lwp): Change return type to int, add new `except'
10208 parameter and handle it.
10209 (unsuspend_and_proceed_one_lwp): New.
10210 (proceed_all_lwps): Use find_inferior instead of
10211 for_each_inferior.
10212 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10213 also decrement the suspend count of LWPs. Pass `except' down,
10214 instead of hacking its suspend count.
10215 (linux_pause_all): Add `freeze' parameter. Adjust.
10216 (linux_unpause_all): New.
10217 (linux_target_ops): Install linux_unpause_all.
10218 * server.c (handle_status): Adjust.
10219 * target.h (struct target_ops): New fields `unpause_all' and
10220 `cancel_breakpoints'. Add new parameter to `pause_all'.
10221 (pause_all): Add new `freeze' parameter.
10222 (unpause_all): New.
10223 (cancel_breakpoints): New.
10224 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10225 cancel breakpoints.
10226 (cmd_qtstart): Pause threads.
10227 (stop_tracing): Pause threads, and cancel breakpoints.
10228 * win32-low.c (win32_target_ops): Adjust.
10229
e471f25b
PA
102302010-05-03 Pedro Alves <pedro@codesourcery.com>
10231
10232 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10233 the inferior right away from here...
10234 (linux_wait_1): ... to here, and adjust to check the thread's
10235 last_resume_kind instead of the lwp's step or stop_expected flags.
10236
1915ef4f
PA
102372010-05-02 Pedro Alves <pedro@codesourcery.com>
10238
10239 * README: Use consistent `GDB' and `GDBserver' spellings.
10240
f9e39928
PA
102412010-05-02 Pedro Alves <pedro@codesourcery.com>
10242
10243 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10244 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10245 (linux_detach_one_lwp): Assume the lwp is stopped.
10246 (any_thread_of): Delete.
10247 (linux_detach): Stop all lwps here. Don't blindly delete all
10248 breakpoints.
10249 (delete_lwp_callback): New.
10250 (linux_mourn): Delete all lwps of the process that is gone.
10251 (linux_wait_1): Don't delete the last lwp of the process here.
10252 * mem-break.h (mark_breakpoints_out): Declare.
10253 * mem-break.c (mark_breakpoints_out): New.
10254 (free_all_breakpoints): Use it.
10255 * server.c (handle_target_event): If the process is gone, mark
10256 breakpoints out.
10257 * thread-db.c (struct thread_db) <create_bp>: New field.
10258 (thread_db_enable_reporting): Fix prototype. Store a thread event
10259 breakpoint reference in the thread_db struct.
10260 (thread_db_load_search): Clear the thread_db object.
10261 (try_thread_db_load_1): Ditto.
10262 (switch_to_process): New.
10263 (disable_thread_event_reporting): Use it.
10264 (remove_thread_event_breakpoints): New.
10265 (thread_db_detach, thread_db_mourn): Use it.
10266
1e7fc18c
PA
102672010-05-01 Pedro Alves <pedro@codesourcery.com>
10268
10269 * linux-low.c (linux_enable_event_reporting): New.
10270 (linux_wait_for_event_1, handle_extended_wait): Use it.
10271
02fc4de7
PA
102722010-04-30 Pedro Alves <pedro@codesourcery.com>
10273
10274 * linux-low.c (linux_kill_one_lwp, linux_kill)
10275 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10276 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10277 SIGSTOP even if the LWP is stopped.
10278 (send_sigstop_callback): New.
10279 (stop_all_lwps): Use send_sigstop_callback instead.
10280 (linux_resume_one_thread): Adjust.
10281 (proceed_one_lwp): Still proceed an LWP that the client has
10282 requested to stop, if we haven't reported it as stopped yet. Make
10283 sure that LWPs the client want stopped, have a pending SIGSTOP.
10284
bc3b5632
DE
102852010-04-26 Doug Evans <dje@google.com>
10286
ae1ada35
DE
10287 * server.c (handle_general_set): Make static.
10288
bc3b5632
DE
10289 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10290 Print received char after testing for error/eof instead of before.
10291 (input_interrupt): Tweak comment.
10292
65730243
DE
102932010-04-23 Doug Evans <dje@google.com>
10294
10295 * server.c (start_inferior): Print inferior argv if --debug.
10296
a8ae7dc0
AR
102972010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10298
10299 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10300 * nto-x86-low.c: Include server.h
10301
1c07cc19
PM
103022010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10303
10304 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10305 be consistent with other sources of this directory.
10306 (init_registers_amd64): Correct name of source file of this function
10307 in the comment.
10308
e0a61e09
PM
103092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10310
10311 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10312 64-bit executables.
10313
54709339
PM
103142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10315
10316 * win32-i386-low.c: Add 64-bit support.
10317 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10318 (init_registers_amd64): Declare.
10319 (mappings): Add 64-bit version of array.
10320 (init_windows_x86): New function.
10321 (the_low_target): Change init_arch field to init_windows_x86.
10322
e8f0053d
PM
103232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10324
10325 * win32-low.c: Adapt to support also 64-bit architecture.
10326 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10327 (get_image_name): Use SIZE_T type for local variable `done'.
10328 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10329 (toolhelp_get_dll_name): Idem.
10330 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10331 Use uintptr_t typecast to avoid warning.
10332 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10333 (handle_exception): Use phex_nz to avoid warning.
10334 (win32_wait): Remove unused local variable `process'.
10335
c481e77e
PM
103362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10337
10338 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10339 `amd64-avx.o'.
10340
12ea4b69
PM
103412010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10342
10343 * configure.ac: Use `ws2_32' library for srv_mingw.
10344 * configure: Regenerate.
10345 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10346 * remote-utils.c: Likewise.
10347
f6d1620c
L
103482010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10349
10350 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10351 if __x86_64__ is defined.
10352
8e642873
PM
103532010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10354
10355 * configure: Regenerate.
10356
711e434b
PM
103572010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10358
10359 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10360 * target.h (target_ops): New get_tib_address field.
10361 * win32-low.h (win32_thread_info): Add thread_local_base field.
10362 * win32-low.c (child_add_thread): Add tlb argument.
10363 Set thread_local_base field to TLB.
10364 (get_child_debug_event): Adapt to child_add_thread change.
10365 (win32_get_tib_address): New function.
10366 (win32_target_ops): Set get_tib_address field to
10367 win32_get_tib_address.
10368 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10369
505106cd
PA
103702010-04-12 Pedro Alves <pedro@codesourcery.com>
10371
505106cd
PA
10372 * linux-low.c (linux_mourn): Also remove the process.
10373 * server.c (handle_target_event): Don't remove the process here.
10374 * nto-low.c (nto_mourn): New.
10375 (nto_target_ops): Install it.
10376 * spu-low.c (spu_mourn): New.
10377 (spu_target_ops): Install it.
10378 * win32-low.c (win32_mourn): New.
10379 (win32_target_ops): Install it.
10380
e8470a06
PA
103812010-04-12 Pedro Alves <pedro@codesourcery.com>
10382
10383 * server.h (buffer_xml_printf): Remove redundant `;'.
10384
45ba0d02
PA
103852010-04-12 Pedro Alves <pedro@codesourcery.com>
10386
10387 * regcache.c (set_register_cache): Invalidate regcaches before
10388 changing the register cache layout.
10389 (regcache_invalidate_one): Allow a NULL regcache.
10390 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10391 regcaches before changing the register cache layout or the target
10392 regsets.
10393
59e04013
L
103942010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10395
10396 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10397 variable warning on Linux/x86-64.
10398
8336d594
PA
103992010-04-11 Pedro Alves <pedro@codesourcery.com>
10400
10401 GDBserver disconnected tracing support.
10402
10403 * linux-low.c (linux_remove_process): Delete.
10404 (add_lwp): Don't set last_resume_kind here.
10405 (linux_kill): Use `mourn'.
10406 (linux_detach): Use `thread_db_detach', and `mourn'.
10407 (linux_mourn): New.
10408 (linux_attach_lwp_1): Adjust comment.
10409 (linux_attach): last_resume_kind moved the thread_info; adjust.
10410 (status_pending_p_callback): Adjust.
10411 (linux_wait_for_event_1): Adjust.
10412 (count_events_callback, select_singlestep_lwp_callback)
10413 (select_event_lwp_callback, cancel_breakpoints_callback)
10414 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10415 (proceed_one_lwp): Adjust.
10416 (linux_async): Add debug output.
10417 (linux_thread_stopped): New.
10418 (linux_pause_all): New.
10419 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10420 linux_pause_all.
10421 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10422 (thread_db_free): Delete declaration.
10423 (thread_db_detach, thread_db_mourn): Declare.
10424 * thread-db.c (thread_db_init): Use thread_db_mourn.
10425 (thread_db_free): Delete, split in two.
10426 (disable_thread_event_reporting): New.
10427 (thread_db_detach): New.
10428 (thread_db_mourn): New.
10429
10430 * server.h (struct thread_info) <last_resume_kind>: New field.
10431 <attached>: Add comment.
10432 <gdb_detached>: New field.
10433 (handler_func): Change return type to int.
10434 (handle_serial_event, handle_target_event): Ditto.
10435 (gdb_connected): Declare.
10436 (tracing): Delete.
10437 (disconnected_tracing): Declare.
10438 (stop_tracing): Declare.
10439
10440 * server.c (handle_query) <qSupported>: Report support for
10441 disconnected tracing.
10442 (queue_stop_reply_callback): Account for running threads.
10443 (gdb_wants_thread_stopped): New.
10444 (gdb_wants_all_threads_stopped): New.
10445 (gdb_reattached_process): New.
10446 (handle_status): Clear the `gdb_detached' flag of all processes.
10447 In all-stop, stop all threads.
10448 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10449 (process_serial_event): If the remote connection breaks, or if an
10450 exit was forced with "monitor exit", force an event loop exit.
10451 Handle disconnected tracing on detach.
10452 (handle_serial_event): Adjust.
10453 (handle_target_event): If GDB isn't connected, forward events back
10454 to the inferior, unless the last process exited, in which case,
10455 exit gdbserver. Adjust interface.
10456
10457 * remote-utils.c (remote_open): Don't block in accept. Instead
10458 register an event loop source on the listen socket file
10459 descriptor. Refactor bits into ...
10460 (listen_desc): ... this new global.
10461 (gdb_connected): ... this new function.
10462 (enable_async_notification): ... this new function.
10463 (handle_accept_event): ... this new function.
10464 (remote_close): Clear remote_desc.
10465
10466 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10467
10468 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10469 New fields.
10470 (mourn_inferior): Define.
10471 (target_process_qsupported): Avoid the dangling else problem.
10472 (thread_stopped): Define.
10473 (pause_all): Define.
10474 (target_waitstatus_to_string): Declare.
10475 * target.c (target_waitstatus_to_string): New.
10476
10477 * tracepoint.c (tracing): Make extern.
10478 (disconnected_tracing): New.
10479 (stop_tracing): Make extern. Handle tracing stops due to GDB
10480 disconnecting.
10481 (cmd_qtdisconnected): New.
10482 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10483 (handle_tracepoint_general_set): Handle QTDisconnected.
10484
10485 * event-loop.c (event_handler_func): Change return type to int.
10486 (process_event): Bail out if the event handler wants the event
10487 loop to stop.
10488 (handle_file_event): Ditto.
10489 (start_event_loop): Bail out if the event handler wants the event
10490 loop to stop.
10491
10492 * nto-low.c (nto_target_ops): Adjust.
10493 * spu-low.c (spu_wait): Don't remove the process here.
10494 (spu_target_ops): Adjust.
10495 * win32-low.c (win32_wait): Don't remove the process here.
10496 (win32_target_ops): Adjust.
10497
5d267c4c
PA
104982010-04-11 Pedro Alves <pedro@codesourcery.com>
10499
10500 * regcache.c (realloc_register_cache): Invalidate inferior's
10501 regcache before recreating it.
10502
623ccd72
PA
105032010-04-09 Pedro Alves <pedro@codesourcery.com>
10504
10505 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10506
219f2f23
PA
105072010-04-09 Stan Shebs <stan@codesourcery.com>
10508 Pedro Alves <pedro@codesourcery.com>
10509
10510 * server.h (LONGEST): New.
10511 (struct thread_info) <while_stepping>: New field.
10512 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10513 Declare.
10514 (initialize_tracepoint, handle_tracepoint_general_set)
10515 (handle_tracepoint_query, tracepoint_finished_step)
10516 (tracepoint_was_hit, release_while_stepping_state_list):
10517 (current_traceframe): Declare.
10518 * server.c (handle_general_set): Handle tracepoint packets.
10519 (read_memory): New.
10520 (write_memory): New.
10521 (handle_search_memory_1): Use read_memory.
10522 (handle_query): Report support for conditional tracepoints, trace
10523 state variables, and tracepoint sources. Handle tracepoint
10524 queries.
10525 (main): Initialize the tracepoints module.
10526 (process_serial_event): Handle traceframe reads/writes.
10527
10528 * linux-low.c (handle_tracepoints): New.
10529 (linux_wait_1): Call it.
10530 (linux_resume_one_lwp): Handle while-stepping.
10531 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10532 (linux_target_ops): Install them.
10533 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10534 New field.
10535 * linux-x86-low.c (x86_supports_tracepoints): New.
10536 (the_low_target). Install it.
10537
10538 * mem-break.h (delete_breakpoint): Declare.
10539 * mem-break.c (delete_breakpoint): Make external.
10540
10541 * target.h (struct target_ops): Add `supports_tracepoints',
10542 `read_pc', and `write_pc' fields.
10543 (target_supports_tracepoints): Define.
10544 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10545 (phex_nz): New.
10546
10547 * regcache.h (struct regcache) <registers_owned>: New field.
10548 (init_register_cache, regcache_cpy): Declare.
10549 (regcache_read_pc, regcache_write_pc): Declare.
10550 (register_cache_size): Declare.
10551 (supply_regblock): Declare.
10552 * regcache.c (init_register_cache): New.
10553 (new_register_cache): Use it.
10554 (regcache_cpy): New.
10555 (register_cache_size): New.
10556 (supply_regblock): New.
10557 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10558
219f2f23
PA
10559 * tracepoint.c: New.
10560
10561 * Makefile.in (OBS): Add tracepoint.o.
10562 (tracepoint.o): New rule.
10563
3a13a53b
L
105642010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10565
10566 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10567 (i386-mmx.o): New.
10568 (i386-mmx.c): Likewise.
10569 (i386-mmx-linux.o): Likewise.
10570 (i386-mmx-linux.c): Likewise.
10571
10572 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10573 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10574 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10575 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10576
10577 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10578 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10579 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10580
1570b33e
L
105812010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10582
10583 * Makefile.in (clean): Updated.
10584 (i386-avx.o): New.
10585 (i386-avx.c): Likewise.
10586 (i386-avx-linux.o): Likewise.
10587 (i386-avx-linux.c): Likewise.
10588 (amd64-avx.o): Likewise.
10589 (amd64-avx.c): Likewise.
10590 (amd64-avx-linux.o): Likewise.
10591 (amd64-avx-linux.c): Likewise.
10592
10593 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10594 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10595 (srv_amd64_regobj): Add amd64-avx.o.
10596 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10597 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10598 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10599 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10600 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10601 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10602 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10603
10604 * i387-fp.c: Include "i386-xstate.h".
10605 (i387_xsave): New.
10606 (i387_cache_to_xsave): Likewise.
10607 (i387_xsave_to_cache): Likewise.
10608 (x86_xcr0): Likewise.
10609
10610 * i387-fp.h (i387_cache_to_xsave): Likewise.
10611 (i387_xsave_to_cache): Likewise.
10612 (x86_xcr0): Likewise.
10613
10614 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10615 * linux-crisv32-low.c (target_regsets): Likewise.
10616 * linux-m68k-low.c (target_regsets): Likewise.
10617 * linux-mips-low.c (target_regsets): Likewise.
10618 * linux-ppc-low.c (target_regsets): Likewise.
10619 * linux-s390-low.c (target_regsets): Likewise.
10620 * linux-sh-low.c (target_regsets): Likewise.
10621 * linux-sparc-low.c (target_regsets): Likewise.
10622 * linux-xtensa-low.c (target_regsets): Likewise.
10623
10624 * linux-low.c: Include <sys/uio.h>.
10625 (regsets_fetch_inferior_registers): Support nt_type.
10626 (regsets_store_inferior_registers): Likewise.
10627 (linux_process_qsupported): New.
10628 (linux_target_ops): Add linux_process_qsupported.
10629
10630 * linux-low.h (regset_info): Add nt_type.
10631 (linux_target_ops): Add process_qsupported.
10632
10633 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10634 and <sys/uio.h>.
10635 (init_registers_i386_avx_linux): New.
10636 (init_registers_amd64_avx_linux): Likewise.
10637 (xmltarget_i386_linux_no_xml): Likewise.
10638 (xmltarget_amd64_linux_no_xml): Likewise.
10639 (PTRACE_GETREGSET): Likewise.
10640 (PTRACE_SETREGSET): Likewise.
10641 (x86_fill_xstateregset): Likewise.
10642 (x86_store_xstateregset): Likewise.
10643 (use_xml): Likewise.
10644 (x86_linux_update_xmltarget): Likewise.
10645 (x86_linux_process_qsupported): Likewise.
10646 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10647 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10648 init_registers_i386_linux here. Call
10649 x86_linux_update_xmltarget.
10650 (the_low_target): Add x86_linux_process_qsupported.
10651
10652 * server.c (handle_query): Call target_process_qsupported.
10653
10654 * target.h (target_ops): Add process_qsupported.
10655 (target_process_qsupported): New.
10656
fc7238bb
PA
106572010-04-03 Pedro Alves <pedro@codesourcery.com>
10658
10659 * inferiors.c (add_thread): Set last_status kind to
10660 TARGET_WAITKIND_IGNORE.
10661 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10662 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10663 (linux_wait_1): Move `thread' local definition to block that uses
10664 it. Don't NULL initialize `event_child'.
10665 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10666 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10667 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10668
bdabb078
PA
106692010-04-01 Pedro Alves <pedro@codesourcery.com>
10670
10671 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10672 an extended waitstatus, or by a watchpoint.
10673 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10674 thread was stepping or has been stopped by a watchpoint.
10675
d3bbe7a0
PA
106762010-04-01 Pedro Alves <pedro@codesourcery.com>
10677
10678 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10679 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10680 of another, then delete the previous, and validate all
10681 breakpoints.
10682 (validate_inserted_breakpoint): New.
10683 (delete_disabled_breakpoints): New.
10684 (validate_breakpoints): New.
10685 (check_mem_read): Validate breakpoints before trusting their
10686 shadow. Delete disabled breakpoints.
10687 (check_mem_write): Validate breakpoints before trusting they
10688 should be inserted. Delete disabled breakpoints.
10689 * mem-break.h (validate_breakpoints):
10690 * server.c (handle_query): Validate breakpoints when we see a
10691 qSymbol query.
10692
8b07ae33
PA
106932010-04-01 Pedro Alves <pedro@codesourcery.com>
10694
10695 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10696 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10697 if we could tell there's a GDB breakpoint at stop_pc.
10698 (need_step_over_p): Don't do a step over if we find a GDB
10699 breakpoint at the resume PC.
10700
10701 * mem-break.c (struct raw_breakpoint): New.
10702 (enum bkpt_type): New type `gdb_breakpoint'.
10703 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10704 fields. New field `raw'.
10705 (find_raw_breakpoint_at): New.
10706 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10707 breakpoint instead.
10708 (set_breakpoint_at): Adjust.
10709 (delete_raw_breakpoint): New.
10710 (release_breakpoint): New.
10711 (delete_breakpoint): Rename to...
10712 (delete_breakpoint_1): ... this. Add proc parameter. Use
10713 release_breakpoint. Return ENOENT.
10714 (delete_breakpoint): Reimplement.
10715 (find_breakpoint_at): Delete.
10716 (find_gdb_breakpoint_at): New.
10717 (delete_breakpoint_at): Delete.
10718 (set_gdb_breakpoint_at): New.
10719 (delete_gdb_breakpoint_at): New.
10720 (gdb_breakpoint_here): New.
10721 (set_reinsert_breakpoint): Use release_breakpoint.
10722 (uninsert_breakpoint): Rename to ...
10723 (uninsert_raw_breakpoint): ... this.
10724 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10725 (reinsert_raw_breakpoint): Change parameter type to
10726 raw_breakpoint.
10727 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10728 instead.
10729 (check_breakpoints): Adjust. Use release_breakpoint.
10730 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10731 (breakpoint_inserted_here): Ditto.
10732 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10733 Don't trust the breakpoint's shadow if it is not inserted.
10734 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10735 (delete_all_breakpoints): Adjust.
10736 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10737 use delete_breakpoint_1.
10738
10739 * mem-break.h (breakpoints_supported): Delete declaration.
10740 (set_gdb_breakpoint_at): Declare.
10741 (gdb_breakpoint_here): Declare.
10742 (delete_breakpoint_at): Delete.
10743 (delete_gdb_breakpoint_at): Declare.
10744
10745 * server.h (struct raw_breakpoint): Forward declare.
10746 (struct process_info): New field `raw_breakpoints'.
10747
10748 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10749 breakpoints.
10750
6bf5e0ba
PA
107512010-03-24 Pedro Alves <pedro@codesourcery.com>
10752
10753 * linux-low.c (status_pending_p_callback): Fix comment.
10754 (linux_wait_for_event_1): Move most of the internal breakpoint
10755 handling from here...
10756 (linux_wait_1): ... to here.
10757 (count_events_callback): New.
10758 (select_singlestep_lwp_callback): New.
10759 (select_event_lwp_callback): New.
10760 (cancel_breakpoints_callback): New.
10761 (select_event_lwp): New.
10762 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10763 priority to all LWPs that have had events that should be reported
10764 to the client. Cancel breakpoints when about to reporting the
10765 event to the client, not while stopping lwps. No longer cancel
10766 finished single-steps here.
10767 (cancel_finished_single_step): Delete.
10768 (cancel_finished_single_steps): Delete.
10769
414a389f
PA
107702010-03-24 Pedro Alves <pedro@codesourcery.com>
10771
10772 * mem-break.c (enum bkpt_type): New.
10773 (struct breakpoint): New field `type'.
10774 (set_breakpoint_at): Change return type to struct breakpoint
10775 pointer. Set type to `other_breakpoint' by default.
10776 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10777 in the breakpoint list.
10778 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10779 (reinsert_breakpoint): Rename to ...
10780 (reinsert_raw_breakpoint): ... this.
10781 (reinsert_breakpoints_at): Adjust.
10782 * mem-break.h (struct breakpoint): Declare.
10783 (set_breakpoint_at): Change return type to struct breakpoint
10784 pointer.
10785
2280c721
PA
107862010-03-24 Pedro Alves <pedro@codesourcery.com>
10787
10788 * server.c (handle_query): Assign, not compare.
10789
d50171e4
PA
107902010-03-24 Pedro Alves <pedro@codesourcery.com>
10791
10792 Teach linux gdbserver to step-over-breakpoints.
10793
10794 * linux-low.c (can_hardware_single_step): New.
10795 (supports_breakpoints): New.
10796 (handle_extended_wait): If stopping threads, read the stop pc of
10797 the new cloned LWP.
10798 (get_pc): New.
10799 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10800 low target doesn't support retrieving the PC.
10801 (add_lwp): Set last_resume_kind to resume_continue.
10802 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10803 (linux_attach): Don't clear stop_expected. Set the lwp's
10804 last_resume_kind to resume_stop.
10805 (linux_detach_one_lwp): Don't check for removed breakpoints.
10806 (check_removed_breakpoint): Delete.
10807 (status_pending_p): Rename to ...
10808 (status_pending_p_callback): ... this. Don't check for removed
10809 breakpoints. Don't consider threads that are stopped from GDB's
10810 perspective.
10811 (linux_wait_for_lwp): Always read the stop_pc here.
10812 (cancel_breakpoint): New.
10813 (step_over_bkpt): New global.
10814 (linux_wait_for_event_1): Implement stepping over breakpoints.
10815 (gdb_wants_lwp_stopped): New.
10816 (gdb_wants_all_stopped): New.
10817 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10818 single-step traps here. Store the thread's last reported target
10819 wait status.
10820 (send_sigstop): Don't clear stop_expected. Always set it,
10821 instead.
10822 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10823 (cancel_finished_single_step): New.
10824 (cancel_finished_single_steps): New.
10825 (wait_for_sigstop): Don't cancel finished single-step traps here.
10826 (linux_resume_one_lwp): Don't check for removed breakpoints.
10827 Don't set `step' on non-hardware step archs.
10828 (linux_set_resume_request): Ignore resume_stop requests if already
10829 stopping or stopped. Set the lwp's last_resume_kind.
10830 (resume_status_pending_p): Don't check for removed breakpoints.
10831 (need_step_over_p): New.
10832 (start_step_over): New.
10833 (finish_step_over): New.
10834 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10835 requests. Clear the thread's last reported target waitstatus.
10836 Don't use the `suspended' flag. Don't consider pending breakpoints.
10837 (linux_resume): Start a step-over if necessary.
10838 (proceed_one_lwp): New.
10839 (proceed_all_lwps): New.
10840 (unstop_all_lwps): New.
10841 * linux-low.h (struct lwp_info): Rewrite comment for the
10842 `suspended' flag. Add the `stop_pc' field. Delete the
10843 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10844 Add `'last_resume_kind' and `need_step_over' fields.
10845 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10846 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10847 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10848 (set_raw_breakpoint_at): New.
10849 (set_breakpoint_at): Rewrite to use it.
10850 (reinsert_breakpoint_handler): Delete.
10851 (set_reinsert_breakpoint): New.
10852 (reinsert_breakpoint_by_bp): Delete.
10853 (delete_reinsert_breakpoints): New.
10854 (uninsert_breakpoint): Rewrite.
10855 (uninsert_breakpoints_at): New.
10856 (reinsert_breakpoint): Rewrite.
10857 (reinsert_breakpoints_at): New.
10858 (check_breakpoints): Rewrite.
10859 (breakpoint_here): New.
10860 (breakpoint_inserted_here): New.
10861 (check_mem_read): Adjust.
10862 * mem-break.h (breakpoints_supported, breakpoint_here)
10863 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10864 (reinsert_breakpoint_by_bp): Delete declaration.
10865 (delete_reinsert_breakpoints): Declare.
10866 (reinsert_breakpoint): Delete declaration.
10867 (reinsert_breakpoints_at): Declare.
10868 (uninsert_breakpoint): Delete declaration.
10869 (uninsert_breakpoints_at): Declare.
10870 (check_breakpoints): Adjust prototype.
10871 * server.h: Adjust include order.
10872 (struct thread_info): Declare here. Add a `last_status' field.
10873
30ba68cb
MS
108742010-03-23 Michael Snyder <msnyder@vmware.com>
10875
10876 * server.c (crc32): New function.
10877 (handle_query): Add handling for 'qCRC:' request.
10878
b9a881c2
PA
108792010-03-23 Pedro Alves <pedro@codesourcery.com>
10880
10881 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10882 lwp had been stopped by a watchpoint.
10883
e92d13d5
PA
108842010-03-16 Pedro Alves <pedro@codesourcery.com>
10885
10886 * server.h (internal_error): Declare.
10887 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10888 * utils.c (internal_error): New function.
10889
64daa791
AS
108902010-03-15 Andreas Schwab <schwab@redhat.com>
10891
10892 * configure.srv: Fix typo setting srv_regobj.
10893
f52cd8cd
PA
108942010-03-15 Pedro Alves <pedro@codesourcery.com>
10895
10896 * linux-low.c (fetch_register): Avoid passing a non string literal
10897 format to `error'.
10898 (usr_store_inferior_registers): Ditto.
10899
93ae6fdc
PA
109002010-03-14 Pedro Alves <pedro@codesourcery.com>
10901
10902 * linux-low.c (linux_write_memory): Bail out early if peeking
10903 memory failed.
10904
c3adc08c
PA
109052010-03-14 Pedro Alves <pedro@codesourcery.com>
10906
10907 * linux-low.h (struct lwp_info): New fields
10908 `stopped_by_watchpoint' and `stopped_data_address'.
10909 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10910 here, and cache them in the lwp object.
10911 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10912 directly.
10913 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10914 field.
10915 (linux_stopped_by_watchpoint): Rewrite.
10916 (linux_stopped_data_address): Rewrite.
10917
bce522a2
PA
109182010-03-06 Simo Melenius <simo.melenius@iki.fi>
10919
10920 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10921 switching the current inferior, not before.
10922
90884b2b
L
109232010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10924
10925 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10926 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10927 i386-linux.c and amd64-linux.c.
10928 (reg-i386.o): Removed.
10929 (reg-i386.c): Likewise.
10930 (reg-i386-linux.o): Likewise.
10931 (reg-i386-linux.c): Likewise.
10932 (reg-x86-64.o): Likewise.
10933 (reg-x86-64.c): Likewise.
10934 (reg-x86-64-linux.o): Likewise.
10935 (reg-x86-64-linux.c): Likewise.
10936 (i386.o): New.
10937 (i386.c): Likewise.
10938 (i386-linux.o): Likewise.
10939 (i386-linux.c): Likewise.
10940 (amd64.o): Likewise.
10941 (amd64.c): Likewise.
10942 (amd64-linux.o): Likewise.
10943 (amd64-linux.c): Likewise.
10944
10945 * configure.srv (srv_i386_regobj): New.
10946 (srv_i386_linux_regobj): Likewise.
10947 (srv_amd64_regobj): Likewise.
10948 (srv_amd64_linux_regobj): Likewise.
10949 (srv_i386_32bit_xmlfiles): Likewise.
10950 (srv_i386_64bit_xmlfiles): Likewise.
10951 (srv_i386_xmlfiles): Likewise.
10952 (srv_amd64_xmlfiles): Likewise.
10953 (srv_i386_linux_xmlfiles): Likewise.
10954 (srv_amd64_linux_xmlfiles): Likewise.
10955 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10956 srv_xmlfiles to $srv_i386_xmlfiles.
10957 (i[34567]86-*-mingw32ce*): Likewise.
10958 (i[34567]86-*-mingw*): Likewise.
10959 (i[34567]86-*-nto*): Likewise.
10960 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10961 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10962 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10963 (x86_64-*-linux*): Likewise.
10964
10965 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10966 (init_registers_amd64_linux): New.
10967 (x86_arch_setup): Replace init_registers_x86_64_linux with
10968 init_registers_amd64_linux.
10969
193f13e6
MK
109702010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10971
10972 * configure.ac: Check for libdl. If it is not available link against
10973 static libthread_db.
10974 * configure: Regenerate.
10975
85d721b8
PA
109762010-02-22 Pedro Alves <pedro@codesourcery.com>
10977
10978 PR9605
10979
10980 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10981 handing a read watchpoint.
10982 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10983
6076632b
DE
109842010-02-12 Doug Evans <dje@google.com>
10985
10986 * linux-low.c (linux_supports_tracefork_flag): Document.
10987 (linux_look_up_symbols): Add comment.
10988
3327ccf7
L
109892010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10990
10991 * regcache.c (supply_register): Clear regcache if buf is NULL.
10992
0718675c 109932010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10994 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10995
10996 * inferiors.c (find_inferior): Add function documentation.
10997 (unloaded_dll): Handle the case where the unloaded dll has not
10998 been previously registered in the dll list.
10999
177321bd
DJ
110002010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11001
11002 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11003 (thumb2_breakpoint): New.
11004 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11005
2b009048
DJ
110062010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11007
11008 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11009 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11010 breakpoints.
11011
3be029c7
PA
110122010-01-21 Pedro Alves <pedro@codesourcery.com>
11013
11014 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11015
18f5de3b
JK
110162010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11017
11018 * linux-s390-low.c (s390_collect_ptrace_register)
11019 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11020
3743bb4f
DE
110212010-01-21 Doug Evans <dje@google.com>
11022
14ce3065
DE
11023 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11024 (PTRACE_ARG4_TYPE): New macro.
11025 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11026 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11027 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11028 (usr_store_inferior_registers): Ditto.
11029 (linux_read_memory, linux_write_memory): Ditto.
11030 (linux_test_for_tracefork): Ditto.
11031
3743bb4f
DE
11032 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11033 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11034
8b315be5
PA
110352010-01-21 Pedro Alves <pedro@codesourcery.com>
11036
11037 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11038 target.
11039
85492558
PA
110402010-01-21 Pedro Alves <pedro@codesourcery.com>
11041
11042 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11043 prototype to take a regcache. Adjust.
11044
442ea881
PA
110452010-01-20 Pedro Alves <pedro@codesourcery.com>
11046
11047 * regcache.h (struct thread_info): Forward declare.
11048 (struct regcache): New.
11049 (new_register_cache): Adjust prototype.
11050 (get_thread_regcache): Declare.
11051 (free_register_cache): Adjust prototype.
11052 (registers_to_string, registers_from_string): Ditto.
11053 (supply_register, supply_register_by_name, collect_register)
11054 (collect_register_as_string, collect_register_by_name): Ditto.
11055 * regcache.c (struct inferior_regcache_data): Delete.
11056 (get_regcache): Rename to ...
11057 (get_thread_regcache): ... this. Adjust. Switch inferior before
11058 fetching registers.
11059 (regcache_invalidate_one): Adjust.
11060 (regcache_invalidate): Fix prototype.
11061 (new_register_cache): Return the new register cache.
11062 (free_register_cache): Change prototype.
11063 (realloc_register_cache): Adjust.
11064 (registers_to_string): Change prototype to take a regcache. Adjust.
11065 (registers_from_string): Ditto.
11066 (register_data): Ditto.
11067 (supply_register): Ditto.
11068 (supply_register_by_name): Ditto.
11069 (collect_register): Ditto.
11070 (collect_register_as_string): Ditto.
11071 (collect_register_by_name): Ditto.
11072 * server.c (process_serial_event): Adjust.
11073 * linux-low.h (regset_fill_func, regset_store_func): Change
11074 prototype.
11075 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11076 Change prototype.
11077 * linux-low.c (get_stop_pc): Adjust.
11078 (check_removed_breakpoint): Adjust.
11079 (linux_wait_for_event): Adjust.
11080 (linux_resume_one_lwp): Adjust.
11081 (fetch_register): Add regcache parameter. Adjust.
11082 (usr_store_inferior_registers): Ditto.
11083 (regsets_fetch_inferior_registers): Ditto.
11084 (regsets_store_inferior_registers): Ditto.
11085 (linux_fetch_registers, linux_store_registers): Ditto.
11086 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11087 regcache. Adjust.
43aaf8b6
PA
11088 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11089 Ditto.
442ea881
PA
11090 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11091 prototype to take a regcache.
11092 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11093 * remote-utils.c (convert_ascii_to_int, outreg)
11094 (prepare_resume_reply): Change prototype to take a regcache.
11095 Adjust.
11096 * target.h (struct target_ops) <fetch_registers, store_registers>:
11097 Change prototype to take a regcache.
11098 (fetch_inferior_registers, store_inferior_registers): Change
11099 prototype to take a regcache. Adjust.
11100 * proc-service.c (ps_lgetregs): Adjust.
11101 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11102 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11103 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11104 take a regcache. Adjust.
11105 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11106 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11107 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11108 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11109 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11110 (cris_cannot_fetch_register):
11111 (cris_breakpoint_at): Change prototype to take a regcache.
11112 Adjust.
11113 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11114 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11115 to take a regcache. Adjust.
11116 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11117 Adjust.
11118 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11119 take a regcache. Adjust.
11120 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11121 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11122 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11123 * linux-mips-low.c (mips_get_pc):
11124 (mips_set_pc): Change prototype to take a regcache. Adjust.
11125 (mips_reinsert_addr): Adjust.
11126 (mips_collect_register): Change prototype to take a regcache.
11127 Adjust.
11128 (mips_supply_register):
11129 (mips_collect_register_32bit, mips_supply_register_32bit)
11130 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11131 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11132 * linux-ppc-low.c (ppc_supply_ptrace_register)
11133 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11134 (parse_spufs_run): Adjust.
11135 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11136 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11137 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11138 take a regcache. Adjust.
11139 * linux-s390-low.c (s390_collect_ptrace_register)
11140 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11141 (s390_set_pc): Change prototype to take a regcache. Adjust.
11142 (s390_arch_setup): Adjust.
11143 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11144 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11145 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11146 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11147 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11148 regcache. Adjust.
11149 (sparc_breakpoint_at): Adjust.
11150 * linux-xtensa-low.c (xtensa_fill_gregset):
11151 (xtensa_store_gregset):
11152 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11153 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11154 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11155 prototype to take a regcache. Adjust.
11156 * win32-arm-low.c (arm_fetch_inferior_register)
11157 (arm_store_inferior_register): Change prototype to take a
11158 regcache. Adjust.
11159 * win32-i386-low.c (i386_fetch_inferior_register)
11160 (i386_store_inferior_register): Change prototype to take a
11161 regcache. Adjust.
11162 * win32-low.c (child_fetch_inferior_registers)
11163 (child_store_inferior_registers): Change prototype to take a
11164 regcache. Adjust.
11165 (win32_wait): Adjust.
11166 (win32_fetch_inferior_registers): Change prototype to take a
11167 regcache. Adjust.
11168 (win32_store_inferior_registers): Adjust.
11169 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11170 store_inferior_register>: Change prototype to take a regcache.
11171
60c3d7b0
DE
111722010-01-20 Doug Evans <dje@google.com>
11173
11174 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11175 #ifdef.
11176 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11177 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11178
dc146f7c
VP
111792010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11180
11181 * linux-low.c (linux_core_of_thread): New.
11182 (compare_ints, show_process, list_threads): New.
11183 (linux_qxfer_osdata): Report threads and cores.
11184 (linux_target_op): Register linux_core_of_thread.
11185 * remote-utils.c (prepare_resume_reply): Report the core.
11186 (buffer_xml_printf): Support %d specifier.
11187 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11188 New.
11189 (handle_query): Handle qXfer:threads. Announce availability
11190 thereof.
11191 * target.h (struct target_ops): New field core_of_thread.
11192
7803799a
UW
111932010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11194
11195 * Makefile.in (clean): Remove new generated files.
11196 (reg-s390.o, reg-s390.c): Remove rules.
11197 (reg-s390x.o, reg-s390x.c): Likewise.
11198 (s390-linux32.o, s390-linux32.c): Add rules.
11199 (s390-linux64.o, s390-linux64.c): Likewise.
11200 (s390x-linux64.o, s390x-linux64.c): Likewise.
11201 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11202 * linux-s390-low.c: Include <elf.h>.
11203 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11204 (init_registers_s390): Remove prototype.
11205 (init_registers_s390x): Likewise.
11206 (init_registers_s390_linux32): Add prototype.
11207 (init_registers_s390_linux64): Likewise.
11208 (init_registers_s390x_linux64): Likewise.
11209 (s390_num_regs_3264): New define.
11210 (s390_regmap_3264): New global variable.
11211 (s390_cannot_fetch_register): Remove obsolete check.
11212 (s390_cannot_store_register): Likewise.
11213 (s390_collect_ptrace_register): Handle upper/lower register halves.
11214 (s390_supply_ptrace_register): Likewise.
11215 (s390_fill_gregset): Update to register number changes.
11216 (s390_get_hwcap): New routine.
11217 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11218 Install appropriate regmap and register set.
11219
6e7ffa39
JB
112202010-01-01 Joel Brobecker <brobecker@adacore.com>
11221
11222 * server.c (gdbserver_version): Update copyright year to 2010.
11223 * gdbreplay.c (gdbreplay_version): Likewise.
11224
957f3f49
DE
112252009-12-28 Doug Evans <dje@google.com>
11226
11227 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11228 elf/external.h. Include <elf.h> instead but only if necessary.
11229
ca5c370d
PA
112302009-12-28 Pedro Alves <pedro@codesourcery.com>
11231
11232 * linux-low.c (linux_remove_process): Remove `detaching'
11233 parameter. Don't release/detach from thread_db here.
11234 (linux_kill): Release/detach from thread_db here, ...
11235 (linux_detach): ... and here, before actually detaching.
11236 (linux_wait_1): ... and here, when a process exits.
11237 * thread-db.c (any_thread_of): New.
11238 (thread_db_free): Switch the current inferior to a thread of the
11239 passed in process.
11240
4ee62156
DE
112412009-12-21 Doug Evans <dje@google.com>
11242
d90e6a88
DE
11243 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11244
c5f62d5f
DE
11245 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11246 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11247 warning ifndef __NR_tkill. Move setting of errno there too.
11248 Delete unnecessary resetting of errno after syscall.
11249 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11250
10e86dd7
DE
11251 * configure.ac: Check for dladdr.
11252 * config.in: Regenerate.
11253 * configure: Regenerate.
11254 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11255 (try_thread_db_load): Update.
11256
4ee62156
DE
11257 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11258
00f515da
DE
112592009-12-18 Doug Evans <dje@google.com>
11260
e9464885
DE
11261 * event-loop.c: Include unistd.h if it exists.
11262
07d4f67e
DE
11263 * linux-low.c (my_waitpid): Move definition away from being in
11264 between linux_tracefork_child/linux_test_for_tracefork.
11265
00f515da
DE
11266 * gdb_proc_service.h (psaddr_t): Fix type.
11267 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11268 signature to match glibc.
11269
1de1badb
DE
112702009-12-16 Doug Evans <dje@google.com>
11271
11272 * linux-low.c (linux_read_memory): Fix argument to read.
11273
aeeb81d1
PA
112742009-11-26 Pedro Alves <pedro@codesourcery.com>
11275
11276 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11277 events, don't leave current_inferior pointing at null.
11278
10357975
PA
112792009-11-26 Pedro Alves <pedro@codesourcery.com>
11280
11281 * win32-low.c (LOG): Delete.
11282 (OUTMSG): Output to stderr.
11283 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11284 on compile time LOG macro.
11285 (win32_wait): Fix debug output.
11286
cf6e3471
PA
112872009-11-26 Pedro Alves <pedro@codesourcery.com>
11288
11289 * win32-low.c (win32_add_one_solib): If the dll name is
11290 "ntdll.dll", prepend the system directory to the dll path.
11291
0c85e18e
MK
112922009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11293
11294 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11295
9ac544ce 112962009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11297 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11298
11299 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11300 * configure.ac: Check for __mcoldfire__ and set
11301 gdb_cv_m68k_is_coldfire.
11302 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11303 reg-cf.o and reg-m68k.o.
11304 * configure: Regenerated.
11305
fd7dd3e6
PA
113062009-11-16 Pedro Alves <pedro@codesourcery.com>
11307
11308 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11309 Pass it to thread_db_free.
11310 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11311 proper `detaching' argument to linux_remove_process.
11312 * linux-low.h (thread_db_free): Add `detaching' parameter.
11313 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11314 to thread_db_free.
11315 (thread_db_free): Add `detaching' parameter. Only
11316 call td_ta_clear_event if detaching from process.
11317
75aa492e
MK
113182009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11319
11320 * thread-db.c (thread_db_free): Fix typo.
11321
21e1bee4
PP
113222009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11323
11324 PR gdb/10838
11325 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11326
8838b45e
NS
113272009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11328
11329 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11330 with an i686 compiler.
11331 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11332 needed.
11333 * configure: Rebuilt.
11334
8a35fb51
SL
113352009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11336
11337 PR gdb/10783
11338
11339 * server.c (handle_search_memory_1): Correct read_addr initialization
11340 in loop for searching subsequent chunks.
11341
96f15937
PP
113422009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11343
11344 * configure.ac: New --with-libthread-db option.
11345 * thread-db.c: Allow direct dependence on libthread_db.
11346 (thread_db_free): Adjust.
11347 * config.in: Regenerate.
11348 * configure: Likewise.
889bf7c5 11349
5f7d1694
PP
113502009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11351
11352 PR gdb/10757
11353 * thread-db.c (attach_thread): New function.
11354 (maybe_attach_thread): Return success/failure.
11355 (find_new_threads_callback): Adjust.
889bf7c5
PA
11356 (thread_db_find_new_threads): Loop until no new threads.
11357
88e3b899
PA
113582009-10-13 Pedro Alves <pedro@codesourcery.com>
11359
11360 * proc-service.c (ps_lgetregs): Formatting.
11361
cdbfd419
PP
113622009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11363
11364 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11365 * configure.ac: Adjust.
11366 * linux-low.h (struct process_info_private): Move members to struct
11367 thread_db.
11368 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11369 * linux-low.c (linux_remove_process): Adjust.
11370 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11371 * server.c (handle_query): Move code ...
11372 (handle_monitor_command): ... here. New function.
11373 * target.h (struct target_ops): New member.
11374 * thread-db.c (struct thread_db): New.
11375 (libthread_db_search_path): New variable.
11376 (thread_db_create_event, thread_db_enable_reporting)
11377 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11378 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11379 (try_thread_db_load_1, dladdr_to_soname): New functions.
11380 (try_thread_db_load, thread_db_load_search): New functions.
11381 (thread_db_init): Search for libthread_db.
11382 (thread_db_free): New function.
11383 (thread_db_handle_monitor_command): Likewise.
11384 * config.in: Regenerate.
11385 * configure: Regenerate.
889bf7c5 11386
4168d2d6
UW
113872009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11388
11389 * spu-low.c (spu_kill): Wait for inferior to terminate.
11390 Call clear_inferiors.
11391 (spu_detach): Call clear_inferiors.
11392
81ecdfbb
RW
113932009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11394
11395 * aclocal.m4: Regenerate.
11396 * config.in: Likewise.
11397 * configure: Likewise.
11398
0b9ff2c0
UW
113992009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11400
11401 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11402 (parse_spufs_run): New function.
11403 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11404 (ppc_breakpoint_at): Handle SPU breakpoints.
11405
efcbbd14
UW
114062009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11407
11408 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11409 (SPUFS_MAGIC): Define.
11410 (spu_enumerate_spu_ids): New function.
11411 (linux_qxfer_spu): New function.
11412 (linux_target_ops): Install linux_qxfer_spu.
11413
f4d9bade
UW
114142009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11415
11416 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11417 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11418 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11419 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11420 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11421 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11422 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11423 (init_registers_powerpc_cell32l): Add prototype.
11424 (init_registers_powerpc_cell64l): Likewise.
11425 (ppc_arch_setup): Detect Cell/B.E. architecture.
11426
96e946ca
RW
114272009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11428
11429 * Makefile.in (datarootdir): New variable.
11430
58d6951d
DJ
114312009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11432
11433 * linux-low.c (linux_write_memory): Update debugging output.
11434 * Makefile.in (clean): Add new descriptions.
11435 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11436 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11437 * configure.srv: Add new files for arm*-*-linux*.
11438 * linux-arm-low.c: Add new declarations.
11439 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11440 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11441 (HWCAP_VFPv3D16): New.
11442 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11443 instead of __IWMMXT__.
11444 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11445 (arm_arch_setup): New.
11446 (target_regsets): Remove #ifdef. Add VFP regset.
11447 (the_low_target): Use arm_arch_setup.
11448
12b42a12
DJ
114492009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11450
11451 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11452 the main thread again.
11453
ac8c974e
AR
114542009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11455
11456 Adding Neutrino gdbserver.
11457 * configure: Regenerated.
11458 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11459 * configure.srv (i[34567]86-*-nto*): New target.
11460 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11461 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11462 (nto_comctrl) [__QNX__]: New function.
11463 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11464
4424e0c3 114652009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11466
11467 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11468 srv_tgtobj.
11469
912cf4ba
PA
114702009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11471 Pedro Alves <pedro@codesourcery.com>
11472
11473 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11474 don't support CONTEXT_EXTENDED_REGISTERS.
11475 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11476 (the_low_target): Install them.
11477 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11478 failing with ERROR_PIPE_NOT_CONNECTED.
11479
aa5ca48f
DE
114802009-06-30 Doug Evans <dje@google.com>
11481 Pierre Muller <muller@ics.u-strasbg.fr>
11482
11483 Add h/w watchpoint support to x86-linux, win32-i386.
11484 * Makefile.in (SFILES): Add i386-low.c
11485 (i386_low_h): Define.
11486 (i386-low.o): Add dependencies.
11487 (linux-x86-low.o): Add i386-low.h dependency.
11488 (win32-i386-low.o): Ditto.
11489 * i386-low.c: New file.
11490 * i386-low.h: New file.
11491 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11492 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11493 * linux-low.c (linux_add_process): Initialize arch_private.
11494 (linux_remove_process): Free arch_private.
11495 (add_lwp): Initialize arch_private.
11496 (delete_lwp): Free arch_private.
11497 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11498 provided.
11499 * linux-low.h (process_info_private): New member arch_private.
11500 (lwp_info): New member arch_private.
11501 (linux_target_ops): New members new_process, new_thread,
11502 prepare_to_resume.
11503 (ptid_of): New macro.
11504 * linux-x86-low.c: Include stddef.h, i386-low.h.
11505 (arch_process_info): New struct.
11506 (arch_lwp_info): New struct.
11507 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11508 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11509 (i386_dr_low_get_status): New function.
11510 (x86_insert_point, x86_remove_point): New functions.
11511 (x86_stopped_by_watchpoint): New function.
11512 (x86_stopped_data_address): New function.
11513 (x86_linux_new_process, x86_linux_new_thread): New functions.
11514 (x86_linux_prepare_to_resume): New function.
11515 (the_low_target): Add entries for insert_point, remove_point,
11516 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11517 prepare_to_resume.
11518 * server.c (debug_hw_points): New global.
11519 (monitor_show_help): Document set debug-hw-points.
11520 (handle_query): Process "set debug-hw-points".
11521 * server.h (debug_hw_points): Declare.
11522 (paddress): Declare.
11523 * utils.c (NUMCELLS, CELLSIZE): New macros.
11524 (get_sell, xsnprintf, paddress): New functions.
11525 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11526 remove_point, stopped_by_watchpoint, stopped_data_address.
11527 * win32-i386-low.c: Include i386-low.h.
11528 (debug_reg_state): Replaces dr.
11529 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11530 (i386_dr_low_get_status): New function.
11531 (i386_insert_point, i386_remove_point): New functions.
11532 (i386_stopped_by_watchpoint): New function.
11533 (i386_stopped_data_address): New function.
11534 (i386_initial_stuff): Update.
11535 (get_thread_context,set_thread_context,i386_thread_added): Update.
11536 (the_low_target): Add entries for insert_point,
11537 remove_point, stopped_by_watchpoint, stopped_data_address.
11538 * win32-low.c (win32_insert_watchpoint): New function.
11539 (win32_remove_watchpoint): New function.
11540 (win32_stopped_by_watchpoint): New function.
11541 (win32_stopped_data_address): New function.
11542 (win32_target_ops): Add entries for insert_watchpoint,
11543 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11544 * win32-low.h (win32_target_ops): New members insert_point,
11545 remove_point, stopped_by_watchpoint, stopped_data_address.
11546
d993e290
PA
115472009-06-25 Pedro Alves <pedro@codesourcery.com>
11548
11549 * server.c (process_serial_event): Re-return unsupported, not
11550 error, if the type isn't recognized. Re-allow supporting only
11551 insert or remove packets. Also call require_running for
11552 breakpoints. Add missing break statement to default case. Tidy.
11553 * target.h (struct target_ops): Rename insert_watchpoint to
11554 insert_point, and remove_watchpoint to remove_point.
11555
11556 * linux-low.h (struct linux_target_ops): Likewise.
11557 * linux-low.c (linux_insert_watchpoint): Rename to ...
11558 (linux_insert_point): ... this. Adjust.
11559 (linux_remove_watchpoint): Rename to ...
11560 (linux_remove_point): ... this. Adjust.
11561 (linux_target_ops): Adjust.
11562 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11563 (cris_insert_point): ... this.
11564 (cris_remove_watchpoint): Rename to ...
11565 (cris_remove_point): ... this.
11566 (the_low_target): Adjust.
11567
0f54c268
PM
115682009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11569
11570 * server.c (handle_v_kill): Pass signal_pid to
11571 kill_inferior if multi_process is zero.
11572
c6314022
AR
115732009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11574
11575 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11576 * target.h (target_ops): Comment for *_watchpoint to make it clear
11577 the functions can get types '0' and '1'.
11578
4463ce24
AR
115792009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11580
11581 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11582 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11583 * regcache.c (get_regcache): Likewise.
11584 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11585 * win32-low.c (child_fetch_inferior_registers): Remove check for
11586 regno 0.
11587
cf8fd78b
PA
115882009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11589 Pedro Alves <pedro@codesourcery.com>
11590
11591 * target.h (struct target_ops) <supports_multi_process>: New
11592 callback.
11593 (target_supports_multi_process): New.
11594 * server.c (handle_query): Even if GDB reports support, only
11595 enable multi-process if the target also supports it. Report
11596 multi-process support only if the target backend supports it.
11597 * linux-low.c (linux_supports_multi_process): New function.
11598 (linux_target_ops): Install it as target_supports_multi_process
11599 callback.
11600
47c0c975
DE
116012009-05-24 Doug Evans <dje@google.com>
11602
e09875d4
DE
11603 Global renaming of find_thread_pid to find_thread_ptid.
11604 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11605 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11606 All callers updated.
11607
e27d73f6
DE
11608 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11609 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11610 directly.
11611
47c0c975
DE
11612 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11613 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11614 (linux_resume_one_lwp): Ditto.
11615
2acc282a
DE
116162009-05-23 Doug Evans <dje@google.com>
11617
11618 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11619 from struct inferior_list_entry * to struct lwp_info *.
11620 All callers updated.
11621
9f1036c1
DE
116222009-05-13 Doug Evans <dje@google.com>
11623
11624 * linux-x86-low.c: Don't include assert.h.
11625 (x86_siginfo_fixup): Use fatal, not assert.
11626 (x86_arch_setup): Fix comment.
11627
d0722149
DE
116282009-05-12 Doug Evans <dje@google.com>
11629
11630 Biarch support for i386/amd64 gdbserver.
11631 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11632 Add linux-x86-low.c.
11633 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11634 (linux-x86-low.o): Add.
11635 * linux-x86-64-low.c: Delete.
11636 * linux-i386-low.c: Delete.
11637 * linux-x86-low.c: New file.
11638 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11639 linux-x86-low.o.
11640 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11641 linux-x86-low.o.
11642 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11643 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11644 (linux_child_pid_to_exec_file): New function.
11645 (elf_64_header_p, elf_64_file_p): New functions.
11646 (siginfo_fixup): New function.
11647 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11648 give target a chance to convert layout.
11649 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11650 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11651
fdeb2a12
DE
116522009-05-07 Doug Evans <dje@google.com>
11653
11654 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11655 (regsets_store_inferior_registers): Ditto.
11656
a6dbe5df
PA
116572009-05-06 Pedro Alves <pedro@codesourcery.com>
11658
11659 PR server/10048
11660
11661 * linux-low.c (must_set_ptrace_flags): Delete.
11662 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11663 of the global.
11664 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11665 `lwp->must_set_ptrace_flags' instead.
ba42693b 11666 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11667 (linux_wait_1): ... not here.
11668
5091eb23
DE
116692009-04-30 Doug Evans <dje@google.com>
11670
9f767825
DE
11671 * inferiors.c (started_inferior_callback): New function.
11672 (attached_inferior_callback): New function.
11673 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11674 * server.c (print_started_pid, print_attached_pid): New functions.
11675 (detach_or_kill_for_exit): New function.
11676 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11677 * server.h (have_started_inferiors_p): Declare.
11678 (have_attached_inferiors_p): Declare.
11679
5091eb23
DE
11680 * inferiors.c (remove_process): Fix memory leak, free process.
11681 * linux-low.c (linux_remove_process): New function.
11682 (linux_kill): Call it instead of remove_process.
11683 (linux_detach, linux_wait_1): Ditto.
11684
155c8968
PA
116852009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11686
11687 * configure.srv: Add x86 Windows CE target.
11688
7fe519cb
UW
116892009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11690
11691 * inferiors.c (get_thread_process): Make global.
11692 * server.h (get_thread_process): Add prototype.
11693 * thread-db.c (find_one_thread): Use get_thread_process
11694 instead of current_process.
11695 (thread_db_get_tls_address): Do not crash if called when
11696 thread layer is not yet initialized.
11697
5472f405
UW
116982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11699
11700 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11701 * spu-low.c (current_tid): Rename to ...
11702 (current_ptid): ... this.
11703 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11704 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11705 ptid_get_lwp (current_ptid) instead of current_tid.
11706 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11707 instead of current_tid. Use find_process_pid to verify pid
11708 argument is valid. Pass proper argument to remove_process.
11709 (spu_thread_alive): Compare current_ptid instead of current_tid.
11710 (spu_resume): Likewise.
11711
55ac2b99
PA
117122009-04-02 Pedro Alves <pedro@codesourcery.com>
11713
11714 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11715 variable.
11716
95954743
PA
117172009-04-01 Pedro Alves <pedro@codesourcery.com>
11718
11719 Implement the multiprocess extensions, and add linux multiprocess
11720 support.
11721
11722 * server.h (ULONGEST): Declare.
11723 (struct ptid, ptid_t): New.
11724 (minus_one_ptid, null_ptid): Declare.
11725 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11726 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11727 (struct inferior_list_entry): Change `id' type from unsigned from
11728 to ptid_t.
11729 (struct sym_cache, struct breakpoint, struct
11730 process_info_private): Forward declare.
11731 (struct process_info): Declare.
11732 (current_process): Declare.
11733 (all_processes): Declare.
11734 (initialize_inferiors): Declare.
11735 (add_thread): Adjust to use ptid_t.
11736 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11737 (add_process, remove_process, find_thread_pid): Declare.
11738 (find_inferior_id): Adjust to use ptid_t.
11739 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11740 (multi_process): Declare.
11741 (push_event): Adjust to use ptid_t.
11742 (read_ptid, write_ptid): Declare.
11743 (prepare_resume_reply): Adjust to use ptid_t.
11744 (clear_symbol_cache): Declare.
11745 * inferiors.c (all_processes): New.
11746 (null_ptid, minus_one_ptid): New.
11747 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11748 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11749 (add_thread): Change unsigned long to ptid. Remove gdb_id
11750 parameter. Adjust.
11751 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11752 (gdb_id_to_thread): Rename to ...
11753 (find_thread_pid): ... this. Change unsigned long to ptid.
11754 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11755 (loaded_dll, pull_pid_from_list): Adjust.
11756 (add_process, remove_process, find_process_pid)
11757 (get_thread_process, current_process, initialize_inferiors): New.
11758 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11759 (struct target_waitstatus) <related_pid>: Ditto.
11760 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11761 return type to int.
11762 (struct target_ops) <join>: Add `pid' argument.
11763 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11764 (struct target_ops) <wait>: Add `ptid' field. Change return type
11765 to ptid.
11766 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11767 (mywait): Add `ptid' argument. Change return type to ptid_t.
11768 (target_pid_to_str): Declare.
11769 * target.c (set_desired_inferior): Adjust to use ptids.
11770 (mywait): Add new `ptid' argument. Adjust.
11771 (target_pid_to_str): New.
11772 * mem-break.h (free_all_breakpoints): Declare.
11773 * mem-break.c (breakpoints): Delelete.
11774 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11775 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11776 to use per-process breakpoint list.
11777 (free_all_breakpoints): New.
11778 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11779 (symbol_cache, all_symbols_looked_up): Delete.
11780 (hexchars): New.
11781 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11782 read_ptid): New.
11783 (prepare_resume_reply): Change ptid argument's type from unsigned
11784 long to ptid_t. Adjust. Implement W;process and X;process.
11785 (free_sym_cache, clear_symbol_cache): New.
11786 (look_up_one_symbol): Adjust to per-process symbol cache. *
11787 * server.c (cont_thread, general_thread, step_thread): Change type
11788 to ptid_t.
11789 (attached): Delete.
11790 (multi_process): New.
11791 (last_ptid): Change type to ptid_t.
11792 (struct vstop_notif) <ptid>: Change type to ptid_t.
11793 (queue_stop_reply, push_event): Change `ptid' argument's type to
11794 ptid_t.
11795 (discard_queued_stop_replies): Add `pid' argument.
11796 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11797 changes. Don't reference the `attached' global.
11798 (attach_inferior): Adjust to mywait interface changes.
11799 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11800 features. Handle and report "multiprocess+". Handle
11801 "qAttached:PID".
11802 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11803 changes.
11804 (handle_v_kill): New.
11805 (handle_v_stopped): Adjust to use target_pid_to_str.
11806 (handle_v_requests): Allow multiple attaches and runs when
11807 multiprocess extensions are in effect. Handle "vKill".
11808 (myresume): Adjust to use ptids.
11809 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11810 (handle_status): Adjust to discard_queued_stop_replies interface
11811 change.
11812 (first_thread_of, kill_inferior_callback)
11813 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11814 (main): Call initialize_inferiors. Adjust to use ptids, killing
11815 and detaching from all inferiors. Handle multiprocess packet
11816 variants.
11817 * linux-low.h: Include gdb_proc_service.h.
11818 (struct process_info_private): New.
11819 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11820 <lwpid_of>: Use ptid_get_lwp.
11821 (get_lwp_thread): Adjust.
11822 (struct lwp_info): Add `dead' member.
11823 (find_lwp_pid): Declare.
11824 * linux-low.c (thread_db_active): Delete.
11825 (new_inferior): Adjust comment.
11826 (inferior_pid): Delete.
11827 (linux_add_process): New.
11828 (handle_extended_wait): Adjust.
11829 (add_lwp): Change unsigned long to ptid.
11830 (linux_create_inferior): Add process to processes table. Adjust
11831 to use ptids. Don't set new_inferior here.
11832 (linux_attach_lwp): Rename to ...
11833 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11834 it. Adjust to use ptids.
11835 (linux_attach_lwp): New.
11836 (linux_attach): Add process to processes table. Don't set
11837 new_inferior here.
11838 (struct counter): New.
11839 (second_thread_of_pid_p, last_thread_of_process_p): New.
11840 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11841 multiple processes.
11842 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11843 processes. Remove process from process table.
11844 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11845 to multiple processes.
11846 (any_thread_of): New.
11847 (linux_detach): Add `pid' argument, and handle it. Remove process
11848 from processes table.
11849 (linux_join): Add `pid' argument. Handle it.
11850 (linux_thread_alive): Change unsighed long argument to ptid_t.
11851 Consider dead lwps as not being alive.
11852 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11853 threads we're not interested in.
11854 (same_lwp, find_lwp_pid): New.
11855 (linux_wait_for_lwp): Change `pid' argument's type from int to
11856 ptid_t. Adjust.
11857 (linux_wait_for_event): Rename to ...
11858 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11859 from int to ptid_t. Adjust.
11860 (linux_wait_for_event): New.
11861 (linux_wait_1): Add `ptid' argument. Change return type to
11862 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11863 that exit from the process table.
11864 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11865 Adjust.
11866 (mark_lwp_dead): New.
11867 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11868 stopping all threads, mark its main lwp as dead.
11869 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11870 ptids.
11871 (fetch_register, usr_store_inferior_registers)
11872 (regsets_fetch_inferior_registers)
11873 (regsets_store_inferior_registers, linux_read_memory)
11874 (linux_write_memory): Inline `inferior_pid'.
11875 (linux_look_up_symbols): Adjust to use per-process
11876 `thread_db_active'.
11877 (linux_request_interrupt): Adjust to use ptids.
11878 (linux_read_auxv): Inline `inferior_pid'.
11879 (initialize_low): Don't reference thread_db_active.
11880 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11881 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11882 (ps_getpid): Return the pid of the current inferior.
11883 * thread-db.c (proc_handle, thread_agent): Delete.
11884 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11885 per-process data.
11886 (find_one_thread): Change argument type to ptid_t. Adjust to
11887 per-process data.
11888 (maybe_attach_thread): Adjust to per-process data and ptids.
11889 (thread_db_find_new_threads): Ditto.
11890 (thread_db_init): Ditto.
11891 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11892 processes table. Adjust to use ptids.
11893 (spu_kill, spu_detach): Adjust interface. Remove process from
11894 processes table.
11895 (spu_join, spu_thread_alive): Adjust interface.
11896 (spu_wait): Adjust interface. Remove process from processes
11897 table. Adjust to use ptids.
11898 * win32-low.c (current_inferior_tid): Delete.
11899 (current_inferior_ptid): New.
11900 (debug_event_ptid): New.
11901 (thread_rec): Take a ptid. Adjust.
11902 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11903 (child_delete_thread): Ditto.
11904 (do_initial_child_stuff): Add `attached' argument. Add process to
11905 processes table.
11906 (child_fetch_inferior_registers, child_store_inferior_registers):
11907 Adjust.
11908 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11909 (win32_attach): Pass 1 to do_initial_child_stuff.
11910 (win32_kill): Adjust interface. Remove process from processes
11911 table.
11912 (win32_detach): Ditto.
11913 (win32_join): Adjust interface.
11914 (win32_thread_alive): Take a ptid.
11915 (win32_resume): Adjust to use ptids.
11916 (get_child_debug_event): Ditto.
11917 (win32_wait): Adjust interface. Remove exiting process from
11918 processes table.
11919
bd99dc85
PA
119202009-04-01 Pedro Alves <pedro@codesourcery.com>
11921
11922 Non-stop mode support.
11923
11924 * server.h (non_stop): Declare.
11925 (gdb_client_data, handler_func): Declare.
11926 (delete_file_handler, add_file_handler, start_event_loop):
11927 Declare.
11928 (handle_serial_event, handle_target_event, push_event)
11929 (putpkt_notif): Declare.
11930 * target.h (enum resume_kind): New.
11931 (struct thread_resume): Replace `step' field by `kind' field.
11932 (TARGET_WNOHANG): Define.
11933 (struct target_ops) <wait>: Add `options' argument.
11934 <supports_non_stop, async, start_non_stop>: New fields.
11935 (target_supports_non_stop, target_async): New.
11936 (start_non_stop): Declare.
11937 (mywait): Add `options' argument.
11938 * target.c (mywait): Add `options' argument. Print child exit
11939 notifications here.
11940 (start_non_stop): New.
11941 * server.c (non_stop, own_buf, mem_buf): New globals.
11942 (struct vstop_notif): New.
11943 (notif_queue): New global.
11944 (queue_stop_reply, push_event, discard_queued_stop_replies)
11945 (send_next_stop_reply): New.
11946 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11947 interface changes.
11948 (attach_inferior): In non-stop mode, don't wait for the target
11949 here.
11950 (handle_general_set): Handle QNonStop.
11951 (handle_query): When handling qC, return the current general
11952 thread, instead of the first thread of the list.
11953 (handle_query): If the backend supports non-stop mode, include
11954 QNonStop+ in the qSupported query response.
11955 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11956 and non-stop mode.
11957 (handle_v_attach, handle_v_run): Handle non-stop mode.
11958 (handle_v_stopped): New.
11959 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11960 (myresume): Adjust to use resume_kind. Handle non-stop.
11961 (queue_stop_reply_callback): New.
11962 (handle_status): Handle non-stop mode.
11963 (main): Clear non_stop flag on reconnection. Use the event-loop.
11964 Refactor serial protocol handling from here ...
11965 (process_serial_event): ... to this new function. When GDB
11966 selects any thread, select one here. In non-stop mode, wait until
11967 GDB acks all pending events before exiting.
11968 (handle_serial_event, handle_target_event): New.
11969 * remote-utils.c (remote_open): Install remote_desc in the event
11970 loop.
11971 (remote_close): Remove remote_desc from the event loop.
11972 (putpkt_binary): Rename to...
11973 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11974 (putpkt_binary): New as wrapper around putpkt_binary_1.
11975 (putpkt_notif): New.
11976 (prepare_resume_reply): In non-stop mode, don't change the
11977 general_thread.
11978 * event-loop.c: New.
11979 * Makefile.in (OBJ): Add event-loop.o.
11980 (event-loop.o): New rule.
11981
11982 * linux-low.h (pid_of): Moved here.
11983 (lwpid_of): New.
11984 (get_lwp_thread): Use lwpid_of.
11985 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11986 * linux-low.c (pid_of): Delete.
11987 (inferior_pid): Use lwpid_of.
11988 (linux_event_pipe): New.
11989 (target_is_async_p): New.
11990 (delete_lwp): New.
11991 (handle_extended_wait): Use lwpid_of.
11992 (add_lwp): Don't set lwpid field.
11993 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11994 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11995 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11996 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11997 first. Adjust to linux_wait_for_event interface changes. Use
11998 lwpid_of.
11999 (linux_detach): Don't delete the main lwp here.
12000 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12001 (status_pending_p): Don't consider explicitly suspended lwps.
12002 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12003 pointer. Add OPTIONS argument. Change return type to int. Use
12004 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12005 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12006 pointer. Add status pointer argument. Return a pid instead of a
12007 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12008 changes. In non-stop mode, don't switch to a random thread.
12009 (linux_wait): Rename to...
12010 (linux_wait_1): ... this. Add target_options argument, and handle
12011 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12012 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12013 clean exit and signal exit code. Don't stop all threads in
12014 non-stop mode. In all-stop mode, only stop all threads when
12015 reporting a stop to GDB. Handle explicit thread stop requests.
12016 (async_file_flush, async_file_mark): New.
12017 (linux_wait): New.
12018 (send_sigstop): Use lwpid_of.
12019 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12020 interface changes. In non-stop mode, don't switch to a random
12021 thread.
12022 (linux_resume_one_lwp): Use lwpid_of.
12023 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12024 (linux_resume_one_thread): ... this. Handle resume_stop. In
12025 non-stop mode, don't look for pending flag in all threads.
12026 (resume_status_pending_p): Don't consider explicitly suspended
12027 threads.
12028 (my_waitpid): Reimplement. Emulate __WALL.
12029 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12030 Use lwpid_of.
12031 (sigchld_handler, linux_supports_non_stop, linux_async)
12032 (linux_start_non_stop): New.
12033 (linux_target_ops): Register linux_supports_non_stop, linux_async
12034 and linux_start_non_stop.
12035 (initialize_low): Install SIGCHLD handler.
12036 * thread-db.c (thread_db_create_event, find_one_thread)
12037 (thread_db_get_tls_address): Use lwpid_of.
12038 * win32-low.c (win32_detach): Adjust to use resume_kind.
12039 (win32_wait): Add `options' argument.
12040 * spu-low.c (spu_resume): Adjust to use resume_kind.
12041 (spu_wait): Add `options' argument.
12042
5b1c542e
PA
120432009-04-01 Pedro Alves <pedro@codesourcery.com>
12044
12045 Decouple target code from remote protocol.
12046
12047 * target.h (enum target_waitkind): New.
12048 (struct target_waitstatus): New.
12049 (struct target_ops) <wait>: Return an unsigned long. Take a
12050 target_waitstatus pointer instead of a char pointer.
12051 (mywait): Likewise.
12052 * target.c (mywait): Change prototype to return an unsigned long.
12053 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12054 * server.h (thread_from_wait, old_thread_from_wait): Delete
12055 declarations.
12056 (prepare_resume_reply): Change prototype to take a
12057 target_waitstatus.
12058 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12059 (last_status, last_ptid): New.
12060 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12061 pid instead of a signal.
12062 (attach_inferior): Remove "status" and "signal" parameters.
12063 Adjust.
12064 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12065 not as an address.
12066 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12067 (handle_v_requests, myresume): Remove "status" and "signal"
12068 parameters. Adjust.
12069 (handle_status): New.
12070 (main): Delete local `status'. Adjust.
12071 * remote-utils.c: Include target.h.
12072 (prepare_resume_reply): Change prototype to take a
12073 target_waitstatus. Adjust.
12074
12075 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12076 interface.
12077 * spu-low.c (spu_wait): Adjust.
12078 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12079 Delete.
12080 (win32_wait): Adjust.
12081
2bd7c093
PA
120822009-04-01 Pedro Alves <pedro@codesourcery.com>
12083
12084 * target.h (struct thread_resume): Delete leave_stopped member.
12085 (struct target_ops): Add a `n' argument to the `resume' callback.
12086 * server.c (start_inferior): Adjust.
12087 (handle_v_cont, myresume): Adjust.
12088 * linux-low.c (check_removed_breakpoint): Adjust to resume
12089 interface change, and to removed leave_stopped field.
12090 (resume_ptr): Delete.
12091 (struct thread_resume_array): New.
12092 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12093 resume interface change.
12094 (linux_continue_one_thread, linux_queue_one_thread)
12095 (resume_status_pending_p): Check if the resume field is NULL
12096 instead of checking the leave_stopped member.
12097 (linux_resume): Adjust to the target resume interface change.
12098 * spu-low.c (spu_resume): Adjust to the target resume interface
12099 change.
12100 * win32-low.c (win32_detach, win32_resume): Ditto.
12101
c35fafde
PA
121022009-04-01 Pedro Alves <pedro@codesourcery.com>
12103
12104 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12105 flag.
12106 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12107 pending.
12108 (linux_continue_one_thread): Only preserve the stepping flag if
12109 there's a pending breakpoint.
12110
0a59d50b
PA
121112009-03-31 Pedro Alves <pedro@codesourcery.com>
12112
12113 * server.c (main): After the inferior having exited, call
12114 remote_close before exiting gdbserver.
12115
f04c6d38
TJB
121162009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12117
12118 Fix size of FPSCR in Power 7 processors.
12119 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12120 (PPC_FEATURE_HAS_DFP): New #define.
12121 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12122 size of the FPSCR.
12123
78e5cee6
PA
121242009-03-23 Pedro Alves <pedro@codesourcery.com>
12125
12126 * server.c (handle_query) Whitespace and formatting.
12127
1b3f6016
PA
121282009-03-22 Pedro Alves <pedro@codesourcery.com>
12129
12130 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12131 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12132 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12133 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12134 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12135 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12136 Makefile.in, configure.ac: Fix whitespace throughout.
12137 * configure: Regenerate.
12138
a07b2135
PA
121392009-03-22 Pedro Alves <pedro@codesourcery.com>
12140
12141 * inferiors.c (find_inferior): Make it safe for the callback
12142 function to delete the currently iterated inferior.
12143
67cc2626
PA
121442009-03-22 Pedro Alves <pedro@codesourcery.com>
12145
12146 * Makefile.in (linuw_low_h): Move higher.
12147 (thread-db.o): Depend on $(linux_low_h).
12148
54a0b537
PA
121492009-03-17 Pedro Alves <pedro@codesourcery.com>
12150
12151 Rename "process" to "lwp" throughout.
12152
12153 * linux-low.c (all_processes): Rename to...
12154 (all_lwps): ... this.
12155 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12156 (add_process): Rename to ...
12157 (add_lwp): ... this. Adjust.
12158 (linux_create_inferior): Adjust.
12159 (linux_attach_lwp): Adjust.
12160 (linux_attach): Adjust.
12161 (linux_kill_one_process): Rename to ...
12162 (linux_kill_one_lwp): ... this. Adjust.
12163 (linux_kill): Adjust.
12164 (linux_detach_one_process): Rename to ...
12165 (linux_detach_one_lwp): ... this. Adjust.
12166 (linux_detach): Adjust.
12167 (check_removed_breakpoint): Adjust.
12168 (status_pending_p): Adjust.
12169 (linux_wait_for_process): Rename to ...
12170 (linux_wait_for_lwp): ... this. Adjust.
12171 (linux_wait_for_event): Adjust.
12172 (send_sigstop): Adjust.
12173 (wait_for_sigstop): Adjust.
12174 (stop_all_processes): Rename to ...
12175 (stop_all_lwps): ... this.
12176 (linux_resume_one_process): Rename to ...
12177 (linux_resume_one_lwp): ... this. Adjust.
12178 (linux_set_resume_request, linux_continue_one_thread)
12179 (linux_queue_one_thread, resume_status_pending_p)
12180 (usr_store_inferior_registers, regsets_store_inferior_registers)
12181 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12182 Adjust.
12183 * linux-low.h (get_process): Rename to ...
12184 (get_lwp): ... this. Adjust.
12185 (get_thread_process): Rename to ...
12186 (get_thread_lwp): ... this. Adjust.
12187 (get_process_thread): Rename to ...
12188 (get_lwp_thread): ... this. Adjust.
12189 (struct process_info): Rename to ...
12190 (struct lwp_info): ... this.
12191 (all_processes): Rename to ...
12192 (all_lwps): ... this.
12193 * proc-service.c (ps_lgetregs): Adjust.
12194 * thread-db.c (thread_db_create_event, find_one_thread)
12195 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12196
0b16c5cf
PA
121972009-03-14 Pedro Alves <pedro@codesourcery.com>
12198
12199 * server.c (handle_query): Handle "qAttached".
12200
32de4b9d
NS
122012009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12202
12203 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12204 GPLv3, update license URL.
12205
2aecd87f
DE
122062009-03-01 Doug Evans <dje@google.com>
12207
93efd302 12208 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12209 (server_h): Add gdb_signals.h.
12210 (signals.o): Update.
12211 * server.h (target_signal_from_host,target_signal_to_host_p)
12212 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12213
86b1f9c5
PM
122142009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12215
12216 * remote-utils.c (getpkt): Also generate remote-debug
12217 information if noack_mode is set.
12218
4aa995e1
PA
122192009-02-06 Pedro Alves <pedro@codesourcery.com>
12220
12221 * server.c (handle_query): Report qXfer:siginfo:read and
12222 qXfer:siginfo:write as supported and handle them.
12223 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12224 * linux-low.c (linux_xfer_siginfo): New.
12225 (linux_target_ops): Set it.
12226
62709adf
PA
122272009-01-26 Pedro Alves <pedro@codesourcery.com>
12228
12229 * server.c (gdbserver_usage): Mention --remote-debug.
12230 (main): Accept '--remote-debug' switch.
12231
aef93bd7
DE
122322009-01-18 Doug Evans <dje@google.com>
12233
12234 * regcache.c (new_register_cache): No need to check result of xcalloc.
12235 * server.c (handle_search_memory): Back out calls to xmalloc,
12236 result is checked and error is returned to user upon failure.
12237 (handle_query): Ditto. Add more checks for result of malloc.
12238 (handle_v_cont): Check result of malloc, report error back to
12239 user upon failure.
12240 (handle_v_run): Ditto. Call freeargv.
12241 * server.h (freeargv): Declare.
12242 * utils.c (freeargv): New fn.
12243
54363045
DE
122442009-01-15 Doug Evans <dje@google.com>
12245
f626972c
DE
12246 * gdbreplay.c (perror_with_name): Make arg const char *.
12247 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12248 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12249 * utils.c (perror_with_name): Make arg const char *.
54363045 12250
18aae699
PA
122512009-01-14 Pedro Alves <pedro@codesourcery.com>
12252
12253 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12254 when handling a EXIT_PROCESS_DEBUG_EVENT.
12255
ff703abe
JB
122562009-01-06 Joel Brobecker <brobecker@adacore.com>
12257
12258 * gdbreplay.c (gdbreplay_version): Update copyright year.
12259 * server.c (gdbserver_version): Likewise.
12260
f21cc1a2 122612009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12262
12263 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12264 (handle_extended_wait): Improve comment.
0e21c1ec 12265
bca929d3
DE
122662008-12-13 Doug Evans <dje@google.com>
12267
12268 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12269 * server.h (ATTR_MALLOC): New macro.
12270 (xmalloc,xcalloc,xstrdup): Declare.
12271 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12272 * inferiors.c: Ditto.
12273 * linux-low.c: Ditto.
12274 * mem-break.c: Ditto.
12275 * regcache.c: Ditto.
12276 * remote-utils.c: Ditto.
12277 * server.c: Ditto.
12278 * target.c: Ditto.
12279 * win32-low.c: Ditto.
12280
97438e3f
DE
122812008-12-12 Doug Evans <dje@google.com>
12282
896c7fbb
DE
12283 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12284 in debugging printf.
12285
97438e3f
DE
12286 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12287
e3b886f8
DE
122882008-12-09 Doug Evans <dje@google.com>
12289
12290 * linux-low.h (struct process_info): Delete member tid, unused.
12291 * thread-db.c (find_one_thread): Update.
12292 (maybe_attach_thread): Update.
12293
07e059b5
VP
122942008-12-02 Pedro Alves <pedro@codesourcery.com>
12295
889bf7c5
PA
12296 * target.h (struct target_ops): Add qxfer_osdata member.
12297 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12298 and dirent.h.
12299 (linux_qxfer_osdata): New functions.
12300 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12301 callback.
12302 * server.c (handle_query): Handle "qXfer:osdata:read:".
12303 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12304 (buffer_xml_printf): New functions.
12305 * server.h (struct buffer): New.
12306 (buffer_grow_str, buffer_grow_str0): New macros.
12307 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12308 (buffer_xml_printf): Declare.
07e059b5 12309
4cab47ab
DE
123102008-11-24 Doug Evans <dje@google.com>
12311
12312 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12313
f142445f
DJ
123142008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12315
12316 * server.c (handle_v_run): Always use the supplied argument list.
12317
d0107bb6 123182008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12319
d0107bb6
BW
12320 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12321 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12322
2c4ad781
TJB
123232008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12324
12325 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12326 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12327 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12328 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12329 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12330 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12331 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12332 XML target descriptions.
12333 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12334 when inferior is running on an ISA 2.05 or later processor. Add
12335 special case to return offset for full 64-bit slot of FPSCR when
12336 in 32-bits.
12337
dfb64f85
DJ
123382008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12339
12340 * Makefile.in (SFILES, clean): Added sparc64 files.
12341 (reg-sparc64.o, reg-sparc64.c): New.
12342 * configure.srv (sparc*-*-linux*): New configuration.
12343 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12344 syscall arguments for SPARC.
12345 (regsets_store_inferior_registers): Likewise.
12346 * linux-sparc-low.c: New file.
12347
66b6e1dd
DE
123482008-10-21 Doug Evans <dje@google.com>
12349
12350 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12351 (READLINE_DIR,READLINE_DEP): Delete.
12352 (INTERNAL_CFLAGS): Update.
12353 (LINTFLAGS): Update.
12354
9b710a42
PA
123552008-10-10 Pedro Alves <pedro@codesourcery.com>
12356
12357 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12358 whole argv from the last run, not just argv[0].
12359
5822d809
PA
123602008-09-08 Pedro Alves <pedro@codesourcery.com>
12361
12362 * regcache.c (new_register_cache): Return NULL if the register
12363 cache size isn't known yet.
12364 (free_register_cache): Avoid dereferencing a NULL regcache.
12365
74aac56f
DJ
123662008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12367
12368 * configure.srv: Merge MIPS and MIPS64.
12369
400b20f5
MR
123702008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12371
12372 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12373
677c5bb1
LM
123742008-08-18 Luis Machado <luisgpm@br.ibm.com>
12375
12376 * Makefile.in: Add required vsx dependencies.
12377
12378 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12379 Declare init_registers_powerpc_vsx32l.
12380 Declare init_registers_powerpc_vsx64l.
12381 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12382 (ppc_arch_setup): Check for VSX in hwcap.
12383 (ppc_fill_vsxregset): New function.
12384 (ppc_store_vsxregset): New function.
12385 Add new VSX entry in regset_info target_regsets.
12386
12387 * configure.srv: Add new VSX dependencies.
12388
a6f3e723
SL
123892008-08-12 Pedro Alves <pedro@codesourcery.com>
12390
12391 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12392 (remote_open): Set or clear transport_is_reliable.
12393 (putpkt_binary): Don't expect acks in noack mode.
12394 (getpkt): Don't send ack/nac in noack mode.
12395 * server.c (handle_general_set): Handle QStartNoAckMode.
12396 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12397 qSupported.
12398 (main): Reset noack_mode on every connection.
12399 * server.h (noack_mode): Declare.
12400
a417dc56
RW
124012008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12402
12403 * Makefile.in (GDBREPLAY_OBS): New variable.
12404 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12405
3221518c
UW
124062008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12407 Daniel Jacobowitz <dan@codesourcery.com>
12408
12409 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12410 (usr_store_inferior_registers): Likewise.
12411 (regsets_store_inferior_registers): Likewise.
12412
ec56be1b
PA
124132008-07-31 Rolf Jansen <rj@surtec.com>
12414 Pedro Alves <pedro@codesourcery.com>
12415
12416 * configure.ac: Check for memmem declaration.
12417 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12418 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12419 (disable_packet_qfThreadInfo): Unconditionally compile.
12420 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12421 * configure, config.in: Regenerate.
12422
2fe5e3ff
DE
124232008-07-28 Doug Kwan <dougkwan@google.com>
12424
12425 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12426 (linux_write_memory): Remove declaration of errno.
12427
836acd6d
UW
124282008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12429
12430 * linux-low.c (handle_extended_wait): Do not use "status"
12431 variable uninitialized.
12432
aeba519e
PA
124332008-07-07 Pedro Alves <pedro@codesourcery.com>
12434
12435 * server.c (handle_v_attach): Inhibit reporting dll changes.
12436
db42f210
PA
124372008-06-27 Pedro Alves <pedro@codesourcery.com>
12438
12439 * remote-utils.c (prepare_resume_reply): If requested, don't
12440 output "thread:TID" in the T stop reply.
12441
12442 * server.c (disable_packet_vCont, disable_packet_Tthread)
12443 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12444 (handle_query): If requested, disable support for qC, qfThreadInfo
12445 and qsThreadInfo.
12446 (handle_v_requests): If requested, disable support for vCont.
12447 (gdbserver_show_disableable): New.
12448 (main): Handle --disable-packet and --disable-packet=LIST.
12449
12450 * server.h (disable_packet_vCont, disable_packet_Tthread)
12451 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12452
8e4c5421
CD
124532008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12454
12455 * server.c (gdbserver_usage): Mention --version.
12456
6e23a804
DJ
124572008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12458
12459 * Makefile.in (gdbreplay.o): New rule.
12460
90aa6a40
JM
124612008-06-06 Joseph Myers <joseph@codesourcery.com>
12462
12463 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12464 message, not gdbserver.
12465
c16158bc 124662008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12467 Nathan Sidwell <nathan@codesourcery.com>
12468 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12469
12470 * acinclude.m4: Include ../../config/acx.m4.
12471 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12472 * configure, config.in: Regenerate.
12473 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12474 * server.c (gdbserver_version): Print PKGVERSION.
12475 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12476 (main): Adjust gdbserver_usage calls.
12477 * gdbreplay.c (version, host_name): Add declarations.
12478 (gdbreplay_version, gdbreplay_usage): New.
12479 (main): Accept --version and --help options.
12480
aeb75bf5
DJ
124812008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12482
12483 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12484 (arm_breakpoint_at): Handle Thumb.
12485 (the_low_target): Add comment.
12486
76b233dd
UW
124872008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12488
12489 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12490
08388c79
DE
124912008-05-09 Doug Evans <dje@google.com>
12492
a3c83fae
DE
12493 * server.h (decode_search_memory_packet): Declare.
12494 * remote-utils.c (decode_search_memory_packet): New fn.
12495 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12496 (handle_search_memory): New fn.
12497 (handle_query): Process qSearch:memory packets.
12498
bb9c3d36
UW
124992008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12500
12501 * regcache.c (registers_length): Remove.
12502 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12503 full register packet.
12504 * regcache.h (registers_length): Remove prototype.
12505 * server.h (PBUFSIZ): Define to 16384.
12506
7284e1be
UW
125072008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12508
12509 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12510 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12511 powerpc-64l.o, and powerpc-altivec64l.o.
12512 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12513 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12514 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12515 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12516 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12517 to srv_xmlfiles.
12518
12519 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12520 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12521 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12522 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12523 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12524 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12525 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12526 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12527 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12528 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12529 (clean): Update.
12530
12531 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12532 (init_registers_powerpc_32l): ... this new prototype.
12533 (init_registers_powerpc_32): Remove, replace by ...
12534 (init_registers_powerpc_altivec32l): ... this new prototype.
12535 (init_registers_powerpc_e500): Remove, replace by ...
12536 (init_registers_powerpc_e500l): ... this new prototype.
12537 (init_registers_ppc64): Remove, replace by ...
12538 (init_registers_powerpc_64l): ... this new prototype.
12539 (init_registers_powerpc_64): Remove, replace by ...
12540 (init_registers_powerpc_altivec64l): ... this new prototype.
12541 (ppc_num_regs): Set to 73.
12542 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12543 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12544 (ppc_cannot_store_register): Handle orig_r3 and trap.
12545 (ppc_arch_setup): Update init_registers_... calls.
12546 (ppc_fill_gregset): Handle orig_r3 and trap.
12547
12548 * inferiors.c (clear_inferiors): Reset current_inferior.
12549
fdc59709
PB
125502008-04-23 Paolo Bonzini <bonzini@gnu.org>
12551
889bf7c5
PA
12552 * acinclude.m4: Add override.m4.
12553 * configure: Regenerate.
fdc59709 12554
c9b2f845
UW
125552008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12556
12557 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12558 initial call to init_register_ppc64.
12559
550512b8
UW
125602008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12561
43aaf8b6
PA
12562 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12563 single powerpc*-*-linux* case.
550512b8
UW
12564 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12565
b6430ec3
UW
125662008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12567
12568 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12569 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12570 from reg_xmlfiles.
12571 * linux-ppc-low.c: Include <elf.h>.
12572 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12573 (ppc_hwcap): New global variable.
12574 (ppc_regmap): Remove __SPE__ #ifdef sections.
12575 (ppc_regmap_e500): New global variable.
12576 (ppc_cannot_store_register): Update __SPE__ special case.
12577 (ppc_get_hwcap): New function.
12578 (ppc_arch_setup): Use it to determine whether inferior supports
12579 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12580 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12581 Do not access registers if target does not support AltiVec.
12582 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12583 Do not access registers if target does not support SPE.
12584 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12585
52fa2412
UW
125862008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12587
12588 * linux-low.c (disabled_regsets, num_regsets): New.
12589 (use_regsets_p): Delete.
12590 (linux_wait_for_process): Clear disabled_regsets.
12591 (regsets_fetch_inferior_registers): Check and set it.
12592 (regsets_store_inferior_registers): Likewise.
12593 (linux_fetch_registers, linux_store_registers): Do not use
12594 use_regsets_p.
12595 (initialize_low): Allocate disabled_regsets.
12596
e28b3332
DJ
125972008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12598
12599 * Makefile.in (LIBOBJS): New.
12600 (OBS): Use LIBOBJS.
12601 (memmem.o): New rule.
12602 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12603 * configure: Regenerated.
12604
4536995d
UW
126052008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12606
12607 * server.c (handle_query): Never return "unsupported" for
12608 qXfer:features:read queries.
12609
221c031f
UW
126102008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12611
12612 * server.c (get_features_xml): Fix inverted condition.
12613 (handle_query): Always support qXfer:feature:read.
12614
ccd213ac
DJ
126152008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12616
12617 * server.c (wrapper_argv): New.
12618 (start_inferior): Handle wrapper_argv. If set, expect an extra
12619 trap.
12620 (gdbserver_usage): Document --wrapper.
12621 (main): Parse --wrapper.
12622
6fe305f7
UW
126232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12624
12625 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12626 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12627 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12628 (ppc_set_pc): Likewise.
12629 (ppc_arch_setup): New function.
12630 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12631 of collect_register.
889bf7c5 12632 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12633
5b0a002e
UW
126342008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12635
12636 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12637 instead of linux-ppc64-low.o.
12638 * linux-ppc64-low.c: Remove file.
12639 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12640 (linux-ppc64-low.o): Remove rule.
12641
12642 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12643 (init_registers_powerpc_64): Likewise.
12644 (ppc_regmap): Conditionally define depending on __powerpc64__.
12645 (ppc_cannot_store_register): Do not special-case "fpscr" when
12646 compiled on __powerpc64__.
12647 (ppc_collect_ptrace_register): New function.
12648 (ppc_supply_ptrace_register): New function.
12649 (ppc_breakpoint): Change type to "unsigned int".
12650 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12651 (the_low_target): Conditionally provide initializers for the
889bf7c5 12652 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12653 collect_ptrace_register and supply_ptrace_register members.
12654
9b4b61c8
UW
126552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12656
12657 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12658 * server.c (gdbserver_xmltarget): Define.
12659 (get_features_xml): Use it to replace "target.xml" and arch_string.
12660
12661 * configure.srv: Remove srv_xmltarget. Add XML files that were
12662 mentioned there to srv_xmlfiles instead. Remove conditional tests
12663 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12664 srv_xmlfiles and srv_regobj to include all possible choices.
12665 * configure.ac (srv_xmltarget): Remove.
12666 (srv_xmlfiles): Do not add "target.xml".
12667 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12668 checks for supplementary target information.
12669 * configure: Regenerate.
12670 * Makefile.in (XML_TARGET): Remove.
12671 (target.xml): Remove rule.
12672 (clean): Do not clean up target.xml.
12673 (.PRECIOUS): Do not mention target.xml.
12674
12675 * target.h (struct target_ops): Remove arch_string member.
12676 * linux-low.c (linux_arch_string): Remove.
12677 (linux_target_ops): Remove arch_string initializer.
12678 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12679 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12680 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12681 * spu-low.c (spu_arch_string): Remove.
12682 (spu_target_ops): Remove arch_string initializer.
12683 * win32-low.c (win32_arch_string): Remove.
12684 (win32_target_ops): Remove arch_string initializer.
12685 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12686 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12687 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12688
ee1a7ae4
UW
126892008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12690
12691 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12692 by collect_ptrace_register and supply_ptrace_register hooks.
12693 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12694 instead of checking for the_low_target.left_pad_xfer.
12695 (usr_store_inferior_registers): Use collect_ptrace_register callback
12696 instead of checking for the_low_target.left_pad_xfer.
12697
12698 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12699 (s390_supply_ptrace_register): Likewise.
12700 (s390_fill_gregset): Call s390_collect_ptrace_register.
12701 (the_low_target): Update.
12702
12703 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12704 (ppc_supply_ptrace_register): Likewise.
12705 (the_low_target): Update.
12706
12707 * linux-i386-low.c (the_low_target): Update.
12708 * linux-x86-64-low.c (the_low_target): Update.
12709
d61ddec4
UW
127102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12711
12712 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12713 reg-s390.o and reg-s390x.o.
12714
12715 * linux-low.c (new_inferior): New global variable.
12716 (linux_create_inferior, linux_attach): Set it.
12717 (linux_wait_for_process): Call the_low_target.arch_setup after the
12718 target has stopped for the first time.
12719 (initialize_low): Do not call the_low_target.arch_setup.
12720
12721 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12722 (s390_set_pc): Likewise.
12723 (s390_arch_setup): New function.
12724 (the_low_target): Use s390_arch_setup as arch_setup routine.
12725
12726 * regcache.c (realloc_register_cache): New function.
12727 (set_register_cache): Call it for each existing regcache.
12728
d05b4ac3
UW
127292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12730
12731 * server.h (init_registers): Remove prototype.
12732
12733 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12734 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12735 instead of init_registers ().
12736 * linux-arm-low.c (init_registers_arm): Add prototype.
12737 (init_registers_arm_with_iwmmxt): Likewise.
12738 (the_low_target): Add initializer for arch_setup field.
12739 * linux-cris-low.c (init_registers_cris): Add prototype.
12740 (the_low_target): Add initializer for arch_setup field.
12741 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12742 (the_low_target): Add initializer for arch_setup field.
12743 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12744 (the_low_target): Add initializer for arch_setup field.
12745 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12746 (the_low_target): Add initializer for arch_setup field.
12747 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12748 (the_low_target): Add initializer for arch_setup field.
12749 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12750 (the_low_target): Add initializer for arch_setup field.
12751 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12752 (init_registers_mips64_linux): Likewise.
12753 (the_low_target): Add initializer for arch_setup field.
12754 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12755 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12756 (the_low_target): Add initializer for arch_setup field.
12757 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12758 (init_registers_powerpc_64): Likewise.
12759 (the_low_target): Add initializer for arch_setup field.
12760 * linux-s390-low.c (init_registers_s390): Add prototype.
12761 (init_registers_s390x): Likewise.
12762 (the_low_target): Add initializer for arch_setup field.
12763 * linux-sh-low.c (init_registers_sh): Add prototype.
12764 (the_low_target): Add initializer for arch_setup field.
12765 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12766 (the_low_target): Add initializer for arch_setup field.
12767 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12768 (the_low_target): Add initializer for arch_setup field.
12769
12770 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12771 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12772 instead of init_registers ().
12773 * win32-arm-low.c (init_registers_arm): Add prototype.
12774 (the_low_target): Add initializer for arch_setup field.
12775 * win32-i386-low.c (init_registers_i386): Add prototype.
12776 (the_low_target): Add initializer for arch_setup field.
12777
12778 * spu-low.c (init_registers_spu): Add prototype.
12779 (initialize_low): Call initialie_registers_spu () instead of
12780 initialize_registers ().
12781
fd96d250
PA
127822008-02-19 Pedro Alves <pedro@codesourcery.com>
12783
12784 * server.c (handle_v_requests): When handling the vRun and vAttach
12785 packets, if already debugging a process, don't kill it. Return an
12786 error instead.
12787
d41b6bb4
DJ
127882008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12789
12790 * server.c (handle_query): Correct length check.
12791
5ac588cf
PA
127922008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12793
12794 * win32-low.c (do_initial_child_stuff): Add process handle
12795 parameter. Set current_process_handle and current_process_id from the
12796 parameters. Clear globals.
12797 (win32_create_inferior): Don't set current_process_handle and
12798 current_process_id here. Instead pass them on the call to
12799 do_initial_child_stuff.
12800 (win32_attach): Likewise.
12801 (win32_clear_inferiors): New.
12802 (win32_kill): Don't close the current process handle or the
12803 current thread handle here. Instead call win32_clear_inferiors.
12804 (win32_detach): Don't open a new handle to the process. Call
12805 win32_clear_inferiors.
12806 (win32_join): Don't rely on current_process_handle; open a new
12807 handle using the process id.
12808 (win32_wait): Call win32_clear_inferiors when the inferior process
12809 has exited.
12810
ecd7ecbc
DJ
128112008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12812
12813 * server.c (monitor_show_help): Add "exit".
12814
1525d545
MG
128152008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12816
ecd7ecbc 12817 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12818 (clean): Add reg-xtensa.c.
12819 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12820 * configure.srv (xtensa*-*-linux*) New target.
12821 * linux-xtensa-low.c: New.
12822 * xtensa-xtregs.c: New.
1525d545 12823
59a016f0
PA
128242008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12825
12826 * hostio.c: Don't include errno.h.
12827 (errno_to_fileio_errno): Move to hostio-errno.
12828 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12829 error number outputting to the target->hostio_last_error callback.
12830 (hostio_packet_error): Use FILEIO_EINVAL directly.
12831 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12832 calls to hostio_error.
12833 * hostio-errno.c: New.
12834 * server.h (hostio_last_error_from_errno): Declare.
12835 * target.h (target_ops): Add hostio_last_error member.
12836 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12837 as hostio_last_error handler.
889bf7c5 12838 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12839 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12840 (wince_hostio_last_error): New functions.
12841 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12842 as hostio_last_error handler.
12843 (win32_target_ops) [!_WIN32_WCE]: Register
12844 hostio_last_error_from_errno as hostio_last_error handler.
12845 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12846 (hostio-errno.o): New rule.
12847 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12848 * configure.srv (srv_hostio_err_objs): New variable. Default to
12849 hostio-errno.o.
12850 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12851 * configure: Regenerate.
12852
2d717e4f
DJ
128532008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12854
12855 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12856 (linux_kill, linux_detach): Clean up the process list.
12857 * remote-utils.c (remote_open): Improve port number parsing.
12858 (putpkt_binary, input_interrupt): Only send interrupts if the target
12859 is running.
12860 * server.c (extended_protocol): Make static.
12861 (attached): Define earlier.
12862 (exit_requested, response_needed, program_argv): New variables.
12863 (target_running): New.
12864 (start_inferior): Clear attached here.
12865 (attach_inferior): Set attached here.
12866 (require_running): Define.
12867 (handle_query): Use require_running and target_running. Implement
12868 "monitor exit".
12869 (handle_v_attach, handle_v_run): New.
12870 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12871 (gdbserver_usage): Update.
12872 (main): Redo argument parsing. Handle --debug and --multi. Handle
12873 --attach along with other options or after the port. Save
12874 program_argv. Support no initial program. Resynchronize
12875 communication with GDB after an error. Handle "monitor exit".
12876 Use require_running and target_running. Always allow the extended
12877 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12878 restart in extended mode.
12879 * README: Refer to the GDB manual. Update --attach usage.
12880
7407e2de
AS
128812007-12-20 Andreas Schwab <schwab@suse.de>
12882
12883 * linux-low.c (STACK_SIZE): Define.
12884 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12885 (linux_test_for_tracefork): Likewise.
12886
b65d95c5
DJ
128872007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12888
12889 * linux-low.c (linux_wait_for_event): Update messages. Do not
12890 reinsert auto-delete breakpoints.
12891 * mem-break.c (struct breakpoint): Change return type of handler to
12892 int.
12893 (set_breakpoint_at): Update handler type.
12894 (reinsert_breakpoint_handler): Return 1 instead of calling
12895 delete_breakpoint.
12896 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12897 setting a new one.
12898 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12899 * mem-break.h (set_breakpoint_at): Update handler type.
12900 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12901 * win32-low.c (auto_delete_breakpoint): New.
12902 (get_child_debug_event): Use it.
12903
4e799345
DJ
129042007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12905
12906 * configure.ac: Check for pread and pwrite.
12907 * hostio.c (handle_pread): Fall back to lseek and read.
12908 (handle_pwrite): Fall back to lseek and write.
12909 * config.in, configure: Regenerated.
12910
27524b67
DJ
129112007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12912
12913 * server.c (myresume): Add own_buf argument.
12914 (main): Update calls.
12915
a20d5e98
DJ
129162007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12917
12918 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12919 * remote-utils.c (remote_open): Do not call disable_async_io.
12920 (block_async_io): Delete.
12921 (unblock_async_io): Make static.
12922 (initialize_async_io): New.
12923 * server.c (handle_v_cont): Handle async I/O here.
12924 (myresume): Likewise. Move other common resume tasks here...
12925 (main): ... from here. Call initialize_async_io. Disable async
12926 I/O before the main loop.
12927 * server.h (initialize_async_io): Declare.
12928 (block_async_io, unblock_async_io): Delete prototypes.
12929 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12930
b79d787e
DJ
129312007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12932
12933 * remote-utils.c (readchar): Allow binary data in received messages.
12934
d97903b2
PA
129352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12936
12937 * win32-low.c (attaching): New global.
12938 (win32_create_inferior): Clear the `attaching' global.
12939 (win32_attach): Set the `attaching' global.
12940 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12941 attaching. Only set a breakpoint at the entry point if not
12942 attaching.
12943
311de423
PA
129442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12945
12946 * server.c (main): Don't report dll events on the initial
12947 connection on attaches.
12948
6c2d16d2
PA
129492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12950
12951 * server.c (main): Relax numerical bases supported for the pid of
12952 the --attach command line argument.
12953
5ca906e6
PA
129542007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12955
12956 * win32-low.c (win32_attach): Call OpenProcess before
12957 DebugActiveProcess, not after. Add last error output to error
12958 call.
12959
9c6c8194
PA
129602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12961
12962 * win32-low.c (win32_get_thread_context)
12963 (win32_set_thread_context): New functions.
12964 (thread_rec): Use win32_get_thread_context.
12965 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12966 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12967 field.
12968
4d5d1aaa
PA
129692007-12-03 Leo Zayas
12970 Pedro Alves <pedro_alves@portugalmail.pt>
12971
12972 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12973 global variables.
12974 (child_add_thread): Minor cleanup.
12975 (child_continue): Resume artificially suspended threads before
12976 calling ContinueDebugEvent.
12977 (suspend_one_thread): New.
12978 (fake_breakpoint_event): New.
12979 (get_child_debug_event): Change return type to int. Check here if
12980 gdb sent an interrupt request. If a soft interrupt was requested,
12981 fake a breakpoint event. Return 0 if there is no event to handle,
12982 and 1 otherwise.
12983 (win32_wait): Don't check here if gdb sent an interrupt request.
12984 Ensure there is a valid event to handle.
12985 (win32_request_interrupt): Add soft interruption method as last
12986 resort.
12987
c436e841
PA
129882007-12-03 Leo Zayas
12989 Pedro Alves <pedro_alves@portugalmail.pt>
12990
12991 * win32-low.h (win32_thread_info): Add descriptions to the
12992 structure members. Replace `suspend_count' counter by a
12993 `suspended' flag.
12994 * win32-low.c (thread_rec): Update condition of when to get the
12995 context from the inferior. Rely on ContextFlags being set if it
12996 has already been retrieved. Only suspend the inferior thread if
12997 we haven't already. Warn if that fails.
12998 (continue_one_thread): s/suspend_count/suspended/. Only call
12999 ResumeThread once. Warn if that fails.
13000
e7b5fa67
PA
130012007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13002
13003 * win32-low.c (win32_wait): Don't read from the inferior when it
13004 has already exited.
13005
a385171d
PA
130062007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13007
13008 * Makefile.in (win32_low_h): New variable.
13009 (win32-low.o): Add dependency on $(win32_low_h).
13010 (win32-arm-low.o, win32-i386-low.o): New rules.
13011
f80c84b3
DJ
130122007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13013
13014 * hostio.c: Correct copyright year.
13015
a6b151f1
DJ
130162007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13017
13018 * Makefile.in (OBS): Add hostio.o.
13019 (hostio.o): New rule.
13020 * server.h (handle_vFile): Declare.
13021 * hostio.c: New file.
13022 * server.c (handle_v_requests): Take packet_len and new_packet_len
13023 for binary packets. Call handle_vFile.
13024 (main): Update call to handle_v_requests.
13025
f9387fc3
DJ
130262007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13027
13028 * linux-low.c: Include <sched.h>.
13029
51c2684e
DJ
130302007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13031
13032 * linux-low.c (linux_tracefork_grandchild): New.
13033 (linux_tracefork_child): Use clone.
13034 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13035
75f83163
JB
130362007-10-31 Joel Brobecker <brobecker@adacore.com>
13037
13038 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13039
da5898ce
DJ
130402007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13041
13042 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13043
24a09b5f
DJ
130442007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13045
13046 * inferiors.c (change_inferior_id): Delete.
13047 (add_pid_to_list, pull_pid_from_list): New.
13048 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13049 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13050 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13051 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13052 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13053 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13054 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13055 (using_threads): Always set to 1.
13056 (handle_extended_wait): New.
13057 (add_process): Do not set TID.
13058 (linux_create_inferior): Set must_set_ptrace_flags.
13059 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13060 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13061 (linux_thread_alive): Rename TID argument to LWPID.
13062 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13063 (linux_wait_for_event): Do not use TID or check using_threads. Update
13064 call to dead_thread_notify. Call handle_extended_wait.
13065 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13066 (send_sigstop): Delete sigstop_sent.
13067 (wait_for_sigstop): Avoid TID.
13068 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13069 (linux_test_for_tracefork): New.
13070 (linux_lookup_signals): Use thread_db_active and
13071 linux_supports_tracefork_flag.
13072 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13073 * linux-low.h (get_process_thread): Avoid TID.
13074 (struct process_ifo): Move thread_known and tid to the end. Remove
13075 sigstop_sent.
13076 (linux_attach_lwp, thread_db_init): Update prototypes.
13077 * server.h (change_inferior_id): Delete prototype.
13078 (add_pid_to_list, pull_pid_from_list): New prototypes.
13079 * thread-db.c (thread_db_use_events): New.
13080 (find_first_thread): Rename to...
13081 (find_one_thread): ...this. Update callers and messages. Do not
13082 call fatal. Check thread_db_use_events. Do not call
13083 change_inferior_id or new_thread_notify.
13084 (maybe_attach_thread): Update. Do not call new_thread_notify.
13085 (thread_db_init): Set thread_db_use_events. Check use_events.
13086 * utils.c (fatal, warning): Correct message prefix.
13087
30ed0a8f
DJ
130882007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13089
13090 * Makefile.in (clean): Remove new files.
13091 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13092 (powerpc-64.o, powerpc-64.c): New rules.
13093 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13094 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13095 with SPE.
13096 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13097 SPE targets.
13098 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13099 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13100 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13101 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13102 (target_regsets): Add AltiVec and SPE register sets.
13103 * configure.ac: Check for AltiVec and SPE.
13104 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13105 (ppc_fill_vrregset, ppc_store_vrregset): New.
13106 (target_regsets): Add AltiVec register set.
13107 * configure: Regenerated.
13108
fd462a61
DJ
131092007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13110
13111 * linux-low.c (O_LARGEFILE): Define.
13112 (linux_read_memory): Use /proc/PID/mem.
13113 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13114 * configure, config.in: Regenerated.
13115
69f223ed
DJ
131162007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13117
13118 * linux-low.c (linux_wait_for_event): Do not pass signals while
13119 single-stepping.
13120
aec18585
PA
131212007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13122
13123 * win32-low.c (create_process): New.
13124 (win32_create_inferior): Use create_process instead of
13125 CreateProcess. If create_process failed retry appending an ".exe"
13126 suffix. Store the GetLastError result immediatelly after
13127 create_process calls and use it on the call to error.
13128
34d86ddd
PA
131292007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13130
13131 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13132
5a0e3bd0
JB
131332007-08-23 Joel Brobecker <brobecker@adacore.com>
13134
13135 * configure.ac: Switch license to GPLv3.
13136
f88c79e6
MS
131372007-08-01 Michael Snyder <msnyder@access-company.com>
13138
13139 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13140
6b3d9b83
PA
131412007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13142
13143 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13144 typedef.
13145 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13146 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13147 CloseToolhelp32Snapshot.
13148 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13149 CloseToolhelp32Snapshot.
13150
c588c53c
MS
131512007-07-27 Michael Snyder <michael.snyder@access-company.com>
13152
13153 * server.c (main): Check for inferior exit before main loop.
13154
aa0403d9
PA
131552007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13156
13157 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13158 instead of on tmp_desc.
13159
255e7678
DJ
131602007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13161 Daniel Jacobowitz <dan@codesourcery.com>
13162
13163 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13164 (add_thread): Minor cleanups.
13165 (clear_inferiors): Move lower in the file. Clear the DLL
13166 list.
13167 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13168 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13169 (xml_escape_text): New.
13170 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13171 for qSupported.
13172 (handle_v_cont): Report errors.
13173 (gdbserver_version): Update.
13174 (main): Correct size of own_buf. Do not report initial DLL events.
13175 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13176 (unloaded_dll, xml_escape_text): New.
13177 * win32-low.c (enum target_waitkind): Update comments.
13178 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13179 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13180 (win32_EnumProcessModules, win32_GetModuleInformation)
13181 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13182 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13183 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13184 (win32_Module32First, win32_Module32Next, load_toolhelp)
13185 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13186 (get_child_debug_event): Handle DLL events.
13187 (win32_wait): Likewise.
13188
0d37add9
DJ
131892007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13190
13191 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13192 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13193
45e2715e
PA
131942007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13195
13196 * win32-low.c (handle_output_debug_string): Ignore event if not
13197 waiting.
13198
c5674cf1
PA
131992007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13200
13201 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13202
2bbe3cc1
DJ
132032007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13204
13205 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13206
ae13219e
DJ
132072007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13208
13209 * inferiors.c (change_inferior_id): Add comment.
13210 * linux-low.c (check_removed_breakpoint): Add an early
13211 prototype. Improve debug output.
13212 (linux_attach): Doc update.
13213 (linux_detach_one_process, linux_detach): Clean up before releasing
13214 each process.
13215 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13216 * linux-low.h (struct process_info): Doc improvement.
13217 * mem-break.c (delete_all_breakpoints): New.
13218 * mem-break.h (delete_all_breakpoints): New prototype.
13219 * thread-db.c (find_first_thread): New.
13220 (thread_db_create_event): Call it instead of
13221 thread_db_find_new_threads. Clean up unused variables.
13222 (maybe_attach_thread): Remove first thread handling.
13223 (thread_db_find_new_threads): Use find_first_thread.
13224 (thread_db_get_tls_address): Likewise.
13225
4105de34
DJ
132262007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13227
13228 * thread-db.c (thread_db_find_new_threads): Add prototype.
13229 (thread_db_create_event): Check for the main thread before adding
13230 a new thread.
13231 (maybe_attach_thread): Only enable event reporting if TID == 0.
13232 (thread_db_get_tls_address): Check for new threads.
13233
2b876972
DJ
132342007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13235
13236 * linux-low.c (linux_create_inferior): Try execv before execvp.
13237 * spu-low.c (spu_create_inferior): Likewise.
13238
7a245884
DJ
132392007-06-13 Mike Frysinger <vapier@gentoo.org>
13240
13241 * linux-low.c (linux_create_inferior): Change execv to execvp.
13242 * spu-low.c (spu_create_inferior): Likewies.
13243
117ce543
DJ
132442007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13245
13246 * Makefile.in (clean): Clean new files instead of deleted ones.
13247 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13248 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13249 rules.
13250 * configure.srv: Specify XML files and new regformats for MIPS and
13251 MIPS64 GNU/Linux.
13252 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13253 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13254 an entry for the restart register.
13255 (mips_cannot_fetch_register, mips_cannot_store_register)
13256 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13257 register names to match the XML descriptions.
13258 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13259 restart register instead of $0.
13260
0e7f50da
UW
132612007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13262 Markus Deuling <deuling@de.ibm.com>
13263
13264 * remote-utils.c (decode_xfer_write): New function.
13265 * server.h (decode_xfer_write): Add prototype.
13266 * server.c (handle_query): Add PACKET_LEN argument. Support
13267 qXfer:spu:read and qXfer:spu:write packets.
13268 (main): Pass packet_len to handle_query.
13269 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13270 * target.h (target_ops): Add qxfer_spu.
13271
374c1d38
UW
132722007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13273
13274 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13275 accessing non-seekable spufs files.
13276
bb63802a
UW
132772007-05-16 Markus Deuling <deuling@de.ibm.com>
13278
889bf7c5 13279 * server.c (handle_query): Add reply for qC packet.
bb63802a 13280
7390519e
PA
132812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13282 Leo Zayas <lerele@champenstudios@com>
13283
13284 * server.h (check_remote_input_interrupt_request): New function.
13285 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13286 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13287 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13288 (check_remote_input_interrupt_request): New function.
13289 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13290 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13291 winapi_GenerateConsoleCtrlEvent): New typedefs.
13292 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13293 to 250 ms.
13294 (win32_wait): Check for remote interrupt request
13295 with check_remote_input_interrupt_request.
13296 (win32_request_interrupt): New function.
13297 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13298
34b34921
PA
132992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13300
13301 * win32-low.c (debug_registers_changed,
13302 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13303 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13304 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13305 (thread_rec): Get context using the low target.
13306 (child_add_thread): Call thread_added on the low target,
13307 which does the same thing.
13308 (regptr): Delete.
13309 (do_initial_child_stuff): Remove debug registers references.
13310 Set context using the low target. Resume threads after
13311 setting the contexts.
13312 (child_continue): Remove dead variable. Remove debug
13313 registers references.
13314 (child_fetch_inferior_registers): Go through the low target.
13315 (do_child_store_inferior_registers): Remove.
13316 (child_store_inferior_registers): Go through the low target.
13317 (win32_resume): Remove debug registers references.
13318 Set context using the low target.
13319 (handle_exception): Change return type to void. Don't record
13320 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13321 first chance exception.
889bf7c5 13322 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13323 goto loop. Always return after waiting for debug event.
13324 (win32_wait): Convert to switch statement. Handle spurious
13325 events.
13326
13327 * win32-i386-low.c (debug_registers_changed,
13328 debug_registers_used): New.
13329 (initial_stuff): Rename to ...
13330 (i386_initial_stuff): ... this. Clear debug registers
13331 state variables.
13332 (store_debug_registers): Delete.
13333 (i386_get_thread_context): New.
13334 (load_debug_registers): Delete.
13335 (i386_set_thread_context): New.
13336 (i386_thread_added): New.
13337 (single_step): Rename to ...
13338 (i386_single_step): ... this.
13339 (do_fetch_inferior_registers): Rename to ...
13340 (i386_fetch_inferior_register): ... this.
13341 (i386_store_inferior_register): New.
13342 (the_low_target): Adapt to new interface.
13343
13344 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13345 (arm_get_thread_context): New.
13346 (arm_set_thread_context): New.
13347 (regptr): New.
13348 (do_fetch_inferior_registers): Rename to ...
13349 (arm_fetch_inferior_register): ... this.
13350 (arm_store_inferior_register): New.
13351 (arm_wince_breakpoint): Reimplement as unsigned long.
13352 (arm_wince_breakpoint_len): Define.
13353 (the_low_target): Adapt to new interface.
13354
13355 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13356 load_debug_registers. Add get_thread_context, set_thread_context,
13357 thread_added and store_inferior_register. Rename
13358 fetch_inferior_registers to fetch_inferior_register.
13359 (regptr): Remove declaration.
13360
dd6953e1
PA
133612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13362
13363 * linux-low.c (linux_detach): Change return type to int. Return 0.
13364 * spu-low.c (spu_detach): Likewise.
13365
444d6139
PA
133662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13367
13368 * target.h (target_ops): Change return type of detach to int.
13369 Add join.
13370 (join_inferior): New.
13371 * server.c (main): Don't skip detach support on mingw32.
13372 If the inferior doesn't support detaching return error.
13373 Call join_inferior instead of using waitpid.
13374 * linux-low.c (linux_join): New.
13375 (linux_target_op): Add linux_join.
13376 * spu-low.c (spu_join): New.
13377 (spu_target_ops): Add spu_join.
13378 * win32-low.c (win32_detach): Adapt to new interface.
13379 Reopen current_process_handle before detaching. Issue a child
13380 resume before detaching.
13381 (win32_join): New.
13382 (win32_target_op): Add win32_join.
13383
1d5315fe
PA
133842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13385
13386 * win32-low.c (win32-attach): Fix return value.
13387 * target.h (target_ops): Describe ATTACH return values.
13388
bf914831
PA
133892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13390
13391 * win32-low.c (GETPROCADDRESS): Define.
13392 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13393 (winapi_DebugSetProcessKillOnExit): Likewise.
13394 (win32_create_inferior): Force usage of ansi CreateProcessA.
13395 (win32_attach): Use GETPROCADDRESS.
13396 (win32_detach): Likewise.
13397
f72f3e60
PA
133982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13399
13400 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13401
ed50f18f
PA
134022007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13403
13404 * win32-low.c: Commit leftover changes from 2007-03-29.
13405
0c2ead7e
DJ
134062007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13407
13408 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13409 fields short instead of int. Add explicit padding.
13410 (i387_cache_to_fsave): Remove unnecessary casts.
13411 (i387_fsave_to_cache): Doc fix.
13412 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13413
73725ff3
DJ
134142007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13415
13416 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13417 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13418
d99f33d8
PA
134192007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13420
13421 * configure.srv (arm*-*-mingw32ce*): Move near the other
13422 arm targets.
13423
68070c10
PA
134242007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13425
2482afc6 13426 * configure.ac: Add errno checking.
68070c10
PA
13427 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13428 sys/file.h and malloc.h.
13429 (AC_CHECK_DECLS): Add perror.
13430 (srv_mingwce): Handle.
2482afc6 13431 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13432 win32-i386-low.o to srv_tgtobj.
13433 (i[34567]86-*-mingw*): Likewise.
13434 (arm*-*-mingw32ce*): Add case.
13435 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13436 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13437 [__MINGW32CE__] (strerror): New function.
13438 [__MINGW32CE__] (errno): Define to GetLastError.
13439 [__MINGW32CE__] (COUNTOF): New macro.
13440 (remote_open): Remove extra close call.
13441 * mem-break.c (delete_breakpoint_at): New function.
13442 * mem-break.h (delete_breakpoint_at): Declare.
13443 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13444 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13445 [USE_WIN32API] (read, write): Add char* casts.
13446 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13447 * server.h: Include wincecompat.h on Windows CE.
13448 [HAVE_ERRNO_H]: Check.
13449 (perror): Declare if not declared.
13450 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13451 (perror_with_name): Remove errno declaration.
13452 * wincecompat.h: New.
13453 * wincecompat.c: New.
13454 * win32-low.h: New.
13455 * win32-arm-low.c: New.
13456 * win32-i386-low.c: New.
13457 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13458 (OUTMSG2): Make it safe.
13459 (_T): New macro.
13460 (COUNTOF): New macro.
13461 (NUM_REGS): Get it from the low target.
13462 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13463 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13464 (thread_rec): Let low target handle debug registers.
13465 (child_add_thread): Likewise.
13466 (child_init_thread_list): Likewise.
13467 (continue_one_thread): Likewise.
13468 (regptr): New.
13469 (do_child_fetch_inferior_registers): Move to ...
13470 * win32-i386-low.c: ... here, and rename to ...
13471 (do_fetch_inferior_registers): ... this.
889bf7c5 13472 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13473 Go through the low target.
13474 (do_child_store_inferior_registers): Use regptr.
13475 (strwinerror): New function.
13476 (win32_create_inferior): Handle Windows CE.
13477 Use strwinerror instead of strerror on Windows error
13478 codes. Add program to the error output.
13479 Don't close the main thread handle on Windows CE.
13480 (win32_attach): Use coredll.dll on Windows CE.
13481 (win32_kill): Close current process and current
13482 thread handles.
13483 (win32_detach): Use coredll.dll on Windows CE.
13484 (win32_resume): Let low target handle debug registers, and
13485 step request.
13486 (handle_exception): Add/Remove initial breakpoint. Avoid
13487 non-existant WSTOPSIG on Windows CE.
13488 (win32_read_inferior_memory): Cast to remove warning.
13489 (win32_arch_string): Go through the low target.
13490 (initialize_low): Call set_breakpoint_data with the low
13491 target's breakpoint.
13492 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13493 FOP_REGNUM, mappings): Move to ...
13494 * win32-i386-low.c: ... here.
13495 * win32-low.c (win32_thread_info): Move to ...
13496 * win32-low.h: ... here.
13497 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13498 win32-arm-low.c and wincecompat.c.
13499 (all:): Add $EXEEXT.
13500 (install-only:): Likewise.
13501 (gdbserver:): Likewise.
13502 (gdbreplay:): Likewise.
13503 * config.in: Regenerate.
13504 * configure: Regenerate.
13505
41093d81
PA
135062007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13507
13508 * win32-low.c: Rename typedef thread_info to
13509 win32_thread_info throughout.
13510
544afa54
PA
135112007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13512
13513 * win32-i386-low.c: Rename to ...
13514 * win32-low.c: ... this.
13515 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13516 * Makefile.in: Likewise.
13517
bce7165d
PA
135182007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13519
13520 * remote-utils.c (monitor_output): Constify msg parameter.
13521 * server.h (monitor_output): Likewise.
13522 * win32-i386-low.c (handle_output_debug_string): New.
13523 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13524 handle_output_debug_string.
13525 (get_child_debug_event): Likewise.
13526
506c7aa0
DJ
135272007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13528
13529 * server.c (main): Correct strtoul check.
13530
42c81e2a
DJ
135312007-03-27 Jon Ringle <jon@ringle.org>
13532
13533 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13534
9453113a
DJ
135352007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13536
13537 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13538
64a69107
DJ
135392007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13540
13541 * terminal.h: Check HAVE_SGTTY_H.
13542
135432007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13544
13545 * remote-utils.c (remote_open): Print out the assigned port number.
13546
c74d0ad8
DJ
135472007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13548
13549 * remote-utils.c (monitor_output): New function.
13550 * server.c (debug_threads): Define here.
13551 (monitor_show_help): New function.
13552 (handle_query): Handle qRcmd.
13553 (main): Do not handle 'd' packet.
13554 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13555 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13556 of debug_threads.
13557
de7c3b4a
PA
135582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13559
13560 * Makefile.in (EXEEXT): New.
13561 (clean): Use $(EXEEXT).
13562
ef57601b
PA
135632007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13564
13565 * target.h (target_ops): Rename send_signal to request_interrupt,
13566 and remove enum target_signal parameter.
13567 * linux-low.c (linux_request_interrupt): Rename from
13568 linux_send_signal, and always send SIGINT.
13569 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13570 and always send SIGINT.
13571 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13572 of send_signal.
13573 (input_interrupt): Likewise.
13574
820f2bda
PA
135752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13576
13577 * server.c (get_features_xml): Check if target implemented
13578 arch_string.
13579 * win32-i386-low.c (win32_arch_string): New.
13580 (win32_target_ops): Add win32_arch_string as arch_string member.
13581
ab39bf24
UW
135822007-02-22 Markus Deuling <deuling@de.ibm.com>
13583
13584 * spu-low.c (spu_arch_string): New.
13585 (spu_target_ops): Add spu_arch_string.
13586
61ff6e04
DJ
135872007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13588
13589 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13590 * configure.ac: Do not check for terminal.h.
13591 * configure, config.in: Regenerated.
13592
fb1e4ffc
DJ
135932007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13594
13595 * Makefile.in (OBS): Add $(XML_BUILTIN).
13596 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13597 (clean): Update.
13598 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13599 (arm-with-iwmmxt.c): New.
13600 * config.in, configure: Regenerate.
13601 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13602 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13603 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13604 (arm*-*-linux*): Add iWMMXt and regset support.
13605 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13606 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13607 (arm_store_wmmxregset, target_regsets): New.
13608 * server.c (get_features_xml): Take annex argument. Check builtin
13609 XML documents.
13610 (handle_query): Handle multiple annexes.
13611
0f48aa01
DJ
136122007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13613
13614 * remote-utils.c [USE_WIN32API] (read, write): Define.
13615 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13616 write.
13617
23181151
DJ
136182007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13619
13620 * linux-i386-low.c (the_low_target): Set arch_string.
13621 * linux-x86-64-low.c (the_low_target): Likewise.
13622 * linux-low.c (linux_arch_string): New.
13623 (linux_target_ops): Add it.
13624 * linux-low.h (struct linux_target_ops): Add arch_string.
13625 * server.c (write_qxfer_response): Use const void * for DATA.
13626 (get_features_xml): New.
13627 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13628 * target.h (struct target_ops): Add arch_string method.
13629
9d606399
DJ
136302007-01-03 Denis Pilat <denis.pilat@st.com>
13631 Daniel Jacobowitz <dan@codesourcery.com>
13632
13633 * linux-low.c (linux_kill): Handle being called with no threads.
13634 * win32-i386-low.c (win32_kill): Likewise.
13635 (get_child_debug_event): Clear current_process_handle.
13636
136372006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13638 Daniel Jacobowitz <dan@codesourcery.com>
13639
13640 * remote-utils.c (remote_open): Check the type of specified
13641 serial port devices before opening them.
13642 * server.c (main): Kill the inferior if an error occurs during
13643 the first remote_open.
13644
a5e13d24
DJ
136452006-12-05 Markus Deuling <deuling@de.ibm.com>
13646
13647 * README: Update supported targets.
13648
186947f7
DJ
136492006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13650
13651 * Makefile.in (clean): Remove reg-mips64.c.
13652 (reg-mips64.c, reg-mips64.o): New rules.
13653 * configure.srv: Handle mips64. Include regset support for mips.
13654 * linux-mips-low.c (union mips_register): New.
13655 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13656 (mips_breakpoint, mips_breakpoint_at): Use int.
13657 (mips_collect_register, mips_supply_register)
13658 (mips_collect_register_32bit, mips_supply_register_32bit)
13659 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13660 (mips_store_fpregset, target_regsets): New.
13661 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13662
a13e2c95
UW
136632006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13664
13665 * configure.srv: Add target "spu*-*-*".
13666 * Makefile.in (clean): Remove reg-spu.c.
13667 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13668 * spu-low.c: New file.
13669
cb7283db
DJ
136702006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13671
13672 * configure.ac: Correct td_thr_tls_get_addr test.
13673 * configure: Regenerated.
13674
89be2091
DJ
136752006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13676
13677 * linux-low.c (linux_wait_for_event): Reformat. Use the
13678 pass_signals array.
13679 * remote-utils.c (decode_address_to_semicolon): New.
13680 * server.c (pass_signals, handle_general_set): New.
13681 (handle_query): Mention QPassSignals for qSupported.
13682 (main): Call handle_general_set.
13683 * server.h (pass_signals, decode_address_to_semicolon): New.
13684
000ef4f0
DJ
136852006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13686
13687 * server.c (handle_query): Correct error handling for read_auxv.
13688
b7149293
UW
136892005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13690
13691 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13692 and srv_linux_thread_db to yes.
13693 * linux-s390-low.c (s390_fill_gregset): New function.
13694 (target_regsets): Define data structure.
13695
dae5f5cf
DJ
136962006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13697
13698 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13699 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13700 * config.in, configure: Regenerated.
13701 * inferiors.c (gdb_id_to_thread): New function.
13702 (gdb_id_to_thread_id): Use it.
13703 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13704 * linux-low.h (struct process_info): Add th member.
13705 (thread_db_get_tls_address): New prototype.
13706 * remote-utils.c (decode_address): Make non-static.
13707 * server.c (handle_query): Handle qGetTLSAddr.
13708 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13709 * target.h (struct target_ops): Add get_tls_address.
13710 * thread-db.c (maybe_attach_thread): Save the thread handle.
13711 (thread_db_get_tls_address): New.
13712
32ca6d61
DJ
137132006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13714
13715 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13716 (linux_resume_one_process): Take a siginfo_t *. Update all
13717 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13718 (struct pending_signals): Add a siginfo_t.
13719 (linux_wait_for_process): Always set last_status.
13720 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13721 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13722 * linux-low.h (struct process_info): Add last_status.
13723
5ffff7c1
DJ
137242006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13725
13726 * remote-utils.c (try_rle): New function.
13727 (putpkt_binary): Use it.
13728
8695c747
DJ
137292006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13730
13731 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13732 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13733 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13734 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13735 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13736 point registers.
13737
290fadea
RS
137382006-08-08 Richard Sandiford <richard@codesourcery.com>
13739
13740 * server.c (terminal_fd): New variable.
13741 (old_foreground_pgrp): Likewise.
13742 (restore_old_foreground_pgrp): New function.
13743 (start_inferior): Record the terminal file descriptor in terminal_fd
13744 and its original foreground group in old_foreground_pgrp. Register
13745 restore_old_foreground_pgrp with atexit().
13746
9f2e1e63
DJ
137472006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13748
13749 * server.c (handle_query): Correct qPart to qXfer.
13750
b80864fb
DJ
137512006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13752
13753 * configure.ac: Check for more headers which are missing on
13754 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13755 * configure.srv: Add Cygwin and mingw32.
13756 * remote-utils.c: Don't include headers unconditionally which
13757 are missing on mingw32. Include <winsock.h> for mingw32.
13758 (remote_open): Adjust for mingw32 support. Flush
13759 standard error after writing to it.
13760 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13761 (unblock_async_io, enable_async_io, disable_async_io)
13762 (readchar, getpkt): Update for Winsock support.
13763 (prepare_resume_reply): Expect a protocol signal number.
13764 * server.c: Disable <sys/wait.h> on mingw32.
13765 (start_inferior): Adjust for mingw32 support. Flush
13766 standard error after writing to it.
13767 (attach_inferior): Likewise. Use protocol signal
13768 numbers.
13769 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13770 and names.
13771 * win32-i386-low.c: New file.
13772 * Makefile.in (XM_CLIBS): Set.
13773 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13774 (win32-i386-low.o): New dependency rule.
13775 * linux-low.c (linux_wait): Use target signal numbers.
13776 * target.h (struct target_ops): Doc fix.
13777 * server.h (target_signal_to_name): New prototype.
13778 * gdbreplay.c: Don't include headers unconditionally which
13779 are missing on mingw32. Include <winsock.h> for mingw32.
13780 (remote_close, remote_open): Adjust for Winsock support.
13781 * configure, config.in: Regenerated.
13782
0876f84a
DJ
137832006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13784
13785 * server.c (decode_xfer_read, write_qxfer_response): New.
13786 (handle_query): Take a packet length argument. Handle
13787 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13788 the qSupported response.
13789 (main): Update call to handle_query.
13790
01f9e8fa
DJ
137912006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13792
13793 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13794 (putpkt_binary): Renamed from putpkt and adjusted for binary
13795 data.
13796 (putpkt): New wrapper for putpkt_binary.
13797 (readchar): Don't mask off the high bit.
13798 (decode_X_packet): New function.
13799 * server.c (main): Call putpkt_binary if a handler sets the packet
13800 length. Save the length of the incoming packet. Handle 'X'.
13801 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13802
be2a5f71
DJ
138032006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * server.c (handle_query): Handle qSupported.
13806
ea025f5f
DJ
138072006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13808
13809 * remote-utils.c (all_symbols_looked_up): New variable.
13810 (look_up_one_symbol): Check it.
13811 * server.h (look_up_one_symbol): New declaration.
13812 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13813
9308fc88
DJ
138142006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13815
13816 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13817 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13818 (PTRACE_GET_THREAD_AREA): Define.
13819 (ps_get_thread_area): New function.
13820
52fb6437
NS
138212006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13822
13823 * configure.srv (m68k*-*-uclinux*): New target.
13824 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13825 (linux_resume_one_process): Remove extraneous cast.
13826 (linux_read_offsets): New.
13827 (linux_target_op): Add linux_read_offsets on mmuless systems.
13828 * server.c (handle_query): Add qOffsets logic.
13829 * target.h (struct target_ops): Add read_offsets.
13830
21b0f40c
DJ
138312006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13832
13833 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13834 (PTRACE_GET_THREAD_AREA): Define.
13835 (ps_get_thread_area): New function.
13836 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13837 (linux-x86-64-low.o): Update.
13838
0050a760
DJ
138392006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13840
13841 * configure.ac: Remove checks for prfpregset_t.
13842 * gdb_proc_service.h: New file.
13843 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13844 new "gdb_proc_service.h".
13845 * proc-service.c: Likewise.
13846 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13847 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13848 * Makefile.in (gdb_proc_service_h): Updated.
13849 * configure, config.in: Regenerated.
13850
b92a518e
DJ
138512006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13852
13853 * remote-utils.c (prepare_resume_reply): Move declaration
13854 of gdb_id_from_wait to the top of the block.
13855
545587ee
DJ
138562006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13857
13858 * linux-low.c (regsets_store_inferior_registers): Read the regset
13859 from the target before filling it.
13860
9db87ebd
DJ
138612006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13862
13863 * server.c (attach_inferior): Return SIGTRAP for a successful
13864 attach.
13865
dd24457d
DJ
138662006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13867
13868 * Makefile.in (OBS): Add version.o.
13869 (STAGESTUFF): Delete.
13870 (version.o): Add dependencies.
13871 (version.c): Replace rule.
13872 (clean): Remove version.c.
13873 * server.c (gdbserver_version): New.
13874 (gdbserver_usage): Use printf.
13875 (main): Handle --version and --help.
13876 * server.h (version, host_name): Add declarations.
13877
6f0f660e
EZ
138782005-12-23 Eli Zaretskii <eliz@gnu.org>
13879
889bf7c5
PA
13880 * linux-arm-low.c:
13881 * linux-arm-low.c:
13882 * inferiors.c:
13883 * i387-fp.h:
13884 * i387-fp.c:
13885 * gdbreplay.c:
13886 * regcache.c:
13887 * proc-service.c:
13888 * mem-break.h:
13889 * mem-break.c:
13890 * linux-x86-64-low.c:
13891 * linux-sh-low.c:
13892 * linux-s390-low.c:
13893 * linux-ppc64-low.c:
13894 * linux-ppc-low.c:
13895 * linux-mips-low.c:
13896 * linux-m68k-low.c:
13897 * linux-m32r-low.c:
13898 * linux-low.h:
13899 * linux-low.c:
13900 * linux-ia64-low.c:
13901 * linux-i386-low.c:
13902 * linux-crisv32-low.c:
13903 * thread-db.c:
13904 * terminal.h:
13905 * target.h:
13906 * target.c:
13907 * server.h:
13908 * server.c:
13909 * remote-utils.c:
13910 * regcache.h:
13911 * utils.c:
13912 * Makefile.in:
13913 * configure.ac:
6f0f660e
EZ
13914 * gdbserver.1: Add (C) after Copyright. Update the FSF
13915 address.
13916
9d1fb177
DJ
139172005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13918
13919 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13920 (arm_breakpoint_at): Recognize both breakpoints.
13921 (the_low_target): Use the correct breakpoint instruction.
13922
011a70c2
DJ
139232005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13924
13925 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13926 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13927 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13928 (the_low_target): Update.
13929
7fb85e41
AS
139302005-10-25 Andreas Schwab <schwab@suse.de>
13931
13932 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13933
13934 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13935 (ia64_num_regs): Reduce to 462.
13936
3db0444b
DJ
139372005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13938
13939 * acinclude.m4: Correct quoting.
13940 * aclocal.m4: Regenerated.
13941
13942 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13943 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13944 (thread_db_init): Call thread_db_err_str.
13945 * configure.ac: Check for TD_VERSION.
13946 * config.in, configure: Regenerated.
13947
bee0189a
DJ
139482005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13949
13950 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13951
e9d25b98
DJ
139522005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13953
13954 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13955 is not available. Define HAVE_PTRACE_GETREGS if it is.
13956 * config.in, configure: Regenerated.
13957 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13958 * linux-i386-low.c, linux-m68k-low.c: Update to use
13959 HAVE_PTRACE_GETREGS.
13960 * linux-low.c (regsets_fetch_inferior_registers)
13961 (regsets_store_inferior_registers): Only return 0 if we processed
13962 GENERAL_REGS.
13963 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13964 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13965
a06660f7
DJ
139662005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13967
13968 * inferiors.c (struct thread_info): Add gdb_id.
13969 (add_thread): Add gdb_id argument.
13970 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13971 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13972 calls to add_thread.
13973 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13974 * server.c (handle_query): Use thread_to_gdb_id.
13975 (handle_v_cont, main): Use gdb_id_to_thread_id.
13976 * server.h (add_thread): Update prototype.
13977 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13978 prototypes.
13979
5a1f5858
DJ
139802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13981
13982 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13983 left-padded registers.
13984 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13985 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13986
e122f1f5
SE
139872005-07-01 Steve Ellcey <sje@cup.hp.com>
13988
13989 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13990 * configure: Regenerate.
13991 * config.in: Regenerate.
13992 * server.h (NEED_DECLARATION_STRERROR):
13993 Replace with !HAVE_DECL_STRERROR.
13994
d592fa2f
DJ
139952005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13996
13997 * linux-low.c (linux_wait, linux_send_signal): Don't test
13998 an unsigned long variable for > 0 if it could be MAX_ULONG.
13999 * server.c (myresume): Likewise.
14000 * target.c (set_desired_inferior): Likewise.
14001
ccbd4912
MK
140022005-06-13 Mark Kettenis <kettenis@gnu.org>
14003
14004 * configure.ac: Simplify and improve check for socklen_t.
14005 * configure, config.in: Regenerate.
14006
f450004a
DJ
140072005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14008
14009 * acconfig.h: Remove.
14010 * configure.ac: Add a test for socklen_t. Use three-argument
14011 AC_DEFINE throughout.
14012 * config.in: Regenerated using autoheader 2.59.
14013 * configure: Regenerated.
14014
14015 * gdbreplay.c (socklen_t): Provide a default.
14016 (remote_open): Use socklen_t.
14017 * remote-utils.c (socklen_t): Provide a default.
14018 (remote_open): Use socklen_t.
14019 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14020 unsigned char.
14021
14022 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14023 char for buffers.
14024 * linux-low.c (linux_read_memory, linux_write_memory)
14025 (linux_read_auxv): Likewise.
14026 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14027 (check_mem_write): Likewise.
14028 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14029 Likewise.
14030 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14031 (registers_from_string, register_data): Likewise.
14032 * server.c (handle_query, main): Likewise.
14033 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14034 (decode_M_packet): Likewise.
14035 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14036 * target.h (struct target_ops): Update read_memory, write_memory,
14037 and read_auxv.
14038 (read_inferior_memory, write_inferior_memory): Update.
14039 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14040 to unsigned char *.
14041 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14042 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14043 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14044 linux-s390-low.c, linux-sh-low.c: Update for changes in
14045 read_inferior_memory and the_low_target->breakpoint.
14046
eee84df1
DJ
140472005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14048
14049 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14050 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14051 * configure.srv: Add powerpc64-*-linux*.
14052 * linux-ppc64-low.c: New file.
14053
45b134e5
OF
140542005-05-23 Orjan Friberg <orjanf@axis.com>
14055
14056 * linux-cris-low.c: New file with support for CRIS.
14057 * linux-crisv32-low.c: Ditto for CRISv32.
14058 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14059 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14060 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14061 reg-crisv32.o, and reg-crisv32.c to make rules.
14062 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14063 recognized targets.
14064
48d93c75
UW
140652005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14066
14067 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14068 of sizeof (PTRACE_XFER_TYPE).
14069 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14070
e013ee27
OF
140712005-05-12 Orjan Friberg <orjanf@axis.com>
14072
889bf7c5 14073 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14074 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14075 pointers for hardware watchpoint support.
14076 * linux-low.h (struct linux_target_ops): Ditto.
14077 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14078 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14079 to linux_target_ops.
14080 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14081 reply packet.
14082 * server.c (main): Recognize 'Z' and 'z' packets.
14083
b0ded00b
UW
140842005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14085
14086 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14087 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14088 (the_low_target): Add new members.
14089
8643e2ad
DJ
140902005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14091
14092 * proc-service.c (ps_lgetregs): Search all_processes instead of
14093 all_threads.
14094
fc620387
DJ
140952005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14096
14097 * server.c (start_inferior): Change return type to int.
14098 (attach_inferior): Change sigptr to int *.
14099 (handle_v_cont, handle_v_requests): Change signal to int *.
14100 (main): Change signal to int.
14101
141022005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14103
14104 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14105 * configure.srv: Add m32r*-*-linux*.
14106 * linux-m32r-low.c: New file.
14107
e0e76420
DJ
141082005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14109
14110 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14111
a1928bad
DJ
141122005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14113
14114 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14115 Take unsigned long arguments for PIDs.
14116 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14117 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14118 (wait_for_sigstop, linux_resume_one_process)
14119 (regsets_fetch_inferior_registers, linux_send_signal)
14120 (linux_read_auxv): Likewise. Update the types of variables holding
14121 PIDs. Update format string specifiers.
14122 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14123 * remote-utils.c (prepare_resume_reply): Likewise.
14124 * server.c (cont_thread, general_thread, step_thread)
14125 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14126 unsigned long.
14127 (handle_query): Update format specifiers.
14128 (handle_v_cont, main): Use strtoul for thread IDs.
14129 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14130 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14131 (general_thread, step_thread, thread_from_wait)
14132 (old_thread_from_wait): Update.
14133 * target.h (struct thread_resume): Use unsigned long for THREAD.
14134 (struct target_ops): Use unsigned long for arguments to attach and
14135 thread_alive.
14136
dcdb98d2
DJ
141372005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14138
14139 * acinclude.m4: Include bfd/bfd.m4 directly.
14140 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14141 <agriffis@toolchain.org>.
14142 * aclocal.m4, configure: Regenerated.
14143
bec39cab
AC
141442005-01-07 Andrew Cagney <cagney@gnu.org>
14145
14146 * configure.ac: Rename configure.in, require autoconf 2.59.
14147 * configure: Re-generate.
14148
434c4c77
DJ
141492004-12-08 Daniel Jacobowitz <dan@debian.org>
14150
14151 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14152 LIBS when finished.
14153 * aclocal.m4: Regenerated.
14154 * configure: Regenerated.
14155
db1d3e1b
AS
141562004-11-21 Andreas Schwab <schwab@suse.de>
14157
14158 * linux-m68k-low.c (m68k_num_gregs): Define.
14159 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14160 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14161 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14162 (m68k_breakpoint_at): New. Add to the_low_target.
14163
14164 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14165 srv_linux_thread_db to yes.
14166
43360365
JB
141672004-10-20 Joel Brobecker <brobecker@gnat.com>
14168
14169 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14170 (ARCH_SET_FS): Likewise.
14171 (ARCH_GET_FS): Likewise.
14172 (ARCH_GET_GS): Likewise.
14173
fd500816
DJ
141742004-10-16 Daniel Jacobowitz <dan@debian.org>
14175
14176 * linux-i386-low.c (ps_get_thread_area): New.
14177 * linux-x86-64-low.c (ps_get_thread_area): New.
14178 * linux-low.c: Include <sys/syscall.h>.
14179 (linux_kill_one_process): Don't kill the first thread here.
14180 (linux_kill): Kill the first thread here.
14181 (kill_lwp): New function.
14182 (send_sigstop, linux_send_signal): Use it.
14183 * proc-service.c: Clean up #ifdefs.
14184 (fpregset_info): Delete.
14185 (ps_lgetregs): Update and enable implementation.
14186 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14187 implementations.
14188 * remote-utils.c (struct sym_cache, symbol_cache): New.
14189 (input_interrupt): Print a clearer message.
14190 (async_io_enabled): New variable.
14191 (enable_async_io, disable_async_io): Use it. Update comments.
14192 (look_up_one_symbol): Use the symbol cache.
14193 * thread-db.c (thread_db_look_up_symbols): New function.
14194 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14195
f6de3c42
DJ
141962004-10-16 Daniel Jacobowitz <dan@debian.org>
14197
14198 * configure.in: Test for -rdynamic.
14199 * configure: Regenerated.
14200 * Makefile (INTERNAL_LDFLAGS): New.
14201 (gdbserver, gdbreplay): Use it.
14202
2c0fc042
AC
142032004-09-02 Andrew Cagney <cagney@gnu.org>
14204
14205 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14206
075b3282
DJ
142072004-03-23 Daniel Jacobowitz <drow@mvista.com>
14208
14209 * linux-low.c (linux_wait): Clear all_processes list also.
14210
fa6a77dc
DJ
142112004-03-12 Daniel Jacobowitz <drow@mvista.com>
14212
14213 * linux-low.c: Include <errno.h>. Remove extern declaration of
14214 errno.
14215
6d782a97
DJ
142162004-03-12 Daniel Jacobowitz <drow@mvista.com>
14217
14218 * gdbreplay.c, server.h, utils.c: Update copyright years.
14219
3a7fb99b
DJ
142202004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14221
14222 * server.c (main): Print child status or termination signal from
14223 variable 'signal', not 'sig'.
14224
c3e735a6
DJ
142252004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14226
14227 * linux-low.c (linux_read_memory): Change return type to
14228 int. Check for and return error from ptrace().
14229 * target.c (read_inferior_memory): Change return type to int. Pass
14230 back return status from the_target->read_memory().
14231 * target.h (struct target_ops): Adapt *read_memory() prototype.
14232 Update comment.
14233 (read_inferior_memory): Adapt prototype.
14234 * server.c (main): Return an error packet if
14235 read_inferior_memory() returns an error.
14236
a59d1c82
DJ
142372004-03-04 Daniel Jacobowitz <drow@mvista.com>
14238
14239 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14240 Unify with other clean targets.
14241
dc3f8883
DJ
142422004-02-29 Daniel Jacobowitz <drow@mvista.com>
14243
14244 * server.c (handle_v_cont): Call set_desired_inferior.
14245
89a208da
DJ
142462004-02-29 Daniel Jacobowitz <drow@mvista.com>
14247
14248 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14249
62ea82f5
DJ
142502004-02-29 Daniel Jacobowitz <drow@mvista.com>
14251
14252 * linux-low.c (linux_wait): Unblock async I/O.
14253 (linux_resume): Block and enable async I/O.
14254 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14255 * server.h (block_async_io, unblock_async_io): Add prototypes.
14256
6910d122
DJ
142572004-02-29 Daniel Jacobowitz <drow@mvista.com>
14258
14259 * remote-utils.c (remote_open): Print a status notice after
14260 opening a TCP port.
14261 * server.c (attach_inferior): Print a status notice after
14262 attaching.
14263
142642004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14265
14266 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14267
c89dc5d4
DJ
142682004-02-26 Daniel Jacobowitz <drow@mvista.com>
14269
14270 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14271 error packet.
14272 * server.c, target.h: Update copyright years.
14273
4b8dad4a
RM
142742004-02-25 Roland McGrath <roland@redhat.com>
14275
14276 * target.h (struct target_ops): New member `read_auxv'.
14277 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14278 * linux-low.c (linux_read_auxv): New function.
14279 (linux_target_ops): Initialize `read_auxv' member to that.
14280
d7446758
JB
142812004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14282
14283 Committed by Jim Blandy <jimb@redhat.com>.
14284
14285 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14286 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14287 instead of GPR_SIZE to distiguish s390 and s390x targets.
14288
5544ad89
DJ
142892004-01-31 Daniel Jacobowitz <drow@mvista.com>
14290
14291 * linux-low.c: Update copyright year.
14292 (check_removed_breakpoint): Clear pending_is_breakpoint.
14293 (linux_set_resume_request, linux_queue_one_thread)
14294 (resume_status_pending_p): New functions.
14295 (linux_continue_one_thread): Use process->resume.
14296 (linux_resume): Only resume threads if there are no pending events.
14297 * linux-low.h (struct process_info): Add resume request
14298 pointer.
14299
2a68b70e
DJ
143002004-01-30 Daniel Jacobowitz <drow@mvista.com>
14301
14302 * regcache.c (new_register_cache): Clear the allocated register
14303 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14304
64386c31
DJ
143052003-10-13 Daniel Jacobowitz <drow@mvista.com>
14306
14307 * linux-low.c (linux_resume): Take a struct thread_resume *
14308 argument.
14309 (linux_wait): Update call.
14310 (resume_ptr): New static variable.
14311 (linux_continue_one_thread): Renamed from
14312 linux_continue_one_process. Use resume_ptr.
14313 (linux_resume): Use linux_continue_one_thread.
14314 * server.c (handle_v_cont, handle_v_requests): New functions.
14315 (myresume): New function.
14316 (main): Handle 'v' case.
14317 * target.h (struct thread_resume): New type.
14318 (struct target_ops): Change argument of "resume" to struct
14319 thread_resume *.
14320 (myresume): Delete macro.
14321
c938e9b0
L
143222003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14323
14324 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14325 (uninstall): Support DESTDIR.
14326
7f313d07
BC
14327Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14328
14329 * configure.srv: Add xscale*linux copy of arm*linux entry.
14330
3b2fc2ea
DJ
143312003-07-24 Daniel Jacobowitz <drow@mvista.com>
14332
14333 * linux-arm-low.c (arm_reinsert_addr): New function.
14334 (the_low_target): Add arm_reinsert_addr.
14335
1c0a559e
MK
143362003-07-08 Mark Kettenis <kettenis@gnu.org>
14337
14338 * mem-break.c: Remove whitespace at end of file.
14339
43d5792c
DJ
143402003-06-28 Daniel Jacobowitz <drow@mvista.com>
14341
14342 * configure.in: Check whether we need to prototype strerror.
14343 * server.h: Optionally prototype strerror.
14344 * gdbreplay.c (perror_with_name): Use strerror.
14345 * linux-low.c (linux_attach_lwp): Use strerror.
14346 * utils.c (perror_with_name): Use strerror.
14347 * config.in, configure: Regenerated.
14348
c8a86edf
DJ
143492003-06-28 Daniel Jacobowitz <drow@mvista.com>
14350
14351 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14352 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14353
73d37363
DJ
143542003-06-20 Daniel Jacobowitz <drow@mvista.com>
14355
14356 * Makefile.in (SFILES): Update.
14357 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14358 low-sun3.c: Remove files.
14359
6ad8ae5c
DJ
143602003-06-17 Daniel Jacobowitz <drow@mvista.com>
14361
14362 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14363 (linux_detach_one_process, linux_detach): New functions.
14364 (linux_target_ops): Add linux_detach.
14365 * server.c (main): Handle 'D' packet.
14366 * target.h (struct target_ops): Add "detach" member.
14367 (detach_inferior): Define.
14368
1581182a
MK
143692003-06-13 Mark Kettenis <kettenis@gnu.org>
14370
14371 From Kelley Cook <kelleycook@wideopenwest.com>:
14372 * configure.srv: Accept i[34567]86 variants.
14373
e5379b03
DJ
143742003-06-05 Daniel Jacobowitz <drow@mvista.com>
14375
14376 * linux-low.c (linux_wait_for_event): Correct comment typos.
14377 (linux_resume_one_process): Call check_removed_breakpoint.
14378 (linux_send_signal): New function.
14379 (linux_target_ops): Add linux_send_signal.
14380 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14381 of kill.
14382 * target.h (struct target_ops): Add send_signal.
14383
2ff29de4
JB
143842003-05-29 Jim Blandy <jimb@redhat.com>
14385
14386 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14387 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14388 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14389 away part of the register's value.
14390
254787d4
DJ
143912003-03-26 Daniel Jacobowitz <drow@mvista.com>
14392
14393 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14394 (linux_wait_for_event, linux_init_signals): Likewise.
14395
94e10508
DJ
143962003-03-17 Daniel Jacobowitz <drow@mvista.com>
14397
14398 * configure.in: Check for stdlib.h.
14399 * configure: Regenerated.
14400 * config.in: Regenerated.
14401
4c0711e0
DJ
144022003-01-04 Andreas Schwab <schwab@suse.de>
14403
14404 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14405
ef66e766
AC
144062003-01-02 Andrew Cagney <ac131313@redhat.com>
14407
14408 * Makefile.in: Remove obsolete code.
14409
a1358604
DJ
144102002-11-20 Daniel Jacobowitz <drow@mvista.com>
14411
14412 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14413 defined(PT_FPR0_HI).
14414
23ce3b1c
DJ
144152002-11-17 Stuart Hughes <seh@zee2.com>
14416
14417 * linux-arm-low.c (arm_num_regs): Increase.
14418 (arm_regmap): Include status register.
14419
144202002-11-17 Daniel Jacobowitz <drow@mvista.com>
14421
14422 * linux-low.c (register_addr): Remove incorrect -1 check.
14423
a9fa9f7d
DJ
144242002-08-29 Daniel Jacobowitz <drow@mvista.com>
14425
14426 * linux-low.c (linux_create_inferior): Call setpgid. Return
14427 the new PID.
14428 (unstopped_p, linux_signal_pid): Remove.
14429 (linux_target_ops): Remove linux_signal_pid.
14430 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14431 global instead of target method.
14432 * target.h (struct target_ops): Remove signal_pid. Update comment
14433 for create_inferior.
14434 * server.c (signal_pid): New variable.
14435 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14436 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14437 (attach_inferior): Set signal_pid.
14438
17574093
DJ
144392002-08-23 Daniel Jacobowitz <drow@mvista.com>
14440
14441 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14442
144432002-08-20 Jim Blandy <jimb@redhat.com>
14444
14445 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14446 default for this.
14447
144482002-08-01 Andrew Cagney <cagney@redhat.com>
14449
14450 * Makefile.in: Make chill references obsolete.
14451
144522002-07-24 Kevin Buettner <kevinb@redhat.com>
14453
14454 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14455 * configure: Regenerate.
14456 * config.in: Regenerate.
14457
144582002-07-09 David O'Brien <obrien@FreeBSD.org>
14459
14460 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14461 (perror_with_name, remote_close, remote_open, expect, play): Static.
14462
144632002-07-04 Michal Ludvig <mludvig@suse.cz>
14464
4b8dad4a 14465 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14466 byte offsets instead of an array of indexes.
14467 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14468
144692002-06-13 Daniel Jacobowitz <drow@mvista.com>
14470
14471 * regcache.c: Add comment.
14472
144732002-06-11 Daniel Jacobowitz <drow@mvista.com>
14474
14475 * thread-db.c: New file.
14476 * proc-service.c: New file.
14477 * acinclude.m4: New file.
14478 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14479 proc-service.o, and thread-db.o.
14480 (linux-low.o): Add USE_THREAD_DB.
14481 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14482 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14483 * aclocal.m4: Regenerated.
14484 * config.in: Regenerated.
14485 * configure: Regenerated.
14486 * configure.in: Check for proc_service.h, sys/procfs.h,
14487 thread_db.h, and linux/elf.h headrs.
14488 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14489 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14490 Check for -lthread_db and thread support.
14491 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14492 PowerPC, and SuperH.
14493 * i387-fp.c: Constify arguments.
14494 * i387-fp.h: Likewise.
14495 * inferiors.c: (struct thread_info): Renamed from
14496 `struct inferior_info'. Remove PID member. Use generic inferior
14497 list header. All uses updated.
14498 (inferiors, signal_pid): Removed.
14499 (all_threads): New variable.
14500 (get_thread): Define.
14501 (add_inferior_to_list): New function.
14502 (for_each_inferior): New function.
14503 (change_inferior_id): New function.
14504 (add_inferior): Removed.
14505 (remove_inferior): New function.
14506 (add_thread): New function.
14507 (free_one_thread): New function.
14508 (remove_thread): New function.
14509 (clear_inferiors): Use for_each_inferior and free_one_thread.
14510 (find_inferior): New function.
14511 (find_inferior_id): New function.
14512 (inferior_target_data): Update argument type.
14513 (set_inferior_target_data): Likewise.
14514 (inferior_regcache_data): Likewise.
14515 (set_inferior_regcache_data): Likewise.
14516 * linux-low.c (linux_bp_reinsert): Remove.
14517 (all_processes, stopping_threads, using_thrads)
14518 (struct pending_signals, debug_threads, pid_of): New.
14519 (inferior_pid): Replace with macro.
14520 (struct inferior_linux_data): Remove.
14521 (get_stop_pc, add_process): New functions.
14522 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14523 Use add_process and add_thread.
14524 (linux_attach_lwp): New function, based on old linux_attach. Use
14525 add_process and add_thread. Set stop_expected for new threads.
14526 (linux_attach): New function.
14527 (linux_kill_one_process): New function.
14528 (linux_kill): Kill all LWPs.
14529 (linux_thread_alive): Use find_inferior_id.
14530 (check_removed_breakpoints, status_pending_p): New functions.
14531 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14532 Update. Use WNOHANG. Wait for cloned processes also. Update process
14533 struct for the found process.
14534 (linux_wait_for_event): New function.
14535 (linux_wait): Use it. Support LWPs.
14536 (send_sigstop, wait_for_sigstop, stop_all_processes)
14537 (linux_resume_one_process, linux_continue_one_process): New functions.
14538 (linux_resume): Support LWPs.
14539 (REGISTER_RAW_SIZE): Remove.
14540 (fetch_register): Use register_size instead. Call supply_register.
14541 (usr_store_inferior_registers): Likewise. Call collect_register.
14542 Fix recursive case.
14543 (regsets_fetch_inferior_registers): Improve error message.
14544 (regsets_store_inferior_registers): Add debugging.
14545 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14546 (unstopped_p, linux_signal_pid): New functions.
14547 (linux_target_ops): Add linux_signal_pid.
14548 (linux_init_signals): New function.
14549 (initialize_low): Call it. Initialize using_threads.
14550 * regcache.c (inferior_regcache_data): Add valid
14551 flag.
14552 (get_regcache): Fetch registers lazily. Add fetch argument
14553 and update all callers.
14554 (regcache_invalidate_one, regcache_invalidate): New
14555 functions.
14556 (new_register_cache): Renamed from create_register_cache.
14557 Return the new regcache.
14558 (free_register_cache): Change argument to a void *.
14559 (registers_to_string, registers_from_string): Call get_regcache
14560 with fetch flag set.
14561 (register_data): Make static. Pass fetch flag to get_regcache.
14562 (supply_register): Call get_regcache with fetch flag clear.
14563 (collect_register): Call get_regcache with fetch flag set.
14564 (collect_register_as_string): New function.
14565 * regcache.h: Update.
14566 * remote-utils.c (putpkt): Flush after debug output and use
14567 stderr.
14568 Handle input interrupts while waiting for an ACK.
14569 (input_interrupt): Use signal_pid method.
14570 (getpkt): Flush after debug output and use stderr.
14571 (outreg): Use collect_register_as_string.
14572 (new_thread_notify, dead_thread_notify): New functions.
14573 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14574 and general_thread.
14575 (look_up_one_symbol): Flush after debug output.
14576 * server.c (step_thread, server_waiting): New variables.
14577 (start_inferior): Don't use signal_pid. Update call to mywait.
14578 (attach_inferior): Update call to mywait.
14579 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14580 (main): Don't fetch/store registers explicitly. Use
14581 set_desired_inferior. Support proposed ``Hs'' packet. Update
14582 calls to mywait.
14583 * server.h: Update.
14584 (struct inferior_list, struct_inferior_list_entry): New.
14585 * target.c (set_desired_inferior): New.
14586 (write_inferior_memory): Constify.
14587 (mywait): New function.
14588 * target.h: Update.
14589 (struct target_ops): New signal_pid method.
14590 (mywait): Removed macro, added prototype.
14591
14592 * linux-low.h (regset_func): Removed.
14593 (regset_fill_func, regset_store_func): New.
14594 (enum regset_type): New.
14595 (struct regset_info): Add type field. Use new operation types.
14596 (struct linux_target_ops): stop_pc renamed to get_pc.
14597 Add decr_pc_after_break and breakpoint_at.
14598 (get_process, get_thread_proess, get_process_thread)
14599 (strut process_info, all_processes, linux_attach_lwp)
14600 (thread_db_init): New.
14601
14602 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14603 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14604 (the_low_target): Add new members.
14605 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14606 (i386_store_fpxregset): Constify.
14607 (target_regsets): Add new kind identifier.
14608 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14609 (i386_set_pc): Add debugging.
14610 (i386_breakpoint_at): New function.
14611 (the_low_target): Add new members.
14612 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14613 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14614 (mips_breakpoint_at): New.
14615 (the_low_target): Add new members.
14616 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14617 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14618 (the_low_target): Add new members.
14619 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14620 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14621 (the_low_target): Add new members.
14622 * linux-x86-64-low.c (target_regsets): Add new kind
14623 identifier.
14624
146252002-05-15 Daniel Jacobowitz <drow@mvista.com>
14626
14627 From Martin Pool <mbp@samba.org>:
14628 * server.c (gdbserver_usage): New function.
14629 (main): Call it.
14630
146312002-05-14 Daniel Jacobowitz <drow@mvista.com>
14632
14633 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14634 stop_at -> stop_pc.
14635
146362002-05-04 Andrew Cagney <ac131313@redhat.com>
14637
14638 * Makefile.in: Remove obsolete code.
14639
146402002-04-24 Michal Ludvig <mludvig@suse.cz>
14641
14642 * linux-low.c (regsets_fetch_inferior_registers),
14643 (regsets_store_inferior_registers): Removed cast to int from
14644 ptrace() calls.
14645 * regcache.h: Added declaration of struct inferior_info.
14646
146472002-04-20 Daniel Jacobowitz <drow@mvista.com>
14648
14649 * inferiors.c (struct inferior_info): Add regcache_data.
14650 (add_inferior): Call create_register_cache.
14651 (clear_inferiors): Call free_register_cache.
14652 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14653 * regcache.c (struct inferior_regcache_data): New.
14654 (registers): Remove.
14655 (get_regcache): New function.
14656 (create_register_cache, free_register_cache): New functions.
14657 (set_register_cache): Don't initialize the register cache here.
14658 (registers_to_string, registers_from_string, register_data): Call
14659 get_regcache.
14660 * regcache.h: Add prototypes.
14661 * server.h: Likewise.
14662
146632002-04-20 Daniel Jacobowitz <drow@mvista.com>
14664
14665 * mem-break.c: New file.
14666 * mem-break.h: New file.
14667 * Makefile.in: Add mem-break.o rule; update server.h
14668 dependencies.
14669 * inferiors.c (struct inferior_info): Add target_data
14670 member.
14671 (clear_inferiors): Free target_data member if set.
14672 (inferior_target_data, set_inferior_target_data): New functions.
14673 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14674 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14675 * linux-low.c (linux_bp_reinsert): New variable.
14676 (struct inferior_linux_data): New.
14677 (linux_create_inferior): Use set_inferior_target_data.
14678 (linux_attach): Likewise. Call add_inferior.
14679 (linux_wait_for_one_inferior): New function.
14680 (linux_wait): Call it.
14681 (linux_write_memory): Add const.
14682 (initialize_low): Call set_breakpoint_data.
14683 * linux-low.h (struct linux_target_ops): Add breakpoint
14684 handling members.
14685 * server.c (attach_inferior): Remove extra add_inferior
14686 call.
14687 * server.h: Include mem-break.h. Update inferior.c
14688 prototypes.
14689 * target.c (read_inferior_memory)
14690 (write_inferior_memory): New functions.
14691 * target.h (read_inferior_memory)
14692 (write_inferior_memory): Change macros to prototypes.
14693 (struct target_ops): Update comments. Add const to write_memory
14694 definition.
14695
146962002-04-11 Daniel Jacobowitz <drow@mvista.com>
14697
14698 * linux-low.c (usr_store_inferior_registers): Support
14699 registers which are allowed to fail to store.
14700 * linux-low.h (linux_target_ops): Likewise.
14701 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14702 (ppc_cannot_store_register): FPSCR may not be storable.
14703
147042002-04-09 Daniel Jacobowitz <drow@mvista.com>
14705
14706 * server.h: Include <string.h> if HAVE_STRING_H.
14707 * ChangeLog: Correct paths in last ChangeLog entry.
14708
147092002-04-09 Daniel Jacobowitz <drow@mvista.com>
14710
14711 * linux-low.h: Remove obsolete prototypes.
14712 (struct linux_target_ops): New.
14713 (extern the_low_target): New.
14714 * linux-low.c (num_regs, regmap): Remove declarations.
14715 (register_addr): Use the_low_target explicitly.
14716 (fetch_register): Likewise.
14717 (usr_fetch_inferior_registers): Likewise.
14718 (usr_store_inferior_registers): Likewise.
14719 * linux-arm-low.c (num_regs): Remove.
14720 (arm_num_regs): Define.
14721 (arm_regmap): Renamed from regmap, made static.
14722 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14723 made static.
14724 (arm_cannot_store_register): Renamed from cannot_store_register,
14725 made static.
14726 (the_low_target): New.
14727 * linux-i386-low.c (num_regs): Remove.
14728 (i386_num_regs): Define.
14729 (i386_regmap): Renamed from regmap, made static.
14730 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14731 made static.
14732 (i386_cannot_store_register): Renamed from cannot_store_register,
14733 made static.
14734 (the_low_target): New.
14735 * linux-ia64-low.c (num_regs): Remove.
14736 (ia64_num_regs): Define.
14737 (ia64_regmap): Renamed from regmap, made static.
14738 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14739 made static.
14740 (ia64_cannot_store_register): Renamed from cannot_store_register,
14741 made static.
14742 (the_low_target): New.
14743 * linux-m68k-low.c (num_regs): Remove.
14744 (m68k_num_regs): Define.
14745 (m68k_regmap): Renamed from regmap, made static.
14746 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14747 made static.
14748 (m68k_cannot_store_register): Renamed from cannot_store_register,
14749 made static.
14750 (the_low_target): New.
14751 * linux-mips-low.c (num_regs): Remove.
14752 (mips_num_regs): Define.
14753 (mips_regmap): Renamed from regmap, made static.
14754 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14755 made static.
14756 (mips_cannot_store_register): Renamed from cannot_store_register,
14757 made static.
14758 (the_low_target): New.
14759 * linux-ppc-low.c (num_regs): Remove.
14760 (ppc_num_regs): Define.
14761 (ppc_regmap): Renamed from regmap, made static.
14762 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14763 made static.
14764 (ppc_cannot_store_register): Renamed from cannot_store_register,
14765 made static.
14766 (the_low_target): New.
14767 * linux-s390-low.c (num_regs): Remove.
14768 (s390_num_regs): Define.
14769 (s390_regmap): Renamed from regmap, made static.
14770 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14771 made static.
14772 (s390_cannot_store_register): Renamed from cannot_store_register,
14773 made static.
14774 (the_low_target): New.
14775 * linux-sh-low.c (num_regs): Remove.
14776 (sh_num_regs): Define.
14777 (sh_regmap): Renamed from regmap, made static.
14778 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14779 made static.
14780 (sh_cannot_store_register): Renamed from cannot_store_register,
14781 made static.
14782 (the_low_target): New.
14783 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14784 (the_low_target): New.
14785
147862002-04-09 Daniel Jacobowitz <drow@mvista.com>
14787
14788 * Makefile.in: Add stamp-h target.
14789 * configure.in: Create stamp-h.
14790 * configure: Regenerated.
14791
147922002-04-09 Daniel Jacobowitz <drow@mvista.com>
14793
14794 * inferiors.c: New file.
14795 * target.c: New file.
14796 * target.h: New file.
14797 * Makefile.in: Add target.o and inferiors.o. Update
14798 dependencies.
14799 * linux-low.c (inferior_pid): New static variable,
14800 moved from server.c.
14801 (linux_create_inferior): Renamed from create_inferior.
14802 Call add_inferior. Return 0 on success instead of a PID.
14803 (linux_attach): Renamed from myattach.
14804 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14805 (linux_thread_alive): Renamed from mythread_alive.
14806 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14807 child dies.
14808 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14809 (regsets_store_inferior_registers): Correct error message.
14810 Add missing ``return 0''.
14811 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14812 (linux_store_registers): Renamed from store_inferior_registers.
14813 (linux_read_memory): Renamed from read_inferior_memory.
14814 (linux_write_memory): Renamed from write_inferior_memory.
14815 (linux_target_ops): New structure.
14816 (initialize_low): Call set_target_ops ().
14817 * remote-utils.c (unhexify): New function.
14818 (hexify): New function.
14819 (input_interrupt): Send signals to ``signal_pid''.
14820 * server.c (inferior_pid): Remove.
14821 (start_inferior): Update create_inferior call.
14822 (attach_inferior): Call add_inferior.
14823 (handle_query): New function.
14824 (main): Call handle_query for `q' packets.
14825 * server.h: Include "target.h". Remove obsolete prototypes.
14826 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14827
148282002-04-09 Daniel Jacobowitz <drow@mvista.com>
14829
14830 * Makefile.in: Add WARN_CFLAGS. Update configury
14831 dependencies.
14832 * configure.in: Check for <string.h>
14833 * configure: Regenerate.
14834 * config.in: Regenerate.
14835 * gdbreplay.c: Include needed system headers.
14836 (remote_open): Remove strchr prototype.
14837 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14838 * regcache.c (supply_register): Change buf argument to const void *.
14839 (supply_register_by_name): Likewise.
14840 (collect_register): Change buf argument to void *.
14841 (collect_register_by_name): Likewise.
14842 * regcache.h: Add missing prototypes.
14843 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14844 * server.c (handle_query): New function.
14845 (attached): New static variable, moved out of main.
14846 (main): Quiet longjmp clobber warnings.
14847 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14848 * utils.c (error): Remove NORETURN.
14849 (fatal): Likewise.
This page took 2.026657 seconds and 4 git commands to generate.