]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Change linespec_result::location to be an event_location_up
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
7c5ded6a
SDJ
12017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * server.c: Include <vector>.
4 <program_argv, wrapper_argv>: Convert to std::vector.
5 (start_inferior): Rewrite function to use C++.
6 (handle_v_run): Likewise. Update code that calculates the argv
7 based on the vRun packet; use C++.
8 (captured_main): Likewise.
9
436252de
SM
102017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11
12 * server.c (handle_v_cont): Initialize thread_resume::thread
13 with null_ptid.
14
9bf2a700
PA
152017-04-05 Pedro Alves <palves@redhat.com>
16
17 * configure: Regenerate.
18
a121b7c1
PA
192017-04-05 Pedro Alves <palves@redhat.com>
20
21 * gdbreplay.c (sync_error): Constify.
22 * linux-x86-low.c (push_opcode): Constify.
23
21c8a587
PA
242017-04-05 Pedro Alves <palves@redhat.com>
25
26 * win32-low.c (get_child_debug_event)
27 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
28 Report TARGET_WAITKIND_SPURIOUS instead.
29
fb32b4f7
PA
302017-04-05 Pedro Alves <palves@redhat.com>
31
32 * remote-utils.c (remote_prepare, remote_open): Constify.
33 * remote-utils.h (remote_prepare, remote_open): Constify.
34 * server.c (captured_main): Constify 'port' handling.
35
65dd1e59
SM
362017-04-04 Simon Marchi <simon.marchi@ericsson.com>
37
38 * Makefile.in (clean): Clear .deps.
39
8fa5b777
SM
402017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
41
42 * .gitignore: Remove generated files, replace with wildcard.
43 * (clean): Replace removal of generated files with wildcard.
44 (version.c): Replace with...
45 (version-generated.c): ...this.
46 (xml-builtin.c): Replace with...
47 (xml-builtin-generated.c): ...this.
48 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
49 (%.c: *regformats*): Replace with...
50 (%-generated.c: *regformats*): ...this.
51
a12e714b
MF
522017-03-27 Max Filippov <jcmvbkbc@gmail.com>
53
54 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
55 (xtensa_fill_gregset): Call collect_register_by_name for
56 threadptr register.
57 (xtensa_store_gregset): Call supply_register_by_name for
58 threadptr register.
59
1a09b50a
MF
602017-03-27 Max Filippov <jcmvbkbc@gmail.com>
61
62 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
63 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
64 (xtensa_store_gregset): Call supply_register for all registers in
65 a0_regnum..a0_regnum + C0_NREGS range.
66
1a01e7c6
SM
672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
68
69 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
70 (ax-ipa.o: ax.c): Remove.
71 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
72 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
73 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
74 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
75 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
76
36bc18a8
SM
772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
78
79 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
80 (print-utils-ipa.o: ../common/print-utils.c): Remove.
81 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
82 (errors-ipa.o: ../common/errors.c): Remove.
83 (format-ipa.o: ../common/format.c): Remove.
84 (common-utils-ipa.o: ../common/common-utils.c): Remove.
85
a8ebe3d5
SM
862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
87
88 * Makefile.in (%-ipa.o: %.c): New rule.
89 (tracepoint-ipa.o: tracepoint.c): Remove.
90 (utils-ipa.o: utils.c): Remove.
91 (remote-utils-ipa.o: remote-utils.c): Remove.
92 (regcache-ipa.o: regcache.c): Remove.
93 (i386-linux-ipa.o: i386-linux.c): Remove.
94 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
95 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
96 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
97 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
98 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
99 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
100 (amd64-linux-ipa.o: amd64-linux.c): Remove.
101 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
102 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
103 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
104 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
105 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
106 (aarch64-ipa.o: aarch64.c): Remove.
107 (s390-linux32-ipa.o: s390-linux32.c): Remove.
108 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
109 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
110 (s390-linux64-ipa.o: s390-linux64.c): Remove.
111 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
112 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
113 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
114 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
115 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
116 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
117 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
118 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
119 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
120 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
121 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
122 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
123 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
124 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
125 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
126 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
127 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
128 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
129 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
130 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
131 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
132 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
133 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
134 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
135 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
136 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
137 (tdesc-ipa.o: tdesc.c): Remove.
138 (x32-linux-ipa.o: x32-linux.c): Remove.
139 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
140 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
141
50cfacb7
SM
1422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
143
144 * Makefile.in (%.o: ../arch/%.c): New rule.
145 (arm.o: ../arch/arm.c): Remove.
146 (arm-linux.o: ../arch/arm-linux.c): Remove.
147 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
148 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
149
c5a22423
SM
1502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
151
152 * Makefile.in (%.o: ../nat/%.c): New rule.
153 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
154 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
155 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
156 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
157 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
158 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
159 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
160 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
161 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
162 (linux-personality.o: ../nat/linux-personality.c): Remove.
163 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
164 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
165 (x86-linux.o: ../nat/x86-linux.c): Remove.
166 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
167 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
168
6bda016b
SM
1692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
170
171 * Makefile.in (%.o: ../common/%.c): New rule.
172 (signals.o: ../common/signals.c): Remove.
173 (print-utils.o: ../common/print-utils.c): Remove.
174 (rsp-low.o: ../common/rsp-low.c): Remove.
175 (common-utils.o: ../common/common-utils.c): Remove.
176 (posix-strerror.o: ../common/posix-strerror.c): Remove.
177 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
178 (vec.o: ../common/vec.c): Remove.
179 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
180 (xml-utils.o: ../common/xml-utils.c): Remove.
181 (ptid.o: ../common/ptid.c): Remove.
182 (buffer.o: ../common/buffer.c): Remove.
183 (format.o: ../common/format.c): Remove.
184 (filestuff.o: ../common/filestuff.c): Remove.
185 (agent.o: ../common/agent.c): Remove.
186 (errors.o: ../common/errors.c): Remove.
187 (environ.o: ../common/environ.c): Remove.
188 (common-debug.o: ../common/common-debug.c): Remove.
189 (cleanups.o: ../common/cleanups.c): Remove.
190 (common-exceptions.o: ../common/common-exceptions.c): Remove.
191 (fileio.o: ../common/fileio.c): Remove.
192 (common-regcache.o: ../common/common-regcache.c): Remove.
193 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
194 (new-op.o: ../common/new-op.c): Remove.
195 (btrace-common.o: ../common/btrace-common.c): Remove.
196
21122961
SM
1972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
198
199 * Makefile.in (%.o: ../target/%.c): New rule.
200 (waitstatus.o: ../target/waitstatus.c): Remove.
201
c362e621
SM
2022017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
203
204 * Makefile.in
205 (%.c: ../regformats/%.dat,
206 (%.c: ../regformats/arm/%.dat,
207 (%.c: ../regformats/i386/%.dat,
208 (%.c: ../regformats/rs6000/%.dat): New rules.
209 (aarch64.c): Remove.
210 (reg-arm.c): Remove.
211 (arm-with-iwmmxt.c): Remove.
212 (arm-with-vfpv2.c): Remove.
213 (arm-with-vfpv3.c): Remove.
214 (arm-with-neon.c): Remove.
215 (reg-bfin.c): Remove.
216 (reg-cris.c): Remove.
217 (reg-crisv32.c): Remove.
218 (i386.c): Remove.
219 (i386-linux.c): Remove.
220 (i386-avx.c): Remove.
221 (i386-avx-linux.c): Remove.
222 (i386-avx-avx512.c): Remove.
223 (i386-avx-avx512-linux.c): Remove.
224 (i386-mpx.c): Remove.
225 (i386-mpx-linux.c): Remove.
226 (i386-avx-mpx-avx512-pku.c): Remove.
227 (i386-avx-mpx-avx512-pku-linux.c): Remove.
228 (i386-avx-mpx.c): Remove.
229 (i386-avx-mpx-linux.c): Remove.
230 (i386-mmx.c): Remove.
231 (i386-mmx-linux.c): Remove.
232 (reg-ia64.c): Remove.
233 (reg-m32r.c): Remove.
234 (reg-m68k.c): Remove.
235 (reg-cf.c): Remove.
236 (mips-linux.c): Remove.
237 (mips-dsp-linux.c): Remove.
238 (mips64-linux.c): Remove.
239 (mips64-dsp-linux.c): Remove.
240 (nios2-linux.c): Remove.
241 (powerpc-32.c): Remove.
242 (powerpc-32l.c): Remove.
243 (powerpc-altivec32l.c): Remove.
244 (powerpc-cell32l.c): Remove.
245 (powerpc-vsx32l.c): Remove.
246 (powerpc-isa205-32l.c): Remove.
247 (powerpc-isa205-altivec32l.c): Remove.
248 (powerpc-isa205-vsx32l.c): Remove.
249 (powerpc-e500l.c): Remove.
250 (powerpc-64l.c): Remove.
251 (powerpc-altivec64l.c): Remove.
252 (powerpc-cell64l.c): Remove.
253 (powerpc-vsx64l.c): Remove.
254 (powerpc-isa205-64l.c): Remove.
255 (powerpc-isa205-altivec64l.c): Remove.
256 (powerpc-isa205-vsx64l.c): Remove.
257 (s390-linux32.c): Remove.
258 (s390-linux32v1.c): Remove.
259 (s390-linux32v2.c): Remove.
260 (s390-linux64.c): Remove.
261 (s390-linux64v1.c): Remove.
262 (s390-linux64v2.c): Remove.
263 (s390-te-linux64.c): Remove.
264 (s390-vx-linux64.c): Remove.
265 (s390-tevx-linux64.c): Remove.
266 (s390x-linux64.c): Remove.
267 (s390x-linux64v1.c): Remove.
268 (s390x-linux64v2.c): Remove.
269 (s390x-te-linux64.c): Remove.
270 (s390x-vx-linux64.c): Remove.
271 (s390x-tevx-linux64.c): Remove.
272 (tic6x-c64xp-linux.c): Remove.
273 (tic6x-c64x-linux.c): Remove.
274 (tic6x-c62x-linux.c): Remove.
275 (reg-sh.c): Remove.
276 (reg-sparc64.c): Remove.
277 (reg-spu.c): Remove.
278 (amd64.c): Remove.
279 (amd64-linux.c): Remove.
280 (amd64-avx.c): Remove.
281 (amd64-avx-linux.c): Remove.
282 (amd64-avx-avx512.c): Remove.
283 (amd64-avx-avx512-linux.c): Remove.
284 (amd64-mpx.c): Remove.
285 (amd64-mpx-linux.c): Remove.
286 (amd64-avx-mpx-avx512-pku.c): Remove.
287 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
288 (amd64-avx-mpx.c): Remove.
289 (amd64-avx-mpx-linux.c): Remove.
290 (x32.c): Remove.
291 (x32-linux.c): Remove.
292 (x32-avx.c): Remove.
293 (x32-avx-linux.c): Remove.
294 (x32-avx-avx512.c): Remove.
295 (x32-avx-avx512-linux.c): Remove.
296 (reg-xtensa.c): Remove.
297 (reg-tilegx.c): Remove.
298 (reg-tilegx32.c): Remove.
299
1672e0d9
SDJ
3002017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
301
302 * Makefile.in (SFILES): Add "common/environ.c".
303 (OBJS): Add "common/environ.h".
304
239b6d10
WT
3052017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
306
307 * configure.ac: Check if the fs_base and gs_base members of
308 `struct user_regs_struct' exist.
309 * config.in: Regenerated.
310 * configure: Likewise.
311
694b382c
AT
3122017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
313
314 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
315 target_read_memory.
316 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
317 (get_next_pcs_syscall_next_pc): Likewise.
318
7dc53023
LM
3192016-12-23 Luis Machado <lgustavo@codesourcery.com>
320
321 * win32-i386-low.c: Fix incorrect reference to a couple source files.
322 * nto-x86-low.c: Likewise.
323
ad02e4fe
SM
3242016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
325
326 * Makefile.in: Include disable-implicit-rules.mk.
327
dcb07cfa
PA
3282016-11-23 Pedro Alves <palves@redhat.com>
329
330 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
331 (debug_vprintf): Use std::chrono::steady_clock instead of
332 gettimeofday. Use '.' instead of ':'.
333 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
334 (get_timestamp): Use std::chrono::steady_clock instead of
335 gettimeofday.
336
8629c02c
SM
3372016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
338
339 * Makefile.in: Fix whitespace formatting.
340
b593ecca
SM
3412016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
342
343 * Makefile.in (SFILES, OBS): Flatten list and order
344 alphabetically.
345
9986ba08
PA
3462016-11-23 Pedro Alves <palves@redhat.com>
347
348 * event-loop.c (handle_file_event): Use warning.
349 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
350 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
351 Use warning.
352
4eefa7bc
PA
3532016-11-23 Pedro Alves <palves@redhat.com>
354
355 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
356 output.
357 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
358 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
359 debug_printf and debug_flush for debug output.
360 * server.c (handle_general_set): Likewise.
361 * thread-db.c (try_thread_db_load): Use debug_printf for debug
362 output.
363
5443506e
SM
3642016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
365
366 * Makefile.in (.c.o): Replace rule with ...
367 (%.o: %.c): ... this one.
368
3b165252
SM
3692016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
370
371 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
372 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
373 make.
374 * configure.ac: Remove checks for the make program.
375 * configure: Re-generate.
376
0bcda685
PA
3772016-10-28 Pedro Alves <palves@redhat.com>
378
379 * Makefile.in (CXX_DIALECT): Get from configure.
380 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
381 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
382 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
383 * config.in: Regenerate.
384 * configure: Regenerate.
385
c3805894
YQ
3862016-10-27 Yao Qi <yao.qi@linaro.org>
387
388 * linux-low.c (linux_supports_range_stepping): Return true if
389 can_software_single_step return true.
390
89342618
YQ
3912016-10-27 Yao Qi <yao.qi@linaro.org>
392
393 * inferiors.c (find_inferior_in_random): New function.
394 * inferiors.h (find_inferior_in_random): Declare.
395 * linux-low.c (linux_wait_for_event_filtered): Call
396 find_inferior_in_random instead of find_inferior.
397
e3652c84
YQ
3982016-10-27 Yao Qi <yao.qi@linaro.org>
399
400 * linux-low.c (linux_wait_1): If single-step breakpoints are
401 inserted, remove them.
402
5a04c4cf
PA
4032016-10-26 Pedro Alves <palves@redhat.com>
404
405 * linux-low.c (handle_extended_wait): Link parent/child fork
406 threads.
407 (linux_wait_1): Unlink them.
408 (linux_set_resume_request): Ignore resume requests for
409 already-resumed and unhandled fork child threads.
410 * linux-low.h (struct lwp_info) <fork_relative>: New field.
411 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
412 New functions.
413 (handle_v_requests) <vCont>: Don't call require_running.
414 * server.h (in_queued_stop_replies): New declaration.
415
cb93dc7f
YQ
4162016-10-24 Yao Qi <yao.qi@linaro.org>
417
418 PR server/20733
419 * linux-aarch64-low.c (append_insns): Cast the return value to
420 'uint32_t *'.
421
a1078bea
YQ
4222016-10-10 Yao Qi <yao.qi@linaro.org>
423
424 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
425
1fb77080
SDJ
4262016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
427
428 * target.c (target_supports_multi_process): New function, moved
429 from...
430 * target.h (target_supports_multi_process): ... here. Remove
431 macro.
432
39b5a3b9
TT
4332016-10-05 Tom Tromey <tom@tromey.com>
434
435 PR remote/20655:
436 * tracepoint.c (handle_tracepoint_bkpts): Check
437 ipa_error_tracepoint, not ipa_stopping_tracepoint.
438
c1d0b70a
YQ
4392016-10-05 Yao Qi <yao.qi@linaro.org>
440
441 * configure.srv: Update the path of arm-*.xml files.
442
0a69eedb
YQ
4432016-10-05 Terry Guo <terry.guo@arm.com>
444 Yao Qi <yao.qi@linaro.org>
445
446 * Makefile.in: Adjust the path of rules.
447 * configure.srv: Update the path of xml files.
448 * regformats/arm-with-iwmmxt.dat: Regenerated.
449 * regformats/arm-with-neon.dat: Likewise.
450 * regformats/arm-with-vfpv2.dat: Likewise.
451 * regformats/arm-with-vfpv3.dat Likewise.
452
17e16485
YQ
4532016-09-30 Yao Qi <yao.qi@linaro.org>
454
455 PR gdbserver/20627
456 * target.c (target_stop_and_wait): Don't call
457 target_continue_no_signal, use resume_stop instead.
458
edeeb602
YQ
4592016-09-26 Yao Qi <yao.qi@linaro.org>
460
461 * linux-low.c (linux_wait_1): Call debug_exit.
462
503b1c39
PA
4632016-09-23 Pedro Alves <palves@redhat.com>
464
465 * Makefile.in (SFILES): Add common/new-op.c.
466 (OBS): Add common/new-op.o.
467 (new-op.o): New rule.
468
74172ecf
SM
4692016-09-21 Simon Marchi <simon.marchi@ericsson.com>
470
471 * .gitinore: Ignore more files.
472
fc6cda2e
YQ
4732016-09-21 Yao Qi <yao.qi@linaro.org>
474
475 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
476 23.
477
bc1e6c81
SDJ
4782016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
479
480 * server.c (start_inferior): Call target_mourn_inferior instead of
481 mourn_inferior; pass ptid_t argument to it.
482 (resume): Likewise.
483 (handle_target_event): Likewise.
484 * target.c (target_mourn_inferior): New function.
485 * target.h (mourn_inferior): Delete macro.
486
0e00e962
AA
4872016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
488
489 * linux-low.c (lwp_is_stepping): New function.
490
1d8cb77d
CL
4912016-09-06 Carl Love <cel@us.ibm.com>
492
493 * server.c (start_inferior): Fixed comment, requested comment change
494 didn't get updated correctly. Removed reference to ptrace () call as
495 it is only true on Linux systems.
496
7313bced
CL
4972016-09-06 Carl Love <cel@us.ibm.com>
498
499 * server.c (start_inferior): Do not call
500 function target_post_create_inferior () if the
501 inferior process has already exited.
502
cf6de44d
PA
5032016-09-05 Pedro Alves <palves@redhat.com>
504
505 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
506 (COMPILE.pre, CC_LD): Use CXX directly.
507 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
508 * acinclude.m4: Don't include build-with-cxx.m4.
509 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
510 * configure: Regenerate.
511
c1da6748
AT
5122016-09-02 Akash Trehan <akash.trehan123@gmail.com>
513
514 PR gdb/19495
515 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
516 call writing data to own_buf.
517
f2b9e3df
SDJ
5182016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
519
520 * target.c (mywait): Call target_wait instead of
521 the_target->wait.
522 (target_wait): New function.
523
049a8570
SDJ
5242016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
525
526 * server.c (start_inferior): New variable 'ptid'. Replace calls
527 to the_target->resume by target_continue{,_no_signal}, depending
528 on the case.
529 * target.c (target_stop_and_wait): Call target_continue_no_signal
530 instead of the_target->resume.
531 (target_continue): New function.
532
3aa5cfa0
AT
5332016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
534
535 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
536
754653a7
AZ
5372016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
538
539 PR server/20491
540 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
541 ps_prochandle.
542 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
543 * linux-arm-low.c (ps_get_thread_area): Likewise.
544 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
545 * linux-m68k-low.c (ps_get_thread_area): Likewise.
546 * linux-mips-low.c (ps_get_thread_area): Likewise.
547 * linux-nios2-low.c (ps_get_thread_area): Likewise.
548 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
549 * linux-x86-low.c (ps_get_thread_area): Likewise.
550 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
551
ed036b40
PA
5522016-08-19 Pedro Alves <palves@redhat.com>
553
554 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
555
c8ef42ee
PA
5562016-08-19 Pedro Alves <palves@redhat.com>
557
558 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
559 comment. Use memcpy instead of casting through unsigned long.
560
9c235a72
PA
5612016-08-19 Pedro Alves <palves@redhat.com>
562
563 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
564 allocating around 0x80000000.
565
201506da
PA
5662016-08-19 Pedro Alves <palves@redhat.com>
567
568 PR gdb/20415
569 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
570 (x32-avx512-linux-ipa.o): New rules.
571 * configure.ac (x86_64-*-linux*): New x32 check.
572 * configure.srv (ipa_x32_linux_regobj): New.
573 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
574 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
575 descriptions.
576 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
577 descriptions.
578 * configure: Regenerate.
579
f348d89a
PA
5802016-08-09 Pedro Alves <palves@redhat.com>
581
582 PR gdb/18653
583 * Makefile.in (OBS): Add signals-state-save-restore.o.
584 (signals-state-save-restore.o): New rule.
585 * config.in: Regenerate.
586 * configure: Regenerate.
587 * linux-low.c: Include "signals-state-save-restore.h".
588 (linux_create_inferior): Call
589 restore_original_signals_state.
590 * server.c: Include "dispositions-save-restore.h".
591 (captured_main): Call save_original_signals_state.
592
1baf5149
PA
5932016-08-05 Pedro Alves <palves@redhat.com>
594
595 * configure: Regenerate.
596
fcd4a73d
YQ
5972016-08-04 Yao Qi <yao.qi@linaro.org>
598
599 * linux-low.c (regsets_fetch_inferior_registers): Check
600 errno is ESRCH or not.
601
979659d0
YQ
6022016-08-02 Yao Qi <yao.qi@linaro.org>
603
604 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
605 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
606 (thread_db_load_search): Update.
607 (try_thread_db_load_1): Don't look for td_ta_event_addr,
608 td_ta_set_event and td_ta_event_getmsg.
609
6598661d
PA
6102016-07-26 Pedro Alves <palves@redhat.com>
611
612 PR server/20414
613 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
614 of unsigned long for 64-bit registers and use uint32_t instead of
615 unsigned int for 32-bit registers.
616
9cf12d57
PA
6172016-07-26 Pedro Alves <palves@redhat.com>
618
619 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
620 to 'ptrace'.
621
305450ed
TT
6222016-07-21 Tom Tromey <tom@tromey.com>
623
624 * configure: Rebuild.
625
2583da7c
YQ
6262016-07-21 Yao Qi <yao.qi@linaro.org>
627
628 * mem-break.c (find_gdb_breakpoint): Cast bp to
629 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
630
21536b36
YQ
6312016-07-21 Yao Qi <yao.qi@linaro.org>
632
633 * server.c (handle_v_requests): Support s and S actions
634 if target_supports_software_single_step return true.
635
8901d193
YQ
6362016-07-21 Yao Qi <yao.qi@linaro.org>
637
638 * linux-low.c (resume_stopped_resumed_lwps): If resume request
639 is resume_step, call maybe_hw_step.
640 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
641 and unstop them.
642 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
643 breakpoints or not.
644 (proceed_one_lwp): If resume request is resume_step, install
645 reinsert breakpoints and call maybe_hw_step.
646
0e9a339e
YQ
6472016-07-21 Yao Qi <yao.qi@linaro.org>
648
649 * linux-low.c (proceed_one_lwp): Declare.
650 (linux_resume_one_thread): Remove local variable 'step'.
651 Lift code enqueue signal. Call proceed_one_lwp instead of
652 linux_resume_one_lwp.
653
4281b351
YQ
6542016-07-21 Yao Qi <yao.qi@linaro.org>
655
656 * linux-low.c (linux_resume_one_thread): Call
657 enqueue_pending_signal.
658
984a2c04
YQ
6592016-07-21 Yao Qi <yao.qi@linaro.org>
660
661 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
662 * inferiors.c (do_restore_current_thread_cleanup): New function.
663 (make_cleanup_restore_current_thread): Likewise.
664 * linux-low.c (install_software_single_step_breakpoints): Call
665 make_cleanup_restore_current_thread. Switch current_thread to
666 thread.
667
bec903c9
YQ
6682016-07-21 Yao Qi <yao.qi@linaro.org>
669
670 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
671 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
672 (clone_one_breakpoint): Likewise.
673 (delete_reinsert_breakpoints): Change parameter to thread.
674 Callers updated.
675 (has_reinsert_breakpoints): Likewise.
676 (uninsert_reinsert_breakpoints): Likewise.
677 (reinsert_reinsert_breakpoints): Likewise.
678 * mem-break.h (set_reinsert_breakpoint): Update declaration.
679 (delete_reinsert_breakpoints): Likewise.
680 (reinsert_reinsert_breakpoints): Likewise.
681 (uninsert_reinsert_breakpoints): Likewise.
682 (has_reinsert_breakpoints): Likewise.
683
63c40ec7
YQ
6842016-07-21 Yao Qi <yao.qi@linaro.org>
685
686 * inferiors.c (get_thread_process): Make parameter const.
687 * inferiors.h (get_thread_process): Update declaration.
688 * mem-break.c (clone_all_breakpoints): Remove all parameters.
689 Add new parameters child_thread and parent_thread. Callers
690 updated.
691 * mem-break.h (clone_all_breakpoints): Update declaration.
692
9aa76cd0
YQ
6932016-07-21 Yao Qi <yao.qi@linaro.org>
694
695 * mem-break.c (struct breakpoint) <cond_list>: Remove.
696 <command_list, handler>: Remove.
697 (struct gdb_breakpoint): New.
698 (struct other_breakpoint): New.
699 (struct reinsert_breakpoint): New.
700 (is_gdb_breakpoint): New function.
701 (any_persistent_commands): Update command_list if
702 is_gdb_breakpoint returns true.
703 (set_breakpoint): Create breakpoints according to their types.
704 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
705 (set_gdb_breakpoint_1): Likewise.
706 (set_gdb_breakpoint): Likewise.
707 (clear_breakpoint_conditions): Change parameter type to
708 'struct gdb_breakpoint *'.
709 (clear_breakpoint_commands): Likewise.
710 (clear_breakpoint_conditions_and_commands): Likewise.
711 (add_condition_to_breakpoint): Likewise.
712 (add_breakpoint_condition): Likewise.
713 (add_commands_to_breakpoint): Likewise.
714 (check_breakpoints): Check other_breakpoint.
715 (clone_one_breakpoint): Clone breakpopint according to its type.
716 * mem-break.h (struct gdb_breakpoint): Declare.
717 (set_gdb_breakpoint): Update declaration.
718 (clear_breakpoint_conditions_and_commands): Likewise.
719 (add_breakpoint_condition): Likewise.
720 (add_breakpoint_commands): Likewise.
721 * server.c (process_point_options): Change parameter type to
722 'struct gdb_breakpoint *'.
723
811f8301
YQ
7242016-07-21 Yao Qi <yao.qi@linaro.org>
725
726 * mem-break.c (set_breakpoint_at): Rename it to ...
727 (set_breakpoint_type_at): ... it.
728 (set_breakpoint_at): Call set_breakpoint_type_at.
729 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
730 * mem-break.h (set_breakpoint_at): Update comments.
731
b1c51e36
CLT
7322016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
733
734 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
735 to buf parameter.
736 (nios2_store_gregset): Likewise.
737
ced2dffb
PA
7382016-07-01 Pedro Alves <palves@redhat.com>
739 Antoine Tremblay <antoine.tremblay@ericsson.com>
740
741 * linux-low.c: Change interface to take the target lwp_info
742 pointer directly and return void. Handle detaching from a zombie
743 thread.
744 (linux_detach_lwp_callback): New function.
745 (linux_detach): Detach from the leader thread after detaching from
746 the clone threads.
747
2ac09a5b
YQ
7482016-06-28 Yao Qi <yao.qi@linaro.org>
749
750 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
751 for variable new_offset.
752 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
753 (aarch64_ftrace_insn_reloc_cb): Likewise.
754 (aarch64_ftrace_insn_reloc_tb): Likewise.
755 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
756 PRIx64 instead of PRIx32.
757
79e7fd4f
YQ
7582016-06-28 Yao Qi <yao.qi@linaro.org>
759
760 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
761 (the_low_target): Install arm_get_syscall_trapinfo.
762
061fc021
YQ
7632016-06-28 Yao Qi <yao.qi@linaro.org>
764
765 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
766 function.
767 (the_low_target): Install aarch64_get_syscall_trapinfo.
768
4cc32bec
YQ
7692016-06-28 Yao Qi <yao.qi@linaro.org>
770
771 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
772 Callers updated.
773 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
774 Remove parameter sysno.
775 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
776 sysret.
777
782c1122
AA
7782016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
779
780 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
781 (s390_emit_ne_goto): Likewise.
782 (s390_emit_lt_goto): Likewise.
783 (s390_emit_le_goto): Likewise.
784 (s390_emit_gt_goto): Likewise.
785 (s390_emit_ge_goto): Likewise.
786 (s390x_emit_eq_goto): Likewise.
787 (s390x_emit_ne_goto): Likewise.
788 (s390x_emit_lt_goto): Likewise.
789 (s390x_emit_le_goto): Likewise.
790 (s390x_emit_gt_goto): Likewise.
791 (s390x_emit_ge_goto): Likewise.
792 (s390_emit_ops_impl): Mark variable static.
793 (s390x_emit_ops): Likewise.
794
2e7b624b
YQ
7952016-06-17 Yao Qi <yao.qi@linaro.org>
796
797 * linux-low.c (handle_extended_wait): Call
798 uninsert_reinsert_breakpoints for the parent process. Remove
799 reinsert breakpoints from the child process. Reinsert them to
800 the parent process when vfork is done.
801 * mem-break.c (uninsert_reinsert_breakpoints): New function.
802 (reinsert_reinsert_breakpoints): New function.
803 * mem-break.h (uninsert_reinsert_breakpoints): Declare
804 (reinsert_reinsert_breakpoints): Declare.
805
8a81c5d7
YQ
8062016-06-17 Yao Qi <yao.qi@linaro.org>
807
808 * linux-low.c (handle_extended_wait): If the parent is doing
809 step-over, remove the reinsert breakpoints from the forked child.
810
f50bf8e5
YQ
8112016-06-17 Yao Qi <yao.qi@linaro.org>
812
813 * linux-low.c (unsuspend_all_lwps): Declare.
814 (linux_low_filter_event): If thread exited, call finish_step_over.
815 If step-over is finished, unsuspend other threads.
816
8376a3cb
YQ
8172016-06-17 Yao Qi <yao.qi@linaro.org>
818
819 * linux-low.c (linux_resume_one_lwp_throw): Assert
820 has_reinsert_breakpoints returns false.
821 * mem-break.c (delete_disabled_breakpoints): Assert
822 bp type isn't reinsert_breakpoint.
823
f79b145d
YQ
8242016-06-17 Yao Qi <yao.qi@linaro.org>
825
826 * linux-low.c (maybe_hw_step): New function.
827 (linux_resume_one_lwp_throw): Call maybe_hw_step.
828 (finish_step_over): Switch current_thread to lwp temporarily,
829 and assert has_reinsert_breakpoints returns true.
830 (proceed_one_lwp): Call maybe_hw_step.
831 * mem-break.c (has_reinsert_breakpoints): New function.
832 * mem-break.h (has_reinsert_breakpoints): Declare.
833
0ae534d2
JT
8342016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
835
836 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
837
fcdad592
YQ
8382016-05-17 Yao Qi <yao.qi@linaro.org>
839
840 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
841 instead of find_inferior.
842
9e784964
YQ
8432016-05-05 Yao Qi <yao.qi@linaro.org>
844
845 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
846 Initialize res to zero.
847
cf2ebb6e
YQ
8482016-05-05 Yao Qi <yao.qi@linaro.org>
849
850 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
851 to uint32_t.
852
c1aebf87
UW
8532016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
854
855 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
856 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
857 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
858
35fd2deb 8592016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 860 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
861
862 * tracepoint.c (write_inferior_int8): New function.
863 (cmd_qtenable_disable): Write enable flag using
864 write_inferior_int8.
865
484b3c32
YQ
8662016-04-25 Yao Qi <yao.qi@linaro.org>
867
868 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
869 (need_step_over_p): Return zero if the LWP has pending signals
870 can be delivered on software single step target.
871
85ba7d86
YQ
8722016-04-25 Yao Qi <yao.qi@linaro.org>
873
874 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
875 return instead of error.
876
3539aa13
YQ
8772016-04-22 Yao Qi <yao.qi@linaro.org>
878
879 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
880 to 23.
881
5b061e98
YQ
8822016-04-22 Yao Qi <yao.qi@linaro.org>
883
884 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
885 signal when stepping over breakpoint with software single
886 step.
887
3451269c
PA
8882016-04-21 Pedro Alves <palves@redhat.com>
889
890 * linux-s390-low.c (s390_collect_ptrace_register)
891 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
892 add casts.
893 (s390_check_regset): Use void * instead of gdb_byte *.
894
a2358508
PA
8952016-04-20 Pedro Alves <palves@redhat.com>
896
897 * configure: Renegerate.
898
6885166d
YQ
8992016-04-20 Yao Qi <yao.qi@linaro.org>
900
901 * linux-aarch32-low.c: Include "arch/arm-linux.h".
902 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
903 number 16.
904 (arm_store_gregset): Likewise.
905
2b863f51
WT
9062016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
907
908 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
909 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
910 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
911 (amd64-avx-mpx-linux.c): New rules.
912 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
913 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
914 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
915 (srv_amd64_regobj): Add amd64-avx-mpx.o.
916 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
917 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
918 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
919 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
920 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
921 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
922 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
923 * linux-x86-low.c (x86_linux_read_description): Add case for
924 X86_XSTATE_AVX_MPX_MASK.
925 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
926 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
927 init_registers_i386_avx_mpx_linux.
928 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
929 (initialize_low_tracepoint): Call
930 init_registers_i386_avx_mpx_linux.
931 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
932 (initialize_low_tracepoint): Call
933 init_registers_amd64_avx_mpx_linux.
934 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
935 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
936 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
937 declarations.
938
9b30624b
PA
9392016-04-18 Pedro Alves <palves@redhat.com>
940
941 * configure: Regenerate.
942
45e3745e
AT
9432016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
944
945 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
946 (aarch64_emit_sub): Likewise.
947
2afc13ff
PA
9482016-04-12 Pedro Alves <palves@redhat.com>
949
950 * utils.c (prepare_to_throw_exception): Delete.
951
6e774b13
SM
9522016-04-05 Simon Marchi <simon.marchi@ericsson.com>
953
954 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
955
4dca19f8
MK
9562016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
957
958 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
959
d0a9981f
MK
9602016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
961
962 * linux-aarch64-ipa.c: Add <elf.h> include.
963 * linux-ppc-ipa.c: Add <elf.h> include.
964 * linux-s390-ipa.c: Add <elf.h> include.
965
252db07e
MK
9662016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
967
968 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
969 (get_raw_reg_ptr): Likewise.
970 (get_trace_state_variable_value_ptr): Likewise.
971 (set_trace_state_variable_value_ptr): Likewise.
972 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
973 char *.
974
14e2b6d9
MK
9752016-03-31 Wei-cheng Wang <cole945@gmail.com>
976 Marcin Kościelnicki <koriakin@0x04.net>
977
978 PR/17221
979 * linux-ppc-low.c (emit_insns): New function.
980 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
981 (ppc_emit_prologue): New function.
982 (ppc_emit_epilogue): New function.
983 (ppc_emit_add): New function.
984 (ppc_emit_sub): New function.
985 (ppc_emit_mul): New function.
986 (ppc_emit_lsh): New function.
987 (ppc_emit_rsh_signed): New function.
988 (ppc_emit_rsh_unsigned): New function.
989 (ppc_emit_ext): New function.
990 (ppc_emit_zero_ext): New function.
991 (ppc_emit_log_not): New function.
992 (ppc_emit_bit_and): New function.
993 (ppc_emit_bit_or): New function.
994 (ppc_emit_bit_xor): New function.
995 (ppc_emit_bit_not): New function.
996 (ppc_emit_equal): New function.
997 (ppc_emit_less_signed): New function.
998 (ppc_emit_less_unsigned): New function.
999 (ppc_emit_ref): New function.
1000 (ppc_emit_const): New function.
1001 (ppc_emit_reg): New function.
1002 (ppc_emit_pop): New function.
1003 (ppc_emit_stack_flush): New function.
1004 (ppc_emit_swap): New function.
1005 (ppc_emit_stack_adjust): New function.
1006 (ppc_emit_call): New function.
1007 (ppc_emit_int_call_1): New function.
1008 (ppc_emit_void_call_2): New function.
1009 (ppc_emit_if_goto): New function.
1010 (ppc_emit_goto): New function.
1011 (ppc_emit_eq_goto): New function.
1012 (ppc_emit_ne_goto): New function.
1013 (ppc_emit_lt_goto): New function.
1014 (ppc_emit_le_goto): New function.
1015 (ppc_emit_gt_goto): New function.
1016 (ppc_emit_ge_goto): New function.
1017 (ppc_write_goto_address): New function.
1018 (ppc_emit_ops_impl): New static variable.
1019 (ppc64v1_emit_prologue): New function.
1020 (ppc64v2_emit_prologue): New function.
1021 (ppc64_emit_epilogue): New function.
1022 (ppc64_emit_add): New function.
1023 (ppc64_emit_sub): New function.
1024 (ppc64_emit_mul): New function.
1025 (ppc64_emit_lsh): New function.
1026 (ppc64_emit_rsh_signed): New function.
1027 (ppc64_emit_rsh_unsigned): New function.
1028 (ppc64_emit_ext): New function.
1029 (ppc64_emit_zero_ext): New function.
1030 (ppc64_emit_log_not): New function.
1031 (ppc64_emit_bit_and): New function.
1032 (ppc64_emit_bit_or): New function.
1033 (ppc64_emit_bit_xor): New function.
1034 (ppc64_emit_bit_not): New function.
1035 (ppc64_emit_equal): New function.
1036 (ppc64_emit_less_signed): New function.
1037 (ppc64_emit_less_unsigned): New function.
1038 (ppc64_emit_ref): New function.
1039 (ppc64_emit_const): New function.
1040 (ppc64v1_emit_reg): New function.
1041 (ppc64v2_emit_reg): New function.
1042 (ppc64_emit_pop): New function.
1043 (ppc64_emit_stack_flush): New function.
1044 (ppc64_emit_swap): New function.
1045 (ppc64v1_emit_call): New function.
1046 (ppc64v2_emit_call): New function.
1047 (ppc64v1_emit_int_call_1): New function.
1048 (ppc64v2_emit_int_call_1): New function.
1049 (ppc64v1_emit_void_call_2): New function.
1050 (ppc64v2_emit_void_call_2): New function.
1051 (ppc64_emit_if_goto): New function.
1052 (ppc64_emit_eq_goto): New function.
1053 (ppc64_emit_ne_goto): New function.
1054 (ppc64_emit_lt_goto): New function.
1055 (ppc64_emit_le_goto): New function.
1056 (ppc64_emit_gt_goto): New function.
1057 (ppc64_emit_ge_goto): New function.
1058 (ppc64v1_emit_ops_impl): New static variable.
1059 (ppc64v2_emit_ops_impl): New static variable.
1060 (ppc_emit_ops): New function.
1061 (linux_low_target): Wire in ppc_emit_ops.
1062
a2174ba4
MK
10632016-03-31 Wei-cheng Wang <cole945@gmail.com>
1064 Marcin Kościelnicki <koriakin@0x04.net>
1065
1066 PR/17221
1067 * Makefile.in: Add powerpc-*-ipa.o
1068 * configure.srv: Add ipa_obj for powerpc*-linux.
1069 * linux-ppc-ipa.c: New file.
1070 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1071 includes.
1072 (PPC_FIELD): New macro.
1073 (PPC_SEXT): New macro.
1074 (PPC_OP6): New macro.
1075 (PPC_BO): New macro.
1076 (PPC_LI): New macro.
1077 (PPC_BD): New macro.
1078 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1079 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1080 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1081 (ppc_get_thread_area): New function.
1082 (is_elfv2_inferior): New function.
1083 (gen_ds_form): New function.
1084 (GEN_STD): New macro.
1085 (GEN_STDU): New macro.
1086 (GEN_LD): New macro.
1087 (GEN_LDU): New macro.
1088 (gen_d_form): New function.
1089 (GEN_ADDI): New macro.
1090 (GEN_ADDIS): New macro.
1091 (GEN_LI): New macro.
1092 (GEN_LIS): New macro.
1093 (GEN_ORI): New macro.
1094 (GEN_ORIS): New macro.
1095 (GEN_LWZ): New macro.
1096 (GEN_STW): New macro.
1097 (GEN_STWU): New macro.
1098 (gen_xfx_form): New function.
1099 (GEN_MFSPR): New macro.
1100 (GEN_MTSPR): New macro.
1101 (GEN_MFCR): New macro.
1102 (GEN_MTCR): New macro.
1103 (GEN_SYNC): New macro.
1104 (GEN_LWSYNC): New macro.
1105 (gen_x_form): New function.
1106 (GEN_OR): New macro.
1107 (GEN_MR): New macro.
1108 (GEN_LWARX): New macro.
1109 (GEN_STWCX): New macro.
1110 (GEN_CMPW): New macro.
1111 (gen_md_form): New function.
1112 (GEN_RLDICL): New macro.
1113 (GEN_RLDICR): New macro.
1114 (gen_i_form): New function.
1115 (GEN_B): New macro.
1116 (GEN_BL): New macro.
1117 (gen_b_form): New function.
1118 (GEN_BNE): New macro.
1119 (GEN_LOAD): New macro.
1120 (GEN_STORE): New macro.
1121 (gen_limm): New function.
1122 (gen_atomic_xchg): New function.
1123 (gen_call): New function.
1124 (ppc_relocate_instruction): New function.
1125 (ppc_install_fast_tracepoint_jump_pad): New function.
1126 (ppc_get_min_fast_tracepoint_insn_len): New function.
1127 (ppc_get_ipa_tdesc_idx): New function.
1128 (the_low_target): Wire in the new functions.
1129 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1130 tdescs.
1131 * linux-ppc-tdesc.h: New file.
1132
a13c4696
MK
11332016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1134
1135 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1136 (alloc_jump_pad_buffer): New function.
1137 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1138 (alloc_jump_pad_buffer): New function.
1139 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1140 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1141 (alloc_jump_pad_buffer): New function.
1142 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1143 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1144 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1145 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1146
1cda1512
MK
11472016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1148
1149 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1150 * linux-amd64-ipa.c: Likewise.
1151 * linux-i386-ipa.c: Likewise.
1152 * linux-s390-ipa.c: Likewise.
1153 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1154 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1155 set_trace_state_variable_value_ptr.
1156 (struct ipa_sym_addresses): Likewise.
1157 (symbol_list): Likewise.
1158 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1159 accessing gdb_collect directly.
1160 (gdb_collect_ptr_type): New typedef.
1161 (get_raw_reg_ptr_type): New typedef.
1162 (get_trace_state_variable_value_ptr_type): New typedef.
1163 (set_trace_state_variable_value_ptr_type): New typedef.
1164 (gdb_collect_ptr): New global.
1165 (get_raw_reg_ptr): New global.
1166 (get_trace_state_variable_value_ptr): New global.
1167 (set_trace_state_variable_value_ptr): New global.
1168 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1169 accessing get_raw_reg directly.
1170 (get_get_tsv_func_addr): Likewise for
1171 get_trace_state_variable_value_ptr.
1172 (get_set_tsv_func_addr): Likewise for
1173 set_trace_state_variable_value_ptr.
1174 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1175
72fb5488
SM
11762016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1177
1178 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1179
28170b88
MK
11802016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1181
1182 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1183 packets.
1184 (relocate_instruction): Remove own_buf.
1185 * server.c (own_buf): Make global.
1186 (handle_v_requests): Make global.
1187 * server.h (own_buf): New declaration.
1188 (handle_v_requests): New prototype.
1189
f39e8743
MK
11902016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1191
1192 PR 18377
1193 * linux-s390-low.c (add_insns): New function.
1194 (s390_emit_prologue): New function.
1195 (s390_emit_epilogue): New function.
1196 (s390_emit_add): New function.
1197 (s390_emit_sub): New function.
1198 (s390_emit_mul): New function.
1199 (s390_emit_lsh): New function.
1200 (s390_emit_rsh_signed): New function.
1201 (s390_emit_rsh_unsigned): New function.
1202 (s390_emit_ext): New function.
1203 (s390_emit_log_not): New function.
1204 (s390_emit_bit_and): New function.
1205 (s390_emit_bit_or): New function.
1206 (s390_emit_bit_xor): New function.
1207 (s390_emit_bit_not): New function.
1208 (s390_emit_equal): New function.
1209 (s390_emit_less_signed): New function.
1210 (s390_emit_less_unsigned): New function.
1211 (s390_emit_ref): New function.
1212 (s390_emit_if_goto): New function.
1213 (s390_emit_goto): New function.
1214 (s390_write_goto_address): New function.
1215 (s390_emit_litpool): New function.
1216 (s390_emit_const): New function.
1217 (s390_emit_call): New function.
1218 (s390_emit_reg): New function.
1219 (s390_emit_pop): New function.
1220 (s390_emit_stack_flush): New function.
1221 (s390_emit_zero_ext): New function.
1222 (s390_emit_swap): New function.
1223 (s390_emit_stack_adjust): New function.
1224 (s390_emit_set_r2): New function.
1225 (s390_emit_int_call_1): New function.
1226 (s390_emit_void_call_2): New function.
1227 (s390_emit_eq_goto): New function.
1228 (s390_emit_ne_goto): New function.
1229 (s390_emit_lt_goto): New function.
1230 (s390_emit_le_goto): New function.
1231 (s390_emit_gt_goto): New function.
1232 (s390_emit_ge_goto): New function.
1233 (s390x_emit_prologue): New function.
1234 (s390x_emit_epilogue): New function.
1235 (s390x_emit_add): New function.
1236 (s390x_emit_sub): New function.
1237 (s390x_emit_mul): New function.
1238 (s390x_emit_lsh): New function.
1239 (s390x_emit_rsh_signed): New function.
1240 (s390x_emit_rsh_unsigned): New function.
1241 (s390x_emit_ext): New function.
1242 (s390x_emit_log_not): New function.
1243 (s390x_emit_bit_and): New function.
1244 (s390x_emit_bit_or): New function.
1245 (s390x_emit_bit_xor): New function.
1246 (s390x_emit_bit_not): New function.
1247 (s390x_emit_equal): New function.
1248 (s390x_emit_less_signed): New function.
1249 (s390x_emit_less_unsigned): New function.
1250 (s390x_emit_ref): New function.
1251 (s390x_emit_if_goto): New function.
1252 (s390x_emit_const): New function.
1253 (s390x_emit_call): New function.
1254 (s390x_emit_reg): New function.
1255 (s390x_emit_pop): New function.
1256 (s390x_emit_stack_flush): New function.
1257 (s390x_emit_zero_ext): New function.
1258 (s390x_emit_swap): New function.
1259 (s390x_emit_stack_adjust): New function.
1260 (s390x_emit_int_call_1): New function.
1261 (s390x_emit_void_call_2): New function.
1262 (s390x_emit_eq_goto): New function.
1263 (s390x_emit_ne_goto): New function.
1264 (s390x_emit_lt_goto): New function.
1265 (s390x_emit_le_goto): New function.
1266 (s390x_emit_gt_goto): New function.
1267 (s390x_emit_ge_goto): New function.
1268 (s390_emit_ops): New function.
1269 (struct linux_target_ops): Fill in emit_ops hook.
1270
abd9baf9
MK
12712016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1272
1273 PR 18377
1274 * Makefile.in: Add s390 IPA files.
1275 * configure.srv: Build IPA for s390.
1276 * linux-s390-ipa.c: New file.
1277 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1278 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1279 (tdesc_s390_linux32): Likewise.
1280 (init_registers_s390_linux32v1): Likewise.
1281 (tdesc_s390_linux32v1): Likewise.
1282 (init_registers_s390_linux32v2): Likewise.
1283 (tdesc_s390_linux32v2): Likewise.
1284 (init_registers_s390_linux64): Likewise.
1285 (tdesc_s390_linux64): Likewise.
1286 (init_registers_s390_linux64v1): Likewise.
1287 (tdesc_s390_linux64v1): Likewise.
1288 (init_registers_s390_linux64v2): Likewise.
1289 (tdesc_s390_linux64v2): Likewise.
1290 (init_registers_s390_te_linux64): Likewise.
1291 (tdesc_s390_te_linux64): Likewise.
1292 (init_registers_s390_vx_linux64): Likewise.
1293 (tdesc_s390_vx_linux64): Likewise.
1294 (init_registers_s390_tevx_linux64): Likewise.
1295 (tdesc_s390_tevx_linux64): Likewise.
1296 (init_registers_s390x_linux64): Likewise.
1297 (tdesc_s390x_linux64): Likewise.
1298 (init_registers_s390x_linux64v1): Likewise.
1299 (tdesc_s390x_linux64v1): Likewise.
1300 (init_registers_s390x_linux64v2): Likewise.
1301 (tdesc_s390x_linux64v2): Likewise.
1302 (init_registers_s390x_te_linux64): Likewise.
1303 (tdesc_s390x_te_linux64): Likewise.
1304 (init_registers_s390x_vx_linux64): Likewise.
1305 (tdesc_s390x_vx_linux64): Likewise.
1306 (init_registers_s390x_tevx_linux64): Likewise.
1307 (tdesc_s390x_tevx_linux64): Likewise.
1308 (have_hwcap_s390_vx): New static variable.
1309 (s390_arch_setup): Fill have_hwcap_s390_vx.
1310 (s390_get_thread_area): New function.
1311 (s390_ft_entry_gpr_esa): New const.
1312 (s390_ft_entry_gpr_zarch): New const.
1313 (s390_ft_entry_misc): New const.
1314 (s390_ft_entry_fr): New const.
1315 (s390_ft_entry_vr): New const.
1316 (s390_ft_main_31): New const.
1317 (s390_ft_main_64): New const.
1318 (s390_ft_exit_fr): New const.
1319 (s390_ft_exit_vr): New const.
1320 (s390_ft_exit_misc): New const.
1321 (s390_ft_exit_gpr_esa): New const.
1322 (s390_ft_exit_gpr_zarch): New const.
1323 (append_insns): New function.
1324 (s390_relocate_instruction): New function.
1325 (s390_install_fast_tracepoint_jump_pad): New function.
1326 (s390_get_min_fast_tracepoint_insn_len): New function.
1327 (s390_get_ipa_tdesc_idx): New function.
1328 (struct linux_target_ops): Wire in the above functions.
1329 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1330 * linux-s390-tdesc.h: New file.
1331
a4105d04
MK
13322016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1333
1334 * linux-s390-low.c (s390_supports_tracepoints): New function.
1335 (struct linux_target_ops): Fill supports_tracepoints hook.
1336
35ac8b3e
YQ
13372016-03-18 Yao Qi <yao.qi@linaro.org>
1338
1339 * linux-low.c (lwp_signal_can_be_delivered): New function.
1340 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1341
94610ec4
YQ
13422016-03-18 Yao Qi <yao.qi@linaro.org>
1343
1344 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1345 0 if signal is enqueued. Remove 'signal' from one debugging
1346 message. Move one debugging message to some lines below.
1347 Remove code setting 'signal' to 0.
1348
80aea927
YQ
13492016-03-18 Yao Qi <yao.qi@linaro.org>
1350
1351 * linux-low.c (linux_low_filter_event): Remove redundant
1352 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1353
b04fd3be
MK
13542016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1355
1356 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1357 (struct linux_target_ops): Wire in the above.
1358
c40c8d4b
YQ
13592016-03-03 Yao Qi <yao.qi@linaro.org>
1360
1361 * linux-low.c: Update comments to start_step_over.
1362
0f8288ae
YQ
13632016-03-03 Yao Qi <yao.qi@linaro.org>
1364
1365 PR server/19736
1366 * linux-low.c (handle_extended_wait): Set child suspended
1367 if event_lwp->bp_reinsert isn't zero.
1368
fdbd04a8
YQ
13692016-03-02 Yao Qi <yao.qi@linaro.org>
1370
1371 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1372 enqueue_pending_signal.
1373
6896a8fa
MK
13742016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1375
1376 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1377 is actually loaded.
1378
ab503087
MK
13792016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1380
1381 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1382 (s390_regmap_3264) [!__s390x__]: New global.
1383 (s390_collect_ptrace_register): Skip map entries containing -1.
1384 (s390_supply_ptrace_register): Ditto.
1385 (s390_fill_gprs_high): New function.
1386 (s390_store_gprs_high): New function.
1387 (s390_regsets): Add NT_S390_HIGH_GPRS.
1388 (s390_get_hwcap): Enable on 31-bit.
1389 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1390 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1391 Detect NT_S390_HIGH_GPRS.
1392 (s390_usrregs_info_3264): Enable on 31-bit.
1393 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1394 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1395
ae91f625
MK
13962016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1397
1398 PR gdb/13808
1399 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1400 * configure.srv: Ditto.
1401 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1402 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1403 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1404 (init_registers_amd64_linux): Remove prototype.
1405 (tdesc_amd64_linux): Remove declaration.
1406 (get_ipa_tdesc): New function.
1407 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1408 initialize remaining tdescs.
1409 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1410 (init_registers_i386_linux): Remove prototype.
1411 (tdesc_i386_linux): Remove declaration.
1412 (get_ipa_tdesc): New function.
1413 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1414 initialize remaining tdescs.
1415 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1416 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1417 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1418 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1419 (x86_get_ipa_tdesc_idx): New function.
1420 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1421 * linux-x86-tdesc.h: New file.
1422 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1423 (target_get_ipa_tdesc_idx): New macro.
1424 * tracepoint.c (ipa_tdesc_idx): New macro.
1425 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1426 (symbol_list): Add ipa_tdesc_idx.
1427 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1428 (ipa_tdesc): Remove.
1429 (ipa_tdesc_idx): New variable.
1430 (get_context_regcache): Use get_ipa_tdesc.
1431 (gdb_collect): Ditto.
1432 (gdb_probe): Ditto.
1433 * tracepoint.h (get_ipa_tdesc): New prototype.
1434 (ipa_tdesc): Remove.
1435
e7ad2f14
PA
14362016-02-24 Pedro Alves <palves@redhat.com>
1437
1438 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1439 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1440 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1441 Factor out common code between the USE_SIGTRAP_SIGINFO and
1442 !USE_SIGTRAP_SIGINFO blocks.
1443 (linux_low_filter_event): Call save_stop_reason instead of
1444 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1445 Update comments.
1446 (linux_wait_1): Update comments.
1447
657f9cde
WW
14482016-02-24 Wei-cheng Wang <cole945@gmail.com>
1449
1450 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1451 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1452 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1453 ppc_insert_point, ppc_remove_point.
1454
b00b61e1
MK
14552016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1456
1457 * linux-s390-low.c (s390_supports_z_point_type): New function.
1458 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1459
553cb527
YQ
14602016-02-16 Yao Qi <yao.qi@linaro.org>
1461
1462 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1463 PC. Get pc from regcache_read_pc.
1464
a5652c21
YQ
14652016-02-12 Yao Qi <yao.qi@linaro.org>
1466
1467 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1468 or linux_get_pc_32bit.
1469 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1470
ed443b61
YQ
14712016-02-12 Yao Qi <yao.qi@linaro.org>
1472
1473 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1474 arm_linux_get_next_pcs_fixup.
1475
020ecd38
MK
14762016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1477
1478 * tracepoint.c (x_tracepoint_action_download): Change
1479 write_inferior_data_ptr to write_inferior_data_pointer.
1480 (cmd_qtstart): Likewise.
1481 (write_inferior_data_ptr): Remove.
1482 (download_agent_expr): Change write_inferior_data_ptr to
1483 write_inferior_data_pointer.
1484 (download_tracepoint_1): Likewise.
1485 (download_tracepoint): Likewise.
1486 (download_trace_state_variables): Likewise.
1487
7cae9051
WW
14882016-02-11 Wei-cheng Wang <cole945@gmail.com>
1489 Marcin Kościelnicki <koriakin@0x04.net>
1490
1491 * tracepoint.c (struct tracepoint_action_ops): Remove.
1492 (struct tracepoint_action): Remove ops.
1493 (m_tracepoint_action_download, r_tracepoint_action_download)
1494 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1495 size and offset accordingly.
1496 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1497 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1498 (tracepoint_action_send, tracepoint_action_download): New functions.
1499 Helpers for trace action handlers.
1500 (add_tracepoint_action): Remove setup actions ops.
1501 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1502
9f6a71b4
YQ
15032016-02-10 Yao Qi <yao.qi@linaro.org>
1504
1505 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1506
1e94266c
SM
15072016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1508
1509 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1510 to AC_OUTPUT.
1511 * configure: Regenerate.
1512
8adce034
SM
15132016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1514
1515 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1516 void * to gdb_byte *.
1517 * linux-low.c (siginfo_fixup): Likewise.
1518 (linux_xfer_siginfo): Likewise.
1519 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1520 Likewise.
1521 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1522
93813b37
WT
15232016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1524
1525 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1526 to srv_tgtobj.
1527 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1528 to srv_tgtobj.
1529 * linux-x86-low.c [__x86_64__]: Include
1530 "nat/amd64-linux-siginfo.h".
1531 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1532 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1533 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1534 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1535 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1536 (cpt_si_fd, si_timerid, si_overrun): Move from
1537 nat/amd64-linux-siginfo.c.
1538 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1539
8424cc97
SM
15402016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1541
1542 * server.c (skip_to_semicolon): Remove.
1543 (process_point_options): Use strchrnul instead of
1544 skip_to_semicolon.
1545
4d18591b
YQ
15462016-01-26 Yao Qi <yao.qi@linaro.org>
1547
1548 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1549 * linux-low.c (install_software_single_step_breakpoints): Don't
1550 call regcache_read_pc.
1551 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1552 argument pc.
1553
d8020970
YQ
15542016-01-26 Yao Qi <yao.qi@linaro.org>
1555
1556 * linux-low.c (install_software_single_step_breakpoints): Call
1557 regcache_read_pc instead of get_pc.
1558
8b207339
YQ
15592016-01-26 Yao Qi <yao.qi@linaro.org>
1560
1561 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1562 (unblock_async_io): Rename to ...
1563 (block_unblock_async_io): ... it. New function.
1564 (enable_async_io): Don't install SIGIO handler. Unblock it
1565 instead.
1566 (disable_async_io): Don't ignore SIGIO. Block it instead.
1567 (initialize_async_io): Install SIGIO handler. Don't call
1568 unblock_async_io.
1569
18879fef
YQ
15702016-01-26 Yao Qi <yao.qi@linaro.org>
1571
1572 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1573 first character is '\003', call *the_target->request_interrupt.
1574
a0f8e08a
YQ
15752016-01-25 Yao Qi <yao.qi@linaro.org>
1576
1577 * remote-utils.c (new_thread_notify): Remove.
1578 (dead_thread_notify): Likewise.
1579 * remote-utils.h (new_thread_notify): Remove declaration.
1580 (dead_thread_notify): Likewise.
1581
cc5fd9ab
MK
15822016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1583
1584 * gdb.trace/pending.exp: Fix expected message on continue.
1585
99e8eb11
MK
15862016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1587
1588 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1589 it works properly on big-endian machines where sizeof (CORE_ADDR)
1590 != sizeof (void *).
1591
a994041d
PA
15922016-01-21 Pedro Alves <palves@redhat.com>
1593
1594 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1595 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1596 * configure: Regenerate.
1597
f7a6a40d
YQ
15982016-01-21 Yao Qi <yao.qi@linaro.org>
1599
1600 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1601 is_thumb and set it according to CPSR saved on the stack.
1602 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1603 arm_sigreturn_next_pc.
1604
6f69e520
YQ
16052016-01-18 Yao Qi <yao.qi@linaro.org>
1606
1607 * linux-low.c (linux_set_pc_64bit): New function.
1608 (linux_get_pc_64bit): New function.
1609 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1610 Declare.
1611 * linux-sparc-low.c (debug_threads): Remove declaration.
1612 (sparc_get_pc): Remove.
1613 (the_low_target): Use linux_get_pc_64bit instead of
1614 sparc_get_pc.
1615 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1616 (the_low_target): Use linux_get_pc_64bit and
1617 linux_set_pc_64bit.
1618
276d4552
YQ
16192016-01-18 Yao Qi <yao.qi@linaro.org>
1620
1621 * linux-arm-low.c (debug_threads): Remove declaration.
1622 (arm_get_pc, arm_set_pc): Remove.
1623 (the_low_target): Use linux_get_pc_32bit and
1624 linux_set_pc_32bit.
1625 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1626 (the_low_target): Use linux_get_pc_32bit and
1627 linux_set_pc_32bit.
1628 * linux-cris-low.c (debug_threads): Remove declaration.
1629 (cris_get_pc, cris_set_pc,): Remove.
1630 (the_low_target): Use linux_get_pc_32bit and
1631 linux_set_pc_32bit.
1632 * linux-crisv32-low.c (debug_threads): Remove declaration.
1633 (cris_get_pc, cris_set_pc): Remove.
1634 (the_low_target): Use linux_get_pc_32bit and
1635 linux_set_pc_32bit.
1636 * linux-low.c: Include inttypes.h.
1637 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1638 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1639 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1640 (the_low_target): Use linux_get_pc_32bit and
1641 linux_set_pc_32bit.
1642 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1643 (the_low_target): Use linux_get_pc_32bit and
1644 linux_set_pc_32bit.
1645 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1646 (the_low_target): Use linux_get_pc_32bit and
1647 linux_set_pc_32bit.
1648 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1649 (the_low_target): Use linux_get_pc_32bit and
1650 linux_set_pc_32bit.
1651 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1652 (the_low_target): Use linux_get_pc_32bit and
1653 linux_set_pc_32bit.
1654
eb0edac8
GB
16552016-01-18 Gary Benson <gbenson@redhat.com>
1656
1657 * configure.ac (AC_FUNC_FORK): New check.
1658 * config.in: Regenerate.
1659 * configure: Likewise.
1660
1b451dda
YQ
16612016-01-14 Yao Qi <yao.qi@linaro.org>
1662
1663 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1664 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1665 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1666 arm_get_next_pcs_ctor.
1667
82075af2
JS
16682016-01-12 Josh Stone <jistone@redhat.com>
1669 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1670
1671 * inferiors.h: Include "gdb_vecs.h".
1672 (struct process_info): Add syscalls_to_catch.
1673 * inferiors.c (remove_process): Free syscalls_to_catch.
1674 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1675 syscall_return stops.
1676 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1677 * server.c (handle_general_set): Handle QCatchSyscalls.
1678 (handle_query): Report support for QCatchSyscalls.
1679 * target.h (struct target_ops): Add supports_catch_syscall.
1680 (target_supports_catch_syscall): New macro.
1681 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1682 (struct lwp_info): Add syscall_state.
1683 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1684 Maintain syscall_state and syscalls_to_catch across exec.
1685 (get_syscall_trapinfo): New function, proxy to the_low_target.
1686 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1687 (linux_low_filter_event): Toggle syscall_state entry/return for
1688 syscall traps, and set it ignored for all others.
1689 (gdb_catching_syscalls_p): New function.
1690 (gdb_catch_this_syscall_p): New function.
1691 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1692 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1693 (linux_supports_catch_syscall): New function.
1694 (linux_target_ops): Install it.
1695 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1696 (the_low_target): Install it.
1697
8f13a3ce
MF
16982016-01-12 Mike Frysinger <vapier@gentoo.org>
1699
1700 * acinclude.m4: Include new ../warning.m4 file.
1701 * configure: Regenerated.
1702 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1703
5b3da067
MF
17042016-01-12 Mike Frysinger <vapier@gentoo.org>
1705
1706 * ax.c (is_goto_target): Mark static.
1707 * linux-low.c (register_addr): Likewise.
1708 (linux_fetch_registers, linux_store_registers): Likewise.
1709 * mem-break.c (any_persistent_commands): Fix old prototype.
1710 (add_commands_to_breakpoint): Mark static.
1711 * regcache.c (find_register_by_name): Delete unused func.
1712 * remote-utils.c (hex_or_minus_one): Mark static.
1713 * server.c (monitor_show_help): Mark static.
1714 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1715 handle_v_requests): Likewise.
1716
bc504a31
PA
17172016-01-12 Pedro Alves <palves@redhat.com>
1718
1719 Remove use of the registered trademark symbol throughout.
1720
5a0dd67a
YQ
17212016-01-08 Yao Qi <yao.qi@linaro.org>
1722
1723 * remote-utils.c (getpkt): If c is '\003', call target hook
1724 request_interrupt.
1725
b2ca446f
YQ
17262016-01-06 Yao Qi <yao.qi@linaro.org>
1727
1728 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1729 linux-aarch32-low.c.
1730 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1731 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1732 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1733 (thumb2_breakpoint): Declare.
1734 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1735 linux-aarch32-low.h.
1736 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1737 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1738 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1739
edd88788
JB
17402016-01-01 Joel Brobecker <brobecker@adacore.com>
1741
1742 * gdbreplay.c (gdbreplay_version): Change copyright year in
1743 version message.
1744 * server.c (gdbserver_version): Likewise.
1745
65da7f14
PP
17462015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1747
1748 * server.c (crc32_table): Delete.
1749 (crc32): Use libiberty's xcrc32 function.
1750
4abd5ed2
JB
17512015-12-22 Joel Brobecker <brobecker@adacore.com>
1752
1753 * lynx-low.c (lynx_delete_thread_callback): New function.
1754 (lynx_mourn): Properly delete our process and all of its
1755 threads. Remove call to clear_inferiors.
1756
0e50fe5c
JB
17572015-12-22 Joel Brobecker <brobecker@adacore.com>
1758
1759 * target.c (thread_search_callback): Add check that
1760 the thread_stopped target callback is not NULL before
1761 calling it.
1762
35adc03f
YQ
17632015-12-21 Yao Qi <yao.qi@linaro.org>
1764
1765 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1766 arm breakpoint.
1767
bd2b2909
AT
17682015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1769
1770 * server.c (handle_query): Call target_supports_software_single_step.
1771
7fe5e27e
AT
17722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1773
1774 * linux-low.c (single_step): New function.
1775 (linux_resume_one_lwp_throw): Call single_step.
1776 (start_step_over): Likewise.
1777
d9311bfa
AT
17782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1779
1780 * Makefile.in (SFILES): Append arch/arm-linux.c,
1781 arch/arm-get-next-pcs.c.
1782 (arm-linux.o): New rule.
1783 (arm-get-next-pcs.o): New rule.
1784 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1785 arm-linux.o.
1786 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1787 to linux-aarch32-low.c.
1788 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1789 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1790 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1791 (thumb2_breakpoint_len): Likewise.
1792 (arm_is_thumb_mode): Make non-static.
1793 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1794 from linux-aarch32-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): New declaration.
1800 * linux-arm-low.c: Include arch/arm-linux.h
1801 aarch/arm-get-next-pcs.h, sys/syscall.h.
1802 (get_next_pcs_ops): New struct.
1803 (get_next_pcs_addr_bits_remove): New function.
1804 (get_next_pcs_is_thumb): New function.
1805 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1806 (arm_sigreturn_next_pc): Likewise.
1807 (get_next_pcs_syscall_next_pc): Likewise.
1808 (arm_gdbserver_get_next_pcs): Likewise.
1809 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1810 Initialize.
1811 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1812 * server.h: Include gdb_vecs.h.
1813
68ce2059
AT
18142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1815
1816 * Makefile.in (SFILES): Append common/common-regcache.c.
1817 (OBS): Append common-regcache.o.
1818 (common-regcache.o): New rule.
1819 * regcache.c (init_register_cache): Initialize cache to
1820 REG_UNAVAILABLE.
1821 (regcache_raw_read_unsigned): New function.
1822 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1823 register_status enum.
1824
fa5308bd
AT
18252015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1826
1827 * linux-aarch64-low.c (the_low_targets): Rename
1828 breakpoint_reinsert_addr to get_next_pcs.
1829 * linux-arm-low.c (the_low_targets): Likewise.
1830 * linux-bfin-low.c (the_low_targets): Likewise.
1831 * linux-cris-low.c (the_low_targets): Likewise.
1832 * linux-crisv32-low.c (the_low_targets): Likewise.
1833 * linux-low.c (can_software_single_step): Likewise.
1834 (install_software_single_step_breakpoints): New function.
1835 (start_step_over): Use install_software_single_step_breakpoints.
1836 * linux-low.h: New CORE_ADDR vector.
1837 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1838 get_next_pcs.
1839 * linux-mips-low.c (the_low_targets): Likewise.
1840 * linux-nios2-low.c (the_low_targets): Likewise.
1841 * linux-sparc-low.c (the_low_targets): Likewise.
1842
4a6ed09b
PA
18432015-12-17 Pedro Alves <palves@redhat.com>
1844
1845 * linux-low.c (linux_kill_one_lwp): Remove references to
1846 LinuxThreads.
1847 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1848 to 'kill'.
1849 (linux_init_signals): Delete.
1850 (initialize_low): Adjust.
1851 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1852
7544db95
PA
18532015-12-16 Pedro Alves <palves@redhat.com>
1854
1855 * configure.ac (compiler warning flags): When testing a
1856 -Wno-foo option, check whether -Wfoo works instead.
1857 * configure: Regenerate.
1858
8020350c
DB
18592015-12-11 Don Breazeal <donb@codesourcery.com>
1860
1861 * server.c (process_serial_event): Don't exit from gdbserver
1862 in remote mode if there are still active inferiors.
1863
db91f502
YQ
18642015-12-11 Yao Qi <yao.qi@linaro.org>
1865
1866 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1867 arm_breakpoint_at if the process is 32-bit.
1868
b37a6290
YQ
18692015-12-11 Yao Qi <yao.qi@linaro.org>
1870
1871 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1872 arm breakpoint.
1873
17b1509a
YQ
18742015-12-07 Yao Qi <yao.qi@linaro.org>
1875
1876 * configure.srv: Append arm.o to srv_tgtobj for
1877 aarch64*-*-linux* target.
1878 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1879 from linux-arm-low.c.
1880 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1881 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1882 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1883 (thumb2_breakpoint_len): Likewise.
1884 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1885 (arm_breakpoint_kinds): Likewise.
1886 (arm_breakpoint_kind_from_pc): Likewise.
1887 (arm_sw_breakpoint_from_kind): Likewise.
1888 (arm_breakpoint_kind_from_current_state): Likewise.
1889 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1890 (arm_sw_breakpoint_from_kind): Declare.
1891 (arm_breakpoint_kind_from_current_state): Declare.
1892 (arm_breakpoint_at): Declare.
1893 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1894 arm_sw_breakpoint_from_kind if process is 32-bit.
1895 (aarch64_breakpoint_kind_from_pc): New function.
1896 (aarch64_breakpoint_kind_from_current_state): New function.
1897 (the_low_target): Initialize fields breakpoint_kind_from_pc
1898 and breakpoint_kind_from_current_state.
1899 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1900 linux-aarch32-low.c.
1901 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1902 (arm_breakpoint, arm_breakpoint_len): Likewise.
1903 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1904 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1905 (arm_is_thumb_mode): Likewise.
1906 (arm_breakpoint_at): Likewise.
1907 (arm_breakpoint_kind_from_pc): Likewise.
1908 (arm_sw_breakpoint_from_kind): Likewise.
1909 (arm_breakpoint_kind_from_current_state): Likewise.
1910
1911 Revert:
1912 2015-08-04 Yao Qi <yao.qi@linaro.org>
1913
1914 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1915 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1916 * server.c (extended_protocol): Remove "static".
1917 * server.h (extended_protocol): Declare it.
1918
ece66d65
JS
19192015-12-04 Josh Stone <jistone@redhat.com>
1920
1921 * target.h (struct target_ops) <arch_setup>: Rename to ...
1922 (struct target_ops) <post_create_inferior>: ... this.
1923 (target_arch_setup): Rename to ...
1924 (target_post_create_inferior): ... this, calling post_create_inferior.
1925 * server.c (start_inferior): Update target_arch_setup calls to
1926 target_post_create_inferior.
1927 * linux-low.c (linux_low_ptrace_options): Forward declare.
1928 (linux_arch_setup): Update its comment for general use.
1929 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1930 (struct linux_target_ops): Use linux_post_create_inferior.
1931 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1932 to post_create_inferior.
1933 * nto-low.c (struct nto_target_ops): Likewise.
1934 * spu-low.c (struct spu_target_ops): Likewise.
1935 * win32-low.c (struct win32_target_ops): Likewise.
1936
e58c48b4
AT
19372015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1938
1939 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1940
fbec8956
AT
19412015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1942
1943 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1944 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1945 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1946 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1947 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1948 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1949 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1950 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1951 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1952 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1953 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1954 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1955
9b4c5f87
AT
19562015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1957
1958 * linux-low.c (linux_look_up_symbols): Don't call
1959 linux_supports_traceclone.
1960 * linux-low.h (thread_db_init): Remove use_events argument.
1961 * thread-db.c (thread_db_use_event): Remove global variable.
1962 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1963 (struct thread_db) <td_create_bp>: Remove field.
1964 (thread_db_create_event): Remove function.
1965 (thread_db_enable_reporting): Likewise.
1966 (find_one_thread): Don't check for thread_db_use_events.
1967 (attach_thread): Likewise.
1968 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1969 (try_thread_db_load_1): Don't check for thread_db_use_events.
1970 (thread_db_init): Remove use_events argument and thread events
1971 handling.
1972 (remove_thread_event_breakpoints): Remove function.
1973 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1974
7d00775e
AT
19752015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1976
1977 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1978 New function.
1979 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1980 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1981 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1982 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1983 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1984 Initialize.
1985 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1986 New function.
1987 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1988 * linux-low.c (can_hardware_single_step): Use
1989 supports_hardware_single_step.
1990 (can_software_single_step): New function.
1991 (start_step_over): Call can_software_single_step.
1992 (linux_supports_hardware_single_step): New function.
1993 (struct target_ops) <supports_software_single_step>: Initialize.
1994 * linux-low.h (struct linux_target_ops)
1995 <supports_hardware_single_step>: Initialize.
1996 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1997 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1998 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1999 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2000 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2001 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2002 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2003 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2004 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2005 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2006 Initialize.
2007 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2008 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2009 Initialize.
2010 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2011 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2012 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2013 New function.
2014 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2015 * target.h (struct target_ops): <supports_software_single_step>:
2016 New field.
2017 (target_supports_software_single_step): New macro.
2018
2d97cd35
AT
20192015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2020
2021 * linux-low.c (linux_wait_1): Fix pc advance condition.
2022 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2023 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2024
769ef81f
AT
20252015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2026
2027 * linux-arm-low.c (arm_is_thumb_mode): New function.
2028 (arm_breakpoint_at): Use arm_is_thumb_mode.
2029 (arm_breakpoint_kind_from_current_state): New function.
2030 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2031 Initialize.
2032 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2033 (linux_breakpoint_kind_from_current_state): New function.
2034 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2035 * linux-low.h (struct linux_target_ops)
2036 <breakpoint_kind_from_current_state>: New field.
2037 * target.h (struct target_ops): Likewise.
2038 (target_breakpoint_kind_from_current_state): New macro.
2039
1bebeeca
PA
20402015-11-30 Pedro Alves <palves@redhat.com>
2041
2042 * linux-low.c (linux_resume): Wake up the event loop before
2043 returning.
2044
a67a9fae
PA
20452015-11-30 Pedro Alves <palves@redhat.com>
2046
2047 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2048 check.
2049 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2050 to -1.
2051 * target.c (struct thread_search): New structure.
2052 (thread_search_callback): New function.
2053 (prev_general_thread): New global.
2054 (prepare_to_access_memory, done_accessing_memory): New functions.
2055 * target.h (prepare_to_access_memory, done_accessing_memory):
2056 Replace macros with function declarations.
2057
f2faf941
PA
20582015-11-30 Pedro Alves <palves@redhat.com>
2059
2060 PR 14618
2061 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2062 report TARGET_WAITKIND_NO_RESUMED.
2063 * remote-utils.c (prepare_resume_reply): Handle
2064 TARGET_WAITKIND_NO_RESUMED.
2065 * server.c (report_no_resumed): New global.
2066 (handle_query) <qSupported>: Handle "no-resumed+". Report
2067 "no-resumed+" support.
2068 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2069 return error if the client doesn't support no-resumed events.
2070 (push_stop_notification): New function.
2071 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2072 events if the client supports them.
2073
a681f9c9
PA
20742015-11-30 Pedro Alves <palves@redhat.com>
2075
2076 * linux-low.c (thread_still_has_status_pending_p): Don't check
2077 vCont;t here.
2078 (lwp_resumed): New function.
2079 (status_pending_p_callback): Return early if the LWP is not
2080 supposed to be resumed.
2081
65706a29
PA
20822015-11-30 Pedro Alves <palves@redhat.com>
2083
2084 * linux-low.c (handle_extended_wait): Assert that the LWP's
2085 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2086 thread create events, leave the new child's status pending.
2087 (linux_low_filter_event): If GDB wants to hear about thread exit
2088 events, leave the LWP marked dead and don't delete it.
2089 (linux_wait_for_event_filtered): Don't check for thread exit.
2090 (filter_exit_event): New function.
2091 (linux_wait_1): Use it, when returning an exit event.
2092 (linux_resume_one_lwp_throw): Assert that the LWP's
2093 waitstatus is TARGET_WAITKIND_IGNORE.
2094 * remote-utils.c (prepare_resume_reply): Handle
2095 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2096 * server.c (report_thread_events): New global.
2097 (handle_general_set): Handle QThreadEvents.
2098 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2099 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2100 TARGET_WAITKIND_THREAD_EXITED.
2101 * server.h (report_thread_events): Declare.
2102
56cf4bed
PA
21032015-11-30 Pedro Alves <palves@redhat.com>
2104
2105 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2106 the thread's last_resume_kind was resume_stop.
2107
500c1d85
PA
21082015-11-30 Pedro Alves <palves@redhat.com>
2109
2110 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2111 before returning.
2112
de979965
PA
21132015-11-30 Pedro Alves <palves@redhat.com>
2114
2115 * server.c (handle_v_requests): Handle vCtrlC.
2116
34c65914
PA
21172015-11-30 Pedro Alves <palves@redhat.com>
2118
2119 * gdbthread.h (find_any_thread_of_pid): Declare.
2120 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2121 functions.
2122 * server.c (handle_query): If current_thread is NULL, look for
2123 another thread of the selected process.
2124
79efa585 21252015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2126 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2127
2128 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2129 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2130 name in reply.
2131 * target.h (struct target_ops) <thread_name>: New field.
2132 (target_thread_name): New macro.
2133
80d82c19
JB
21342015-11-23 Joel Brobecker <brobecker@adacore.com>
2135
2136 * regcache.h (regcache_invalidate_pid): Add declaration.
2137 * regcache.c (regcache_invalidate_pid): New function, extracted
2138 from regcache_invalidate.
2139 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2140 Add trivial documentation comment.
2141 * lynx-low.c: Use regcache_invalidate_pid instead of
2142 regcache_invalidate.
2143
64da5dd5
JB
21442015-11-23 Joel Brobecker <brobecker@adacore.com>
2145
2146 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2147 and Elf64_auxv_t if the target is Android.
2148
37ce4055
DE
21492015-11-22 Doug Evans <xdje42@gmail.com>
2150
2151 * target.h: #include <sys/types.h>.
2152
06e03fff
PA
21532015-11-19 Pedro Alves <palves@redhat.com>
2154
2155 * linux-low.c (linux_process_qsupported): Change prototype.
2156 Adjust.
2157 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2158 Change prototype.
2159 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2160 and adjust to loop over all features.
2161 * server.c (handle_query) <qSupported>: Adjust to call
2162 target_process_qsupported once, passing it a vector of unprocessed
2163 features.
2164 * target.h (struct target_ops) <process_qsupported>: Change
2165 prototype.
2166 (target_process_qsupported): Adjust.
2167
9a084706
PA
21682015-11-19 Pedro Alves <palves@redhat.com>
2169
2170 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2171 mode.
2172 * configure: Regenerate.
2173
dad44a1f
PA
21742015-11-19 Pedro Alves <palves@redhat.com>
2175
2176 * configure: Regenerate.
2177
231c0592
YQ
21782015-11-19 Yao Qi <yao.qi@linaro.org>
2179
2180 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2181 type to uint32_t.
2182
6c1c9a8b
YQ
21832015-11-19 Yao Qi <yao.qi@linaro.org>
2184
2185 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2186 (struct aarch64_operand): Move enum out.
2187
9caa3311
YQ
21882015-11-19 Yao Qi <yao.qi@linaro.org>
2189
2190 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2191 struct user_fpsimd_state *.
2192 (aarch64_store_fpregset): Likewise.
2193
6a69a054
YQ
21942015-11-19 Yao Qi <yao.qi@linaro.org>
2195
2196 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2197 struct user_pt_regs *.
2198 (aarch64_store_gregset): Likewise.
2199
1798301e
PA
22002015-11-18 Pedro Alves <palves@redhat.com>
2201
2202 * Makefile.in (all_object_files): Add $IPA_OBJS.
2203
ce7715e2
PA
22042015-11-17 Pedro Alves <palves@redhat.com>
2205
2206 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2207 GDB_SIGNAL_0 and gdb_signal_to_string.
2208
c0879059
PA
22092015-11-17 Pedro Alves <palves@redhat.com>
2210
2211 * win32-low.c (handle_output_debug_string): Remove parameter.
2212 (win32_kill): Remove our_status local and adjust call to
2213 handle_output_debug_string.
2214 (get_child_debug_event): Adjust call to
2215 handle_output_debug_string.
2216
1996e237
SM
22172015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2218
2219 * linux-mips-low.c (mips_fill_gregset): Add cast.
2220 (mips_store_gregset): Likewise.
2221 (mips_fill_fpregset): Likewise.
2222 (mips_store_fpregset): Likewise.
2223
cbec665b
SM
22242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2225
2226 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2227 priv.
2228
eb3e3c67
SM
22292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2230
2231 * linux-mips-low.c (mips_linux_new_thread): Change type of
2232 watch_type to enum target_hw_bp_type.
2233
171de4b8
SM
22342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2235
2236 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2237 Change return type to arm_hwbp_type.
2238
04248ead
SM
22392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2240
2241 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2242 (arm_store_gregset): Likewise.
2243 * linux-arm-low.c (arm_get_hwcap): Likewise.
2244 (arm_read_description): Likewise.
2245
04b3479c
SM
22462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2247
2248 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2249
2bc84e8a
SM
22502015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2251
2252 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2253 (ppc_fill_vsxregset): Likewise.
2254 (ppc_store_vsxregset): Likewise.
2255 (ppc_fill_vrregset): Likewise.
2256 (ppc_store_vrregset): Likewise.
2257 (ppc_fill_evrregset): Likewise.
2258 (ppc_store_evrregset): Likewise.
2259
e6c5bb05
SM
22602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2261
2262 * linux-ppc-low.c (ppc_usrregs_info): Remove
2263 forward-declaration.
2264 (ppc_arch_setup): Move lower in file.
2265
7ea45d72
SM
22662015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2267
2268 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2269 (ps_pdwrite): Likewise.
2270
69291610
HW
22712015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2272
2273 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2274 to after assert checks.
2275
b42945fd
SM
22762015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2277
2278 * proc-service.c (ps_pdread): Add/adjust casts.
2279 (ps_pdwrite): Add/adjust casts.
2280
d6f85c84
SM
22812015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2282
2283 * server.c (handle_search_memory_1): Cast return value of
2284 memmem.
2285
f98cd059
SM
22862015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2287
2288 * server.c (write_qxfer_response): Change type of data to
2289 gdb_byte *.
2290
d2412fa5
PA
22912015-10-29 Pedro Alves <palves@redhat.com>
2292
2293 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2294
c17414a2
PA
22952015-10-29 Pedro Alves <palves@redhat.com>
2296
2297 * tracepoint.c (clear_installed_tracepoints): Add casts.
2298
e053fbc4
PA
22992015-10-29 Pedro Alves <palves@redhat.com>
2300
2301 * server.c (handle_v_cont, process_serial_event): Add enum
2302 gdb_signal casts to signal parsing code.
2303
add67df8
PA
23042015-10-29 Pedro Alves <palves@redhat.com>
2305
2306 * linux-low.h (NULL_REGSET): Define.
2307 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2308 * linux-arm-low.c (arm_regsets): Likewise.
2309 * linux-crisv32-low.c (cris_regsets): Likewise.
2310 * linux-m68k-low.c (m68k_regsets): Likewise.
2311 * linux-mips-low.c (mips_regsets): Likewise.
2312 * linux-nios2-low.c (nios2_regsets): Likewise.
2313 * linux-ppc-low.c (ppc_regsets): Likewise.
2314 * linux-s390-low.c (s390_regsets): Likewise.
2315 * linux-sh-low.c (sh_regsets): Likewise.
2316 * linux-sparc-low.c (sparc_regsets): Likewise.
2317 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2318 * linux-tile-low.c (tile_regsets): Likewise.
2319 * linux-x86-low.c (x86_regsets): Likewise.
2320 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2321
50bc912a
PA
23222015-10-29 Pedro Alves <palves@redhat.com>
2323
2324 * linux-low.h (NULL_REGSET): Define.
2325 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2326 * linux-arm-low.c (arm_regsets): Likewise.
2327 * linux-crisv32-low.c (cris_regsets): Likewise.
2328 * linux-m68k-low.c (m68k_regsets): Likewise.
2329 * linux-mips-low.c (mips_regsets): Likewise.
2330 * linux-nios2-low.c (nios2_regsets): Likewise.
2331 * linux-ppc-low.c (ppc_regsets): Likewise.
2332 * linux-s390-low.c (s390_regsets): Likewise.
2333 * linux-sh-low.c (sh_regsets): Likewise.
2334 * linux-sparc-low.c (sparc_regsets): Likewise.
2335 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2336 * linux-tile-low.c (tile_regsets): Likewise.
2337 * linux-x86-low.c (x86_regsets): Likewise.
2338 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2339
682b2546
DE
23402015-10-26 Doug Evans <dje@google.com>
2341
2342 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2343
963843d4
DE
23442015-10-26 Doug Evans <dje@google.com>
2345
2346 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2347
d41401ac
DE
23482015-10-26 Doug Evans <dje@google.com>
2349
2350 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2351 for debug_printf.
2352 (attach_thread, find_new_threads_callback): Ditto.
2353
3db28855
AT
23542015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2355
2356 * mem-break.h (set_breakpoint_data): Remove.
2357
fb78e89c
AT
23582015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2359
2360 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2361 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2362 (initialize_low): Remove set_breakpoint_data call.
2363 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2364 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2365 (initialize_low): Remove set_breakpoint_data call.
2366 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2367 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2368 (initialize_low): Remove set_breakpoint_data call.
2369
2e6ee069
AT
23702015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2371
2372 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2373 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2374 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2375 * target.h (target_breakpoint_kind_from_pc): New macro.
2376
1652a986
AT
23772015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2378
2379 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2380 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2381 the default breakpoint kind.
2382
abeead09
AT
23832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2384
2385 * linux-arm-low.c (arm_supports_z_point_type): Add software
2386 breakpoint support.
2387
b0b4b501
AT
23882015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2389
2390 * linux-arm-low.c: Refactor breakpoint definitions.
2391 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2392 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2393
8689682c
AT
23942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2395
2396 * Makefile.in: Add arm.c/o.
2397 * configure.srv: Likewise.
2398 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2399 (arm_breakpoint_kind_from_pc): New function.
2400 (arm_sw_breakpoint_from_kind): Return proper kind.
2401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2402
27165294
AT
24032015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2404
2405 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2406 removal.
2407 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2408 (struct raw_breakpoint) <size>: Remove.
2409 (struct raw_breakpoint) <kind>: Add.
2410 (bp_size): New function.
2411 (bp_opcode): Likewise.
2412 (find_raw_breakpoint_at): Adjust for kind.
2413 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2414 (remove_memory_breakpoint): Adjust for kind call bp_size.
2415 (set_raw_breakpoint_at): Adjust for kind.
2416 (set_breakpoint): Likewise.
2417 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2418 (delete_raw_breakpoint): Adjust for kind.
2419 (delete_breakpoint): Likewise.
2420 (find_gdb_breakpoint): Likewise.
2421 (set_gdb_breakpoint_1): Likewise.
2422 (set_gdb_breakpoint): Likewise.
2423 (delete_gdb_breakpoint_1): Likewise.
2424 (delete_gdb_breakpoint): Likewise.
2425 (uninsert_raw_breakpoint): Likewise.
2426 (reinsert_raw_breakpoint): Likewise.
2427 (set_breakpoint_data): Remove.
2428 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2429 (check_mem_read): Adjust for kind call bp_size.
2430 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2431 (clone_one_breakpoint): Adjust for kind.
2432 * mem-break.h (set_gdb_breakpoint): Likewise.
2433 (delete_gdb_breakpoint): Likewise.
2434 * server.c (process_serial_event): Likewise.
2435
dd373349
AT
24362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2437
2438 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2439 (struct linux_target_ops) <breakpoint>: Remove.
2440 (struct linux_target_ops) <breakpoint_len>: Remove.
2441 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2442 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2443 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2444 (arm_sw_breakpoint_from_kind): New function.
2445 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2446 (struct linux_target_ops) <breakpoint>: Remove.
2447 (struct linux_target_ops) <breakpoint_len>: Remove.
2448 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2450 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2451 (struct linux_target_ops) <breakpoint>: Remove.
2452 (struct linux_target_ops) <breakpoint_len>: Remove.
2453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2455 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2456 (struct linux_target_ops) <breakpoint>: Remove.
2457 (struct linux_target_ops) <breakpoint_len>: Remove.
2458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2460 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2461 and sw_breakpoint_from_kind to increment the pc.
2462 (linux_breakpoint_kind_from_pc): New function.
2463 (linux_sw_breakpoint_from_kind): New function.
2464 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2465 (initialize_low): Call breakpoint_kind_from_pc and
2466 sw_breakpoint_from_kind to replace breakpoint_data/len.
2467 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2468 New field.
2469 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2470 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2471 (struct linux_target_ops) <breakpoint>: Remove.
2472 (struct linux_target_ops) <breakpoint_len>: Remove.
2473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2475 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2476 (struct linux_target_ops) <breakpoint>: Remove.
2477 (struct linux_target_ops) <breakpoint_len>: Remove.
2478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2480 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2481 (struct linux_target_ops) <breakpoint>: Remove.
2482 (struct linux_target_ops) <breakpoint_len>: Remove.
2483 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2484 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2485 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2486 (struct linux_target_ops) <breakpoint>: Remove.
2487 (struct linux_target_ops) <breakpoint_len>: Remove.
2488 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2489 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2490 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2491 (struct linux_target_ops) <breakpoint>: Remove.
2492 (struct linux_target_ops) <breakpoint_len>: Remove.
2493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2494 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2495 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2496 (struct linux_target_ops) <breakpoint>: Remove.
2497 (struct linux_target_ops) <breakpoint_len>: Remove.
2498 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2499 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2500 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2501 (struct linux_target_ops) <breakpoint>: Remove.
2502 (struct linux_target_ops) <breakpoint_len>: Remove.
2503 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2504 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2505 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2506 (struct linux_target_ops) <breakpoint>: Remove.
2507 (struct linux_target_ops) <breakpoint_len>: Remove.
2508 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2509 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2510 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2511 (struct linux_target_ops) <breakpoint>: Remove.
2512 (struct linux_target_ops) <breakpoint_len>: Remove.
2513 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2514 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2515 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2516 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2517 (struct linux_target_ops) <breakpoint>: Remove.
2518 (struct linux_target_ops) <breakpoint_len>: Remove.
2519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2520 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2521 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2522 (struct linux_target_ops) <breakpoint>: Remove.
2523 (struct linux_target_ops) <breakpoint_len>: Remove.
2524 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2525 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2526
4cd98a19
AT
25272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2528
2529 * linux-cris-low.c (cris_get_pc): Remove void arg.
2530
774ee6d2
AR
25312015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2532
2533 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2534 variable name.
2535
833dcd29
AR
25362015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2537
2538 * inferiors.c (thread_pid_matches_callback): New function.
2539 (find_thread_process): New function.
2540 (remove_thread): Reset current_thread.
2541 (remove_process): Assert threads have been removed first.
2542
8d689ee5
YQ
25432015-10-15 Yao Qi <yao.qi@linaro.org>
2544
2545 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2546 if it is 3.
2547 (aarch64_remove_point): Likewise.
2548 * regcache.c (regcache_register_size): New function.
2549
1c2e1515
YQ
25502015-10-12 Yao Qi <yao.qi@linaro.org>
2551
2552 * linux-aarch64-low.c: Update all callers as emit_load_store
2553 is renamed to aarch64_emit_load_store.
2554
e1c587c3
YQ
25552015-10-12 Yao Qi <yao.qi@linaro.org>
2556
2557 * linux-aarch64-low.c: Update all callers of function renaming
2558 from emit_insn to aarch64_emit_insn.
2559
b6542f81
YQ
25602015-10-12 Yao Qi <yao.qi@linaro.org>
2561
2562 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2563 arch/aarch64-insn.h.
2564 (struct aarch64_memory_operand): Likewise.
2565 (ENCODE): Likewise.
2566 (emit_insn): Move to arch/aarch64-insn.c.
2567 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2568 (emit_load_store): Move to arch/aarch64-insn.c.
2569 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2570 (can_encode_int32): Remove.
2571
246994ce
YQ
25722015-10-12 Yao Qi <yao.qi@linaro.org>
2573
2574 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2575 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2576 (aarch64_relocate_instruction): Likewise.
2577 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2578 (struct aarch64_insn_visitor): Likewise.
2579
0badd99f
YQ
25802015-10-12 Yao Qi <yao.qi@linaro.org>
2581
2582 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2583 (struct aarch64_insn_visitor): New.
2584 (struct aarch64_insn_relocation_data): New.
2585 (aarch64_ftrace_insn_reloc_b): New function.
2586 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2587 (aarch64_ftrace_insn_reloc_cb): Likewise.
2588 (aarch64_ftrace_insn_reloc_tb): Likewise.
2589 (aarch64_ftrace_insn_reloc_adr): Likewise.
2590 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2591 (aarch64_ftrace_insn_reloc_others): Likewise.
2592 (visitor): New.
2593 (aarch64_relocate_instruction): Use visitor.
2594
dfaffe9d
YQ
25952015-10-12 Yao Qi <yao.qi@linaro.org>
2596
2597 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2598 int. Add argument buf.
2599 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2600 aarch64_relocate_instruction.
2601
70b439f0
YQ
26022015-10-12 Yao Qi <yao.qi@linaro.org>
2603
2604 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2605 argument insn. Remove local variable insn. Don't call
2606 target_read_uint32.
2607 (aarch64_install_fast_tracepoint_jump_pad): Call
2608 target_read_uint32.
2609
7781c06f
YQ
26102015-09-30 Yao Qi <yao.qi@linaro.org>
2611
2612 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2613 (emit_load_store_pair): Likewise.
2614
9a3c8263
SM
26152015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2616
2617 * dll.c (match_dll): Add cast(s).
2618 (unloaded_dll): Likewise.
2619 * linux-low.c (second_thread_of_pid_p): Likewise.
2620 (delete_lwp_callback): Likewise.
2621 (count_events_callback): Likewise.
2622 (select_event_lwp_callback): Likewise.
2623 (linux_set_resume_request): Likewise.
2624 * server.c (accumulate_file_name_length): Likewise.
2625 (emit_dll_description): Likewise.
2626 (handle_qxfer_threads_worker): Likewise.
2627 (visit_actioned_threads): Likewise.
2628 * thread-db.c (any_thread_of): Likewise.
2629 * tracepoint.c (same_process_p): Likewise.
2630 (match_blocktype): Likewise.
2631 (build_traceframe_info_xml): Likewise.
2632
224c3ddb
SM
26332015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2634
2635 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2636 assignment.
2637 (gdb_unparse_agent_expr): Likewise.
2638 * hostio.c (require_data): Likewise.
2639 (handle_pread): Likewise.
2640 * linux-low.c (disable_regset): Likewise.
2641 (fetch_register): Likewise.
2642 (store_register): Likewise.
2643 (get_dynamic): Likewise.
2644 (linux_qxfer_libraries_svr4): Likewise.
2645 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2646 (set_fast_tracepoint_jump): Likewise.
2647 (uninsert_fast_tracepoint_jumps_at): Likewise.
2648 (reinsert_fast_tracepoint_jumps_at): Likewise.
2649 (validate_inserted_breakpoint): Likewise.
2650 (clone_agent_expr): Likewise.
2651 * regcache.c (init_register_cache): Likewise.
2652 * remote-utils.c (putpkt_binary_1): Likewise.
2653 (decode_M_packet): Likewise.
2654 (decode_X_packet): Likewise.
2655 (look_up_one_symbol): Likewise.
2656 (relocate_instruction): Likewise.
2657 (monitor_output): Likewise.
2658 * server.c (handle_search_memory): Likewise.
2659 (handle_qxfer_exec_file): Likewise.
2660 (handle_qxfer_libraries): Likewise.
2661 (handle_qxfer): Likewise.
2662 (handle_query): Likewise.
2663 (handle_v_cont): Likewise.
2664 (handle_v_run): Likewise.
2665 (captured_main): Likewise.
2666 * target.c (write_inferior_memory): Likewise.
2667 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2668 * tracepoint.c (init_trace_buffer): Likewise.
2669 (add_tracepoint_action): Likewise.
2670 (add_traceframe): Likewise.
2671 (add_traceframe_block): Likewise.
2672 (cmd_qtdpsrc): Likewise.
2673 (cmd_qtdv): Likewise.
2674 (cmd_qtstatus): Likewise.
2675 (response_source): Likewise.
2676 (response_tsv): Likewise.
2677 (cmd_qtnotes): Likewise.
2678 (gdb_collect): Likewise.
2679 (initialize_tracepoint): Likewise.
2680
afbe19f8
PL
26812015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2682
2683 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2684 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2685 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2686 <NOP>: New.
2687 (enum aarch64_condition_codes): New enum.
2688 (w0): New static global.
2689 (fp): Likewise.
2690 (lr): Likewise.
2691 (struct aarch64_memory_operand) <type>: New
2692 MEMORY_OPERAND_POSTINDEX type.
2693 (postindex_memory_operand): New helper function.
2694 (emit_ret): New function.
2695 (emit_load_store_pair): New function, factored out of emit_stp
2696 with support for MEMORY_OPERAND_POSTINDEX.
2697 (emit_stp): Rewrite using emit_load_store_pair.
2698 (emit_ldp): New function.
2699 (emit_load_store): Likewise.
2700 (emit_ldr): Mention post-index instruction in comment.
2701 (emit_ldrh): New function.
2702 (emit_ldrb): New function.
2703 (emit_ldrsw): Mention post-index instruction in comment.
2704 (emit_str): Likewise.
2705 (emit_subs): New function.
2706 (emit_cmp): Likewise.
2707 (emit_and): Likewise.
2708 (emit_orr): Likewise.
2709 (emit_orn): Likewise.
2710 (emit_eor): Likewise.
2711 (emit_mvn): Likewise.
2712 (emit_lslv): Likewise.
2713 (emit_lsrv): Likewise.
2714 (emit_asrv): Likewise.
2715 (emit_mul): Likewise.
2716 (emit_sbfm): Likewise.
2717 (emit_sbfx): Likewise.
2718 (emit_ubfm): Likewise.
2719 (emit_ubfx): Likewise.
2720 (emit_csinc): Likewise.
2721 (emit_cset): Likewise.
2722 (emit_nop): Likewise.
2723 (emit_ops_insns): New helper function.
2724 (emit_pop): Likewise.
2725 (emit_push): Likewise.
2726 (aarch64_emit_prologue): New function.
2727 (aarch64_emit_epilogue): Likewise.
2728 (aarch64_emit_add): Likewise.
2729 (aarch64_emit_sub): Likewise.
2730 (aarch64_emit_mul): Likewise.
2731 (aarch64_emit_lsh): Likewise.
2732 (aarch64_emit_rsh_signed): Likewise.
2733 (aarch64_emit_rsh_unsigned): Likewise.
2734 (aarch64_emit_ext): Likewise.
2735 (aarch64_emit_log_not): Likewise.
2736 (aarch64_emit_bit_and): Likewise.
2737 (aarch64_emit_bit_or): Likewise.
2738 (aarch64_emit_bit_xor): Likewise.
2739 (aarch64_emit_bit_not): Likewise.
2740 (aarch64_emit_equal): Likewise.
2741 (aarch64_emit_less_signed): Likewise.
2742 (aarch64_emit_less_unsigned): Likewise.
2743 (aarch64_emit_ref): Likewise.
2744 (aarch64_emit_if_goto): Likewise.
2745 (aarch64_emit_goto): Likewise.
2746 (aarch64_write_goto_address): Likewise.
2747 (aarch64_emit_const): Likewise.
2748 (aarch64_emit_call): Likewise.
2749 (aarch64_emit_reg): Likewise.
2750 (aarch64_emit_pop): Likewise.
2751 (aarch64_emit_stack_flush): Likewise.
2752 (aarch64_emit_zero_ext): Likewise.
2753 (aarch64_emit_swap): Likewise.
2754 (aarch64_emit_stack_adjust): Likewise.
2755 (aarch64_emit_int_call_1): Likewise.
2756 (aarch64_emit_void_call_2): Likewise.
2757 (aarch64_emit_eq_goto): Likewise.
2758 (aarch64_emit_ne_goto): Likewise.
2759 (aarch64_emit_lt_goto): Likewise.
2760 (aarch64_emit_le_goto): Likewise.
2761 (aarch64_emit_gt_goto): Likewise.
2762 (aarch64_emit_ge_got): Likewise.
2763 (aarch64_emit_ops_impl): New static global variable.
2764 (aarch64_emit_ops): New target function, return
2765 &aarch64_emit_ops_impl.
2766 (struct linux_target_ops): Install it.
2767
bb903df0
PL
27682015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2769
2770 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2771 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2772 aarch64-ipa.o.
2773 * linux-aarch64-ipa.c: New file.
2774 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2775 and endian.h.
2776 (aarch64_get_thread_area): New target method.
2777 (extract_signed_bitfield): New helper function.
2778 (aarch64_decode_ldr_literal): New function.
2779 (enum aarch64_opcodes): New enum.
2780 (struct aarch64_register): New struct.
2781 (struct aarch64_operand): New struct.
2782 (x0): New static global.
2783 (x1): Likewise.
2784 (x2): Likewise.
2785 (x3): Likewise.
2786 (x4): Likewise.
2787 (w2): Likewise.
2788 (ip0): Likewise.
2789 (sp): Likewise.
2790 (xzr): Likewise.
2791 (aarch64_register): New helper function.
2792 (register_operand): Likewise.
2793 (immediate_operand): Likewise.
2794 (struct aarch64_memory_operand): New struct.
2795 (offset_memory_operand): New helper function.
2796 (preindex_memory_operand): Likewise.
2797 (enum aarch64_system_control_registers): New enum.
2798 (ENCODE): New macro.
2799 (emit_insn): New helper function.
2800 (emit_b): New function.
2801 (emit_bcond): Likewise.
2802 (emit_cb): Likewise.
2803 (emit_tb): Likewise.
2804 (emit_blr): Likewise.
2805 (emit_stp): Likewise.
2806 (emit_ldp_q_offset): Likewise.
2807 (emit_stp_q_offset): Likewise.
2808 (emit_load_store): Likewise.
2809 (emit_ldr): Likewise.
2810 (emit_ldrsw): Likewise.
2811 (emit_str): Likewise.
2812 (emit_ldaxr): Likewise.
2813 (emit_stxr): Likewise.
2814 (emit_stlr): Likewise.
2815 (emit_data_processing_reg): Likewise.
2816 (emit_data_processing): Likewise.
2817 (emit_add): Likewise.
2818 (emit_sub): Likewise.
2819 (emit_mov): Likewise.
2820 (emit_movk): Likewise.
2821 (emit_mov_addr): Likewise.
2822 (emit_mrs): Likewise.
2823 (emit_msr): Likewise.
2824 (emit_sevl): Likewise.
2825 (emit_wfe): Likewise.
2826 (append_insns): Likewise.
2827 (can_encode_int32_in): New helper function.
2828 (aarch64_relocate_instruction): New function.
2829 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2830 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2831 (struct linux_target_ops): Install aarch64_get_thread_area,
2832 aarch64_install_fast_tracepoint_jump_pad and
2833 aarch64_get_min_fast_tracepoint_insn_len.
2834
787749ea
PL
28352015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2836
2837 * Makefile.in (aarch64-insn.o): New rule.
2838 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2839
9812b2e6
YQ
28402015-09-21 Yao Qi <yao.qi@linaro.org>
2841
2842 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2843
18fe412b
YQ
28442015-09-21 Yao Qi <yao.qi@linaro.org>
2845
2846 * tracepoint.c (max_jump_pad_size): Remove.
2847
a0cc84cd
YQ
28482015-09-18 Yao Qi <yao.qi@linaro.org>
2849
2850 * linux-aarch64-low.c: Don't include sys/uio.h.
2851 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2852
d78908cf
WW
28532015-09-16 Wei-cheng Wang <cole945@gmail.com>
2854
2855 * tracepoint.c (eval_result_type): Change prototype.
2856 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2857
d57e0d50
PA
28582015-09-15 Pedro Alves <palves@redhat.com>
2859
2860 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2861 Check whether to report exec events instead of checking whether
2862 multiprocess is enabled.
2863
5a676acc
PA
28642015-09-15 Pedro Alves <palves@redhat.com>
2865
2866 PR remote/18965
2867 * remote-utils.c (prepare_resume_reply): Merge
2868 TARGET_WAITKIND_VFORK_DONE switch case with the
2869 TARGET_WAITKIND_FORKED case.
2870
7c5d0fad
YQ
28712015-09-15 Yao Qi <yao.qi@linaro.org>
2872
2873 * server.c (handle_query): Check string comparison using
2874 "else if" instead of "if".
2875
750ce8d1
YQ
28762015-09-15 Yao Qi <yao.qi@linaro.org>
2877
2878 * server.c (vCont_supported): New global variable.
2879 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2880 matches. Append ";vContSupported+" to own_buf.
2881 (handle_v_requests): Append ";s;S" to own_buf if target supports
2882 hardware single step or vCont_supported is false.
2883 (capture_main): Set vCont_supported to zero.
2884
70b90b91
YQ
28852015-09-15 Yao Qi <yao.qi@linaro.org>
2886
2887 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2888 it to ...
2889 (linux_supports_hardware_single_step): ... New function.
2890 (linux_target_ops): Update.
2891 * lynx-low.c (lynx_target_ops): Set field
2892 supports_hardware_single_step to target_can_do_hardware_single_step.
2893 * nto-low.c (nto_target_ops): Likewise.
2894 * spu-low.c (spu_target_ops): Likewise.
2895 * win32-low.c (win32_target_ops): Likewise.
2896 * target.c (target_can_do_hardware_single_step): New function.
2897 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2898 Remove. <supports_hardware_single_step>: New field.
2899 (target_supports_conditional_breakpoints): Remove.
2900 (target_supports_hardware_single_step): New macro.
2901 (target_can_do_hardware_single_step): Declare.
2902 * server.c (handle_query): Use target_supports_hardware_single_step
2903 instead of target_supports_conditional_breakpoints.
2904
ade90bde
YQ
29052015-09-15 Yao Qi <yao.qi@linaro.org>
2906
2907 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2908 function.
2909 (struct linux_target_ops the_low_target): Install
2910 aarch64_linux_siginfo_fixup.
2911
94585166
DB
29122015-09-11 Don Breazeal <donb@codesourcery.com>
2913 Luis Machado <lgustavo@codesourcery.com>
2914
2915 * linux-low.c (linux_mourn): Static declaration.
2916 (linux_arch_setup): Move in front of
2917 handle_extended_wait.
2918 (linux_arch_setup_thread): New function.
2919 (handle_extended_wait): Handle exec events. Call
2920 linux_arch_setup_thread. Make event_lwp argument a
2921 pointer-to-a-pointer.
2922 (check_zombie_leaders): Do not check stopped threads.
2923 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2924 (linux_low_filter_event): Add lwp and thread for exec'ing
2925 non-leader thread if leader thread has been deleted.
2926 Refactor code into linux_arch_setup_thread and call it.
2927 Pass child lwp pointer by reference to handle_extended_wait.
2928 (linux_wait_for_event_filtered): Update comment.
2929 (linux_wait_1): Prevent clobbering exec event status.
2930 (linux_supports_exec_events): New function.
2931 (linux_target_ops) <supports_exec_events>: Initialize new member.
2932 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2933 new member.
2934 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2935 * server.c (report_exec_events): New global variable.
2936 (handle_query): Handle qSupported query for exec-events feature.
2937 (captured_main): Initialize report_exec_events.
2938 * server.h (report_exec_events): Declare new global variable.
2939 * target.h (struct target_ops) <supports_exec_events>: New
2940 member.
2941 (target_supports_exec_events): New macro.
2942 * win32-low.c (win32_target_ops) <supports_exec_events>:
2943 Initialize new member.
2944
0568462b
MM
29452015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2946
2947 * linux-low.c (linux_low_enable_btrace): Remove.
2948 (linux_target_ops): Replace linux_low_enable_btrace with
2949 linux_enable_btrace.
2950
39edd165
YQ
29512015-09-03 Yao Qi <yao.qi@linaro.org>
2952
2953 * linux-aarch64-low.c (aarch64_insert_point): Call
2954 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2955 returns true.
2956
1db33b5a
UW
29572015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2958
2959 * linux-low.c (check_stopped_by_breakpoint): Use
2960 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2961
ab290430
PA
29622015-08-27 Pedro Alves <palves@redhat.com>
2963
2964 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2965
8d749320
SM
29662015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2967
6711b7f8
SM
2968 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2969 the XNEW-family equivalent.
8d749320
SM
2970 (compile_bytecodes): Likewise.
2971 * dll.c (loaded_dll): Likewise.
2972 * event-loop.c (append_callback_event): Likewise.
2973 (create_file_handler): Likewise.
2974 (create_file_event): Likewise.
2975 * hostio.c (handle_open): Likewise.
2976 * inferiors.c (add_thread): Likewise.
2977 (add_process): Likewise.
2978 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2979 * linux-arm-low.c (arm_new_process): Likewise.
2980 (arm_new_thread): Likewise.
2981 * linux-low.c (add_to_pid_list): Likewise.
2982 (linux_add_process): Likewise.
2983 (handle_extended_wait): Likewise.
2984 (add_lwp): Likewise.
2985 (enqueue_one_deferred_signal): Likewise.
2986 (enqueue_pending_signal): Likewise.
2987 (linux_resume_one_lwp_throw): Likewise.
2988 (linux_resume_one_thread): Likewise.
2989 (linux_read_memory): Likewise.
2990 (linux_write_memory): Likewise.
2991 * linux-mips-low.c (mips_linux_new_process): Likewise.
2992 (mips_linux_new_thread): Likewise.
2993 (mips_add_watchpoint): Likewise.
2994 * linux-x86-low.c (initialize_low_arch): Likewise.
2995 * lynx-low.c (lynx_add_process): Likewise.
2996 * mem-break.c (set_raw_breakpoint_at): Likewise.
2997 (set_breakpoint): Likewise.
2998 (add_condition_to_breakpoint): Likewise.
2999 (add_commands_to_breakpoint): Likewise.
3000 (clone_agent_expr): Likewise.
3001 (clone_one_breakpoint): Likewise.
3002 * regcache.c (new_register_cache): Likewise.
3003 * remote-utils.c (look_up_one_symbol): Likewise.
3004 * server.c (queue_stop_reply): Likewise.
3005 (start_inferior): Likewise.
3006 (queue_stop_reply_callback): Likewise.
3007 (handle_target_event): Likewise.
3008 * spu-low.c (fetch_ppc_memory): Likewise.
3009 (store_ppc_memory): Likewise.
3010 * target.c (set_target_ops): Likewise.
3011 * thread-db.c (thread_db_load_search): Likewise.
3012 (try_thread_db_load_1): Likewise.
3013 * tracepoint.c (add_tracepoint): Likewise.
3014 (add_tracepoint_action): Likewise.
3015 (create_trace_state_variable): Likewise.
3016 (cmd_qtdpsrc): Likewise.
3017 (cmd_qtro): Likewise.
3018 (add_while_stepping_state): Likewise.
3019 * win32-low.c (child_add_thread): Likewise.
3020 (get_image_name): Likewise.
3021
ed8b7b42
YQ
30222015-08-25 Yao Qi <yao.qi@linaro.org>
3023
3024 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3025
db3cb7cb
YQ
30262015-08-25 Yao Qi <yao.qi@linaro.org>
3027
3028 * Makefile.in (aarch64-linux.o): New rule.
3029 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3030 srv_tgtobj.
3031 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3032 (aarch64_init_debug_reg_state): Make it extern.
3033 (aarch64_linux_prepare_to_resume): Remove.
3034
f6011a1c
YQ
30352015-08-25 Yao Qi <yao.qi@linaro.org>
3036
3037 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3038 lwp_arch_private_info and ptid_of_lwp.
3039
88e2cf7e
YQ
30402015-08-25 Yao Qi <yao.qi@linaro.org>
3041
3042 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3043 Find proc_info by find_process_pid. All callers updated.
3044
5e35436e
YQ
30452015-08-25 Yao Qi <yao.qi@linaro.org>
3046
3047 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3048 Remove.
3049 (debug_reg_change_callback): Remove.
3050 (aarch64_notify_debug_reg_change): Remove.
3051
4a8a7965
YQ
30522015-08-25 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3055 Call current_lwp_ptid.
3056
32a271ee
YQ
30572015-08-25 Yao Qi <yao.qi@linaro.org>
3058
3059 * linux-aarch64-low.c (debug_reg_change_callback): Use
3060 debug_printf.
3061
0d51c8d7
YQ
30622015-08-25 Yao Qi <yao.qi@linaro.org>
3063
3064 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3065
31a43dd5
YQ
30662015-08-25 Yao Qi <yao.qi@linaro.org>
3067
3068 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3069
8ee52567
YQ
30702015-08-25 Yao Qi <yao.qi@linaro.org>
3071
3072 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3073 the code.
3074
ff3f0f45
YQ
30752015-08-25 Yao Qi <yao.qi@linaro.org>
3076
3077 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3078 Remove.
3079 (debug_reg_change_callback): Remove argument entry and add argument
3080 lwp. Remove local variable thread. Don't print thread id in the
3081 debugging output. Don't check whether pid of thread equals to pid.
3082 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3083 iterate_over_lwps instead find_inferior.
3084
3d40fbb5
PA
30852015-08-24 Pedro Alves <palves@redhat.com>
3086
3087 * inferiors.c (get_first_process): New function.
3088 * inferiors.h (get_first_process): New declaration.
3089 * remote-utils.c (read_ptid): Default to the first process in the
3090 list, instead of to the current thread's process.
3091
438e1e42
PA
30922015-08-24 Pedro Alves <palves@redhat.com>
3093
3094 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3095 * event-loop.c: Likewise.
3096 * remote-utils.c: Likewise.
3097 * tracepoint.c: Likewise.
3098
a8c6d4fc
PA
30992015-08-24 Pedro Alves <palves@redhat.com>
3100
3101 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3102 ptid_get_lwp.
3103
99b0bb12
PA
31042015-08-21 Pedro Alves <palves@redhat.com>
3105
3106 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3107 instead of literal 1.
3108
f8904751
PA
31092015-08-21 Pedro Alves <palves@redhat.com>
3110
3111 * tdesc.c (default_description): Explicitly zero-initialize.
3112
465a859e
PA
31132015-08-21 Pedro Alves <palves@redhat.com>
3114
3115 PR gdb/18749
3116 * inferiors.c (remove_thread): Discard any pending stop reply for
3117 this thread.
3118 * server.c (remove_all_on_match_pid): Rename to ...
3119 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3120 instead of a pid.
3121 (discard_queued_stop_replies): Change parameter to a ptid. Now
3122 extern.
3123 (handle_v_kill, kill_inferior_callback, captured_main)
3124 (process_serial_event): Adjust.
3125 * server.h (discard_queued_stop_replies): Declare.
3126
f0db101d
PA
31272015-08-21 Pedro Alves <palves@redhat.com>
3128
3129 * linux-low.c (wait_for_sigstop): Always switch to no thread
3130 selected if the previously current thread dies.
3131 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3132 process instead of the current thread's.
3133 * remote-utils.c (input_interrupt): Don't check if there's no
3134 current thread.
3135 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3136 current thread to the general thread fails, error out.
3137 (handle_qxfer_auxv, handle_qxfer_libraries)
3138 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3139 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3140 (handle_query): Check if there's a thread selected instead of
3141 checking whether there's any thread in the thread list.
3142 (handle_qxfer_threads, handle_qxfer_btrace)
3143 (handle_qxfer_btrace_conf): Don't error out early if there's no
3144 thread in the thread list.
3145 (handle_v_cont, myresume): Don't set the current thread to the
3146 continue thread.
3147 (process_serial_event) <Hg handling>: Also set thread_id if the
3148 previous general thread is still alive.
3149 (process_serial_event) <g/G handling>: If setting the current
3150 thread to the general thread fails, error out.
3151 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3152 thread's lwp instead of the current thread's.
3153 * target.c (set_desired_thread): If the desired thread was not
3154 found, leave the current thread pointing to NULL. Return an int
3155 (boolean) indicating success.
3156 * target.h (set_desired_thread): Change return type to int.
3157
40045d91
MF
31582015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3159
3160 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3161 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3162 #includes.
3163 (ps_get_thread_area): New function.
3164
45face3b
GB
31652015-08-19 Gary Benson <gbenson@redhat.com>
3166
3167 * hostio.c (handle_pread): Do not attempt to read more data
3168 than hostio_reply_with_data can fit in a packet.
3169
16d5f642
JB
31702015-08-18 Joel Brobecker <brobecker@adacore.com>
3171
3172 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3173
a738da3a
MF
31742015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3175
3176 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3177
33ebda9d
PA
31782015-08-06 Pedro Alves <palves@redhat.com>
3179
3180 * tracepoint.c (expr_eval_result): Now an int.
3181
a44892be
PA
31822015-08-06 Pedro Alves <palves@redhat.com>
3183
3184 * gdbthread.h (struct regcache): Forward declare.
3185 (struct thread_info) <regcache_data>: Now a struct regcache
3186 pointer.
3187 * inferiors.c (inferior_regcache_data)
3188 (set_inferior_regcache_data): Now work with struct regcache
3189 pointers.
3190 * inferiors.h (struct regcache): Forward declare.
3191 (inferior_regcache_data, set_inferior_regcache_data): Now work
3192 with struct regcache pointers.
3193 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3194 (free_register_cache_thread): Remove struct regcache pointer
3195 casts.
3196
608a1e46
PA
31972015-08-06 Pedro Alves <palves@redhat.com>
3198
3199 * server.c (captured_main): On error, print the exception message
3200 to stderr, and if run_once is set, throw a quit.
3201
f0ce0d3a
PA
32022015-08-06 Pedro Alves <palves@redhat.com>
3203
3204 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3205 the current thread.
3206
bf47e248
PA
32072015-08-06 Pedro Alves <palves@redhat.com>
3208
3209 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3210 reading beyond the passed in buffer length.
3211
b6b9ffcc
PL
32122015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3213
3214 * tracepoint.c (symbol_list) <required>: Remove.
3215
863d01bd
PA
32162015-08-06 Pedro Alves <palves@redhat.com>
3217
3218 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3219 count if stopping and suspending threads.
3220 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3221 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3222 (linux_detach): Complete an ongoing step-over.
3223 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3224 throughout.
3225 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3226 (linux_wait_1): If passing a signal to the inferior after
3227 finishing a step-over, unsuspend and re-resume all lwps. If we
3228 see a single-step event but the thread should be continuing, don't
3229 pass the trap to gdb.
3230 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3231 internal_error instead of gdb_assert.
3232 (enqueue_pending_signal): New function.
3233 (check_ptrace_stopped_lwp_gone): Add debug output.
3234 (start_step_over): Use internal_error instead of gdb_assert.
3235 (complete_ongoing_step_over): New function.
3236 (linux_resume_one_thread): Don't resume a suspended thread.
3237 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3238 it stepping.
3239
00db26fa
PA
32402015-08-06 Pedro Alves <palves@redhat.com>
3241
3242 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3243 (linux_thread_alive): Use lwp_is_marked_dead.
3244 (extended_event_reported): Delete.
3245 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3246 instead of extended_event_reported.
3247 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3248 as well.
3249 (lwp_is_marked_dead): New function.
3250 (lwp_running): Use lwp_is_marked_dead.
3251 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3252 comment.
3253
ad071a30
PA
32542015-08-06 Pedro Alves <palves@redhat.com>
3255
3256 * linux-low.c (linux_wait_1): Move fork event output out of the
3257 !report_to_gdb check. Pass event_child->waitstatus to
3258 target_waitstatus_to_string instead of ourstatus.
3259
524b57e6
YQ
32602015-08-04 Yao Qi <yao.qi@linaro.org>
3261
3262 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3263 if current_thread is 32 bit.
3264
6085d6f6
YQ
32652015-08-04 Yao Qi <yao.qi@linaro.org>
3266
3267 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3268 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3269 * server.c (extended_protocol): Remove "static".
3270 * server.h (extended_protocol): Declare it.
3271
8a7e4587
YQ
32722015-08-04 Yao Qi <yao.qi@linaro.org>
3273
3274 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3275 both aarch64 and aarch32.
3276 (aarch64_set_pc): Likewise.
3277
3b53ae99
YQ
32782015-08-04 Yao Qi <yao.qi@linaro.org>
3279
3280 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3281 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3282 arm-with-neon.xml to srv_xmlfiles.
3283 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3284 (is_64bit_tdesc): New function.
3285 (aarch64_linux_read_description): New function.
3286 (aarch64_arch_setup): Call aarch64_linux_read_description.
3287 (regs_info): Rename to regs_info_aarch64.
3288 (aarch64_regs_info): Return right regs_info.
3289 (initialize_low_arch): Call initialize_low_arch_aarch32.
3290
bd9e6534
YQ
32912015-08-04 Yao Qi <yao.qi@linaro.org>
3292
3293 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3294 * linux-aarch32-low.c: New file.
3295 * linux-aarch32-low.h: New file.
3296 * linux-arm-low.c (arm_fill_gregset): Move it to
3297 linux-aarch32-low.c.
3298 (arm_store_gregset): Likewise.
3299 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3300 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3301 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3302 (regs_info): Rename to regs_info_arm.
3303 (arm_regs_info): Return regs_info_aarch32 if
3304 have_ptrace_getregset is 1 and target description is
3305 arm_with_neon or arm_with_vfpv3.
3306 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3307 Call initialize_low_arch_aarch32 instead.
3308
ded48a5e
YQ
33092015-08-04 Yao Qi <yao.qi@linaro.org>
3310
3311 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3312 * linux-low.c: ... here.
3313 * linux-low.h (have_ptrace_getregset): Declare it.
3314
96e9210f
PA
33152015-08-04 Pedro Alves <palves@redhat.com>
3316
3317 * thread-db.c (struct thread_db): Use new typedefs.
3318 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3319 CHK calls.
3320 (disable_thread_event_reporting): Cast result of dlsym to
3321 destination function pointer type.
3322 (thread_db_mourn): Use td_ta_delete_ftype.
3323
af60a1ef
SL
33242015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3325
3326 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3327 arch variant.
3328 (CDX_BREAKPOINT): Define for R2.
3329 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3330 (the_low_target): Add comments.
3331
e8b41681
YQ
33322015-07-30 Yao Qi <yao.qi@linaro.org>
3333
3334 * linux-arm-low.c (arm_hwcap): Remove it.
3335 (arm_read_description): New local variable arm_hwcap. Don't
3336 set arm_hwcap to zero.
3337
89abb039
YQ
33382015-07-30 Yao Qi <yao.qi@linaro.org>
3339
3340 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3341 Use regcache->tdesc instead.
3342 (arm_store_wmmxregset): Likewise.
3343 (arm_fill_vfpregset): Likewise.
3344 (arm_store_vfpregset): Likewise.
3345
deca266c
YQ
33462015-07-30 Yao Qi <yao.qi@linaro.org>
3347
3348 * linux-arm-low.c: Include arch/arm.h.
3349 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3350 (arm_store_gregset): Likewise.
3351
aa58a496
SM
33522015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3353
3354 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3355 ptrace's 4th parameter.
3356
50904b25
YQ
33572015-07-27 Yao Qi <yao.qi@linaro.org>
3358
3359 * configure.srv (case aarch64*-*-linux*): Don't set
3360 srv_linux_usrregs.
3361
5826e159
PA
33622015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3363
3364 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3365 sys/ptrace.h.
3366 * linux-arm-low.c: Likewise.
3367 * linux-cris-low.c: Likewise.
3368 * linux-crisv32-low.c: Likewise.
3369 * linux-low.c: Likewise.
3370 * linux-m68k-low.c: Likewise.
3371 * linux-mips-low.c: Likewise.
3372 * linux-nios2-low.c: Likewise.
3373 * linux-s390-low.c: Likewise.
3374 * linux-sparc-low.c: Likewise.
3375 * linux-tic6x-low.c: Likewise.
3376 * linux-tile-low.c: Likewise.
3377 * linux-x86-low.c: Likewise.
3378
54019719
PA
33792015-07-24 Pedro Alves <palves@redhat.com>
3380
3381 * config.in: Regenerate.
3382 * configure: Regenerate.
3383
eb7aa561
PA
33842015-07-24 Pedro Alves <palves@redhat.com>
3385
3386 * acinclude.m4: Include ../ptrace.m4.
3387 * configure.ac: Call GDB_AC_PTRACE.
3388 * config.in, configure: Regenerate.
3389
55d7b841
YQ
33902015-07-24 Yao Qi <yao.qi@linaro.org>
3391
3392 * linux-low.c (linux_create_inferior): Remove setting to
3393 proc->priv->new_inferior.
3394 (linux_attach): Likewise.
3395 (linux_low_filter_event): Likewise.
3396 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3397
c06cbd92
YQ
33982015-07-24 Yao Qi <yao.qi@linaro.org>
3399
3400 * linux-low.c (linux_arch_setup): New function.
3401 (linux_low_filter_event): If proc->tdesc is NULL and
3402 proc->attached is true, call the_low_target.arch_setup.
3403 Otherwise, keep status pending, and return.
3404 (linux_resume_one_lwp_throw): Don't call get_pc if
3405 thread->while_stepping isn't NULL. Don't call
3406 get_thread_regcache if proc->tdesc is NULL.
3407 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3408 (linux_target_ops): Install arch_setup.
3409 * server.c (start_inferior): Call the_target->arch_setup.
3410 * target.h (struct target_ops) <arch_setup>: New field.
3411 (target_arch_setup): New marco.
3412 * lynx-low.c (lynx_target_ops): Update.
3413 * nto-low.c (nto_target_ops): Update.
3414 * spu-low.c (spu_target_ops): Update.
3415 * win32-low.c (win32_target_ops): Update.
3416
5ae3ebba
YQ
34172015-07-24 Yao Qi <yao.qi@linaro.org>
3418
3419 * linux-low.c (linux_add_process): Don't set
3420 proc->priv->new_inferior.
3421 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3422 (linux_attach): Likewise.
3423
eb97750b
YQ
34242015-07-24 Yao Qi <yao.qi@linaro.org>
3425
3426 * server.c (start_inferior): Code refactor.
3427
51aee833
YQ
34282015-07-24 Yao Qi <yao.qi@linaro.org>
3429
3430 * server.c (process_serial_event): Set general_thread.
3431
af1b22f3
YQ
34322015-07-21 Yao Qi <yao.qi@linaro.org>
3433
3434 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3435 aarch64_linux_get_debug_reg_capacity.
3436
554717a3
YQ
34372015-07-17 Yao Qi <yao.qi@linaro.org>
3438
3439 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3440 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3441 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3442 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3443 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3444 (AARCH64_HWP_ALIGNMENT): Likewise.
3445 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3446 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3447 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3448 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3449 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3450 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3451 (struct aarch64_debug_reg_state): Likewise.
3452 (struct arch_lwp_info): Likewise.
3453 (aarch64_align_watchpoint): Likewise.
3454 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3455 (aarch64_watchpoint_length): Likewise.
3456 (aarch64_point_encode_ctrl_reg): Likewise
3457 (aarch64_point_is_aligned): Likewise.
3458 (aarch64_align_watchpoint): Likewise.
3459 (aarch64_linux_set_debug_regs):
3460 (aarch64_dr_state_insert_one_point): Likewise.
3461 (aarch64_dr_state_remove_one_point): Likewise.
3462 (aarch64_handle_breakpoint): Likewise.
3463 (aarch64_handle_aligned_watchpoint): Likewise.
3464 (aarch64_handle_unaligned_watchpoint): Likewise.
3465 (aarch64_handle_watchpoint): Likewise.
3466
c67ca4de
YQ
34672015-07-17 Yao Qi <yao.qi@linaro.org>
3468
3469 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3470 and don't aarch64_get_debug_reg_state. All callers update.
3471 (aarch64_handle_aligned_watchpoint): Likewise.
3472 (aarch64_handle_unaligned_watchpoint): Likewise.
3473 (aarch64_handle_watchpoint): Likewise.
3474 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3475 (aarch64_remove_point): Likewise.
3476
25abf979
YQ
34772015-07-17 Yao Qi <yao.qi@linaro.org>
3478
3479 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3480 debug_printf.
3481 (aarch64_handle_unaligned_watchpoint): Likewise.
3482
db1ff28b
JK
34832015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3484
3485 Revert the previous 3 commits:
3486 Move gdb_regex* to common/
3487 Move linux_find_memory_regions_full & co.
3488 gdbserver build-id attribute generator
3489
700ca40f
JK
34902015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3491 Jan Kratochvil <jan.kratochvil@redhat.com>
3492
3493 gdbserver build-id attribute generator.
3494 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3495 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3496 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3497 (find_phdr): New.
3498 (get_dynamic): Use find_pdhr to traverse program headers.
3499 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3500 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3501 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3502 (get_hex_build_id): New.
3503 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3504 to reply XML document.
3505
9904185c
JK
35062015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3507 Jan Kratochvil <jan.kratochvil@redhat.com>
3508
3509 * target.c: Include target/target-utils.h and fcntl.h.
3510 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3511 (target_fileio_read_stralloc): New functions.
3512
6e5b4429
JK
35132015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3514
3515 * Makefile.in (OBS): Add gdb_regex.o.
3516 (gdb_regex.o): New.
3517 * config.in: Rebuilt.
3518 * configure: Rebuilt.
3519
ddc98fbf
JK
35202015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3521 Jan Kratochvil <jan.kratochvil@redhat.com>
3522
3523 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3524 * Makefile.in (OBS): Add target-utils.o.
3525 (linux-maps.o, target-utils.o): New.
3526 * configure.srv (srv_linux_obj): Add linux-maps.o.
3527
e57bb7a0
PL
35282015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3529
3530 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3531 function, return 1.
3532 (the_low_target): Install it.
3533
586b02a9
PA
35342015-07-14 Pedro Alves <palves@redhat.com>
3535
3536 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3537 Instead, ignore ECHILD, and throw an error for other errnos.
3538
58c1b36c
PA
35392015-07-10 Pedro Alves <palves@redhat.com>
3540
3541 * event-loop.c (struct callback_event) <data>: Change type to
3542 gdb_client_data instance instead of gdb_client_data pointer.
3543 (append_callback_event): Adjust.
3544
421530db
PL
35452015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3546
3547 * linux-aarch64-low.c: Add comments for each linux_target_ops
3548 method. Remove comments already covered in target_ops and
3549 linux_target_ops definitions.
3550 (the_low_target): Add comments for each unimplemented method.
3551
c2d65f38
YQ
35522015-07-09 Yao Qi <yao.qi@linaro.org>
3553
3554 * linux-aarch64-low.c (aarch64_regmap): Remove.
3555 (aarch64_usrregs_info): Remove.
3556 (regs_info): Set field usrregs to NULL.
3557
b20a6524
MM
35582015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3559
3560 * linux-low.c: Include "rsp-low.h"
3561 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3562 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3563 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3564 (handle_btrace_enable_pt): New.
3565 (handle_btrace_general_set): Support "pt".
3566 (handle_btrace_conf_general_set): Support "pt:size".
3567
96c97461
PL
35682015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3569
3570 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3571 Z_PACKET_SW_BP.
3572
37d66942
PL
35732015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3574
3575 * linux-aarch64-low.c: Remove comment about endianness.
3576 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3577 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3578 memcmp.
3579
dc06243f
GB
35802015-06-24 Gary Benson <gbenson@redhat.com>
3581
3582 * linux-i386-ipa.c (stdint.h): Do not include.
3583 * lynx-i386-low.c (stdint.h): Likewise.
3584 * lynx-ppc-low.c (stdint.h): Likewise.
3585 * mem-break.c (stdint.h): Likewise.
3586 * thread-db.c (stdint.h): Likewise.
3587 * tracepoint.c (stdint.h): Likewise.
3588 * win32-low.c (stdint.h): Likewise.
3589
124e13d9
SM
35902015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3591
3592 * server.c (write_qxfer_response): Update call to
3593 remote_escape_output.
3594
909c2cda
JK
35952015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3596 Jan Kratochvil <jan.kratochvil@redhat.com>
3597
3598 Merge multiple hex conversions.
3599 * gdbreplay.c (tohex): Rename to 'fromhex'.
3600 (logchar): Use fromhex.
3601
24c05f46
JK
36022015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3603
3604 * server.c (handle_qxfer_libraries): Set `version' attribute for
3605 <library-list>.
3606
14d2069a
GB
36072015-06-10 Gary Benson <gbenson@redhat.com>
3608
3609 * target.h (struct target_ops) <multifs_open>: New field.
3610 <multifs_unlink>: Likewise.
3611 <multifs_readlink>: Likewise.
3612 * linux-low.c (nat/linux-namespaces.h): New include.
3613 (linux_target_ops): Initialize the_target->multifs_open,
3614 the_target->multifs_unlink and the_target->multifs_readlink.
3615 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3616 * hostio.c (hostio_fs_pid): New static variable.
3617 (hostio_handle_new_gdb_connection): New function.
3618 (handle_setfs): Likewise.
3619 (handle_open): Use the_target->multifs_open as appropriate.
3620 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3621 (handle_readlink): Use the_target->multifs_readlink as
3622 appropriate.
3623 (handle_vFile): Handle vFile:setfs packets.
3624 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3625 after target_handle_new_gdb_connection.
3626
4b8b5e72
GB
36272015-06-10 Gary Benson <gbenson@redhat.com>
3628
3629 * configure.ac (AC_CHECK_FUNCS): Add setns.
3630 * config.in: Regenerate.
3631 * configure: Likewise.
3632 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3633 (linux-namespaces.o): New rule.
3634 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3635
3ac2e371
GB
36362015-06-09 Gary Benson <gbenson@redhat.com>
3637
3638 * hostio.c (handle_open): Process mode argument with
3639 fileio_to_host_mode.
3640
ca9b78ce
YQ
36412015-06-01 Yao Qi <yao.qi@linaro.org>
3642
3643 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3644 * linux-x86-low.c: Likewise.
3645
bfacd19d
DB
36462015-05-28 Don Breazeal <donb@codesourcery.com>
3647
3648 * linux-low.c (handle_extended_wait): Initialize
3649 thread_info.last_resume_kind for new fork children.
3650
452003ef
PA
36512015-05-15 Pedro Alves <palves@redhat.com>
3652
3653 * target.h (target_handle_new_gdb_connection): Rewrite using if
3654 wrapped in do/while.
3655
1041a03c
JB
36562015-05-14 Joel Brobecker <brobecker@adacore.com>
3657
3658 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3659 * configure, config.in: Regenerate.
3660 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3661 Declare typedef.
3662
c269dbdb
DB
36632015-05-12 Don Breazeal <donb@codesourcery.com>
3664
3665 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3666 PTRACE_EVENT_VFORK_DONE.
3667 (linux_low_ptrace_options, extended_event_reported): Add vfork
3668 events.
3669 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3670 and "vforkdone" for RSP 'T' Stop Reply Packet.
3671 * server.h (report_vfork_events): Declare
3672 global variable.
3673
3a8a0396
DB
36742015-05-12 Don Breazeal <donb@codesourcery.com>
3675
3676 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3677 (the_low_target) <new_fork>: Initialize new member.
3678 * linux-arm-low.c (arm_new_fork): New function.
3679 (the_low_target) <new_fork>: Initialize new member.
3680 * linux-low.c (handle_extended_wait): Call new target function
3681 new_fork.
3682 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3683 * linux-mips-low.c (mips_add_watchpoint): New function
3684 extracted from mips_insert_point.
3685 (the_low_target) <new_fork>: Initialize new member.
3686 (mips_linux_new_fork): New function.
3687 (mips_insert_point): Call mips_add_watchpoint.
3688 * linux-x86-low.c (x86_linux_new_fork): New function.
3689 (the_low_target) <new_fork>: Initialize new member.
3690
de0d863e
DB
36912015-05-12 Don Breazeal <donb@codesourcery.com>
3692
3693 * linux-low.c (handle_extended_wait): Implement return value,
3694 rename argument 'event_child' to 'event_lwp', handle
3695 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3696 (linux_low_ptrace_options): New function.
3697 (linux_low_filter_event): Call linux_low_ptrace_options,
3698 use different argument fo linux_enable_event_reporting,
3699 use return value from handle_extended_wait.
3700 (extended_event_reported): New function.
3701 (linux_wait_1): Call extended_event_reported and set
3702 status to report fork events.
3703 (linux_write_memory): Add pid to debug message.
3704 (reset_lwp_ptrace_options_callback): New function.
3705 (linux_handle_new_gdb_connection): New function.
3706 (linux_target_ops): Initialize new structure member.
3707 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3708 * lynx-low.c: Initialize new structure member.
3709 * remote-utils.c (prepare_resume_reply): Implement stop reason
3710 "fork" for "T" stop message.
3711 * server.c (handle_query): Call handle_new_gdb_connection.
3712 * server.h (report_fork_events): Declare global flag.
3713 * target.h (struct target_ops) <handle_new_gdb_connection>:
3714 New member.
3715 (target_handle_new_gdb_connection): New macro.
3716 * win32-low.c: Initialize new structure member.
3717
ddcbc397
DB
37182015-05-12 Don Breazeal <donb@codesourcery.com>
3719
3720 * mem-break.c (APPEND_TO_LIST): Define macro.
3721 (clone_agent_expr): New function.
3722 (clone_one_breakpoint): New function.
3723 (clone_all_breakpoints): New function.
3724 * mem-break.h: Declare new functions.
3725
89245bc0
DB
37262015-05-12 Don Breazeal <donb@codesourcery.com>
3727
3728 * linux-low.c (linux_supports_fork_events): New function.
3729 (linux_supports_vfork_events): New function.
3730 (linux_target_ops): Initialize new structure members.
3731 (initialize_low): Call linux_check_ptrace_features.
3732 * lynx-low.c (lynx_target_ops): Initialize new structure
3733 members.
3734 * server.c (report_fork_events, report_vfork_events):
3735 New global flags.
3736 (handle_query): Add new features to qSupported packet and
3737 response.
3738 (captured_main): Initialize new global variables.
3739 * target.h (struct target_ops) <supports_fork_events>:
3740 New member.
3741 <supports_vfork_events>: New member.
3742 (target_supports_fork_events): New macro.
3743 (target_supports_vfork_events): New macro.
3744 * win32-low.c (win32_target_ops): Initialize new structure
3745 members.
3746
835205d0
GB
37472015-05-12 Gary Benson <gbenson@redhat.com>
3748
3749 * server.c (handle_qxfer_exec_file): Use current process
3750 if annex is empty.
3751
21e94bd9
SL
37522015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3753
3754 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3755 Remove HAVE_PTRACE_GETREGS conditionals.
3756 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3757 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3758
45614f15
YQ
37592015-05-08 Yao Qi <yao.qi@linaro.org>
3760
3761 * linux-low.c (linux_supports_conditional_breakpoints): New
3762 function.
3763 (linux_target_ops): Install new target method.
3764 * lynx-low.c (lynx_target_ops): Install NULL hook for
3765 supports_conditional_breakpoints.
3766 * nto-low.c (nto_target_ops): Likewise.
3767 * spu-low.c (spu_target_ops): Likewise.
3768 * win32-low.c (win32_target_ops): Likewise.
3769 * server.c (handle_query): Check
3770 target_supports_conditional_breakpoints.
3771 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3772 New field.
3773 (target_supports_conditional_breakpoints): New macro.
3774
80ad801e
PA
37752015-05-06 Pedro Alves <palves@redhat.com>
3776
3777 PR server/18081
3778 * server.c (start_inferior): If the process exits, mourn it.
3779
819843c7
GB
37802015-04-21 Gary Benson <gbenson@redhat.com>
3781
3782 * hostio.c (fileio_open_flags_to_host): Factored out to
3783 fileio_to_host_openflags in common/fileio.c. Single use
3784 updated.
3785
a2d5a9d7
MF
37862015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3787
3788 * linux-xtensa-low.c (xtensa_fill_gregset)
3789 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3790 XCHAL_HAVE_LOOP.
3791
deb44829
MF
37922015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3793
3794 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3795 (regs_info): Replace usrregs pointer with NULL.
3796
e57f1de3
GB
37972015-04-17 Gary Benson <gbenson@redhat.com>
3798
3799 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3800 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3801 * server.c (handle_qxfer_exec_file): New function.
3802 (qxfer_packets): Add exec-file entry.
3803 (handle_query): Report qXfer:exec-file:read as supported packet.
3804
62828379
RN
38052015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3806
3807 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3808
b88bb450
GB
38092015-04-09 Gary Benson <gbenson@redhat.com>
3810
3811 * hostio-errno.c (errno_to_fileio_error): Remove function.
3812 Update caller to use remote_fileio_to_fio_error.
3813
c8f4bfdd
YQ
38142015-04-09 Yao Qi <yao.qi@linaro.org>
3815
3816 * linux-low.c (linux_insert_point): Call
3817 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3818 (linux_remove_point): Call remove_memory_breakpoint if type is
3819 raw_bkpt_type_sw.
3820 * linux-x86-low.c (x86_insert_point): Don't call
3821 insert_memory_breakpoint.
3822 (x86_remove_point): Don't call remove_memory_breakpoint.
3823
41f98f02
PA
38242015-04-01 Pedro Alves <palves@redhat.com>
3825 Cleber Rosa <crosa@redhat.com>
3826
3827 * server.c (gdbserver_usage): Reorganize and extend the usage
3828 message.
3829
2bf6fb9d
PA
38302015-03-24 Pedro Alves <palves@redhat.com>
3831
3832 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3833 output. Also dump TRAP_TRACE.
3834 (linux_low_filter_event): In debug output, distinguish a
3835 resume_stop SIGSTOP from a delayed SIGSTOP.
3836
369f6daa
GB
38372015-03-24 Gary Benson <gbenson@redhat.com>
3838
3839 * linux-x86-low.c (x86_linux_new_thread): Moved to
3840 nat/x86-linux.c.
3841 (x86_linux_prepare_to_resume): Likewise.
3842
8e5d4070
GB
38432015-03-24 Gary Benson <gbenson@redhat.com>
3844
3845 * Makefile.in (x86-linux-dregs.o): New rule.
3846 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3847 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3848 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3849 (x86_linux_dr_get): Likewise.
3850 (x86_linux_dr_set): Likewise.
3851 (update_debug_registers_callback): Likewise.
3852 (x86_linux_dr_set_addr): Likewise.
3853 (x86_linux_dr_get_addr): Likewise.
3854 (x86_linux_dr_set_control): Likewise.
3855 (x86_linux_dr_get_control): Likewise.
3856 (x86_linux_dr_get_status): Likewise.
3857 (x86_linux_update_debug_registers): Likewise.
3858
2b95d440
GB
38592015-03-24 Gary Benson <gbenson@redhat.com>
3860
3861 * linux-x86-low.c (x86_linux_update_debug_registers):
3862 New function, factored out from...
3863 (x86_linux_prepare_to_resume): ...this.
3864
14b0bc68
GB
38652015-03-24 Gary Benson <gbenson@redhat.com>
3866
3867 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3868 (x86_linux_dr_set): Likewise.
3869 (update_debug_registers_callback): Likewise.
3870 (x86_linux_dr_set_addr): Likewise.
3871 (x86_linux_dr_get_addr): Likewise.
3872 (x86_linux_dr_set_control): Likewise.
3873 (x86_linux_dr_get_control): Likewise.
3874 (x86_linux_dr_get_status): Likewise.
3875 (x86_linux_prepare_to_resume): Likewise.
3876
5dfe6ca8
GB
38772015-03-24 Gary Benson <gbenson@redhat.com>
3878
3879 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3880 Use perror_with_name. Pass string through gettext.
3881 (x86_linux_dr_set): Likewise.
3882
d33472ad
GB
38832015-03-24 Gary Benson <gbenson@redhat.com>
3884
3885 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3886 (x86_linux_dr_set_addr): ...this.
3887 (x86_dr_low_get_addr): Rename to...
3888 (x86_linux_dr_get_addr): ...this.
3889 (x86_dr_low_set_control): Rename to...
3890 (x86_linux_dr_set_control): ...this.
3891 (x86_dr_low_get_control): Rename to...
3892 (x86_linux_dr_get_control): ...this.
3893 (x86_dr_low_get_status): Rename to...
3894 (x86_linux_dr_get_status): ...this.
3895 (x86_dr_low): Update with new function names.
3896
4b134ca1
GB
38972015-03-24 Gary Benson <gbenson@redhat.com>
3898
3899 * Makefile.in (x86-linux.o): New rule.
3900 * configure.srv: Add x86-linux.o to relevant targets.
3901 * linux-low.c (lwp_set_arch_private_info): New function.
3902 (lwp_arch_private_info): Likewise.
3903 * linux-x86-low.c: Include nat/x86-linux.h.
3904 (arch_lwp_info): Removed structure.
3905 (update_debug_registers_callback):
3906 Use lwp_set_debug_registers_changed.
3907 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3908 and lwp_set_debug_registers_changed.
3909 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3910
34c703da
GB
39112015-03-24 Gary Benson <gbenson@redhat.com>
3912
3913 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3914 * linux-arm-low.c (arm_new_thread): Likewise.
3915 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3916 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3917 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3918 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3919
cff068da
GB
39202015-03-24 Gary Benson <gbenson@redhat.com>
3921
3922 * linux-low.c (ptid_of_lwp): New function.
3923 (lwp_is_stopped): Likewise.
3924 (lwp_stop_reason): Likewise.
3925 * linux-x86-low.c (update_debug_registers_callback):
3926 Use lwp_is_stopped.
3927 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3928 lwp_stop_reason.
3929
b2f7c7e8
GB
39302015-03-24 Gary Benson <gbenson@redhat.com>
3931
3932 * linux-low.h (linux_stop_lwp): Remove declaration.
3933
6d4ee8c6
GB
39342015-03-24 Gary Benson <gbenson@redhat.com>
3935
3936 * linux-low.h: Include nat/linux-nat.h.
3937 * linux-low.c (iterate_over_lwps_args): New structure.
3938 (iterate_over_lwps_filter): New function.
3939 (iterate_over_lwps): Likewise.
3940 * linux-x86-low.c (update_debug_registers_callback):
3941 Update signature to what iterate_over_lwps expects.
3942 Remove PID check that iterate_over_lwps now performs.
3943 (x86_dr_low_set_addr): Use iterate_over_lwps.
3944 (x86_dr_low_set_control): Likewise.
3945
70a0bb6b
GB
39462015-03-24 Gary Benson <gbenson@redhat.com>
3947
3948 * linux-x86-low.c (x86_debug_reg_state): New function.
3949 (x86_linux_prepare_to_resume): Use the above.
3950
7b669087
GB
39512015-03-24 Gary Benson <gbenson@redhat.com>
3952
3953 * linux-low.c (current_lwp_ptid): New function.
3954 * linux-x86-low.c: Include nat/linux-nat.h.
3955 (x86_dr_low_get_addr): Use current_lwp_ptid.
3956 (x86_dr_low_get_control): Likewise.
3957 (x86_dr_low_get_status): Likewise.
3958
eef49a3d
PA
39592015-03-20 Pedro Alves <palves@redhat.com>
3960
3961 * tracepoint.c (cmd_qtstatus): Make "str" const.
3962
b2333d22
PA
39632015-03-20 Pedro Alves <palves@redhat.com>
3964
3965 * server.c (handle_general_set): Make "req_str" const.
3966
23f238d3
PA
39672015-03-19 Pedro Alves <palves@redhat.com>
3968
3969 * linux-low.c (linux_resume_one_lwp): Rename to ...
3970 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3971 instead call perror_with_name.
3972 (check_ptrace_stopped_lwp_gone): New function.
3973 (linux_resume_one_lwp): Reimplement as wrapper around
3974 linux_resume_one_lwp_throw that swallows errors if the LWP is
3975 gone.
3976
91baf43f
PA
39772015-03-19 Pedro Alves <palves@redhat.com>
3978
3979 * linux-low.c (count_events_callback, select_event_lwp_callback):
3980 No longer check whether the thread has resume_stop as last resume
3981 kind.
3982
8bf3b159
PA
39832015-03-19 Pedro Alves <palves@redhat.com>
3984
3985 * linux-low.c (count_events_callback, select_event_lwp_callback):
3986 Use the lwp's status_pending_p field, not the thread's.
3987
b90fc188
PA
39882015-03-19 Pedro Alves <palves@redhat.com>
3989
3990 * linux-low.c (select_event_lwp_callback): Update comments to
3991 no longer mention SIGTRAP.
3992
464b0089
GB
39932015-03-18 Gary Benson <gbenson@redhat.com>
3994
3995 * server.c (handle_query): Do not report vFile:fstat as supported.
3996
aa9e327f
GB
39972015-03-11 Gary Benson <gbenson@redhat.com>
3998
3999 * hostio.c (sys/types.h): New include.
4000 (sys/stat.h): Likewise.
4001 (common-remote-fileio.h): Likewise.
4002 (handle_fstat): New function.
4003 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4004
791c0056
GB
40052015-03-11 Gary Benson <gbenson@redhat.com>
4006
4007 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4008 struct stat.st_blocks and struct stat.st_blksize.
4009 * configure: Regenerate.
4010 * config.in: Likewise.
4011 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4012 (OBS): Add common-remote-fileio.o.
4013 (common-remote-fileio.o): New rule.
4014
9a9df970
PA
40152015-03-09 Pedro Alves <palves@redhat.com>
4016
4017 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4018 'struct sockaddr' pointer in 'accept' call.
4019
9eb1356e
PA
40202015-03-09 Pedro Alves <palves@redhat.com>
4021
4022 Revert:
4023 2015-03-07 Pedro Alves <palves@redhat.com>
4024 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4025 or <winsock2.h> here. Instead include "gdb_socket.h".
4026 (remote_open): Use union gdb_sockaddr_u.
4027 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4028 or <winsock2.h> here. Instead include "gdb_socket.h".
4029 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4030 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4031 or <sys/un.h>.
4032 (init_named_socket, gdb_agent_helper_thread): Use union
4033 gdb_sockaddr_u.
4034
aac331e4
PA
40352015-03-07 Pedro Alves <palves@redhat.com>
4036
4037 * configure.ac (build_warnings): Move
4038 -Wdeclaration-after-statement to the C-specific set.
4039 * configure: Regenerate.
4040
366c75fc
PA
40412015-03-07 Pedro Alves <palves@redhat.com>
4042
4043 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4044 or <winsock2.h> here. Instead include "gdb_socket.h".
4045 (remote_open): Use union gdb_sockaddr_u.
4046 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4047 or <winsock2.h> here. Instead include "gdb_socket.h".
4048 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4049 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4050 or <sys/un.h>.
4051 (init_named_socket, gdb_agent_helper_thread): Use union
4052 gdb_sockaddr_u.
4053
492d29ea
PA
40542015-03-07 Pedro Alves <palves@redhat.com>
4055
4056 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4057 instead.
4058
60a191ed
YQ
40592015-03-06 Yao Qi <yao.qi@linaro.org>
4060
4061 * linux-aarch64-low.c (aarch64_insert_point): Use
4062 show_debug_regs as a boolean.
4063 (aarch64_remove_point): Likewise.
4064
f5771b1d
PA
40652015-03-05 Pedro Alves <palves@redhat.com>
4066
4067 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4068 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4069 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4070 * nto-low.c (nto_target_ops): Likewise.
4071 * spu-low.c (spu_target_ops): Likewise.
4072 * win32-low.c (win32_target_ops): Likewise.
4073
3e572f71
PA
40742015-03-04 Pedro Alves <palves@redhat.com>
4075
72f4393d 4076 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4077 Decide whether a breakpoint triggered based on the SIGTRAP's
4078 siginfo.si_code.
72f4393d
L
4079 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4080 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4081 (linux_low_filter_event): Check for breakpoints before checking
4082 watchpoints.
4083 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4084 siginfo.si_code.
72f4393d
L
4085 (linux_stopped_by_sw_breakpoint)
4086 (linux_supports_stopped_by_sw_breakpoint)
4087 (linux_stopped_by_hw_breakpoint)
4088 (linux_supports_stopped_by_hw_breakpoint): New functions.
4089 (linux_target_ops): Install new target methods.
3e572f71 4090
1ec68e26
PA
40912015-03-04 Pedro Alves <palves@redhat.com>
4092
4093 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4094 * server.c (swbreak_feature, hwbreak_feature): New globals.
4095 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4096 (captured_main): Clear swbreak_feature and hwbreak_feature.
4097 * server.h (swbreak_feature, hwbreak_feature): Declare.
4098 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4099 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4100 supports_stopped_by_hw_breakpoint>: New fields.
4101 (target_supports_stopped_by_sw_breakpoint)
4102 (target_stopped_by_sw_breakpoint)
4103 (target_supports_stopped_by_hw_breakpoint)
4104 (target_stopped_by_hw_breakpoint): Declare.
4105
15c66dd6
PA
41062015-03-04 Pedro Alves <palves@redhat.com>
4107
4108 enum lwp_stop_reason -> enum target_stop_reason
4109 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4110 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4111 (linux_wait_1, stuck_in_jump_pad_callback)
4112 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4113 (linux_stopped_by_watchpoint):
4114 * linux-low.h (enum lwp_stop_reason): Delete.
4115 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4116 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4117
98fc70d6
YQ
41182015-03-04 Yao Qi <yao.qi@linaro.org>
4119
4120 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4121
dd2ac174
GB
41222015-03-03 Gary Benson <gbenson@redhat.com>
4123
4124 * hostio.c (handle_vFile): Fix prefix lengths.
4125
d68e53f4
MM
41262015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4127
4128 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4129 ptr_bits.
4130
bf2d68ab
AA
41312015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4132
4133 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4134 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4135 (clean): Add "rm -f" for above C files.
4136 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4137 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4138 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4139 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4140 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4141 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4142 (init_registers_s390x_vx_linux64)
4143 (init_registers_s390x_tevx_linux64)
4144 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4145 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4146 declarations.
4147 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4148 (s390_store_vxrs_high): New functions.
4149 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4150 NT_S390_VXRS_HIGH.
4151 (s390_arch_setup): Add logic for selecting one of the new target
4152 descriptions. Activate the new vector regsets if applicable.
4153 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4154 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4155 and init_registers_s390x_tevx_linux64.
4156
c966a859
PA
41572015-03-01 Pedro Alves <palves@redhat.com>
4158
4159 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4160 parameter.
4161
4180215b
PA
41622015-02-27 Pedro Alves <palves@redhat.com>
4163
4164 * linux-x86-low.c (u_debugreg_offset): New function.
4165 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4166
749bab01
PA
41672015-02-27 Pedro Alves <palves@redhat.com>
4168
4169 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4170 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4171 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4172 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4173 (ps_lsetfpregs, ps_getpid)
4174 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4175 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4176 (ps_lsetxregs, ps_plog): Declare.
4177
3c14e5a3
PA
41782015-02-27 Pedro Alves <palves@redhat.com>
4179
4180 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4181 IP_AGENT_EXPORT_FUNC.
4182 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4183 IP_AGENT_EXPORT_FUNC.
4184 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4185 (IP_AGENT_EXPORT): Delete.
4186 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4187 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4188 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4189 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4190 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4191 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4192 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4193 (traceframe_read_count, traceframe_write_count)
4194 (traceframes_created, trace_state_variables, get_raw_reg)
4195 (get_trace_state_variable_value, set_trace_state_variable_value)
4196 (ust_loaded, helper_thread_id, cmd_buf): Use
4197 IPA_SYM_EXPORTED_NAME.
4198 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4199 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4200 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4201 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4202 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4203 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4204 EXTERN_C_PUSH/EXTERN_C_POP.
4205 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4206 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4207 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4208 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4209 (traceframe_write_count, traceframe_read_count)
4210 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4211 (about_to_request_buffer_space, get_trace_state_variable_value)
4212 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4213 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4214 EXTERN_C_PUSH/EXTERN_C_POP.
4215 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4216 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4217 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4218 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4219 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4220 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4221 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4222 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4223 Define.
4224 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4225 (IP_AGENT_EXPORT_VAR_DECL): Define.
4226 (tracing): Declare.
4227 (gdb_agent_get_raw_reg): Declare.
4228
fe978cb0
PA
42292015-02-27 Tom Tromey <tromey@redhat.com>
4230 Pedro Alves <palves@redhat.com>
4231
4232 Rename symbols whose names are reserved C++ keywords throughout.
4233
3bc3d82a
PA
42342015-02-27 Pedro Alves <palves@redhat.com>
4235
4236 * Makefile.in (COMPILER): New, get it from autoconf.
4237 (CXX): Get from autoconf instead.
4238 (COMPILE.pre): Use COMPILER.
4239 (CC-LD): Rename to ...
4240 (CC_LD): ... this. Use COMPILER.
4241 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4242 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4243 * acinclude.m4: Include build-with-cxx.m4.
4244 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4245 Disable -Werror by default if building in C++ mode.
4246 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4247 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4248 the C++ compiler. Save/restore CXXFLAGS too.
4249 * configure: Regenerate.
4250
07697489
PA
42512015-02-27 Pedro Alves <palves@redhat.com>
4252
4253 * acinclude.m4: Include libiberty.m4.
4254 * configure.ac: Call libiberty_INIT.
4255 * config.in, configure: Regenerate.
4256
9beb7c4e
PA
42572015-02-26 Pedro Alves <palves@redhat.com>
4258
4259 * linux-low.c (linux_wait_1): When incrementing the PC past a
4260 program breakpoint always use the_low_target.breakpoint_len as
4261 increment, rather than the maximum between that and
4262 the_low_target.decr_pc_after_break.
4263
8090aef2
PA
42642015-02-23 Pedro Alves <palves@redhat.com>
4265
4266 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4267 thread was doing a step-over; always adjust the PC if
4268 we stepped over a permanent breakpoint.
4269 (linux_wait_1): If we stepped over breakpoint that was on top of a
4270 permanent breakpoint, manually advance the PC past it.
4271
bc9540e8
PA
42722015-02-23 Pedro Alves <palves@redhat.com>
4273
4274 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4275 modes.
4276 (x86_fill_gregset, x86_store_gregset): Use it when handling
4277 $orig_eax.
4278
2db9a427
PA
42792015-02-20 Pedro Alves <palves@redhat.com>
4280
4281 * thread-db.c: Include "nat/linux-procfs.h".
4282 (thread_db_init): Skip listing new threads if the kernel supports
4283 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4284
afa8d396
PA
42852015-02-20 Pedro Alves <palves@redhat.com>
4286
4287 * linux-low.c (status_pending_p_callback): Use ptid_match.
4288
c9587f88
AT
42892015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4290
4291 PR breakpoints/16812
4292 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4293 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4294 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4295
b05ec7a5
AT
42962015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4297
4298 PR breakpoints/15956
4299 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4300
d33501a5
MM
43012015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4302
4303 * linux-low.c (linux_low_btrace_conf): Print size.
4304 * server.c (handle_btrace_conf_general_set): New.
4305 (hanle_general_set): Call handle_btrace_conf_general_set.
4306 (handle_query): Report Qbtrace-conf:bts:size as supported.
4307
f4abbc16
MM
43082015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4309
4310 * linux-low.c (linux_low_enable_btrace): Update parameters.
4311 (linux_low_btrace_conf): New.
4312 (linux_target_ops)<to_btrace_conf>: Initialize.
4313 * server.c (current_btrace_conf): New.
4314 (handle_btrace_enable): Rename to ...
4315 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4316 to target_enable_btrace. Update comment. Update users.
4317 (handle_qxfer_btrace_conf): New.
4318 (qxfer_packets): Add btrace-conf entry.
4319 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4320 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4321 (target_ops)<read_btrace_conf>: New.
4322 (target_enable_btrace): Update parameters.
4323 (target_read_btrace_conf): New.
4324
043c3577
MM
43252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4326
4327 * server.c (handle_btrace_general_set): Remove call to
4328 target_supports_btrace.
4329 (supported_btrace_packets): New.
4330 (handle_query): Call supported_btrace_packets.
4331 * target.h: include btrace-common.h.
4332 (btrace_target_info): Removed.
4333 (supports_btrace, target_supports_btrace): Update parameters.
4334
734b0e4b
MM
43352015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4336
4337 * Makefile.in (SFILES): Add common/btrace-common.c.
4338 (OBS): Add common/btrace-common.o.
4339 (btrace-common.o): Add build rules.
4340 * linux-low: Include btrace-common.h.
4341 (linux_low_read_btrace): Use struct btrace_data. Call
4342 btrace_data_init and btrace_data_fini.
4343
d6c146e9
PA
43442015-02-06 Pedro Alves <palves@redhat.com>
4345
4346 * thread-db.c (find_new_threads_callback): Add debug output.
4347
20ba1ce6
PA
43482015-02-04 Pedro Alves <palves@redhat.com>
4349
4350 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4351 (resume_stopped_resumed_lwps): New function.
4352 (linux_wait_for_event_filtered): Use it.
4353
8cc73a39
SDJ
43542015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4355
4356 * Makefile.in (SFILES): Add linux-personality.c.
4357 (linux-personality.o): New rule.
4358 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4359 list of objects to be built.
4360 * linux-low.c: Include nat/linux-personality.h.
4361 (linux_create_inferior): Remove code to disable address space
4362 randomization (moved to ../nat/linux-personality.c). Create
4363 cleanup to disable address space randomization.
4364
fb23d554
SDJ
43652015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4366
4367 * Makefile.in (posix-strerror.o): New rule.
4368 (mingw-strerror.o): Likewise.
4369 * configure: Regenerated.
4370 * configure.ac: Source file ../common/common.host. Initialize new
4371 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4372
cdf43629
YQ
43732015-01-14 Yao Qi <yao@codesourcery.com>
4374
4375 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4376 (ppc-linux.o): New rule.
4377 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4378 * configure.ac: AC_CHECK_FUNCS(getauxval).
4379 * config.in: Re-generated.
4380 * configure: Re-generated.
4381 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4382 ppc64_64bit_inferior_p
4383
514c5338
YQ
43842015-01-14 Yao Qi <yao@codesourcery.com>
4385
4386 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4387 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4388 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4389 (PT_ORIG_R3, PT_TRAP): Likewise.
4390 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4391 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4392 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4393
3368c1e5
JB
43942015-01-10 Joel Brobecker <brobecker@adacore.com>
4395
4396 * i387-fp.c (i387_cache_to_xsave): In look over
4397 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4398 zmmh_low_space field by use of zmmh_high_space.
4399
582511be
PA
44002015-01-09 Pedro Alves <palves@redhat.com>
4401
4402 * linux-low.c (step_over_bkpt): Move higher up in the file.
4403 (handle_extended_wait): Don't store the stop_pc here.
4404 (get_stop_pc): Adjust comments and rename to ...
4405 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4406 stopped for a software breakpoint or hardware breakpoint.
4407 (thread_still_has_status_pending_p): New function.
4408 (status_pending_p_callback): Use
4409 thread_still_has_status_pending_p. If the event is no longer
4410 interesting, resume the LWP.
4411 (handle_tracepoints): Add assert.
4412 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4413 (wstatus_maybe_breakpoint): New function.
4414 (cancel_breakpoint): Delete function.
4415 (check_stopped_by_watchpoint): New function, factored out from
4416 linux_low_filter_event.
4417 (lp_status_maybe_breakpoint): Delete function.
4418 (linux_low_filter_event): Remove filter_ptid argument.
4419 Leave thread group exits pending here. Store the LWP's stop PC.
4420 Always leave events pending.
4421 (linux_wait_for_event_filtered): Pull all events out of the
4422 kernel, and leave them all pending.
4423 (count_events_callback, select_event_lwp_callback): Consider all
4424 events.
4425 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4426 (select_event_lwp): Only give preference to the stepping LWP in
4427 all-stop mode. Adjust comments.
4428 (ignore_event): New function.
4429 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4430 references to cancel_breakpoints. Adjust to renames. Also give
4431 equal priority to all LWPs that have had events in non-stop mode.
4432 If reporting a software breakpoint event, unadjust the LWP's PC.
4433 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4434 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4435 Adjust.
4436 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4437 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4438 (linux_stopped_by_watchpoint): Adjust.
4439 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4440 * linux-low.h (enum lwp_stop_reason): New.
4441 (struct lwp_info) <stop_pc>: Adjust comment.
4442 <stopped_by_watchpoint>: Delete field.
4443 <stop_reason>: New field.
4444 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4445 * mem-break.c (software_breakpoint_inserted_here)
4446 (hardware_breakpoint_inserted_here): New function.
4447 * mem-break.h (software_breakpoint_inserted_here)
4448 (hardware_breakpoint_inserted_here): Declare.
4449 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4450 (cancel_breakpoints): Delete.
4451 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4452 (upload_fast_traceframes): Remove references to
4453 cancel_breakpoints.
4454
a33e3959
PA
44552015-01-09 Pedro Alves <palves@redhat.com>
4456
4457 * thread-db.c (find_new_threads_callback): Ignore thread if the
4458 kernel thread ID is -1.
4459
8784d563
PA
44602015-01-09 Pedro Alves <palves@redhat.com>
4461
4462 * linux-low.c (linux_attach_fail_reason_string): Move to
4463 nat/linux-ptrace.c, and rename.
4464 (linux_attach_lwp): Update comment.
4465 (attach_proc_task_lwp_callback): New function.
4466 (linux_attach): Adjust to rename and use
4467 linux_proc_attach_tgid_threads.
4468 (linux_attach_fail_reason_string): Delete declaration.
4469
76f2b779
JB
44702015-01-01 Joel Brobecker <brobecker@adacore.com>
4471
4472 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4473 * server.c (gdbserver_version): Likewise.
4474
fafcc06a
SDJ
44752014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4476
4477 * remote-utils.c: Include ctype.h.
4478 (input_interrupt): Explicitly handle the case when the char
4479 received is the NUL byte. Improve the printing of non-ASCII
4480 characters.
4481
beed38b8
JB
44822014-12-16 Joel Brobecker <brobecker@adacore.com>
4483
4484 * linux-low.c (linux_low_filter_event): Update call to
4485 linux_enable_event_reporting following the addition of
4486 a new parameter to that function.
4487
bf330350
CU
44882014-12-16 Catalin Udma <catalin.udma@freescale.com>
4489
4490 PR server/17457
4491 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4492 (AARCH64_FPCR_REGNO): Likewise.
4493 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4494 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4495 (aarch64_store_fpregset): Likewise.
4496
5227d625
JB
44972014-12-15 Joel Brobecker <brobecker@adacore.com>
4498
4499 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4500 Remove FIXME comment about assumption about N.
4501
f93b65a0
JB
45022014-12-13 Joel Brobecker <brobecker@adacore.com>
4503
4504 * configure.ac: If large-file support is disabled in GDBserver,
4505 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4506 * configure: Regenerate.
4507
e5a9158d
AA
45082014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4509
4510 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4511 warning upon ENODATA from ptrace.
4512 * linux-s390-low.c (s390_store_tdb): New.
4513 (s390_regsets): Add regset for NT_S390_TDB.
4514
feea5f36
AA
45152014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4516
4517 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4518 without a fill_function.
4519 * linux-s390-low.c (s390_fill_last_break): Remove.
4520 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4521 (s390_arch_setup): Use regset's size instead of fill_function for
4522 loop end condition.
4523
098dbe61
AA
45242014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4525
4526 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4527 the regset's store function when ptrace returned an error.
4528 * regcache.c (get_thread_regcache): Invalidate register cache
4529 before fetching inferior's registers.
4530
28eef672
AA
45312014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4532
4533 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4534 while-loop as for-loop.
4535 (regsets_store_inferior_registers): Likewise.
4536
bdca27a2
YQ
45372014-11-28 Yao Qi <yao@codesourcery.com>
4538
4539 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4540 * config.in, configure: Re-generate.
4541 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4542 is defined.
4543
9c232dda
YQ
45442014-11-21 Yao Qi <yao@codesourcery.com>
4545
4546 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4547 (AC_CHECK_HEADERS): Remove malloc.h.
4548 * configure: Re-generated.
4549 * config.in: Re-generated.
4550 * server.h: Don't include alloca.h and malloc.h.
4551 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4552 Don't include malloc.h.
4553
43968415
JB
45542014-11-17 Joel Brobecker <brobecker@adacore.com>
4555
4556 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4557 corresponding ERRNO check in same block.
4558
40e91bc7
PA
45592014-11-12 Pedro Alves <palves@redhat.com>
4560
4561 * server.c (cont_thread): Update comment.
4562 (start_inferior, attach_inferior): No longer clear cont_thread.
4563 (handle_v_cont): No longer set cont_thread.
4564 (captured_main): Clear cont_thread each time a GDB connects.
4565
c2c118cf
PA
45662014-11-12 Pedro Alves <palves@redhat.com>
4567
4568 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4569 thread, and don't resume all threads if the Hc thread has exited.
4570
78708b7c
PA
45712014-11-12 Pedro Alves <palves@redhat.com>
4572
4573 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4574 the process group instead of to a specific LWP.
4575
a2abc7de
PA
45762014-10-15 Pedro Alves <palves@redhat.com>
4577
4578 PR server/17487
4579 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4580 parameter.
4581 (arm_set_thread_context): Delete.
4582 (the_low_target): Adjust.
4583 * win32-i386-low.c (debug_registers_changed)
4584 (debug_registers_used): Delete.
4585 (update_debug_registers_callback): New function.
4586 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4587 needing to update their debug registers.
4588 (win32_get_current_dr): New function.
4589 (x86_dr_low_get_addr, x86_dr_low_get_control)
4590 (x86_dr_low_get_status): Fetch the debug register from the thread
4591 record's context.
4592 (i386_initial_stuff): Adjust.
4593 (i386_get_thread_context): Remove current_event parameter. Don't
4594 clear debug_registers_changed nor copy DR values to
4595 debug_reg_state.
4596 (i386_set_thread_context): Delete.
4597 (i386_prepare_to_resume): New function.
4598 (i386_thread_added): Mark the thread as needing to update irs
4599 debug registers.
4600 (the_low_target): Remove i386_set_thread_context and install
4601 i386_prepare_to_resume.
4602 * win32-low.c (win32_get_thread_context): Adjust.
4603 (win32_set_thread_context): Use SetThreadContext
4604 directly.
4605 (win32_prepare_to_resume): New function.
4606 (win32_require_context): New function, factored out from ...
4607 (thread_rec): ... this.
4608 (continue_one_thread): Call win32_prepare_to_resume on each thread
4609 we're about to continue.
4610 (win32_resume): Call win32_prepare_to_resume on the event thread.
4611 * win32-low.h (struct win32_thread_info)
4612 <debug_registers_changed>: New field.
4613 (struct win32_target_ops): Change prototype of set_thread_context,
4614 delete set_thread_context and add prepare_to_resume.
4615 (win32_require_context): New declaration.
4616
a442d071
GB
46172014-10-08 Gary Benson <gbenson@redhat.com>
4618
4619 * server.h: Do not include common-exceptions.h.
4620
6f1947e8
GB
46212014-10-08 Gary Benson <gbenson@redhat.com>
4622
4623 * server.h: Do not include cleanups.h.
4624
63b434a4
JH
46252014-09-30 James Hogan <james.hogan@imgtec.com>
4626
4627 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4628 mips64-dsp-linux.c.
4629
c4d9ceb6
YQ
46302014-09-23 Yao Qi <yao@codesourcery.com>
4631
4632 * linux-low.c (lp_status_maybe_breakpoint): New function.
4633 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4634 (count_events_callback): Likewise.
4635 (select_event_lwp_callback): Likewise.
4636 (cancel_breakpoints_callback): Likewise.
4637
89a5711c
DB
46382014-09-19 Don Breazeal <donb@codesourcery.com>
4639
4640 * linux-low.c (handle_extended_wait): Call
4641 linux_ptrace_get_extended_event.
4642 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4643 linux_is_extended_waitstatus.
4644
bffc0964
JB
46452014-09-16 Joel Brobecker <brobecker@adacore.com>
4646
4647 * Makefile.in (CPPFLAGS): Define.
4648 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4649 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4650
0bfdf32f
GB
46512014-09-16 Gary Benson <gbenson@redhat.com>
4652
4653 * inferiors.h (current_inferior): Renamed as...
4654 (current_thread): New variable. All uses updated.
4655 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4656 (maybe_move_out_of_jump_pad): Likewise.
4657 (cancel_breakpoint): Likewise.
4658 (linux_low_filter_event): Likewise.
4659 (wait_for_sigstop): Likewise.
4660 (linux_resume_one_lwp): Likewise.
4661 (need_step_over_p): Likewise.
4662 (start_step_over): Likewise.
4663 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4664 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4665 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4666 and save_inferior as saved_thread.
4667 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4668 saved_thread.
4669 (regcache_invalidate_thread): Likewise.
4670 * remote-utils.c (prepare_resume_reply): Likewise.
4671 * thread-db.c (thread_db_get_tls_address): Likewise.
4672 (disable_thread_event_reporting): Likewise.
4673 (remove_thread_event_breakpoints): Likewise.
4674 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4675 as saved_thread.
4676 * target.h (set_desired_inferior): Renamed as...
4677 (set_desired_thread): New declaration. All uses updated.
4678 * server.c (myresume): Updated comment to reference thread instead
4679 of inferior.
4680 (handle_serial_event): Likewise.
4681 (handle_target_event): Likewise.
4682
361c8ade
GB
46832014-09-12 Tom Tromey <tromey@redhat.com>
4684 Gary Benson <gbenson@redhat.com>
4685
4686 * regcache.h: Include common-regcache.h.
4687 (regcache_read_pc): Don't declare.
4688 * regcache.c (get_thread_regcache_for_ptid): New function.
4689
bd9269f7
GB
46902014-09-11 Tom Tromey <tromey@redhat.com>
4691 Gary Benson <gbenson@redhat.com>
4692
4693 * symbol.c: New file.
4694 * Makefile.in (SFILES): Add symbol.c.
4695 (OBS): Add symbol.o.
4696
f8c1d06b
GB
46972014-09-11 Gary Benson <gbenson@redhat.com>
4698
4699 * target.c (target_stop_ptid, target_continue_ptid): New
4700 functions.
4701
721ec300
GB
47022014-09-11 Tom Tromey <tromey@redhat.com>
4703 Gary Benson <gbenson@redhat.com>
4704
4705 * target.h: Include target/target.h.
4706 * target.c (target_read_memory, target_read_uint32)
4707 (target_write_memory): New functions.
4708
c5e92cca
GB
47092014-09-11 Gary Benson <gbenson@redhat.com>
4710
4711 * server.h (debug_hw_points): Don't declare.
4712 * server.c (debug_hw_points): Don't define. Replace all uses
4713 with show_debug_regs.
4714 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4715 all uses with show_debug_regs.
4716
2e4bb98a
EBM
47172014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4718
4719 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4720 endianness into account.
4721 (ppc_supply_ptrace_register): Likewise.
4722
ac740bc7
JH
47232014-09-03 James Hogan <james.hogan@imgtec.com>
4724
4725 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4726 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4727
97ea6506
GB
47282014-09-03 Gary Benson <gbenson@redhat.com>
4729
4730 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4731 ALL_DEBUG_ADDRESS_REGISTERS.
4732
df7e5265
GB
47332014-09-02 Gary Benson <gbenson@redhat.com>
4734
4735 * i386-low.h: Renamed as...
4736 * x86-low.h: New file. All type, function and variable name
4737 prefixes changed from "i386_" to "x86_". All references updated.
4738 * i386-low.c: Renamed as...
4739 * x86-low.c: New file. All type, function and variable name
4740 prefixes changed from "i386_" to "x86_". All references updated.
4741
ed859da7
GB
47422014-09-02 Gary Benson <gbenson@redhat.com>
4743
4744 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4745 (x86_linux_new_thread): Likewise.
4746
860789c7
GB
47472014-08-29 Gary Benson <gbenson@redhat.com>
4748
4749 * server.h (setjmp.h): Do not include.
4750 (toplevel): Do not declare.
4751 (common-exceptions.h): Include.
4752 (cleanups.h): Likewise.
4753 * server.c (toplevel): Do not define.
4754 (exit_code): New static global.
4755 (detach_or_kill_for_exit_cleanup): New function.
4756 (main): New function. Original main renamed to...
4757 (captured_main): New function.
4758 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4759
ff55e1b5
GB
47602014-08-29 Gary Benson <gbenson@redhat.com>
4761
4762 * Makefile.in (SFILES): Add common/common-exceptions.c.
4763 (OBS): Add common-exceptions.o.
4764 (common-exceptions.o): New rule.
4765 * utils.c (prepare_to_throw_exception): New function.
4766
e9bcb658
GB
47672014-08-29 Gary Benson <gbenson@redhat.com>
4768
4769 * config.in: Regenerate.
4770 * configure: Likewise.
4771
e3180625
GB
47722014-08-29 Gary Benson <gbenson@redhat.com>
4773
4774 * Makefile.in (SFILES): Add common/cleanups.c.
4775 (OBS): cleanups.o.
4776 (cleanups.o): New rule.
4777
e3d6ba5d
GB
47782014-08-29 Gary Benson <gbenson@redhat.com>
4779
4780 * utils.c (internal_vwarning): New function.
4781
7096e886
GB
47822014-08-28 Gary Benson <gbenson@redhat.com>
4783
4784 * utils.h (fatal): Remove declaration.
4785 * utils.c (fatal): Remove function.
4786
14ce3192
GB
47872014-08-28 Gary Benson <gbenson@redhat.com>
4788
4789 * tracepoint.c (gdb_agent_init): Replace fatal with
4790 perror_with_name.
4791 (initialize_tracepoint): Likewise.
4792
50278d59
GB
47932014-08-28 Gary Benson <gbenson@redhat.com>
4794
4795 * remote-utils.c (remote_prepare): Replace fatal with error.
4796
aa96c426
GB
47972014-08-28 Gary Benson <gbenson@redhat.com>
4798
4799 * linux-low.c (linux_async): Replace fatal with warning.
4800 Tidy up and return.
4801 (linux_start_non_stop): Return -1 if linux_async failed.
4802
f7160e97
GB
48032014-08-28 Gary Benson <gbenson@redhat.com>
4804
4805 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4806 gdb_assert.
4807 (i386_dr_low_get_addr): Remove vague comment.
4808 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4809 gdb_assert.
4810
38e08fca
GB
48112014-08-28 Gary Benson <gbenson@redhat.com>
4812
4813 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4814 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4815 internal_error.
4816 (linux_resume_one_lwp): Likewise.
4817 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4818 gdb_assert.
4819 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4820 with internal_error.
4821 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4822 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4823 (find_register_by_name): Replace fatal with internal_error.
4824 (find_regno): Likewise.
4825 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4826 * thread-db.c (thread_db_create_event): Likewise.
4827 (thread_db_load_search): Likewise.
4828 (try_thread_db_load_1): Likewise.
4829 * tracepoint.c (get_jump_space_head): Replace fatal with
4830 internal_error.
4831 (claim_trampoline_space): Likewise.
4832 (have_fast_tracepoint_trampoline_buffer): Likewise.
4833 (cmd_qtstart): Likewise.
4834 (stop_tracing): Likewise.
4835 (fast_tracepoint_collecting): Likewise.
4836 (target_malloc): Likewise.
4837 (download_tracepoint): Likewise.
4838 (download_trace_state_variables): Replace check with gdb_assert.
4839 (upload_fast_traceframes): Replace fatal with internal_error.
4840
34abf635
GB
48412014-08-19 Tom Tromey <tromey@redhat.com>
4842 Gary Benson <gbenson@redhat.com>
4843
4844 * Makefile.in (SFILES): Add common/common-debug.c.
4845 (OBS): Add common-debug.o.
4846 (common-debug.o): New rule.
4847 * debug.h (debug_printf): Don't declare.
4848 * debug.c (debug_printf): Renamed and rewritten as...
4849 (debug_vprintf): New function.
4850
f6e94d78
GB
48512014-08-19 Gary Benson <gbenson@redhat.com>
4852
4853 * utils.h: Do not include print-utils.h.
4854
9239eeab
GB
48552014-08-19 Tom Tromey <tromey@redhat.com>
4856 Gary Benson <gbenson@redhat.com>
4857
4858 * server.h: Add static assertion.
4859 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4860
ef87c8bb
GB
48612014-08-19 Tom Tromey <tromey@redhat.com>
4862 Gary Benson <gbenson@redhat.com>
4863
4864 * Makefile.in (SFILES): Add common/errors.c.
4865 (OBS): Add errors.o.
4866 (IPA_OBS): Add errors-ipa.o.
4867 (errors.o): New rule.
4868 (errors-ipa.o): Likewise.
4869 * utils.h (perror_with_name, error, warning): Don't declare.
4870 * utils.c (warning): Renamed and rewritten as...
4871 (vwarning): New function.
4872 (error): Renamed and rewritten as...
4873 (verror): New function.
4874 (internal_error): Renamed and rewritten as...
4875 (internal_verror): New function.
4876
bb974a24
GB
48772014-08-07 Gary Benson <gbenson@redhat.com>
4878
4879 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4880 * configure: Regenerate.
4881 * config.in: Likewise.
4882 * server.h: Do not include errno.h.
4883 * event-loop.c: Likewise.
4884 * hostio-errno.c: Likewise.
4885 * linux-low.c: Likewise.
4886 * remote-utils.c: Likewise.
4887 * spu-low.c: Likewise.
4888 * utils.c: Likewise.
4889 * gdbreplay.c: Unconditionally include errno.h.
4890
6d3d12eb
GB
48912014-08-07 Gary Benson <gbenson@redhat.com>
4892
4893 * server.h: Do not include string.h.
4894 * event-loop.c: Likewise.
4895 * linux-low.c: Likewise.
4896 * regcache.c: Likewise.
4897 * remote-utils.c: Likewise.
4898 * spu-low.c: Likewise.
4899 * utils.c: Likewise.
4900
dccbb609
GB
49012014-08-07 Gary Benson <gbenson@redhat.com>
4902
4903 * server.h: Do not include gdb_assert.h.
4904
e76df0d0
GB
49052014-08-07 Gary Benson <gbenson@redhat.com>
4906
4907 * server.h: Do not include common-utils.h.
4908
4cb9c816
GB
49092014-08-07 Gary Benson <gbenson@redhat.com>
4910
4911 * server.h: Do not include ptid.h.
4912 * notif.h: Likewise.
4913
3995eeee
GB
49142014-08-07 Gary Benson <gbenson@redhat.com>
4915
4916 * server.h: Do not include gdb_locale.h.
4917
cb9f1a9b
GB
49182014-08-07 Gary Benson <gbenson@redhat.com>
4919
4920 * server.h: Do not include gdb/signals.h.
4921 * win32-low.c: Likewise.
4922
a5fceff8
GB
49232014-08-07 Gary Benson <gbenson@redhat.com>
4924
4925 * server.h: Do not include pathmax.h.
4926
b9391142
GB
49272014-08-07 Gary Benson <gbenson@redhat.com>
4928
4929 * server.h: Do not include libiberty.h.
4930 * linux-bfin-low.c: Likewise.
4931
0e443c87
GB
49322014-08-07 Gary Benson <gbenson@redhat.com>
4933
4934 * server.h: Do not include ansidecl.h.
4935
8ebb3f56
GB
49362014-08-07 Gary Benson <gbenson@redhat.com>
4937
4938 * linux-x86-low.c: Do not include stddef.h.
4939 * lynx-ppc-low.c: Likewise.
4940 * tracepoint.c: Likewise.
4941
8980bdf6
GB
49422014-08-07 Gary Benson <gbenson@redhat.com>
4943
4944 * server.h: Do not include stdarg.h.
4945 * nto-low.c: Likewise.
4946
d7096f71
GB
49472014-08-07 Gary Benson <gbenson@redhat.com>
4948
4949 * server.h: Do not include stdlib.h.
4950 * inferiors.c: Likewise.
4951 * linux-low.c: Likewise.
4952 * regcache.c: Likewise.
4953 * spu-low.c: Likewise.
4954 * tracepoint.c: Likewise.
4955 * utils.c: Likewise.
4956
d02f550d
GB
49572014-08-07 Gary Benson <gbenson@redhat.com>
4958
4959 * server.h: Do not include stdio.h.
4960 * linux-low.c: Likewise.
4961 * remote-utils.c: Likewise.
4962 * spu-low.c: Likewise.
4963 * utils.c: Likewise.
4964 * wincecompat.c: Likewise.
4965
87f6c4e3
GB
49662014-08-06 Gary Benson <gbenson@redhat.com>
4967
4968 * regcache.c (init_register_cache): Move conditionals inside if.
4969
7089dca4
GB
49702014-08-06 Gary Benson <gbenson@redhat.com>
4971
4972 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4973
462f517e
GB
49742014-07-31 Gary Benson <gbenson@redhat.com>
4975
4976 * ax.h: Do not include server.h.
4977 * gdbthread.h: Likewise.
4978 * lynx-low.h: Likewise.
4979 * notif.h: Likewise.
4980
976411d6
GB
49812014-07-30 Gary Benson <gbenson@redhat.com>
4982
4983 * server.h: Include common-defs.h.
4984 Do not include config.h or build-gnulib-gdbserver/config.h.
4985
d41f6d8e
GB
49862014-07-30 Gary Benson <gbenson@redhat.com>
4987
4988 * hostio-errno.c: Move server.h to top of includes list.
4989 * inferiors.c: Likewise.
4990 * linux-x86-low.c: Likewise.
4991 * notif.c: Include server.h.
4992
314c6a35
TT
49932014-07-24 Tom Tromey <tromey@redhat.com>
4994 Gary Benson <gbenson@redhat.com>
4995
4996 * server.h (CORE_ADDR): Now unsigned.
4997
69ff6be5
PA
49982014-07-16 Pedro Alves <palves@redhat.com>
4999
5000 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5001
ce9e3fe7
PA
50022014-07-15 Pedro Alves <palves@redhat.com>
5003
5004 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5005 copy.
5006
e76126e8
PA
50072014-07-11 Pedro Alves <palves@redhat.com>
5008
5009 * linux-low.c (kill_wait_lwp): New function, based on
5010 kill_one_lwp_callback, but use my_waitpid directly.
5011 (kill_one_lwp_callback, linux_kill): Use it.
5012
8e9db26e
PA
50132014-06-23 Pedro Alves <palves@redhat.com>
5014
5015 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5016 before setting DR0..DR3.
5017
698b3e08
GB
50182014-06-20 Gary Benson <gbenson@redhat.com>
5019
5020 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5021 * configure: Regenerated.
5022 * config.in: Likewise.
5023
125f8a3d
GB
50242014-06-20 Gary Benson <gbenson@redhat.com>
5025
5026 * Makefile.in (SFILES): Update locations for files moved
5027 from common to nat.
5028 (object file files): Reordered.
5029
42995dbd
GB
50302014-06-20 Gary Benson <gbenson@redhat.com>
5031
5032 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5033 (i386_dr_low_set_addr): Likewise.
5034 (i386_dr_low_get_addr): Likewise.
5035 (i386_dr_low_can_set_control): Likewise.
5036 (i386_dr_low_set_control): Likewise.
5037 (i386_dr_low_get_control): Likewise.
5038 (i386_dr_low_get_status): Likewise.
5039 (i386_get_debug_register_length): Likewise.
5040 * linux-x86-low.c (i386_dr_low_set_addr):
5041 Changed signature. Made static.
5042 (i386_dr_low_get_addr): Likewise.
5043 (i386_dr_low_set_control): Likewise.
5044 (i386_dr_low_get_control): Likewise.
5045 (i386_dr_low_get_status): Likewise.
5046 (i386_dr_low): New global variable.
5047 * win32-i386-low.c (i386_dr_low_set_addr):
5048 Changed signature. Made static.
5049 (i386_dr_low_get_addr): Likewise.
5050 (i386_dr_low_set_control): Likewise.
5051 (i386_dr_low_get_control): Likewise.
5052 (i386_dr_low_get_status): Likewise.
5053 (i386_dr_low): New global variable.
5054
e1d2394b
MS
50552014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5056
5057 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5058 * Makefile.in (AR, AR_FLAGS): Define.
5059 * configure: Regenerate.
5060
3a8ee006
GB
50612014-06-19 Gary Benson <gbenson@redhat.com>
5062
5063 * Makefile.in (i386-dregs.o): New rule.
5064 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5065 * i386-low.c (target.h): Remove include.
5066 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5067 (DR_CONTROL_SHIFT): Likewise.
5068 (DR_CONTROL_SIZE): Likewise.
5069 (DR_RW_EXECUTE): Likewise.
5070 (DR_RW_WRITE): Likewise.
5071 (DR_RW_READ): Likewise.
5072 (DR_RW_IORW): Likewise.
5073 (DR_LEN_1): Likewise.
5074 (DR_LEN_2): Likewise.
5075 (DR_LEN_4): Likewise.
5076 (DR_LEN_8): Likewise.
5077 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5078 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5079 (DR_ENABLE_SIZE): Likewise.
5080 (DR_LOCAL_SLOWDOWN): Likewise.
5081 (DR_GLOBAL_SLOWDOWN): Likewise.
5082 (DR_CONTROL_RESERVED): Likewise.
5083 (I386_DR_CONTROL_MASK): Likewise.
5084 (I386_DR_VACANT): Likewise.
5085 (I386_DR_LOCAL_ENABLE): Likewise.
5086 (I386_DR_GLOBAL_ENABLE): Likewise.
5087 (I386_DR_DISABLE): Likewise.
5088 (I386_DR_SET_RW_LEN): Likewise.
5089 (I386_DR_GET_RW_LEN): Likewise.
5090 (I386_DR_WATCH_HIT): Likewise.
5091 (i386_wp_op_t): Likewise.
5092 (i386_show_dr): Likewise.
5093 (i386_length_and_rw_bits): Likewise.
5094 (i386_insert_aligned_watchpoint): Likewise.
5095 (i386_remove_aligned_watchpoint): Likewise.
5096 (i386_handle_nonaligned_watchpoint): Likewise.
5097 i386_update_inferior_debug_regs(): Likewise.
5098 (i386_dr_insert_watchpoint): Likewise.
5099 (i386_dr_remove_watchpoint): Likewise.
5100 (i386_dr_region_ok_for_watchpoint): Likewise.
5101 (i386_dr_stopped_data_address): Likewise.
5102 (i386_dr_stopped_by_watchpoint): Likewise.
5103
8f26655c
GB
51042014-06-19 Gary Benson <gbenson@redhat.com>
5105
5106 * i386-low.c (i386_dr_show): Renamed to
5107 i386_show_dr and made static. All uses updated.
5108 (i386_dr_length_and_rw_bits): Renamed to
5109 i386_length_and_rw_bits and made static.
5110 All uses updated.
5111 (i386_dr_insert_aligned_watchpoint): Renamed to
5112 i386_insert_aligned_watchpoint and made static.
5113 All uses updated.
5114 (i386_dr_remove_aligned_watchpoint): Renamed to
5115 i386_remove_aligned_watchpoint and made static.
5116 All uses updated.
5117 (i386_dr_update_inferior_debug_regs): Renamed to
5118 i386_update_inferior_debug_regs and made static.
5119 All uses updated.
5120
b9228891
GB
51212014-06-18 Gary Benson <gbenson@redhat.com>
5122
5171def3
GB
5123 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5124 (i386_dr_low_can_set_control): Likewise.
5125 (i386_get_debug_register_length): Likewise.
5126 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5127 (i386_dr_low_can_set_control): Likewise.
5128 (i386_get_debug_register_length): Likewise.
5129
51302014-06-17 Gary Benson <gbenson@redhat.com>
5131
b9228891
GB
5132 * i386-low.h (i386-dregs.h): New include.
5133 (DR_FIRSTADDR): Now in i386-dregs.h.
5134 (DR_LASTADDR): Likewise.
5135 (DR_NADDR): Likewise.
5136 (DR_STATUS): Likewise.
5137 (DR_CONTROL): Likewise.
5138 (i386_debug_reg_state): Likewise.
5139 (i386_dr_insert_watchpoint): Likewise.
5140 (i386_dr_remove_watchpoint): Likewise.
5141 (i386_dr_region_ok_for_watchpoint): Likewise.
5142 (i386_dr_stopped_data_address): Likewise.
5143 (i386_dr_stopped_by_watchpoint): Likewise.
5144 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5145
4be83cc2
GB
51462014-06-18 Gary Benson <gbenson@redhat.com>
5147
5148 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5149 i386_dr_insert_watchpoint.
5150 (i386_low_remove_watchpoint): Renamed to
5151 i386_dr_remove_watchpoint.
5152 (i386_low_region_ok_for_watchpoint): Renamed to
5153 i386_dr_region_ok_for_watchpoint.
5154 (i386_low_stopped_data_address): Renamed to
5155 i386_dr_stopped_data_address.
5156 (i386_low_stopped_by_watchpoint): Renamed to
5157 i386_dr_stopped_by_watchpoint.
5158 * i386-low.c (i386_show_dr): Renamed to
5159 i386_dr_show and made nonstatic. All uses updated.
5160 (i386_length_and_rw_bits): Renamed to
5161 i386_dr_length_and_rw_bits and made nonstatic.
5162 All uses updated.
5163 (i386_insert_aligned_watchpoint): Renamed to
5164 i386_dr_insert_aligned_watchpoint and made nonstatic.
5165 All uses updated.
5166 (i386_remove_aligned_watchpoint): Renamed to
5167 i386_dr_remove_aligned_watchpoint and made nonstatic.
5168 All uses updated.
5169 (i386_update_inferior_debug_regs): Renamed to
5170 i386_dr_update_inferior_debug_regs and made nonstatic.
5171 All uses updated.
5172 (i386_low_insert_watchpoint): Renamed to
5173 i386_dr_insert_watchpoint. All uses updated.
5174 (i386_low_remove_watchpoint): Renamed to
5175 i386_dr_remove_watchpoint. All uses updated.
5176 (i386_low_region_ok_for_watchpoint): Renamed to
5177 i386_dr_region_ok_for_watchpoint. All uses updated.
5178 (i386_low_stopped_data_address): Renamed to
5179 i386_dr_stopped_data_address. All uses updated.
5180 (i386_low_stopped_by_watchpoint): Renamed to
5181 i386_dr_stopped_by_watchpoint. All uses updated.
5182
131aa0d4
GB
51832014-06-18 Gary Benson <gbenson@redhat.com>
5184
5185 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5186 (i386_dr_low_can_set_control): Likewise.
5187 (i386_insert_aligned_watchpoint): New check.
5188
d9305f7f
GB
51892014-06-18 Gary Benson <gbenson@redhat.com>
5190
5191 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5192 Renamed to state.
5193
e927c9fc
GB
51942014-06-18 Gary Benson <gbenson@redhat.com>
5195
5196 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5197 instead of fatal and error.
5198 (i386_handle_nonaligned_watchpoint): Likewise.
5199
1b6d4134
GB
52002014-06-18 Gary Benson <gbenson@redhat.com>
5201
5202 * i386-low.c (i386_get_debug_register_length): New macro.
5203 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5204 (i386_show_dr): Use debug_printf instead of fprintf. Use
5205 phex to format values.
5206
6e62758f
GB
52072014-06-18 Gary Benson <gbenson@redhat.com>
5208
5209 * i386-low.h: Comment changes.
5210 * i386-low.c: Likewise.
5211
fc6e2f03
GB
52122014-06-18 Gary Benson <gbenson@redhat.com>
5213
5214 * i386-low.c: Whitespace changes.
5215
f9d1eeed
TT
52162014-06-12 Tom Tromey <tromey@redhat.com>
5217
5218 * utils.c (freeargv): Remove.
5219
0b04e523
TT
52202014-06-12 Tom Tromey <tromey@redhat.com>
5221
5222 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5223 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5224 (parse_debug_format_options): Likewise.
5225 (gdbserver_usage): Likewise.
5226 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5227 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5228 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5229 against libiberty.
5230 ($(LIBGNU)): Depend on libiberty.
5231 (all-lib): Recurse into all subdirs.
5232 (install-only): Invoke "install" target in subdirs.
5233 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5234 targets.
5235 * configure: Rebuild.
5236 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5237 for vasprintf, vsnprintf, or gettimeofday.
5238 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5239 srv_tgtobj.
5240
270c9937
JB
52412014-06-05 Joel Brobecker <brobecker@adacore.com>
5242
5243 * development.sh: Delete.
5244 * Makefile.in (config.status): Adjust dependency on development.sh.
5245 * configure.ac: Adjust development.sh source call.
5246 * configure: Regenerate.
5247
0a261ed8
PA
52482014-06-02 Pedro Alves <palves@redhat.com>
5249
5250 * ax.c (gdb_free_agent_expr): New function.
5251 * ax.h (gdb_free_agent_expr): New declaration.
5252 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5253 list.
5254 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5255 static.
5256 (clear_breakpoint_conditions_and_commands): New function.
5257 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5258 (clear_breakpoint_conditions_and_commands): New declaration.
5259
e9dae05e
RR
52602014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5261
5262 * linux-aarch64-low.c (asm/ptrace.h): Include.
5263
5876f503
JK
52642014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5265
5266 Fix TLS access for -static -pthread.
5267 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5268 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5269 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5270
802e8e6d
PA
52712014-05-20 Pedro Alves <palves@redhat.com>
5272
5273 * linux-aarch64-low.c (aarch64_insert_point)
5274 (aarch64_remove_point): No longer check whether the type is
5275 supported here. Adjust to new interface.
5276 (the_low_target): Install aarch64_supports_z_point_type as
5277 supports_z_point_type method.
5278 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5279 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5280 instead of a Z packet char. Adjust.
5281 (arm_supports_z_point_type): New function.
5282 (arm_insert_point, arm_remove_point): Adjust to new interface.
5283 (the_low_target): Install arm_supports_z_point_type.
5284 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5285 (cris_insert_point, cris_remove_point): Adjust to new interface.
5286 Don't check whether the type is supported here.
5287 (the_low_target): Install cris_supports_z_point_type.
5288 * linux-low.c (linux_supports_z_point_type): New function.
5289 (linux_insert_point, linux_remove_point): Adjust to new interface.
5290 * linux-low.h (struct linux_target_ops) <insert_point,
5291 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5292 raw_breakpoint pointer parameter.
5293 <supports_z_point_type>: New method.
5294 * linux-mips-low.c (mips_supports_z_point_type): New function.
5295 (mips_insert_point, mips_remove_point): Adjust to new interface.
5296 Use mips_supports_z_point_type.
5297 (the_low_target): Install mips_supports_z_point_type.
5298 * linux-ppc-low.c (the_low_target): Install NULL as
5299 supports_z_point_type method.
5300 * linux-s390-low.c (the_low_target): Install NULL as
5301 supports_z_point_type method.
5302 * linux-sparc-low.c (the_low_target): Install NULL as
5303 supports_z_point_type method.
5304 * linux-x86-low.c (x86_supports_z_point_type): New function.
5305 (x86_insert_point): Adjust to new insert_point interface. Use
5306 insert_memory_breakpoint. Adjust to new
5307 i386_low_insert_watchpoint interface.
5308 (x86_remove_point): Adjust to remove_point interface. Use
5309 remove_memory_breakpoint. Adjust to new
5310 i386_low_remove_watchpoint interface.
5311 (the_low_target): Install x86_supports_z_point_type.
5312 * lynx-low.c (lynx_target_ops): Install NULL as
5313 supports_z_point_type callback.
5314 * nto-low.c (nto_supports_z_point_type): New.
5315 (nto_insert_point, nto_remove_point): Adjust to new interface.
5316 (nto_target_ops): Install nto_supports_z_point_type.
5317 * mem-break.c: Adjust intro comment.
5318 (struct raw_breakpoint) <raw_type, size>: New fields.
5319 <inserted>: Update comment.
5320 <shlib_disabled>: Delete field.
5321 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5322 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5323 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5324 (raw_bkpt_type_to_target_hw_bp_type): New function.
5325 (find_enabled_raw_code_breakpoint_at): New function.
5326 (find_raw_breakpoint_at): New type and size parameters. Use them.
5327 (insert_memory_breakpoint): New function, based off
5328 set_raw_breakpoint_at.
5329 (remove_memory_breakpoint): New function.
5330 (set_raw_breakpoint_at): Reimplement.
5331 (set_breakpoint): New, based on set_breakpoint_at.
5332 (set_breakpoint_at): Reimplement.
5333 (delete_raw_breakpoint): Go through the_target->remove_point
5334 instead of assuming memory breakpoints.
5335 (find_gdb_breakpoint_at): Delete.
5336 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5337 (find_gdb_breakpoint): New function.
5338 (set_gdb_breakpoint_at): Delete.
5339 (z_type_supported): New function.
5340 (set_gdb_breakpoint_1): New function, loosely based off
5341 set_gdb_breakpoint_at.
5342 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5343 (delete_gdb_breakpoint_at): Delete.
5344 (delete_gdb_breakpoint_1): New function, loosely based off
5345 delete_gdb_breakpoint_at.
5346 (delete_gdb_breakpoint): New function.
5347 (clear_gdb_breakpoint_conditions): Rename to ...
5348 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5349 breakpoint.
5350 (add_condition_to_breakpoint): Make static.
5351 (add_breakpoint_condition): Take a struct breakpoint pointer
5352 instead of an address. Adjust.
5353 (gdb_condition_true_at_breakpoint): Rename to ...
5354 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5355 z_type parameter.
5356 (gdb_condition_true_at_breakpoint): Reimplement.
5357 (add_breakpoint_commands): Take a struct breakpoint pointer
5358 instead of an address. Adjust.
5359 (gdb_no_commands_at_breakpoint): Rename to ...
5360 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5361 parameter. Return true if no breakpoint was found. Change debug
5362 output.
5363 (gdb_no_commands_at_breakpoint): Reimplement.
5364 (run_breakpoint_commands): Rename to ...
5365 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5366 and change return type to boolean.
5367 (run_breakpoint_commands): New function.
5368 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5369 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5370 breakpoint. Go through the_target->remove_point instead of
5371 assuming memory breakpoint.
5372 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5373 software and hardware breakpoints.
5374 (reinsert_raw_breakpoint): Go through the_target->insert_point
5375 instead of assuming memory breakpoint.
5376 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5377 software and hardware breakpoints.
5378 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5379 Check both software and hardware breakpoints.
5380 (validate_inserted_breakpoint): Assert the breakpoint is a
5381 software breakpoint. Set the inserted flag to -1 instead of
5382 setting shlib_disabled.
5383 (delete_disabled_breakpoints): Adjust.
5384 (validate_breakpoints): Only validate software breakpoints.
5385 Adjust to inserted flag change.
5386 (check_mem_read, check_mem_write): Skip breakpoint types other
5387 than software breakpoints. Adjust to inserted flag change.
5388 * mem-break.h (enum raw_bkpt_type): New enum.
5389 (raw_breakpoint, struct process_info): Forward declare.
5390 (Z_packet_to_target_hw_bp_type): Delete declaration.
5391 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5392 (set_gdb_breakpoint, delete_gdb_breakpoint)
5393 (clear_breakpoint_conditions): New declarations.
5394 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5395 (breakpoint_inserted_here): Update comment.
5396 (add_breakpoint_condition, add_breakpoint_commands): Replace
5397 address parameter with a breakpoint pointer parameter.
5398 (gdb_breakpoint_here): Update comment.
5399 (delete_gdb_breakpoint_at): Delete.
5400 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5401 * server.c (process_point_options): Take a struct breakpoint
5402 pointer instead of an address. Adjust.
5403 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5404 delete_gdb_breakpoint.
5405 * spu-low.c (spu_target_ops): Install NULL as
5406 supports_z_point_type method.
5407 * target.h: Include mem-break.h.
5408 (struct target_ops) <prepare_to_access_memory>: Update comment.
5409 <supports_z_point_type>: New field.
5410 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5411 instead of a char. Also take a raw breakpoint pointer.
5412 * win32-arm-low.c (the_low_target): Install NULL as
5413 supports_z_point_type.
5414 * win32-i386-low.c (i386_supports_z_point_type): New function.
5415 (i386_insert_point, i386_remove_point): Adjust to new interface.
5416 (the_low_target): Install i386_supports_z_point_type.
5417 * win32-low.c (win32_supports_z_point_type): New function.
5418 (win32_insert_point, win32_remove_point): Adjust to new interface.
5419 (win32_target_ops): Install win32_supports_z_point_type.
5420 * win32-low.h (struct win32_target_ops):
5421 <supports_z_point_type>: New method.
5422 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5423 instead of a char. Also take a raw breakpoint pointer.
5424
932539e3
PA
54252014-05-20 Pedro Alves <palves@redhat.com>
5426
5427 * mem-break.h: Include break-common.h.
5428 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5429 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5430 (Z_packet_to_target_hw_bp_type): New declaration.
5431 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5432 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5433 (Z_PACKET_ACCESS_WP): Delete macros.
5434 (Z_packet_to_hw_type): Delete function.
5435 * i386-low.h: Don't include break-common.h here.
5436 (Z_packet_to_hw_type): Delete declaration.
5437 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5438 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5439 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5440 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5441 * linux-aarch64-low.c: Don't include break-common.h here.
5442 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5443 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5444 (Z_packet_to_target_hw_bp_type): Delete function.
5445 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5446 function.
5447 (mips_insert_point, mips_remove_point): Use
5448 Z_packet_to_target_hw_bp_type.
5449
4ff0d3d8
PA
54502014-05-20 Pedro Alves <palves@redhat.com>
5451
5452 * linux-aarch64-low.c: Include break-common.h.
5453 (enum target_point_type): Delete.
5454 (Z_packet_to_point_type): Rename to ...
5455 (Z_packet_to_target_hw_bp_type): ... this, and return a
5456 target_hw_bp_type instead.
5457 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5458 instead of an enum target_point_type.
5459 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5460 breakpoint type.
5461 (aarch64_dr_state_insert_one_point)
5462 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5463 (aarch64_handle_aligned_watchpoint)
5464 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5465 Take an enum target_hw_bp_type instead of an enum
5466 target_point_type.
5467 (aarch64_supports_z_point_type): New function.
5468 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5469 use Z_packet_to_target_hw_bp_type.
5470
786dc519
JB
54712014-05-20 Joel Brobecker <brobecker@adacore.com>
5472
5473 * configure.ac: Only use -Werror by default when DEVELOPMENT
5474 is true.
5475 * configure: Regenerate.
5476
9e0aa64f
JK
54772014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5478
5479 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5480 * linux-x86-low.c (X86_64_USER_REGS): New.
5481 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5482
2b577b92
YQ
54832014-04-28 Yao Qi <yao@codesourcery.com>
5484
5485 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5486 name.
5487
94611da2
PA
54882014-04-25 Pedro Alves <palves@redhat.com>
5489
5490 PR server/16255
5491 * linux-low.c (linux_attach_fail_reason_string): New function.
5492 (linux_attach_lwp): Delete.
5493 (linux_attach_lwp_1): Rename to ...
5494 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5495 argument. Remove "initial" parameter. Return int instead of
5496 void. Don't error or warn here.
5497 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5498 failure to attach to the tgid. Call warning when failing to
5499 attach to an lwp.
5500 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5501 argument. Remove "initial" parameter. Return int instead of
5502 void. Don't error or warn here.
5503 (linux_attach_fail_reason_string): New declaration.
5504 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5505 interface change. Use linux_attach_fail_reason_string.
5506
01f9f808
MS
55072014-04-24 Michael Sturm <michael.sturm@mintel.com>
5508 Walfred Tedeschi <walfred.tedeschi@intel.com>
5509
5510 * Makefile.in: Added rules to handle new files
5511 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5512 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5513 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5514 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5515 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5516 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5517 x32-avx512-linux.o.
5518 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5519 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5520 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5521 i386/x32-avx512.xml.
5522 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5523 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5524 i386/x32-avx512-linux.xml.
5525 * i387-fp.c (num_avx512_k_registers): New constant for number
5526 of K registers.
5527 (num_avx512_zmmh_low_registers): New constant for number of
5528 lower ZMM registers (0-15).
5529 (num_avx512_zmmh_high_registers): New constant for number of
5530 higher ZMM registers (16-31).
5531 (num_avx512_ymmh_registers): New contant for number of higher
5532 YMM registers (ymm16-31 added by avx521 on x86_64).
5533 (num_avx512_xmm_registers): New constant for number of higher
5534 XMM registers (xmm16-31 added by AVX512 on x86_64).
5535 (struct i387_xsave): Add space for AVX512 registers.
5536 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5537 Add code to handle AVX512 registers.
5538 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5539 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5540 prototypei from generated file.
5541 (tdesc_amd64_avx512_linux): Likewise.
5542 (init_registers_x32_avx512_linux): Likewise.
5543 (tdesc_x32_avx512_linux): Likewise.
5544 (init_registers_i386_avx512_linux): Likewise.
5545 (tdesc_i386_avx512_linux): Likewise.
5546 (x86_64_regmap): Add AVX512 registers.
5547 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5548 mask.
5549 (initialize_low_arch): Add code to initialize AVX512 registers.
5550
51aa91f9
PA
55512014-04-23 Pedro Alves <palves@redhat.com>
5552
5553 * mem-break.c (find_gdb_breakpoint_at): Make static.
5554 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5555
a4165e94
PA
55562014-04-23 Pedro Alves <palves@redhat.com>
5557
5558 * i386-low.c: Don't include break-common.h here.
5559 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5560 prototype to take target_hw_bp_type as argument instead of a Z
5561 packet char.
5562 * i386-low.h: Include break-common.h here.
5563 (Z_packet_to_hw_type): Declare.
5564 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5565 prototypes.
5566 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5567 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5568 (x86_remove_point): Convert the packet number to a
5569 target_hw_bp_type before calling i386_low_remove_watchpoint.
5570 * win32-i386-low.c (i386_insert_point): Convert the packet number
5571 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5572 (i386_remove_point): Convert the packet number to a
5573 target_hw_bp_type before calling i386_low_remove_watchpoint.
5574
b8acf843
PA
55752014-04-23 Pedro Alves <palves@redhat.com>
5576
5577 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5578
d708bcd1
PA
55792014-04-10 Pedro Alves <palves@redhat.com>
5580
5581 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5582 Check if the condition or command is NULL before checking if the
5583 breakpoint is known. On success, return true.
5584 * mem-break.h (add_breakpoint_condition): Document return.
5585 (add_breakpoint_commands): Add describing comment.
5586 * server.c (skip_to_semicolon): New function.
5587 (process_point_options): Use it.
5588
2eec7d5b
PA
55892014-04-09 Pedro Alves <palves@redhat.com>
5590
5591 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5592 to lwpid_of.
5593
fa96cb38
PA
55942014-02-27 Pedro Alves <palves@redhat.com>
5595
5596 PR 12702
5597 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5598 macros.
5599 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5600 output.
5601 (last_thread_of_process_p): Take a PID argument instead of a
5602 thread pointer.
5603 (linux_wait_for_lwp): Delete.
5604 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5605 functions.
5606 (linux_low_filter_event): New function, party factored out from
5607 linux_wait_for_event.
5608 (linux_wait_for_event): Rename to ...
5609 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5610 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5611 sigsuspend. Check for zombie leaders.
5612 (linux_wait_for_event): Reimplement as wrapper around
5613 linux_wait_for_event_filtered.
5614 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5615 a normal or signal exit is seen, it's the whole process exiting.
5616 (wait_for_sigstop): No longer a for_each_inferior callback.
5617 Rewrite on top of linux_wait_for_event_filtered.
5618 (stop_all_lwps): Call wait_for_sigstop directly.
5619 * server.c (resume, handle_target_event): Handle
5620 TARGET_WAITKIND_NO_RESUMED.
5621
d763de10
JB
56222014-02-26 Joel Brobecker <brobecker@adacore.com>
5623
5624 * win32-low.c (psapi_get_dll_name,
5625 * win32_CreateToolhelp32Snapshot): Delete.
5626 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5627 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5628 Delete.
5629 (handle_load_dll): Add function description.
5630 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5631
850a0f76
JB
56322014-02-26 Joel Brobecker <brobecker@adacore.com>
5633
5634 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5635 Add comment.
5636 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5637 base address when calling win32_add_one_solib.
5638 (handle_load_dll): Delete local variable load_addr.
5639 Remove 0x1000 offset applied to DLL base address when calling
5640 win32_add_one_solib.
5641 (handle_unload_dll): Add comment.
5642
f25b3fc3
JB
56432014-02-26 Joel Brobecker <brobecker@adacore.com>
5644
5645 * win32-low.c (win32_add_all_dlls): Renames
5646 win32_ensure_ntdll_loaded. Rewrite function documentation.
5647 Adjust implementation to always load all DLLs.
5648 Add 0x1000 offset to DLL base address when calling
5649 win32_add_one_solib.
5650 (child_initialization_done): New static global.
5651 (do_initial_child_stuff): Set child_initialization_done to
5652 zero during child initialization, and 1 after. Replace call
5653 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5654 Add comment.
5655 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5656 (handle_unload_dll): Add function documentation.
5657 (get_child_debug_event): Ignore load and unload DLL events
5658 during child initialization.
5659
d86d4aaf
DE
56602014-02-20 Doug Evans <dje@google.com>
5661
3bc32da3 5662 Remove global all_lwps.
d86d4aaf
DE
5663 * inferiors.h (ptid_of): Move here from linux-low.h.
5664 (pid_of, lwpid_of): Ditto.
5665 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5666 parameter is a struct thread_info * now.
5667 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5668 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5669 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5670 directly.
5671 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5672 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5673 * linux-arm-low.c (update_registers_callback): Update, "entry"
5674 parameter is a struct thread_info * now.
5675 Fetch lwpid from current_inferior directly.
5676 (arm_insert_point): Pass &all_threads to find_inferior instead of
5677 &all_lwps.
5678 (arm_remove_point): Ditto.
5679 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5680 (arm_prepare_to_resume): Fetch pid from thread.
5681 (arm_read_description): Fetch lwpid from current_inferior directly.
5682 * linux-low.c (all_lwps): Delete.
5683 (delete_lwp): Delete call to remove_inferior.
5684 (handle_extended_wait): Fetch lwpid from thread.
5685 (add_lwp): Don't set lwp->entry.id. Remove call to
5686 add_inferior_to_list.
5687 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5688 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5689 (kill_one_lwp_callback): Ditto.
5690 (linux_kill): Don't dereference NULL pointer.
5691 Fetch ptid,lwpid from thread.
5692 (get_detach_signal): Fetch ptid from thread.
5693 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5694 Simplify call to regcache_invalidate_thread.
5695 (delete_lwp_callback): Update, "entry" parameter is a
5696 struct thread_info * now. Fetch pid from thread.
5697 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5698 (status_pending_p_callback): Update, "entry" parameter is a
5699 struct thread_info * now. Fetch ptid from thread.
5700 (find_lwp_pid): Update, "entry" parameter is a
5701 struct thread_info * now.
5702 (linux_wait_for_lwp): Fetch pid from thread.
5703 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5704 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5705 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5706 (dequeue_one_deferred_signal): Ditto.
5707 (cancel_breakpoint): Fetch ptid from current_inferior.
5708 (linux_wait_for_event): Pass &all_threads to find_inferior,
5709 not &all_lwps. Fetch ptid, lwpid from thread.
5710 (count_events_callback): Update, "entry" parameter is a
5711 struct thread_info * now.
5712 (select_singlestep_lwp_callback): Ditto.
5713 (select_event_lwp_callback): Ditto.
5714 (cancel_breakpoints_callback): Ditto.
5715 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5716 not &all_lwps.
5717 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5718 (unsuspend_one_lwp): Update, "entry" parameter is a
5719 struct thread_info * now.
5720 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5721 not &all_lwps.
5722 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5723 Fetch lwpid from thread, not lwp.
5724 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5725 Pass &all_threads to find_inferior, not &all_lwps.
5726 (send_sigstop): Fetch lwpid from thread, not lwp.
5727 (send_sigstop_callback): Update, "entry" parameter is a
5728 struct thread_info * now.
5729 (suspend_and_send_sigstop_callback): Ditto.
5730 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5731 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5732 struct thread_info * now.
5733 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5734 from thread, lwp.
5735 (lwp_running): Update, "entry" parameter is a
5736 struct thread_info * now.
5737 (stop_all_lwps): Fetch ptid from thread.
5738 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5739 (linux_resume_one_lwp): Fetch lwpid from thread.
5740 (linux_set_resume_request): Update, "entry" parameter is a
5741 struct thread_info * now. Fetch pid, lwpid from thread.
5742 (resume_status_pending_p): Update, "entry" parameter is a
5743 struct thread_info * now.
5744 (need_step_over_p): Ditto. Fetch lwpid from thread.
5745 (start_step_over): Fetch lwpid from thread.
5746 (linux_resume_one_thread): Update, "entry" parameter is a
5747 struct thread_info * now. Fetch lwpid from thread.
5748 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5749 (proceed_one_lwp): Update, "entry" parameter is a
5750 struct thread_info * now. Fetch lwpid from thread.
5751 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5752 struct thread_info * now.
5753 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5754 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5755 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5756 directly.
5757 (regsets_store_inferior_registers): Ditto.
5758 (fetch_register, store_register): Ditto.
5759 (linux_read_memory, linux_write_memory): Ditto.
5760 (linux_request_interrupt): Ditto.
5761 (linux_read_auxv): Ditto.
5762 (linux_xfer_siginfo): Ditto.
5763 (linux_qxfer_spu): Ditto.
5764 (linux_qxfer_libraries_svr4): Ditto.
5765 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5766 moved to inferiors.h.
5767 (get_lwp): Delete.
5768 (get_thread_lwp): Update.
5769 (struct lwp_info): Delete member "entry". Simplify comment for
5770 member "thread".
5771 (all_lwps): Delete.
5772 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5773 current_inferior directly.
5774 (update_watch_registers_callback): Update, "entry" parameter is a
5775 struct thread_info * now. Fetch pid from thread.
5776 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5777 (mips_insert_point): Fetch lwpid from current_inferior.
5778 Pass &all_threads to find_inferior, not &all_lwps.
5779 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5780 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5781 directly.
5782 (mips_stopped_data_address): Ditto.
5783 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5784 directly.
5785 * linux-tile-low.c (tile_arch_setup): Ditto.
5786 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5787 (update_debug_registers_callback): Update, "entry" parameter is a
5788 struct thread_info * now. Fetch pid from thread.
5789 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5790 Pass &all_threads to find_inferior, not &all_lwps.
5791 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5792 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5793 Pass &all_threads to find_inferior, not &all_lwps.
5794 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5795 (i386_dr_low_get_status): Ditto.
5796 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5797 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5798 (x86_linux_read_description): Ditto.
5799 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5800
3b8361aa
DE
58012014-02-20 Doug Evans <dje@google.com>
5802
5803 * inferiors.c (get_first_inferior): Fix buglet.
5804
f7667f0d
DE
58052014-02-19 Doug Evans <dje@google.com>
5806
5807 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5808 * inferiors.c (add_thread): Change result type to struct thread_info *.
5809 All callers updated.
5810 (add_lwp): Call add_thread here instead of in callers.
5811 All callers updated.
5812 * linux-low.h (get_lwp_thread): Rewrite.
5813 (struct lwp_info): New member "thread".
5814
b3312d80
DE
58152014-02-19 Doug Evans <dje@google.com>
5816
5817 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5818 All callers updated.
5819
ecc6f45c
DE
58202014-02-19 Doug Evans <dje@google.com>
5821
5822 * inferiors.c (add_thread): Fix whitespace.
5823
649ebbca
DE
58242014-02-19 Doug Evans <dje@google.com>
5825
5826 * dll.c (clear_dlls): Replace accessing list implemention details
5827 with API function.
5828 * gdbthread.h (get_first_thread): Declare.
5829 * inferiors.c (for_each_inferior_with_data): New function.
5830 (get_first_thread): New function.
5831 (find_thread_ptid): Simplify.
5832 (get_first_inferior): New function.
5833 (clear_list): Delete.
5834 (one_inferior_p): New function.
5835 (clear_inferior_list): New function.
5836 (clear_inferiors): Update.
5837 * inferiors.h (for_each_inferior_with_data): Declare.
5838 (clear_inferior_list): Declare.
5839 (one_inferior_p): Declare.
5840 (get_first_inferior): Declare.
5841 * linux-low.c (linux_wait_for_event): Replace accessing list
5842 implemention details with API function.
5843 * server.c (target_running): Ditto.
5844 (accumulate_file_name_length): New function.
5845 (emit_dll_description): New function.
5846 (handle_qxfer_libraries): Replace accessing list implemention
5847 details with API function.
5848 (handle_qxfer_threads_worker): New function.
5849 (handle_qxfer_threads_proper): Replace accessing list implemention
5850 details with API function.
5851 (handle_query): Ditto.
5852 (visit_actioned_threads_callback_ftype): New typedef.
5853 (visit_actioned_threads_data): New struct.
5854 (visit_actioned_threads): Rewrite to be find_inferior callback.
5855 (resume): Call find_inferior.
5856 (handle_status): Replace accessing list implemention
5857 details with API function.
5858 (process_serial_event): Replace accessing list implemention details
5859 with API function.
5860 * target.c (set_desired_inferior): Replace accessing list implemention
5861 details with API function.
5862 * tracepoint.c (same_process_p): New function.
5863 (gdb_agent_about_to_close): Replace accessing list implemention
5864 details with API function.
5865 * win32-low.c (child_delete_thread): Replace accessing list
5866 implemention details with API function.
5867 (match_dll_by_basename): New function.
5868 (dll_is_loaded_by_basename): New function.
5869 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5870 details call to dll_is_loaded_by_basename.
5871
80894984
DE
58722014-02-19 Doug Evans <dje@google.com>
5873
5874 * dll.h (struct dll_info): Add comment.
5875 * gdbthread.h (struct thread_info): Add comment.
5876 (current_ptid): Simplify.
5877 * inferiors.c (add_process): Update.
5878 (remove_process): Update.
5879 * inferiors.h (struct process_info): Rename member "head" to "entry".
5880 * linux-low.c (delete_lwp): Update.
5881 (add_lwp): Update.
5882 (last_thread_of_process_p): Update.
5883 (kill_one_lwp_callback, linux_kill): Update.
5884 (status_pending_p_callback): Update.
5885 (wait_for_sigstop): Update. Simplify read of ptid.
5886 (start_step_over): Update.
5887 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5888 (get_lwp_thread): Update.
5889 (struct lwp_info): Rename member "head" to "entry".
5890 * regcache.h (inferior_list_entry): Delete.
5891 * server.c (kill_inferior_callback): Update.
5892 (detach_or_kill_inferior_callback): Update.
5893 (print_started_pid): Update.
5894 (print_attached_pid): Update.
5895 (process_serial_event): Simplify read of ptid.
5896 * thread-db.c (thread_db_create_event): Update.
5897 (thread_db_get_tls_address): Update.
5898 * win32-low.c (current_inferior_ptid): Simplify.
5899
46917d26
TT
59002014-02-19 Tom Tromey <tromey@redhat.com>
5901
5902 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5903 argument.
5904 (target_supports_btrace): Update.
5905
0759a81e
YQ
59062014-02-14 Yao Qi <yao@codesourcery.com>
5907
5908 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5909 (rsp-low-ipa.o): New target.
5910
a7191e8b
TT
59112014-02-12 Tom Tromey <tromey@redhat.com>
5912
5913 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5914 convert_ascii_to_int.
5915 * regcache.c (registers_to_string): Likewise.
5916 * remote-utils.c (decode_M_packet): Likewise.
5917 * server.c (process_serial_event): Likewise.
5918
ff0e980e
TT
59192014-02-12 Tom Tromey <tromey@redhat.com>
5920
5921 * server.c (handle_query, handle_v_run): Use hex2bin, not
5922 unhexify.
5923 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5924
e9371aff
TT
59252014-02-12 Tom Tromey <tromey@redhat.com>
5926
5927 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5928 convert_int_to_ascii.
5929 * regcache.c (registers_to_string, collect_register_as_string):
5930 Likewise.
5931 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5932 Likewise.
5933 * server.c (process_serial_event): Likewise.
5934 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5935 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5936
971dc0b8
TT
59372014-02-12 Tom Tromey <tromey@redhat.com>
5938
5939 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5940 bin2hex, not hexify.
5941 * tracepoint.c (cmd_qtstatus): Likewise.
5942
0a822afb
TT
59432014-02-12 Tom Tromey <tromey@redhat.com>
5944
5945 * remote-utils.c (monitor_output): Pass explicit length to
5946 hexify.
5947
9c3d6531
TT
59482014-02-12 Tom Tromey <tromey@redhat.com>
5949
5950 * tracepoint.c: Include rsp-low.h.
5951 * server.c: Include rsp-low.h.
5952 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5953 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5954 declare.
5955 * remote-utils.c: Include rsp-low.h.
5956 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5957 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5958 (convert_int_to_ascii, convert_ascii_to_int): Move to
5959 common/rsp-low.c.
5960 * regcache.c: Include rsp-low.h.
5961 * ax.c: Include rsp-low.h.
5962 * Makefile.in (SFILES): Add common/rsp-low.c.
5963 (OBS): Add rsp-low.o.
5964 (rsp-low.o): New target.
5965
01fd3ea5
TT
59662014-02-12 Tom Tromey <tromey@redhat.com>
5967
5968 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5969 Include print-utils.h.
5970 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5971 (plongest, thirty_two, phex_nz): Remove.
5972 * Makefile.in (SFILES): Add common/print-utils.c.
5973 (OBS): Add print-utils.o.
5974 (print-utils-ipa.o): New target.
5975 (print-utils.o): New target.
5976 (IPA_OBJS): Add print-utils-ipa.o.
5977
e99dc820
TT
59782014-02-06 Tom Tromey <tromey@redhat.com>
5979
5980 * Makefile.in (SFILES): Fix indentation.
5981
ee1e2d4f
DE
59822014-02-05 Doug Evans <dje@google.com>
5983
5984 * linux-low.c (linux_wait_for_event): Improve comment.
5985 (linux_wait_1): Keep current_inferior in sync with event_child.
5986
f5a02773
DE
59872014-01-22 Doug Evans <dje@google.com>
5988
5989 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5990
87ce2a04
DE
59912014-01-22 Doug Evans <dje@google.com>
5992
5993 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5994 * configure: Regenerate.
5995 * config.in: Regenerate.
5996 * Makefile.in (SFILES): Add debug.c.
5997 (OBS): Add debug.o.
5998 * debug.c: New file.
5999 * debug.h: New file.
6000 * linux-aarch64-low.c (*): Update all debugging printfs to use
6001 debug_printf instead of fprintf.
6002 * linux-arm-low.c (*): Ditto.
6003 * linux-cris-low.c (*): Ditto.
6004 * linux-crisv32-low.c (*): Ditto.
6005 * linux-m32r-low.c (*): Ditto.
6006 * linux-sparc-low.c (*): Ditto.
6007 * linux-x86.c (*): Ditto.
6008 * linux-low.c (*): Ditto.
6009 (linux_wait_1): Add calls to debug_enter, debug_exit.
6010 (linux_wait): Remove redundant debugging printf.
6011 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6012 (linux_resume, unstop_all_lwps): Ditto.
6013 * mem-break.c (*): Update all debugging printfs to use
6014 debug_printf instead of fprintf.
6015 * remote-utils.c (*): Ditto.
6016 * thread-db.c (*): Ditto.
6017 * server.c #include <ctype.h>, "gdb_vecs.h".
6018 (debug_threads): Moved to debug.c.
6019 (*): Update all debugging printfs to use debug_printf instead of
6020 fprintf.
6021 (start_inferior): Replace call to fflush with call to debug_flush.
6022 (monitor_show_help): Mention set debug-format.
6023 (parse_debug_format_options): New function.
6024 (handle_monitor_command): Handle "monitor set debug-format".
6025 (gdbserver_usage): Mention --debug-format.
6026 (main): Parse --debug-format.
6027 * server.h (debug_threads): Declaration moved to debug.h.
6028 #include "debug.h".
6029 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6030 trace_debug_1 that uses debug_printf.
6031 (tracepoint_look_up_symbols): Update all debugging printfs to use
6032 debug_printf instead of fprintf.
6033
e671835b
BS
60342014-01-20 Baruch Siach <baruch@tkos.co.il>
6035
6036 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6037 sys/ptrace.h.
6038
b5737fa9
PA
60392014-01-17 Pedro Alves <palves@redhat.com>
6040
ea38d2a9 6041 PR build/16445
c7faa97a
PA
6042 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6043 defined after including gdb_proc_service.h.
b5737fa9 6044
40ed484e
DE
60452014-01-16 Doug Evans <dje@google.com>
6046
6047 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6048 (match_dll): Use it.
6049
969c39fb
MM
60502014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6051
6052 * target.h (target_ops) <read_btrace>: Change parameters and
6053 return type to allow error reporting.
6054 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6055 trace reading errors on.
6056 * linux-low.c (linux_low_read_btrace): Pass trace reading
6057 errors on.
6058 (linux_low_disable_btrace): New.
6059
ab7f45ba
DE
60602014-01-15 Doug Evans <dje@google.com>
6061
6062 * inferiors.c (thread_id_to_gdb_id): Delete.
6063 * inferiors.h (thread_id_to_gdb_id): Delete.
6064
66af0f44
EZ
60652014-01-13 Eli Zaretskii <eliz@gnu.org>
6066
6067 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6068 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6069 versions.
6070
9939e131
PA
60712014-01-08 Pedro Alves <palves@redhat.com>
6072
6073 * server.c (handle_status): Don't discard previous queued stop
6074 replies or thread's pending status here.
6075 (main) <disconnection>: Do it here instead.
6076
b7ea362b
PA
60772014-01-08 Pedro Alves <palves@redhat.com>
6078
6079 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6080 * server.c (visit_actioned_threads, handle_pending_status): New
6081 function.
6082 (handle_v_cont): Factor out parts to ...
6083 (resume): ... this new function. If in all-stop, and a thread
6084 being resumed has a pending status, report it without actually
6085 resuming.
6086 (myresume): Adjust to use the new 'resume' function.
6087 (clear_pending_status_callback, set_pending_status_callback)
6088 (find_status_pending_thread_callback): New functions.
6089 (handle_status): Handle the case of multiple threads having
6090 interesting statuses to report. Report threads' real last signal
6091 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6092 with an interesting thread to report the status for, instead of
6093 always reporting the status of the first thread.
6094
28498c42
JB
60952014-01-01 Joel Brobecker <brobecker@adacore.com>
6096
6097 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6098 * gdbreplay.c (gdbreplay_version): Likewise.
6099
f45c82da
YZ
61002013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6101
6102 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6103 iov.iov_len with the real length in use.
6104
379a5e2d
JB
61052013-12-13 Joel Brobecker <brobecker@adacore.com>
6106
6107 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6108 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6109 for all targets that use win32-low.c.
6110 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6111 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6112
4210d83e
PA
61132013-12-13 Pedro Alves <palves@redhat.com>
6114
6115 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6116 if equal to TARGET_WAITKIND_LOADED.
6117 * win32-low.c (cached_status): New static global.
6118 (win32_wait): Add declaration.
6119 (do_initial_child_stuff): Flush all initial pending debug events
6120 up to the initial breakpoint.
6121 (win32_wait): If CACHED_STATUS was set, return that instead
6122 of doing a real wait. Remove the code resuming the execution
6123 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6124 during the initial phase. Also remove the code changing
6125 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6126 TARGET_WAITKIND_STOPPED.
6127
e7f0d979
YQ
61282013-12-11 Yao Qi <yao@codesourcery.com>
6129
6130 * notif.c (handle_notif_ack): Return 0 if no notification
6131 matches.
6132
ebcf782c
DE
61332013-11-20 Doug Evans <dje@google.com>
6134
6135 * linux-low.c (linux_set_resume_request): Fix comment.
6136
20ad9378
DE
61372013-11-20 Doug Evans <dje@google.com>
6138
6139 * linux-low.c (resume_status_pending_p): Tweak comment.
6140
a196ebeb
WT
61412013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6142
6143 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6144 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6145 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6146 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6147 (srv_amd64_regobj): Add amd64-mpx.o.
6148 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6149 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6150 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6151 * i387-fp.c (num_pl_bnd_register) Added constant.
6152 (num_pl_bnd_cfg_registers) Added constant.
6153 (struct i387_xsave) Added reserved area and MPX fields.
6154 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6155 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6156 function.
6157 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6158 (init_registers_amd64_mpx_linux): Declare new function.
6159 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6160 (x86_64_regmap): Add MPX registers.
6161 (x86_linux_read_description): Add MPX case.
6162 (initialize_low_arch): Initialize MPX targets.
6163
0080a2f6
TT
61642013-11-18 Tom Tromey <tromey@redhat.com>
6165
6166 * configure: Rebuild.
6167 * configure.ac: Don't check for stdlib.h.
6168 * gdbreplay.c: Unconditionally include stdlib.h.
6169
2978b111
TT
61702013-11-18 Tom Tromey <tromey@redhat.com>
6171
6172 * config.in: Rebuild.
6173 * configure: Rebuild.
6174 * configure.ac: Don't use AC_HEADER_DIRENT.
6175
a3d08894
TT
61762013-11-18 Tom Tromey <tromey@redhat.com>
6177
6178 * server.h: Don't check HAVE_STRING_H.
6179 * gdbreplay.c: Don't check HAVE_STRING_H.
6180 * configure: Rebuild.
6181
0a5dd17d
TT
61822013-11-18 Tom Tromey <tromey@redhat.com>
6183
6184 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6185 LIBGNU.
6186
1bd2f0ba
TT
61872013-11-08 Tom Tromey <tromey@redhat.com>
6188
6189 * configure, config.in: Rebuild.
6190 * configure.ac: Remove unused configury.
6191
3266f10b
TT
61922013-11-08 Tom Tromey <tromey@redhat.com>
6193
6194 * acinclude.m4: Include common.m4, codeset.m4.
6195 * configure, config.in: Rebuild.
6196 * configure.ac: Use GDB_AC_COMMON.
6197
6682d959
AA
61982013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6199
6200 * linux-s390-low.c (HWCAP_S390_TE): New define.
6201 (s390_arch_setup): Consider the TE field in the HWCAP for
6202 determining 'have_regset_tdb'.
6203
fd0a4d76
SDJ
62042013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6205
6206 PR gdb/16014
6207 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6208 call to sizeof.
6209
1a3d890b
PA
62102013-10-02 Pedro Alves <palves@redhat.com>
6211
6212 * server.c (process_serial_event): Don't output "GDBserver
6213 exiting" if GDB is connected through stdio.
6214 * target.c (mywait): Likewise, be silent if GDB is connected
6215 through stdio.
6216
97ad4581
JB
62172013-10-01 Joel Brobecker <brobecker@adacore.com>
6218
6219 * lynx-low.c (lynx_add_threads_after_attach): New function.
6220 (lynx_attach): Remove call to add_thread. Add call to
6221 lynx_add_threads_after_attach instead.
6222
5b4e221c
MF
62232013-09-28 Mike Frysinger <vapier@gentoo.org>
6224
6225 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6226 * config.in, configure: Regenerated.
6227
ee47b2f8
YQ
62282013-09-18 Yao Qi <yao@codesourcery.com>
6229
6230 PR server/15959
6231 * server.c (start_inferior): Clear 'resume_info'.
6232
d6707650 62332013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6234
d6707650
JW
6235 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6236 for each register.
6237
9243dd0e 62382013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6239
9243dd0e
JW
6240 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6241 linux-tile-low.o to srv_tgtobj.
6242
c623a6ef
WN
62432013-09-16 Will Newton <will.newton@linaro.org>
6244
6245 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6246 out regs.
6247
fb71d39e
PA
62482013-09-06 Pedro Alves <palves@redhat.com>
6249
6250 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6251 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6252 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6253 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6254 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6255 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6256
8e7e9910
PA
62572013-09-06 Pedro Alves <palves@redhat.com>
6258
6259 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6260 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6261
7c3a12ca
PA
62622013-09-06 Pedro Alves <palves@redhat.com>
6263
6264 * linux-amd64-ipa.c: Include tracepoint.h.
6265 * linux-i386-ipa.c: Include tracepoint.h.
6266
8eb3d7b6
RW
62672013-09-06 Ricard Wanderlof <ricardw@axis.com>
6268
6269 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6270 (ps_get_thread_area): New function.
6271
eddddb9d
RW
62722013-09-06 Ricard Wanderlof <ricardw@axis.com>
6273
6274 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6275 (initialize_low_arch): Call init_registers_crisv32 rather than
6276 init_register_crisv32.
6277
533b0600
PA
62782013-09-05 Pedro Alves <palves@redhat.com>
6279
6280 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6281 to ...
6282 * hostio.h: ... this new file.
6283 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6284 win32-low.c: Include hostio.h.
6285
0ce3d3b5
PA
62862013-09-05 Pedro Alves <palves@redhat.com>
6287
6288 * server.h (gdb_client_data, handler_func, callback_handler_func)
6289 (delete_file_handler, add_file_handler, append_callback_event)
6290 (delete_callback_event, start_event_loop, initialize_event_loop):
6291 Move to event-loop.h and include it.
6292 * event-loop.h: New file.
6293
799cdc37
PA
62942013-09-05 Pedro Alves <palves@redhat.com>
6295
6296 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6297 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6298 (loaded_dll, unloaded_dll): Move to ...
6299 * dll.h: ... this new file.
6300 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6301
6a6bbd9d
PA
63022013-09-05 Pedro Alves <palves@redhat.com>
6303
6304 * server.h (current_process, get_thread_process, all_processes)
6305 (add_inferior_to_list, for_each_inferior, current_inferior)
6306 (remove_inferior, add_process, remove_process, find_process_pid)
6307 (have_started_inferiors_p, have_attached_inferiors_p)
6308 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6309 (clear_inferiors, find_inferior, find_inferior_id)
6310 (inferior_target_data, set_inferior_target_data)
6311 (inferior_regcache_data, set_inferior_regcache_data): Move to
6312 inferiors.h, and include it.
6313 * inferiors.h: New file.
6314
f699aaba
PA
63152013-09-05 Pedro Alves <palves@redhat.com>
6316
6317 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6318 Move ...
72f4393d 6319 * ax.h: ... here.
f699aaba 6320
c144c7a0
PA
63212013-09-05 Pedro Alves <palves@redhat.com>
6322
6323 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6324 tracepoint.h.
6325 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6326 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6327 (handle_tracepoint_general_set, handle_tracepoint_query)
6328 (tracepoint_finished_step, tracepoint_was_hit)
6329 (release_while_stepping_state_list, current_traceframe)
6330 (in_readonly_region, traceframe_read_mem)
6331 (fetch_traceframe_registers, traceframe_read_sdata)
6332 (traceframe_read_info, struct fast_tpoint_collect_status)
6333 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6334 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6335 (supply_fast_tracepoint_registers)
6336 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6337 (ipa_tdesc, claim_trampoline_space)
6338 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6339 (agent_mem_read, agent_get_trace_state_variable_value)
6340 (agent_set_trace_state_variable_value, agent_tsv_read)
6341 (agent_mem_read_string, get_raw_reg_func_addr)
6342 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6343 * tracepoint.h: ... this new file.
6344
ff42e6ab
PA
63452013-09-05 Pedro Alves <palves@redhat.com>
6346
6347 * server.h (perror_with_name, error, fatal, warning, paddress)
6348 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6349 include it.
6350 * utils.h: New file.
6351
541af0f4
PA
63522013-09-05 Pedro Alves <palves@redhat.com>
6353
6354 * server.h (remote_debug, noack_mode, transport_is_reliable)
6355 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6356 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6357 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6358 (write_enn, initialize_async_io, enable_async_io)
6359 (disable_async_io, check_remote_input_interrupt_request)
6360 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6361 (dead_thread_notify, prepare_resume_reply)
6362 (decode_address_to_semicolon, decode_address, decode_m_packet)
6363 (decode_M_packet, decode_X_packet, decode_xfer_write)
6364 (decode_search_memory_packet, unhexify, hexify)
6365 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6366 (look_up_one_symbol, relocate_instruction)
6367 (monitor_output): Move to remote-utils.h, and include it.
6368 * remote-utils.h: New file.
6369
eebdf26b
PA
63702013-09-05 Pedro Alves <palves@redhat.com>
6371
6372 * server.h (_): Delete.
6373
3aafd2ff
PA
63742013-09-02 Pedro Alves <palves@redhat.com>
6375
6376 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6377 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6378 allocated.
6379 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6380
cee83bcb
PM
63812013-09-02 Pierre Muller <muller@sourceware.org>
6382
6383 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6384 or WriteProcessMemory complete successfully and handle
6385 ERROR_PARTIAL_COPY error.
6386
9a13b2fa
PA
63872013-09-02 Pedro Alves <palves@redhat.com>
6388
6389 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6390 error instead of EIO.
6391
602e3198
JK
63922013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6393
6394 PR server/15604
6395 * linux-low.c: Include filestuff.h.
6396 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6397 * lynx-low.c: Include filestuff.h.
6398 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6399 * server.c: Include filestuff.h.
6400 (main): Call notice_open_fds.
6401 * spu-low.c: Include filestuff.h.
6402 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6403
96d7229d
LM
64042013-08-22 Luis Machado <lgustavo@codesourcery.com>
6405
6406 * Makefile.in: Explain why ../target and ../nat are not
6407 listed as include file search paths.
6408 (linux-waitpid.o): New object file rule.
6409 * configure.srv (srv_native_linux_obj): New variable.
6410 Replace all occurrences of linux native object files with
6411 $srv_native_linux_obj.
6412 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6413 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6414 (linux_enable_event_reporting): Remove declaration.
6415 (my_waitpid): Moved to common/linux-waitpid.c.
6416 (linux_wait_for_event): Pass ptid when calling
6417 linux_enable_event_reporting.
6418 (linux_supports_tracefork_flag): Remove.
6419 (linux_enable_event_reporting): Likewise.
6420 (linux_tracefork_grandchild): Remove.
6421 (STACK_SIZE): Moved to common/linux-ptrace.c.
6422 (linux_tracefork_child): Remove.
6423 (linux_test_for_tracefork): Remove.
6424 (linux_look_up_symbols): Call linux_supports_traceclone.
6425 (initialize_low): Remove call to linux_test_for_tracefork.
6426 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6427 common/linux-ptrace.h.
6428 (PTRACE_TYPE_ARG4): Likewise.
6429 Include linux-ptrace.h.
6430
32940073
PA
64312013-08-21 Pedro Alves <palves@redhat.com>
6432
6433 * config.in: Renegerate.
6434
33b60d58 64352013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6436
33b60d58
LM
6437 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6438 (SFILES): Remove $(srcdir)/common/target-common.c and
6439 add $(srcdir)/target/waitstatus.c.
6440 (OBS): Remove target-common.o and add waitstatus.o.
6441 (server_h): Remove $(srcdir)/../common/target-common.h and
6442 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6443 and $(srcdir)/../target/waitstatus.h.
6444 (target-common.o): Remove.
6445 (waitstatus.o): New target object file.
6446 * target.h: Do not include target-common.h and
6447 include target/resume.h, target/wait.h and
6448 target/waitstatus.h.
6449
b8e1b30e
LM
64502013-08-13 Luis Machado <lgustavo@codesourcery.com>
6451
6452 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6453 to PTRACE_TYPE_ARG3.
6454 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6455 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6456 PTRACE_TYPE_ARG4.
6457 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6458 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6459
7a60ad40
YQ
64602013-07-27 Jie Zhang <jie@codesourcery.com>
6461 Daniel Jacobowitz <dan@codesourcery.com>
6462 Yao Qi <yao@codesourcery.com>
6463
6464 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6465 (mips-linux-watch.o): New rule.
6466 (mips_linux_watch_h): New variable.
6467 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6468 srv_tgtobj.
6469 * linux-mips-low.c: Include mips-linux-watch.h.
6470 (struct arch_process_info, struct arch_lwp_info): New.
6471 (update_watch_registers_callback): New function.
6472 (mips_linux_new_process, mips_linux_new_thread) New functions.
6473 (mips_linux_prepare_to_resume, mips_insert_point): New
6474 functions.
6475 (mips_remove_point, mips_stopped_by_watchpoint): New
6476 functions.
6477 (rsp_bp_type_to_target_hw_bp_type): New function.
6478 (mips_stopped_data_address): New function.
6479 (the_low_target): Add watchpoint support functions.
6480
de6f69ad
YQ
64812013-07-27 Yao Qi <yao@codesourcery.com>
6482
6483 * i386-low.c: Include break-common.h.
6484 (enum target_hw_bp_type): Remove.
6485
3360c0bf
LM
64862013-07-24 Luis Machado <lgustavo@codesourcery.com>
6487
6488 * Makefile.in (SFILES): /common/target-common.c.
6489 (OBS): Add target-common.o.
6490 (server_h): Add $(srcdir)/../common/target-common.h.
6491 (target-common.o): New target.
6492 * server.c (queue_stop_reply_callback): Free
6493 status string after use.
6494 * target.c (target_waitstatus_to_string): Remove.
6495 * target.h: Include target-common.h.
6496 (resume_kind): Likewise.
6497 (target_waitkind): Likewise.
6498 (target_waitstatus): Likewise.
6499 (TARGET_WNOHANG): Likewise.
6500
bd885420
YQ
65012013-07-04 Yao Qi <yao@codesourcery.com>
6502
6503 * Makefile.in (host_alias): Use @host_noncanonical@.
6504 (target_alias): Use @target_noncanonical@.
6505 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6506 ACX_NONCANONICAL_HOST.
6507 * configure: Regenerated.
6508
6509 Revert:
6510 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6511
6512 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6513 * configure: Rebuild.
6514 * Makefile.in (version_host, version_target): Get from configure.
6515 (version.c): Use $(version_host) and $(version_target).
6516
17ef446e
PA
65172013-07-03 Pedro Alves <palves@redhat.com>
6518
6519 * Makefile.in (config.status): Depend on development.sh.
6520 * acinclude.m4: Include libmcheck.m4.
6521 * configure: Regenerate.
6522
7a9a7487
MG
65232013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6524
6525 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6526 attribute inside the parentheses.
6527 (winapi_DebugSetProcessKillOnExit): Ditto.
6528 (winapi_DebugBreakProcess): Ditto.
6529 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6530
49b64de6
MG
65312013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6532
6533 * notif.h (notif_event): Add a dummy member to avoid compiler
6534 errors.
6535
d5749ee7
PA
65362013-07-01 Pedro Alves <palves@redhat.com>
6537
6538 * hostio.c (HOSTIO_PATH_MAX): Define.
6539 (require_filename, handle_open, handle_unlink, handle_readlink):
6540 Use it.
6541
d8d2a3ee
PA
65422013-07-01 Pedro Alves <palves@redhat.com>
6543
6544 * server.h: Include "pathmax.h".
6545 * linux-low.c: Don't include sys/param.h.
6546 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6547 MAXPATHLEN.
6548 * win32-low.c: Don't include sys/param.h.
6549 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6550
bc7dea8d
PA
65512013-07-01 Pedro Alves <palves@redhat.com>
6552
6553 * event-loop.c: Don't check HAVE_UNISTD_H before including
6554 <unistd.h>.
6555 * gdbreplay.c: Likewise.
6556 * remote-utils.c: Likewise.
6557 * server.c: Likewise.
6558 * configure.ac: Don't check for unistd.h.
6559 * configure: Regenerate.
6560
d6c2da54
TT
65612013-06-28 Tom Tromey <tromey@redhat.com>
6562
6563 * Makefile.in (version.c): Use version.in, not
6564 common/version.in.
6565
257b6bec
MG
65662013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6567
6568 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6569 * configure: Rebuild.
6570 * Makefile.in (version_host, version_target): Get from configure.
6571 (version.c): Use $(version_host) and $(version_target).
6572
86ebe149
DK
65732013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6574
6575 Fix trace-status to output user name without trailing colon.
6576 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6577
f30aa5af
DK
65782013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6579
6580 Fix trace-status to output proper start-time and stop-time.
6581 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6582 output start time and stop time in hex as gdb expects.
6583
28a93511
YQ
65842013-06-26 Pedro Alves <pedro@codesourcery.com>
6585
6586 * tracepoint.c (build_traceframe_info_xml): Output trace state
6587 variables present in the trace buffer.
6588
01208463
TT
65892013-06-24 Tom Tromey <tromey@redhat.com>
6590
6591 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6592 create-version.sh.
6593 (version.o): Remove.
6594 * gdbreplay.c: Include version.h.
6595 (version, host_name): Don't declare.
6596 * server.h: Include version.h.
6597 (version, host_name): Don't declare.
6598
760256f9
PA
65992013-06-12 Pedro Alves <palves@redhat.com>
6600
6601 * linux-x86-low.c (linux_is_elf64): Delete global.
6602 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6603 with local linux_pid_exe_is_elf_64_file use.
6604
030031ee
PA
66052013-06-11 Pedro Alves <palves@redhat.com>
6606
6607 * linux-low.c (regset_disabled, disable_regset): New functions.
6608 (regsets_fetch_inferior_registers)
6609 (regsets_store_inferior_registers): Use them.
6610 (initialize_regsets_info); Don't allocate the disabled_regsets
6611 array here.
6612 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6613 comment.
6614
5da6eb0a
PA
66152013-06-11 Pedro Alves <palves@redhat.com>
6616
6617 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6618 xmalloc.
6619
7e5aaa09
PA
66202013-06-11 Pedro Alves <palves@redhat.com>
6621
6622 * linux-x86-low.c (initialize_low_arch): Call
6623 init_registers_x32_avx_linux.
6624
d878444c
JK
66252013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6626
6627 Fix compatibility with Android Bionic.
6628 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6629 it is not empty.
6630
3aee8918
PA
66312013-06-07 Pedro Alves <palves@redhat.com>
6632
5f2b57b5 6633 PR server/14823
3aee8918
PA
6634 * Makefile.in (OBS): Add tdesc.o.
6635 (IPA_OBJS): Add tdesc-ipa.o.
6636 (tdesc-ipa.o): New rule.
6637 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6638 interface.
6639 * linux-low.c (new_inferior): Delete.
6640 (disabled_regsets, num_regsets): Delete.
6641 (linux_add_process): Adjust to set the new per-process
6642 new_inferior flag.
6643 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6644 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6645 was a stop. When calling arch_setup, switch the current inferior
6646 to the thread that got an event.
6647 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6648 (regsets_fetch_inferior_registers)
6649 (regsets_store_inferior_registers): New regsets_info parameter.
6650 Adjust to use it.
6651 (linux_register_in_regsets): New regs_info parameter. Adjust to
6652 use it.
6653 (register_addr, fetch_register, store_register): New usrregs_info
6654 parameter. Adjust to use it.
6655 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6656 parameter regs_info. Adjust to use it.
6657 (linux_fetch_registers): Get the current inferior's regs_info, and
6658 adjust to use it.
6659 (linux_store_registers): Ditto.
6660 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6661 (initialize_low): Don't initialize the target_regsets here. Call
6662 initialize_low_arch.
6663 * linux-low.h (target_regsets): Delete declaration.
6664 (struct regsets_info): New.
6665 (struct usrregs_info): New.
6666 (struct regs_info): New.
6667 (struct process_info_private) <new_inferior>: New field.
6668 (struct linux_target_ops): Delete the num_regs, regmap, and
6669 regset_bitmap fields. New field regs_info.
6670 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6671 * i387-fp.c (num_xmm_registers): Delete.
6672 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6673 calls to new interface.
6674 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6675 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6676 Infer the number of xmm registers from the regcache's target
6677 description.
6678 * i387-fp.h (num_xmm_registers): Delete.
6679 * inferiors.c (add_thread): Don't install the thread's regcache
6680 here.
6681 * proc-service.c (gregset_info): Fetch the current inferior's
6682 regs_info. Adjust to use it.
6683 * regcache.c: Include tdesc.h.
6684 (register_bytes, reg_defs, num_registers)
6685 (gdbserver_expedite_regs): Delete.
6686 (get_thread_regcache): If the thread doesn't have a regcache yet,
6687 create one, instead of aborting gdbserver.
6688 (regcache_invalidate_one): Rename to ...
6689 (regcache_invalidate_thread): ... this.
6690 (regcache_invalidate_one): New.
6691 (regcache_invalidate): Only invalidate registers of the current
6692 process.
6693 (init_register_cache): Add target_desc parameter, and use it.
6694 (new_register_cache): Ditto. Assert the target description has a
6695 non zero registers_size.
6696 (regcache_cpy): Add assertions. Adjust.
6697 (realloc_register_cache, set_register_cache): Delete.
6698 (registers_to_string, registers_from_string): Adjust.
6699 (find_register_by_name, find_regno, find_register_by_number)
6700 (register_cache_size): Add target_desc parameter, and use it.
6701 (free_register_cache_thread, free_register_cache_thread_one)
6702 (regcache_release, register_cache_size): New.
6703 (register_size): Add target_desc parameter, and use it.
6704 (register_data, supply_register, supply_register_zeroed)
6705 (supply_regblock, supply_register_by_name, collect_register)
6706 (collect_register_as_string, collect_register_by_name): Adjust.
6707 * regcache.h (struct target_desc): Forward declare.
6708 (struct regcache) <tdesc>: New field.
6709 (init_register_cache, new_register_cache): Add target_desc
6710 parameter.
6711 (regcache_invalidate_thread): Declare.
6712 (regcache_invalidate_one): Delete declaration.
6713 (regcache_release): Declare.
6714 (find_register_by_number, register_cache_size, register_size)
6715 (find_regno): Add target_desc parameter.
6716 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6717 declarations.
6718 * remote-utils.c: Include tdesc.h.
6719 (outreg, prepare_resume_reply): Adjust.
6720 * server.c: Include tdesc.h.
6721 (gdbserver_xmltarget): Delete declaration.
6722 (get_features_xml, process_serial_event): Adjust.
6723 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6724 declare.
6725 (struct process_info) <tdesc>: New field.
6726 (ipa_tdesc): Declare.
6727 * tdesc.c: New file.
6728 * tdesc.h: New file.
6729 * tracepoint.c: Include tdesc.h.
6730 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6731 (get_context_regcache): Adjust to pass ipa_tdesc down.
6732 (do_action_at_tracepoint): Adjust to get the register cache size
6733 from the context regcache's description.
6734 (traceframe_walk_blocks): Adjust to get the register cache size
6735 from the current trace frame's description.
6736 (traceframe_get_pc): Adjust to get current trace frame's
6737 description and pass it down.
6738 (gdb_collect): Adjust to get the register cache size from the
6739 IPA's description.
6740 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6741 (gdbserver_xmltarget): Delete.
6742 (initialize_low_tracepoint): Set the ipa's target description.
6743 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6744 (initialize_low_tracepoint): Set the ipa's target description.
6745 * linux-x86-low.c: Include tdesc.h.
6746 [__x86_64__] (is_64bit_tdesc): New.
6747 (ps_get_thread_area, x86_get_thread_area): Use it.
6748 (i386_cannot_store_register): Rename to ...
6749 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6750 (i386_cannot_fetch_register): Rename to ...
6751 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6752 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6753 to new interface.
6754 (target_regsets): Rename to ...
6755 (x86_regsets): ... this.
6756 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6757 interface.
6758 (x86_siginfo_fixup): Use is_64bit_tdesc.
6759 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6760 (tdesc_x32_avx_linux, tdesc_x32_linux)
6761 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6762 Declare.
6763 (x86_linux_update_xmltarget): Delete.
6764 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6765 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6766 (AMD64_LINUX_USER64_CS): New.
6767 (x86_linux_read_description): New, based on
6768 x86_linux_update_xmltarget.
6769 (same_process_callback): New.
6770 (x86_arch_setup_process_callback): New.
6771 (x86_linux_update_xmltarget): New.
6772 (x86_regsets_info): New.
6773 (amd64_linux_regs_info): New.
6774 (i386_linux_usrregs_info): New.
6775 (i386_linux_regs_info): New.
6776 (x86_linux_regs_info): New.
6777 (x86_arch_setup): Reimplement.
6778 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6779 (x86_emit_ops): Ditto.
6780 (the_low_target): Adjust. Install x86_linux_regs_info,
6781 x86_cannot_fetch_register, and x86_cannot_store_register.
6782 (initialize_low_arch): New.
6783 * linux-ia64-low.c (tdesc_ia64): Declare.
6784 (ia64_fetch_register): Adjust.
6785 (ia64_usrregs_info, regs_info): New globals.
6786 (ia64_regs_info): New function.
6787 (the_low_target): Adjust.
6788 (initialize_low_arch): New function.
6789 * linux-sparc-low.c (tdesc_sparc64): Declare.
6790 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6791 Adjust.
6792 (sparc_arch_setup): New function.
6793 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6794 (the_low_target): Adjust.
6795 (initialize_low_arch): New function.
6796 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6797 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6798 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6799 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6800 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6801 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6802 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6803 (tdesc_powerpc_isa205_vsx64l): Declare.
6804 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6805 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6806 (ppc_set_pc, ppc_get_hwcap): Adjust.
6807 (ppc_usrregs_info): Forward declare.
6808 (!__powerpc64__) ppc_regmap_adjusted: New global.
6809 (ppc_arch_setup): Adjust to the current process'es target
6810 description.
6811 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6812 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6813 (ppc_store_evrregset): Adjust.
6814 (target_regsets): Rename to ...
6815 (ppc_regsets): ... this, and make static.
6816 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6817 (ppc_regs_info): New function.
6818 (the_low_target): Adjust.
6819 (initialize_low_arch): New function.
6820 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6821 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6822 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6823 (tdesc_s390x_linux64v2): Declare.
6824 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6825 (s390_fill_gregset, s390_store_last_break): Adjust.
6826 (target_regsets): Rename to ...
6827 (s390_regsets): ... this, and make static.
6828 (s390_get_pc, s390_set_pc): Adjust.
6829 (s390_get_hwcap): New target_desc parameter, and use it.
6830 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6831 (s390_arch_setup): Adjust to set the current process'es target
6832 description. Don't adjust the regmap.
6833 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6834 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6835 (regs_info_3264): New globals.
6836 (s390_regs_info): New function.
6837 (the_low_target): Adjust.
6838 (initialize_low_arch): New function.
6839 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6840 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6841 [__mips64] (init_registers_mips_linux)
6842 (init_registers_mips_dsp_linux): Delete defines.
6843 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6844 (have_dsp): New global.
6845 (mips_read_description): New, based on mips_arch_setup.
6846 (mips_arch_setup): Reimplement.
6847 (get_usrregs_info): New function.
6848 (mips_cannot_fetch_register, mips_cannot_store_register)
6849 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6850 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6851 (target_regsets): Rename to ...
6852 (mips_regsets): ... this, and make static.
6853 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6854 (dsp_regs_info, regs_info): New globals.
6855 (mips_regs_info): New function.
6856 (the_low_target): Adjust.
6857 (initialize_low_arch): New function.
6858 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6859 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6860 Declare.
6861 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6862 (arm_read_description): New, with bits factored from
6863 arm_arch_setup.
6864 (arm_arch_setup): Reimplement.
6865 (target_regsets): Rename to ...
6866 (arm_regsets): ... this, and make static.
6867 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6868 (arm_regs_info): New function.
6869 (the_low_target): Adjust.
6870 (initialize_low_arch): New function.
6871 * linux-m68k-low.c (tdesc_m68k): Declare.
6872 (target_regsets): Rename to ...
6873 (m68k_regsets): ... this, and make static.
6874 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6875 (m68k_regs_info): New function.
6876 (m68k_arch_setup): New function.
6877 (the_low_target): Adjust.
6878 (initialize_low_arch): New function.
6879 * linux-sh-low.c (tdesc_sharch): Declare.
6880 (target_regsets): Rename to ...
6881 (sh_regsets): ... this, and make static.
6882 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6883 (sh_regs_info, sh_arch_setup): New functions.
6884 (the_low_target): Adjust.
6885 (initialize_low_arch): New function.
6886 * linux-bfin-low.c (tdesc_bfin): Declare.
6887 (bfin_arch_setup): New function.
6888 (bfin_usrregs_info, regs_info): New globals.
6889 (bfin_regs_info): New function.
6890 (the_low_target): Adjust.
6891 (initialize_low_arch): New function.
6892 * linux-cris-low.c (tdesc_cris): Declare.
6893 (cris_arch_setup): New function.
6894 (cris_usrregs_info, regs_info): New globals.
6895 (cris_regs_info): New function.
6896 (the_low_target): Adjust.
6897 (initialize_low_arch): New function.
6898 * linux-cris-low.c (tdesc_crisv32): Declare.
6899 (cris_arch_setup): New function.
6900 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6901 (cris_regs_info): New function.
6902 (the_low_target): Adjust.
6903 (initialize_low_arch): New function.
6904 * linux-m32r-low.c (tdesc_m32r): Declare.
6905 (m32r_arch_setup): New function.
6906 (m32r_usrregs_info, regs_info): New globals.
6907 (m32r_regs_info): Adjust.
6908 (initialize_low_arch): New function.
6909 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6910 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6911 (tic6x_usrregs_info): Forward declare.
6912 (tic6x_read_description): New function, based on ...
6913 (tic6x_arch_setup): ... this. Reimplement.
6914 (target_regsets): Rename to ...
6915 (tic6x_regsets): ... this, and make static.
6916 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6917 (tic6x_regs_info): New function.
6918 (the_low_target): Adjust.
6919 (initialize_low_arch): New function.
6920 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6921 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6922 (target_regsets): Rename to ...
6923 (xtensa_regsets): ... this, and make static.
6924 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6925 globals.
6926 (xtensa_arch_setup, xtensa_regs_info): New functions.
6927 (the_low_target): Adjust.
6928 (initialize_low_arch): New function.
6929 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6930 (nios2_arch_setup): Set the current process'es tdesc.
6931 (target_regsets): Rename to ...
6932 (nios2_regsets): ... this.
6933 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6934 (nios2_regs_info): New function.
6935 (the_low_target): Adjust.
6936 (initialize_low_arch): New function.
a261b8f5
PA
6937 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6938 (aarch64_arch_setup): Set the current process'es tdesc.
6939 (target_regsets): Rename to ...
6940 (aarch64_regsets): ... this.
6941 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6942 (aarch64_regs_info): New function.
6943 (the_low_target): Adjust.
6944 (initialize_low_arch): New function.
3aee8918
PA
6945 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6946 globals.
6947 (target_regsets): Rename to ...
6948 (tile_regsets): ... this.
6949 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6950 (tile_regs_info): New function.
6951 (tile_arch_setup): Set the current process'es tdesc.
6952 (the_low_target): Adjust.
6953 (initialize_low_arch): New function.
6954 * spu-low.c (tdesc_spu): Declare.
6955 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6956 * win32-arm-low.c (tdesc_arm): Declare.
6957 (arm_arch_setup): New function.
6958 (the_low_target): Install arm_arch_setup instead of
6959 init_registers_arm.
6960 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6961 (init_windows_x86): Rename to ...
6962 (i386_arch_setup): ... this. Set `win32_tdesc'.
6963 (the_low_target): Adjust.
6964 * win32-low.c (win32_tdesc): New global.
6965 (child_add_thread): Don't create the thread cache here.
6966 (do_initial_child_stuff): Set the new process'es tdesc.
6967 * win32-low.h (struct target_desc): Forward declare.
6968 (win32_tdesc): Declare.
6969 * lynx-i386-low.c (tdesc_i386): Declare global.
6970 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6971 * lynx-low.c (lynx_tdesc): New global.
6972 (lynx_add_process): Set the new process'es tdesc.
6973 * lynx-low.h (struct target_desc): Forward declare.
6974 (lynx_tdesc): Declare global.
6975 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6976 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6977 * nto-low.c (nto_tdesc): New global.
6978 (do_attach): Set the new process'es tdesc.
6979 * nto-low.h (struct target_desc): Forward declare.
6980 (nto_tdesc): Declare.
6981 * nto-x86-low.c (tdesc_i386): Declare.
6982 (nto_x86_arch_setup): Set `nto_tdesc'.
6983
b1fbec62
GB
69842013-06-04 Gary Benson <gbenson@redhat.com>
6985
6986 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6987 to qSupported response when appropriate.
6988 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6989 with nonzero-length annex.
6990 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6991 arguments supplied in annex.
6992
d1ec4ce7
DE
69932013-05-31 Doug Evans <dje@google.com>
6994
ac44adcb 6995 PR server/15594
d1ec4ce7
DE
6996 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6997 64 bits in 64-cross-32 environment.
6998
9b25f2d3
PA
69992013-05-28 Pedro Alves <palves@redhat.com>
7000
7001 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7002 (aarch64-without-fpu.c): Delete rule.
7003 * configure.srv (aarch64*-*-linux*): Remove references to
7004 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7005 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7006 declaration.
7007
6740dc9c
PA
70082013-05-24 Pedro Alves <palves@redhat.com>
7009
7010 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7011 instead of strchr/decode_address. Error if the range isn't split
7012 with a ','. Don't assume there's be a ':' in the action.
7013
c2d6af84
PA
70142013-05-23 Yao Qi <yao@codesourcery.com>
7015 Pedro Alves <palves@redhat.com>
7016
7017 * linux-low.c (lwp_in_step_range): New function.
7018 (linux_wait_1): If the thread was range stepping and stopped
7019 outside the stepping range, report the stop to GDB. Otherwise,
7020 continue stepping. Add range stepping debug output.
7021 (linux_set_resume_request): Copy the step range from the resume
7022 request to the lwp.
7023 (linux_supports_range_stepping): New.
7024 (linux_target_ops) <supports_range_stepping>: Set to
7025 linux_supports_range_stepping.
7026 * linux-low.h (struct linux_target_ops)
7027 <supports_range_stepping>: New field.
7028 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7029 * linux-x86-low.c (x86_supports_range_stepping): New.
7030 (the_low_target) <supports_range_stepping>: Set to
7031 x86_supports_range_stepping.
7032 * server.c (handle_v_cont): Handle 'r' action.
7033 (handle_v_requests): Append ";r" if the target supports range
7034 stepping.
7035 * target.h (struct thread_resume) <step_range_start,
7036 step_range_end>: New fields.
7037 (struct target_ops) <supports_range_stepping>:
7038 New field.
7039 (target_supports_range_stepping): New macro.
7040
58794e1a
JB
70412013-05-17 Joel Brobecker <brobecker@adacore.com>
7042
7043 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7044 confusion in comment.
7045
d631c5a7
JB
70462013-05-17 Joel Brobecker <brobecker@adacore.com>
7047
7048 * lynx-low.c (struct process_info_private): New type.
7049 (lynx_add_process): New function.
7050 (lynx_create_inferior, lynx_attach): Replace calls to
7051 add_process by calls to lynx_add_process.
7052 (lynx_resume): If PTID is null, then try using
7053 current_process()->private->last_wait_event_ptid.
7054 Add comments.
7055 (lynx_clear_inferiors): Delete. The contents of that function
7056 has been inlined in lynx_mourn;
7057 (lynx_wait_1): Save the ptid in the process's private data.
7058 (lynx_mourn): Free the process' private data. Replace call
7059 to lynx_clear_inferiors by call to clear_inferiors.
7060
96f7a20f
YQ
70612013-05-17 Yao Qi <yao@codesourcery.com>
7062
7063 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7064 the right place.
7065
db0dfaa0
LM
70662013-05-16 Luis Machado <lgustavo@codesourcery.com>
7067
7068 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7069 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7070 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7071 PT_TEXT_END_ADDR guards. Update comments.
7072 (linux_target_op) <read_offsets>: Conditionally define to
7073 linux_read_offsets if the target is UCLIBC and if it defines
7074 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7075
68f5f838
SL
70762013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7077 Andrew Jenner <andrew@codesourcery.com>
7078
7079 * Makefile.in (SFILES): Add linux-nios2-low.c.
7080 (clean): Add action to delete nios2-linux.c.
7081 (nios2-linux.c): New rule.
7082 * configure.srv: Add nios2*-*-linux*.
7083 * linux-nios2-low.c: New.
7084
1ebff1fd
HAQ
70852013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7086
7087 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7088
f6150862
HZ
70892013-04-25 Hui Zhu <hui@codesourcery.com>
7090
7091 PR gdb/15186
f6150862
HZ
7092 * ax.c (ax_printf): Add fflush.
7093
614c279d
TT
70942013-04-22 Tom Tromey <tromey@redhat.com>
7095
7096 * Makefile.in (SFILES): Add filestuff.c.
7097 (OBS): Add filestuff.o.
7098 (filestuff.o): New target.
7099 * config.in, configure: Rebuild.
7100 * configure.ac: Check for fdwalk, pipe2.
7101
7d4e5717
PA
71022013-04-17 Pedro Alves <palves@redhat.com>
7103
7104 * configure.ac (USE_THREAD_DB): Delete variable.
7105 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7106 Don't AC_SUBST USE_THREAD_DB.
7107 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7108 * config.in, configure: Regenerate.
7109
d5c93e41
PA
71102013-04-16 Pedro Alves <palves@redhat.com>
7111
7112 * linux-low.h (struct lwp_info) <thread_known>: Move under
7113 the USE_THREAD_DB #ifdef.
7114
04f5fe89
PA
71152013-04-16 Pedro Alves <palves@redhat.com>
7116
7117 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7118 (linux-low.o): Delete rule.
7119 * linux-low.h: Always include "gdb_thread_db.h" instead of
7120 conditionally including thread_db.h.
7121 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7122 HAVE_THREAD_DB_H.
7123
480b27bf
JK
71242013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7125
7126 * Makefile.in (install-only): Fix make install regression.
7127
43662968
JK
71282013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7129
7130 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7131 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7132 installation.
7133 * gdbserver.1: Remove.
7134
3e74e146
PA
71352013-03-22 Pedro Alves <palves@redhat.com>
7136
7137 * linux-low.c (handle_extended_wait): Don't call
7138 linux_enable_event_reporting.
7139
a8347a2a
TT
71402013-03-15 Tony Theodore <tonyt@logyst.com>
7141
7142 PR build/9098:
7143 * Makefile.in (SHELL): Use @SHELL@.
7144
eeb56fa7
SDJ
71452013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7146
7147 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7148 compiler warning.
7149
4fa7e2ff
JB
71502013-03-13 Joel Brobecker <brobecker@adacore.com>
7151
7152 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7153 Remove extraneous NULL element.
7154
8ddb1965
YQ
71552013-03-13 Yao Qi <yao@codesourcery.com>
7156
7157 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7158 'V' block in trace frame.
7159
9accd112
MM
71602013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7161
7162 * target.h (struct target_ops): Add btrace ops.
7163 (target_supports_btrace): New macro.
7164 (target_enable_btrace): New macro.
7165 (target_disable_btrace): New macro.
7166 (target_read_btrace): New macro.
7167 * gdbthread.h (struct thread_info): Add btrace field.
7168 * server.c: Include btrace-common.h.
7169 (handle_btrace_general_set): New function.
7170 (handle_btrace_enable): New function.
7171 (handle_btrace_disable): New function.
7172 (handle_general_set): Call handle_btrace_general_set.
7173 (handle_qxfer_btrace): New function.
7174 (struct qxfer qxfer_packets[]): Add btrace entry.
7175 * inferiors.c (remove_thread): Disable btrace.
7176 * linux-low: Include linux-btrace.h.
7177 (linux_low_enable_btrace): New function.
7178 (linux_low_read_btrace): New function.
7179 (linux_target_ops): Add btrace ops.
7180 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7181 Add srv_linux_btrace=yes.
7182 (x86_64-*-linux*): Add linux-btrace.o.
7183 Add srv_linux_btrace=yes.
7184 * configure.ac: Define HAVE_LINUX_BTRACE.
7185 * config.in: Regenerated.
7186 * configure: Regenerated.
7187
5cc22e4c
MM
71882013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7189
7190 * server.c (handle_qxfer): Preserve error message if -3 is
7191 returned.
7192 (qxfer): Document the -3 return value.
7193
7c97f91e
MM
71942013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7195
7196 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7197 (linux_btrace_h): New variable.
7198 (linux-btrace.o): New rule.
7199
be9a119c 72002013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7201 Hafiz Abid Qadeer <abidh@codesourcery.com>
7202
7203 * tracepoint.c (trace_buffer_size): New global.
7204 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7205 (init_trace_buffer): Change to one-argument function. Allocate
7206 trace buffer memory.
7207 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7208 handle QTBuffer:size packet.
7209 (cmd_bigqtbuffer_size): New function.
7210 (initialize_tracepoint): Call init_trace_buffer with
7211 DEFAULT_TRACE_BUFFER_SIZE.
7212 * server.c (handle_query): Add QTBuffer:size in the
7213 supported packets.
7214
e64f7499
YQ
72152013-03-07 Yao Qi <yao@codesourcery.com>
7216
7217 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7218 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7219 of -1.
7220 (cmd_qtsp): Adjust condition. Do post increment.
7221 Set cur_action and cur_step_action back to 0.
7222
f0ae6fc3
PA
72232013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7224
7225 PR server/15236
7226 * linux-low.c (linux_write_memory): Return early success if LEN is
7227 zero.
7228
b5b0b0af
CV
72292013-03-05 Corinna Vinschen <vinschen@redhat.de>
7230
334ad4a8 7231 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7232
589bc927
TT
72332013-02-28 Tom Tromey <tromey@redhat.com>
7234
7235 * configure.ac: Invoke AC_SYS_LARGEFILE.
7236 * configure, config.in: Rebuild.
7237
dfe07582
CV
72382013-02-28 Corinna Vinschen <vinschen@redhat.com>
7239
7240 * win32-low.c: Throughout, fix format strings and casts of
7241 printf-like functions to avoid type related warnings on all
7242 platforms.
7243 (get_child_debug_event): Print dwDebugEventCode as hex since
7244 that's how it's usually documented.
7245
736cd585
YQ
72462013-02-28 Yao Qi <yao@codesourcery.com>
7247
7248 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7249 pulongest.
7250
e1f58301
JW
72512013-02-27 Jiong Wang <jiwang@tilera.com>
7252
7253 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7254 (reg-tilegx32.c): New rule.
7255 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7256 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7257 different register info initializer according to elf class.
7258 (init_registers_tilgx32): New function. The tilegx32 register info
7259 initializer.
7260 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7261 (tile_store_gregset): Likewise.
7262
d171ca78
YQ
72632013-02-27 Yao Qi <yao@codesourcery.com>
7264
7265 * server.c (process_point_options): Print debug message when
7266 debug_threads is true.
7267
282bbdf3
YQ
72682013-02-26 Yao Qi <yao@codesourcery.com>
7269
7270 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7271
aca22551
PA
72722013-02-19 Pedro Alves <palves@redhat.com>
7273 Kai Tietz <ktietz@redhat.com>
7274
7275 PR gdb/15161
7276
7277 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7278 instead of strtoul to extract address from packet.
7279 (process_serial_event) <'z'>: Likewise.
7280
4f3cee1c
YQ
72812013-02-18 Yao Qi <yao@codesourcery.com>
7282
7283 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7284
8e1d55a3
PA
72852013-02-14 Pedro Alves <palves@redhat.com>
7286
7287 Plug memory leak.
7288
7289 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7290 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7291
458820da
PA
72922013-02-14 Pedro Alves <palves@redhat.com>
7293
7294 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7295
baea0dae
PA
72962013-02-14 Pedro Alves <palves@redhat.com>
7297
7298 * tracepoint.c (save_string): Delete.
7299 (add_tracepoint_action): Use savestring instead of save_string.
7300
0b1afbb3
PA
73012013-02-12 Pedro Alves <palves@redhat.com>
7302
7303 * linux-xtensa-low.c: Ditto.
7304 * xtensa-xtregs.c: Ditto.
7305
8a4ac37e
PA
73062013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7307
7308 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7309 thread_db.
7310
148de6bb
MS
73112013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7312
7313 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7314 aarch64_num_wp_regs and aarch64_num_bp_regs to
7315 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7316
55fac6e0
MS
73172013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7318
7319 * linux-aarch64-low.c (ps_get_thread_area): Replace
7320 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7321
176eb98c
MS
73222013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7323 Marcus Shawcroft <marcus.shawcroft@arm.com>
7324 Nigel Stephens <nigel.stephens@arm.com>
7325 Yufeng Zhang <yufeng.zhang@arm.com>
7326
7327 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7328 (aarch64.c, aarch64-without-fpu.c): New targets.
7329 * configure.srv (aarch64*-*-linux*): New.
7330 * linux-aarch64-low.c: New file.
7331
56f7af9c
MS
73322013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7333
43aaf8b6 7334 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7335 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7336 (dequeue_one_deferred_signal, linux_resume_one_thread)
7337 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7338 (linux_tracefork_grandchild, linux_test_for_tracefork)
7339 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7340 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7341 where the argument is 0.
7342
60f662b0
YQ
73432013-01-25 Yao Qi <yao@codesourcery.com>
7344
7345 * event-loop.c: Include "queue.h".
7346 (gdb_event_p): New typedef.
7347 (struct gdb_event) <next_event>: Remove.
7348 (event_queue): Change to QUEUE(gdb_event_p).
7349 (async_queue_event): Remove.
7350 (gdb_event_xfree): New.
7351 (initialize_event_loop): New.
7352 (process_event): Use API from QUEUE.
7353 (wait_for_event): Likewise.
7354 * server.c (main): Call initialize_event_loop.
7355 * server.h (initialize_event_loop): Declare.
7356
5ae4861a
YQ
73572013-01-18 Yao Qi <yao@codesourcery.com>
7358
7359 * ax.h (struct eval_agent_expr_context): New.
7360 (gdb_eval_agent_expr): Update declaration.
7361 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7362 TFRAME. Add new argument CTX.
7363 * server.h (struct eval_agent_expr_context): Declare.
7364 (agent_mem_read, agent_tsv_read): Update declaration.
7365 (agent_mem_read_string): Likewise.
7366 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7367 (add_traceframe_block): Add new argument TPOINT.
7368 Increase TPOINT->traceframe_usage.
7369 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7370 eval_tracepoint_agent_expr.
7371 (condition_true_at_tracepoint): Likewise.
7372 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7373 (agent_mem_read_string, agent_tsv_read): Likewise.
7374
85e00e85
YQ
73752013-01-16 Yao Qi <yao@codesourcery.com>
7376
7377 * linux-low.c (linux_resume_one_lwp): Don't check
7378 'lwp->bp_reinsert != 0'.
7379
4039cf45
JB
73802013-01-07 Joel Brobecker <brobecker@adacore.com>
7381 Pedro Alves <palves@redhat.com>
7382
7383 * lynx-low.c (ptrace_request_to_str): Define a temporary
7384 macro and use it to simplify this function's implementation.
7385
9044dee2
JB
73862013-01-07 Joel Brobecker <brobecker@adacore.com>
7387
7388 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7389 sets errno.
7390
e6352c8f
JB
73912013-01-07 Joel Brobecker <brobecker@adacore.com>
7392
7393 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7394
50681a27
JB
73952013-01-07 Joel Brobecker <brobecker@adacore.com>
7396
7397 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7398
3f6e77ef
JB
73992013-01-07 Joel Brobecker <brobecker@adacore.com>
7400
7401 * lynx-low.c (lynx_resume): Use the resume_info parameter
7402 to determine the ptid for the lynx_ptrace call, unless
7403 it is equal to minus_one_ptid, in which case we use the
7404 ptid of the current_inferior.
7405 (lynx_wait_1): After having received a thread create/exit
7406 event, resume the inferior's execution using the signaling
7407 thread's ptid, rather than the old ptid.
7408
7fda33ae
JB
74092013-01-07 Joel Brobecker <brobecker@adacore.com>
7410
7411 * lynx-low.c (lynx_resume): Delete variable ret.
7412
b9786c74
JB
74132013-01-01 Joel Brobecker <brobecker@adacore.com>
7414
7415 * gdbreplay.c (gdbreplay_version): Update copyright year.
7416 * server.c (gdbserver_version): Likewise.
7417
8b93d60f
JB
74182012-12-17 Joel Brobecker <brobecker@adacore.com>
7419
7420 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7421 new thread.
7422
037335a7
JB
74232012-12-17 Joel Brobecker <brobecker@adacore.com>
7424
7425 * lynx-low.c (ptrace_request_to_str): Add handling for
7426 PTRACE_GETTRACESIG.
7427
52d4cbd8
JB
74282012-12-17 Joel Brobecker <brobecker@adacore.com>
7429
7430 * lynx-low.c (lynx_attach): Delete variable new_process.
7431
ab8f6ca9
JB
74322012-12-17 Joel Brobecker <brobecker@adacore.com>
7433
7434 * lynx-low.c (lynx_create_inferior): Delete variable
7435 new_process.
7436
78cbc024
JB
74372012-12-17 Joel Brobecker <brobecker@adacore.com>
7438
7439 * lynx-low.c (ptrace_request_to_str): Do not handle
7440 PTRACE_GETTHREADLIST if this macro does not exist.
7441
14a00470
YQ
74422012-12-15 Yao Qi <yao@codesourcery.com>
7443
7444 * Makefile.in (OBS): Add notif.o.
7445 * notif.c, notif.h: New.
7446 * server.c: Include "notif.h".
7447 (struct vstop_notif) <next>: Remove.
7448 <base>: New field.
7449 (queue_stop_reply): Update.
7450 (push_event, send_next_stop_reply): Remove.
7451 (discard_queued_stop_replies): Update.
7452 (notif_stop): New variable.
7453 (handle_v_stopped): Remove.
7454 (handle_v_requests): Don't call handle_v_stopped. Call
7455 handle_ack_notif instead.
7456 (queue_stop_reply_callback): Call notif_event_enque instead
7457 of queue_stop_reply.
7458 (handle_status): Don't call send_next_stop_reply, call
7459 notif_write_event instead.
7460 (kill_inferior_callback): Likewise.
7461 (detach_or_kill_inferior_callback): Likewise.
7462 (main): Call initialize_notif.
7463 (process_serial_event): Call QUEUE_is_empty.
7464 (handle_target_event): Call notif_push instead of push event.
7465 * server.h (push_event): Remove declaration.
7466
61c125b9
TT
74672012-12-10 Tom Tromey <tromey@redhat.com>
7468
7469 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7470 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7471 macros.
7472 (.c.o): Rewrite.
7473 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7474 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7475 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7476 (amd64-linux-ipa.o, ax.o): Rewrite.
7477 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7478 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7479 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7480 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7481 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7482 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7483 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7484 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7485 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7486 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7487 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7488 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7489 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7490 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7491 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7492 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7493 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7494 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7495 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7496 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7497 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7498 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7499 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7500 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7501 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7502 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7503 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7504 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7505 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7506 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7507 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7508 (reg-tilegx.o): Remove.
7509 (all_object_files): New macro.
7510 Include .deps files.
7511 * aclocal.m4, configure: Rebuild.
7512 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7513 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7514 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7515
e90e9ad9
TT
75162012-12-05 Tom Tromey <tromey@redhat.com>
7517
7518 PR gdb/14917:
7519 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7520
02d403bf 75212012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7522
7523 * configure.ac: Check for linux/perf_event.h.
7524 * config.in: Regenerated.
7525 * configure: Regenerated.
7526
0270a750
PA
75272012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7528
7529 * hostio.c (handle_readlink): Decrease buffer size
7530 parameter passed to readlink by one byte.
7531
8c29b58e
YQ
75322012-11-26 Yao Qi <yao@codesourcery.com>
7533
7534 * configure.ac (build_warnings): Append '-Wempty-body'.
7535 * configure: Regenerated.
7536 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7537 body.
7538
8bdce1ff
PM
75392012-11-15 Pierre Muller <muller@sourceware.org>
7540
7541 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7542 * config.in: Regenerate.
7543 * configure: Regenerate.
7544 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7545 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7546 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7547 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7548 header.
7549 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7550 instead of <sys/wait.h> header.
7551 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7552
02d403bf 75532012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7554
7555 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7556 (various make rules): Remove -DGDBSERVER
7557
fbd5db48
YQ
75582012-11-09 Yao Qi <yao@codesourcery.com>
7559
7560 * spu-low.c (current_ptid): Move it to ..
7561 * gdbthread.h: ... here. New.
7562 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7563 * server.c (myresume, process_serial_event): Likewise.
7564 * thread-db.c (thread_db_find_new_threads): Likewise.
7565 * tracepoint.c (run_inferior_command): Likewise.
7566
b3dc46ff
AB
75672012-10-01 Andrew Burgess <aburgess@broadcom.com>
7568
7569 * server.c (handle_search_memory_1): Include access length in
7570 warning message.
7571
07c04788
HPN
75722012-09-05 Michael Brandt <michael.brandt@axis.com>
7573
7574 * linux-crisv32-low.c: Fix compile errors.
7575
918d227b
YQ
75762012-09-04 Yao Qi <yao@codesourcery.com>
7577
7578 * tracepoint.c (cmd_qtsv): Adjust debug message.
7579 Don't check CUR_TPOINT.
7580
18c1b81a
YQ
75812012-08-28 Yao Qi <yao@codesourcery.com>
7582
7583 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7584 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7585 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7586 Remove declarations of xmalloc, xreallloc, xstrdup and
7587 freeargv.
7588 * Makefile.in (libiberty_h): New.
7589 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7590 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7591
dc82f37b
YQ
75922012-08-23 Yao Qi <yao@codesourcery.com>
7593
7594 * server.h: Remove declaration of 'xsnprintf'.
7595
406b1477
KS
75962012-08-22 Keith Seitz <keiths@redhat.com>
7597
7598 * server.h: Include build-gnulib-gbserver/config.h.
7599 * gdbreplay.c: Likewise.
7600
e6712ff1
DE
76012012-08-08 Doug Evans <dje@google.com>
7602
7603 * Makefile.in (SFILES): Add gdb_vecs.c.
7604 (OBS): Add gdb_vecs.o.
7605 (gdb_vecs_h, host_defs_h): New variables.
7606 (thread-db.o): Add $(gdb_vecs_h) dependency.
7607 (gdb_vecs.o): New rule.
7608 * thread-db.c: #include "gdb_vecs.h".
7609 (thread_db_load_search): Use a vector to iterate over path elements.
7610 Handle text appearing after "$pdir".
7611
7612 * configure.ac: Add check for strstr.
7613 * config.in: Regenerate.
7614 * configure: Regenerate.
7615
7c3270ae
UW
76162012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7617
7618 * hostio.c (handle_pread): If pread fails, fall back to attempting
7619 lseek/read.
7620 (handle_pwrite): Likewise for pwrite.
7621
b62e2b27
UW
76222012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7623
7624 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7625 between unsupported TYPE and unimplementable ADDR/LEN combination.
7626 (arm_insert_point): Act on new return value.
7627
78a99e91
PA
76282012-07-31 Pedro Alves <palves@redhat.com>
7629
7630 * server.c (process_point_options): Only skip tokens if we find
7631 one that is unrecognized. Don't treat 'X' specially while
7632 skipping unrecognized tokens.
7633
fcf303ab
UW
76342012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7635
7636 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7637 to 4-byte-align HW breakpoint addresses for Thumb.
7638
7255706c
YQ
76392012-07-27 Yao Qi <yao@codesourcery.com>
7640
7641 PR remote/14161.
7642
7643 * server.h: Declare gdb_agent_about_to_close.
7644 * target.c (kill_inferior): Include "agent.h".
7645 New. Send command 'kill'.
7646 * target.h (kill_inferior): Removed macro.
7647 * tracepoint.c (gdb_agent_about_to_close): New.
7648 (gdb_agent_helper_thread): Handle command 'close'.
7649 Wait endlessly until the inferior stops.
7650 Install gdb_agent_remove_socket to atexit hook.
7651 (agent_socket_name): New static variable.
7652 (gdb_agent_socket_init): Replace local variable 'name' with
7653 'agent_socket_name'.
7654 (gdb_agent_remove_socket): New.
7655
5a3f286f
YQ
76562012-07-27 Yao Qi <yao@codesourcery.com>
7657
7658 * server.c (process_point_options): Stop at 'X' when parsing.
7659
961bd387
ME
76602012-07-19 Michael Eager <eager@eagercon.com>
7661
a261b8f5 7662 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7663 to hw_execute.
7664 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7665 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7666 hardware breakpoint.
7667
aa7c7447
JK
76682012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7669
7670 * gdbserver/linux-low.c (initialize_low): Call
7671 linux_ptrace_init_warnings.
7672
7f216e7c
DE
76732012-07-02 Doug Evans <dje@google.com>
7674
7675 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7676 pointer to int.
7677
d3ce09f5
SS
76782012-07-02 Stan Shebs <stan@codesourcery.com>
7679
7680 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7681 (ax.o): Add it to build rule.
7682 (ax-ipa.o): Ditto.
7683 (OBS): Add format.o.
7684 (IPA_OBS): Add format.o.
7685 * server.c (handle_query): Claim support for breakpoint commands.
7686 (process_point_options): Add command case.
7687 (process_serial_event): Leave running if there are printfs in
7688 effect.
7689 * mem-break.h (any_persistent_commands): Declare.
7690 (add_breakpoint_commands): Declare.
7691 (gdb_no_commands_at_breakpoint): Declare.
7692 (run_breakpoint_commands): Declare.
7693 * mem-break.c (struct point_command_list): New struct.
7694 (struct breakpoint): New field command_list.
7695 (any_persistent_commands): New function.
7696 (add_commands_to_breakpoint): New function.
7697 (add_breakpoint_commands): New function.
7698 (gdb_no_commands_at_breakpoint): New function.
7699 (run_breakpoint_commands): New function.
7700 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7701 locally.
7702 * ax.c: Include format.h.
7703 (ax_printf): New function.
7704 (gdb_eval_agent_expr): Add printf opcode.
7705
2f8f6aed
YQ
77062012-06-13 Yao Qi <yao@codesourcery.com>
7707
7708 * server.c (start_inferior): Remove duplicated writes to fields
7709 'last_resume_kind' and 'last_status' of 'current_inferior'.
7710
0c9070b3
YQ
77112012-06-12 Yao Qi <yao@codesourcery.com>
7712 Pedro Alves <palves@redhat.com>
7713
7714 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7715 comment.
7716 * server.c (handle_v_cont): Extend comment.
7717
c52daf70
YQ
77182012-06-11 Yao Qi <yao@codesourcery.com>
7719
7720 * linux-low.c (linux_attach): Add 'static'.
7721
d38bbb0a
YQ
77222012-06-06 Yao Qi <yao@codesourcery.com>
7723
7724 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7725
89dc0afd
JK
77262012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7727
7728 Fix gcc -flto compilation warning.
7729 * server.c (main): Make variable multi_mode and attach volatile.
7730
75f62ce7
TJB
77312012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7732
7733 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7734 if the platform doesn't know about it.
7735
65f479b6
PA
77362012-05-30 Jeff Kenton <jkenton@tilera.com>
7737
7738 * Makefile.in (SFILES): Add linux-tile-low.c.
7739 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7740 * configure.srv: Handle tilegx-*-linux*.
7741 * linux-tile-low.c: New file.
7742
0c5bf5a9
JK
77432012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7744
7745 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7746
a493e3e2
PA
77472012-05-24 Pedro Alves <palves@redhat.com>
7748
7749 PR gdb/7205
7750
43aaf8b6 7751 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7752
2ea28649
PA
77532012-05-24 Pedro Alves <palves@redhat.com>
7754
7755 PR gdb/7205
7756
7757 Replace target_signal with gdb_signal throughout.
7758
8d409d16
MR
77592012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7760
7761 * linux-low.c (linux_store_registers): Avoid the copying sequence
7762 when no data has been retrieved by ptrace.
7763
23512c01
MGD
77642012-05-22 Will Deacon <will.deacon@arm.com>
7765
7766 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7767 Include asm/ptrace.h.
7768 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7769 already defined.
7770
4934b29e
MR
77712012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7772
7773 * linux-low.c (linux_store_registers): Don't re-retrieve data
7774 with ptrace that has already been obtained from /proc. Always
7775 copy any data retrieved with ptrace to the buffer supplied.
7776
bde24c0a
PA
77772012-05-11 Yao Qi <yao@codesourcery.com>
7778 Pedro Alves <palves@redhat.com>
7779
7780 * linux-low.c (enum stopping_threads_kind): New.
7781 (stopping_threads): Change type to `enum stopping_threads_kind'.
7782 (handle_extended_wait): If stopping and suspending threads, leave
7783 the new_lwp suspended too.
7784 (linux_wait_for_event): Adjust.
7785 (stop_all_lwps): Set `stopping_threads' to
7786 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7787 whether we're suspending threads or just stopping them. Assert no
7788 recursion happens.
7789
623b6bdf
YQ
77902012-04-29 Yao Qi <yao@codesourcery.com>
7791
7792 * server.h: Move some code to ...
7793 * gdbthread.h: ... here. New.
7794 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7795 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7796 (nto-low.o, win32-low.o): Likewise.
7797 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7798 * regcache.c, remote-utils.c, server.c: Likewise.
7799 * target.c, tracepoint.c, win32-low.c: Likewise.
7800
f15f9948
TJB
78012012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7802
7803 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7804 (PTRACE_ARG4_TYPE): Likewise.
7805 (PTRACE_XFER_TYPE): Likewise.
7806 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7807 ptrace to PTRACE_ARG3_TYPE.
7808 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7809 (PTRACE_ARG4_TYPE): Likewise.
7810 (PTRACE_XFER_TYPE): Likewise.
7811 (linux_detach_one_lwp): Cast fourth argument of
7812 ptrace to long then PTRACE_ARG4_TYPE.
7813 (regsets_fetch_inferior_registers): Cast third argument of
7814 ptrace to long then PTRACE_ARG3_TYPE.
7815 (regsets_store_inferior_registers): Likewise.
7816
38ea300a
PA
78172012-04-20 Pedro Alves <palves@redhat.com>
7818
7819 * configure: Regenerate.
7820
c971b7fa
PA
78212012-04-19 Pedro Alves <palves@redhat.com>
7822
43aaf8b6 7823 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7824 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7825 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7826 (all, install-only, uninstall, clean-info, all-lib, clean): No
7827 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7828 (maintainer-clean realclean distclean): Use subdir_do.
7829 (subdir_do): New.
7830 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7831 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7832 * acinclude.m4: Include acx_configure_dir.m4.
7833 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7834 calls. Call AC_PROG_RANLIB. Configure gnulib using
7835 ACX_CONFIGURE_DIR.
7836 (GNULIB): New.
7837 (GNULIB_STDINT_H): Adjust.
7838 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7839 * gdbreplay.c: Include build-gnulib/config.h.
7840 * server.h: Likewise.
7841 * aclocal.m4: Regenerate.
7842 * config.in: Regenerate.
7843 * configure: Regenerate.
c971b7fa 7844
809277f8
PA
78452012-04-19 Pedro Alves <palves@redhat.com>
7846
7847 * Makefile.in (LIBGNU, INCGNU): Adjust.
7848 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7849 (all, install-only, uninstall, clean-info, all-lib, clean)
7850 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7851 * configure.ac: Adjust AC_OUTPUT output.
7852 * aclocal.m4: Regenerate.
7853 * configure: Regenerate.
7854
fd9bb8b8
PA
78552012-04-19 Pedro Alves <palves@redhat.com>
7856
7857 * Makefile.in (generated_files): New.
7858 (server_h): Remove the explicit dependency on config.h, and depend
7859 on $generated_files.
7860
1c298c66
PA
78612012-04-19 Pedro Alves <palves@redhat.com>
7862
7863 * Makefile.in (INCGNU): Add -Ignulib.
7864
57c4b50b
PA
78652012-04-19 Pedro Alves <palves@redhat.com>
7866
7867 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7868 (INCGNU): ... this, and spell out -I here.
7869 (GNULIB_LIB): Rename to ...
7870 (LIBGNU): ... this.
7871 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7872
1030e047
PA
78732012-04-19 Pedro Alves <palves@redhat.com>
7874
7875 * config.in: Regenerate.
7876
447d4319
PA
78772012-04-19 Pedro Alves <palves@redhat.com>
7878
7879 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7880 * server.h (memmem): Remove declaration.
7881 * config.in: Regenerate.
7882 * configure: Regenerate.
7883
aad9eab9
YQ
78842012-04-19 Yao Qi <yao@codesourcery.com>
7885
7886 * Makefile.in (SFILES): Add common/vec.c.
7887 (OBS): Add vec.o.
7888 (vec.o): New rule.
7889
3e10640f
YQ
78902012-04-19 Yao Qi <yao@codesourcery.com>
7891
7892 * remote-utils.c (prepare_resume_reply): Replace with macro
7893 target_core_of_thread.
7894 * server.c (handle_qxfer_threads_proper): Likewise.
7895 * target.h (traget_core_of_thread): New macro.
7896
71622373
PA
78972012-04-18 Pedro Alves <palves@redhat.com>
7898
7899 * aclocal.m4: Regenerate.
7900 * configure: Regenerate.
7901
80d26939
YQ
79022012-04-16 Yao Qi <yao@codesourcery.com>
7903
7904 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7905 duplicated on address.
7906
42476b70
YQ
79072012-04-16 Yao Qi <yao@codesourcery.com>
7908
7909 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7910 (struct tracepoint_action_ops) <send>: New field.
7911 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7912 (agent_expr_send, x_tracepoint_action_send): New.
7913 (l_tracepoint_action_send): New.
7914 (cmd_qtdp): Download and install tracepoint
7915 according to `use_agent'.
7916 (run_inferior_command): Add one more parameter `len'.
7917 Update callers.
7918 (tracepoint_send_agent): New.
7919 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7920
7bc83639
YQ
79212012-04-16 Yao Qi <yao@codesourcery.com>
7922
7923 * tracepoint.c (download_tracepoints): Moved to ...
7924 (cmd_qtstart): ... here.
7925
5f18041e
YQ
79262012-04-14 Yao Qi <yao@codesourcery.com>
7927
7928 * tracepoint.c: Include inttypes.h.
7929 (struct collect_memory_action): Use sized types.
7930 (struct tracepoint): Likewise.
7931 (cmd_qtdp, stop_tracing): Update print specifiers.
7932 (cmd_qtp, response_tracepoint): Likewise.
7933 (collect_data_at_tracepoint): Likewise.
7934 (collect_data_at_step): Likewise.
7935
55a8c076
YQ
79362012-04-14 Yao Qi <yao@codesourcery.com>
7937
7938 Import gnulib module inttypes.
7939 * aclocal.m4, config.in, configure: Regenerated.
7940
dc750257
YQ
79412012-04-14 Yao Qi <yao@codesourcery.com>
7942
7943 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7944 Makefile and config.status at last.
7945
0ab5faf9
YQ
79462012-04-13 Yao Qi <yao@codesourcery.com>
7947
7948 * tracepoint.c: Include stdint.h unconditionally.
7949
18f5fd81
TJB
79502012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7951
7952 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7953 on BFD_HAVE_SYS_PROCFS_TYPE.
7954 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7955 * configure: Regenerate.
7956 * config.in: Likewise.
7957
4d47af5c
L
79582012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7959
7960 * Makefile.in (clean): Also remove x32.c x32-linux.c
7961 x32-avx.c x32-avx-linux.c.
7962 (x32.o): New target.
7963 (x32.c): Likewise.
7964 (x32-linux.o): Likewise.
7965 (x32-linux.c): Likewise.
7966 (x32-avx.o): Likewise.
7967 (x32-avx.c): Likewise.
7968 (x32-avx-linux.o): Likewise.
7969 (x32-avx-linux.c): Likewise.
7970
7971 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7972 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7973 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7974 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7975 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7976 i386/x32-avx-linux.xml.
7977
7978 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7979 (init_registers_x32_avx_linux): Likwise.
7980 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7981 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7982
ecedbe58
PA
79832012-04-13 Pedro Alves <palves@redhat.com>
7984
7985 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7986 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7987 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7988 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7989 the sub-make.
7990
c92b5177
L
79912012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7992
7993 * linux-x86-low.c (compat_x32_clock_t): New.
7994 (compat_x32_siginfo_t): Likewise.
7995 (compat_x32_siginfo_from_siginfo): Likewise.
7996 (siginfo_from_compat_x32_siginfo): Likewise.
7997 (linux_is_elf64): Likewise.
7998 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7999 and siginfo_from_compat_x32_siginfo for x32.
8000 (x86_arch_setup): Set linux_is_elf64.
8001
214d508e
L
80022012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8003
8004 PR gdb/13969
8005 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8006 e_machine field.
8007 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8008 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8009 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8010 compatible with process.
8011
c9a1864a
YQ
80122012-04-12 Yao Qi <yao@codesourcery.com>
8013
8014 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8015 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8016 (install-only, install-info, clean): Handle sub dir gnulib.
8017 (all-lib, am--refresh): New targets.
8018 (memmem.o): Remove target.
8019 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8020 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8021 (AC_REPLACE_FUNCS): Remove memmem.
8022 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8023 (AC_OUTPUT): Generate Makefile in gnulib/.
8024 * aclocal.m4, config.in, configure: Regenerated.
8025
367ba2c2
MR
80262012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8027
8028 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8029
9d236627
PA
80302012-04-05 Pedro Alves <palves@redhat.com>
8031
8032 -Werror=strict-aliasing
8033
8034 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8035 pointer.
8036
111217b3
PA
80372012-04-04 Pedro Alves <palves@redhat.com>
8038
8039 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8040 (sparc_store_gregset_from_stack, sparc_store_gregset)
8041 (sparc_breakpoint_at): Fix formatting.
8042
8365dcf5
TJB
80432012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8044
8045 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8046 are available.
8047 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8048 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8049 * config.in: Regenerate.
8050 * configure: Likewise.
8051
689cc2ae
PA
80522012-03-29 Pedro Alves <palves@redhat.com>
8053
8054 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8055 Correct ptrace arguments.
8056
c14dfd32
PA
80572012-03-28 Pedro Alves <palves@redhat.com>
8058
8059 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8060 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8061 (IA64_FR1_REGNUM): New defines.
8062 (ia64_fetch_register): New.
8063 (the_low_target): Install it.
8064 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8065 field.
8066 * linux-low.c (linux_fetch_registers): Try the
8067 the_low_target.fetch_register hook first.
8068
8069 * linux-arm-low.c (the_low_target): Adjust.
8070 * linux-bfin-low.c (the_low_target): Adjust.
8071 * linux-cris-low.c (the_low_target): Adjust.
8072 * linux-crisv32-low.c (the_low_target): Adjust.
8073 * linux-m32r-low.c (the_low_target): Adjust.
8074 * linux-m68k-low.c (the_low_target): Adjust.
8075 * linux-mips-low.c (the_low_target): Adjust.
8076 * linux-ppc-low.c (the_low_target): Adjust.
8077 * linux-s390-low.c (the_low_target): Adjust.
8078 * linux-sh-low.c (the_low_target): Adjust.
8079 * linux-sparc-low.c (the_low_target): Adjust.
8080 * linux-tic6x-low.c (the_low_target): Adjust.
8081 * linux-x86-low.c (the_low_target): Adjust.
8082 * linux-xtensa-low.c (the_low_target): Adjust.
8083
63c88e13
PA
80842012-03-26 Pedro Alves <palves@redhat.com>
8085
8086 * server.c (handle_qxfer_libraries): Don't bail early if
8087 the_target->qxfer_libraries_svr4 is not NULL.
8088
fb723180
PA
80892012-03-26 Pedro Alves <palves@redhat.com>
8090
8091 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8092
0afae3cf
PA
80932012-03-23 Pedro Alves <palves@redhat.com>
8094
8095 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8096 "library-list-svr4" element's start tag when the the DSO list is
8097 empty.
8098
485f1ee4
PA
80992012-03-23 Pedro Alves <palves@redhat.com>
8100
8101 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8102 a variable whose type size is the same as the inferior's pointer
8103 size.
8104
a5362b9a
TS
81052012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8106
8107 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8108 struct siginfo.
8109 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8110 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8111 * linux-low.h: Include <signal.h>.
8112 (struct siginfo): Remove forward declaration.
8113 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8114 struct siginfo.
8115
d226c142
MF
81162012-03-21 Mike Frysinger <vapier@gentoo.org>
8117
8118 * .gitignore: Ignore more files.
8119
122f36ef
PA
81202012-03-19 Pedro Alves <palves@redhat.com>
8121 Jan Kratochvil <jan.kratochvil@redhat.com>
8122
8123 * server.c (cont_thread, general_thread): Add describing comments.
8124 (start_inferior): Clear `cont_thread'.
8125 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8126 of a process.
8127
fc3e5175
YQ
81282012-03-15 Yao Qi <yao@codesourcery.com>
8129
8130 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8131 handling to ...
8132 (cmd_qtdp): ... here.
8133
8d0d92cd
YQ
81342012-03-15 Yao Qi <yao@codesourcery.com>
8135
8136 * tracepoint.c (struct tracepoint_action_ops): New.
8137 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8138 (m_tracepoint_action_download): New.
8139 (r_tracepoint_action_download): New.
8140 (x_tracepoint_action_download): New.
8141 (l_tracepoint_action_download): New.
8142 (add_tracepoint_action): Install `action->ops' according type.
8143 (download_tracepoint_1): Move code `download' function pointer
8144 of various tracepoint_action_ops.
8145
87b0bb13
JK
81462012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8147
8148 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8149 linux_ptrace_attach_warnings.
8150
5f572dec
JK
81512012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8152
8153 * Makefile.in (linux-ptrace.o): New.
8154 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8155 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8156 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8157 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8158 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8159 of these targets.
8160 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8161
f4647387
YQ
81622012-03-08 Yao Qi <yao@codesourcery.com>
8163 Pedro Alves <palves@redhat.com>
8164
8165 Fix PR server/13392.
8166 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8167 offset of JMP insn.
8168 * tracepoint.c (remove_tracepoint): New.
8169 (cmd_qtdp): Call remove_tracepoint when failed to install.
8170
9b224c5e
PA
81712012-03-07 Pedro Alves <palves@redhat.com>
8172
8173 * linux-low.c (get_detach_signal): New.
8174 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8175 Pass on pending signals to PTRACE_DETACH. Check the result of the
8176 ptrace call.
8177 * server.c (program_signals, program_signals_p): New.
8178 (handle_general_set): Handle QProgramSignals.
8179 * server.h (program_signals, program_signals_p): Declare.
8180
e237a7e2
JK
81812012-03-05 Pedro Alves <palves@redhat.com>
8182 Jan Kratochvil <jan.kratochvil@redhat.com>
8183
8184 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8185 New comment why.
8186
5808517f
YQ
81872012-03-03 Yao Qi <yao@codesourcery.com>
8188
8189 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8190 agent_look_up_symbols.
8191
58b4daa5
YQ
81922012-03-03 Yao Qi <yao@codesourcery.com>
8193
8194 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8195 (linux-x86-low.o): Likewise.
8196 * server.h: Remove in_process_agent_loaded.
8197 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8198 common/agent.c.
8199 Update callers.
8200
8ffcbaaf
YQ
82012012-03-03 Yao Qi <yao@codesourcery.com>
8202
8203 * tracepoint.c (gdb_agent_capability): New global.
8204 (in_process_agent_loaded_ust): Renamed to
8205 `in_process_agent_supports_ust'.
8206 Update callers.
8207 (in_process_agent_supports_ust): Call agent_capability_check.
8208 (clear_installed_tracepoints): Assert that agent supports
8209 agent.
8210
d1feda86
YQ
82112012-03-03 Yao Qi <yao@codesourcery.com>
8212
8213 * linux-low.c (linux_supports_agent): New.
8214 (linux_target_ops): Initialize field `supports_agent' with
8215 linux_supports_agent.
8216 * target.h (struct target_ops) <supports_agent>: New.
8217 (target_supports_agent): New macro.
8218 * server.c (handle_general_set): Handle packet 'QAgent'.
8219 (handle_query): Send `QAgent+'.
8220 * Makefile.in (server.o): Depends on agent.h.
8221
2fa291ac
YQ
82222012-03-03 Yao Qi <yao@codesourcery.com>
8223
8224 * Makefile.in (OBS): Add agent.o.
8225 Add new rule for agent.o.
8226 Track dependence of tracepoint.c on agent.h.
8227 * tracepoint.c (run_inferior_command_1):
8228 (run_inferior_command): Call agent_run_command.
8229 (gdb_ust_connect_sync_socket): Deleted. Move it to
8230 common/agent.c.
8231 (resume_thread, stop_thread): Likewise.
8232 (gdb_ust_socket_init): Renamed to ...
8233 (gdb_agent_socket_init): ... New.
8234 (gdb_ust_thread): Renamed to ...
8235 (gdb_agent_helper_thread): ... New.
8236 (gdb_ust_init): Move some code to ...
8237 (gdb_agent_init): ... here. New.
8238 [HAVE_UST]: Call gdb_ust_init.
8239 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8240 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8241 * config.in, configure: Regenerated.
8242
05044653
PA
82432012-03-02 Pedro Alves <palves@redhat.com>
8244
8245 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8246 * linux-low.c (struct simple_pid_list): New.
8247 (stopped_pids): New a struct simple_pid_list pointer.
8248 (add_to_pid_list, pull_pid_from_list): New.
8249 (handle_extended_wait): Don't assume the first signal new children
8250 report is SIGSTOP. Adjust call to pull_pid_from_list.
8251 (linux_wait_for_lwp): Adjust.
8252
8d00225b
YQ
82532012-03-02 Yao Qi <yao@codesourcery.com>
8254
8255 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8256 debug log.
8257
19560ba5
YQ
82582012-03-02 Yao Qi <yao@codesourcery.com>
8259
8260 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8261 `stop_pc' and `tpoint'. Update caller.
8262
1faeff08
MR
82632012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8264
8265 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8266 * linux-low.c (use_linux_regsets): New macro.
8267 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8268 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8269 (linux_register_in_regsets): New function.
8270 (usr_fetch_inferior_registers): Skip registers covered by
8271 regsets.
8272 (usr_store_inferior_registers): Likewise.
8273 (usr_fetch_inferior_registers): New macro.
8274 (usr_store_inferior_registers): Likewise.
8275 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8276 (linux_store_registers): Likewise.
8277 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8278 prototype.
8279 (init_registers_mips64_dsp_linux): Likewise.
8280 (init_registers_mips_linux): New macro.
8281 (init_registers_mips_dsp_linux): Likewise.
8282 (mips_dsp_num_regs): Likewise.
8283 (DSP_BASE, DSP_CONTROL): New fallback macros.
8284 (mips_base_regs): New macro.
8285 (mips_regmap): Use it. Fix the size.
8286 (mips_dsp_regmap): New variable.
8287 (mips_dsp_regset_bitmap): Likewise.
8288 (mips_arch_setup): New function.
8289 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8290 than mips_regmap.
8291 (mips_cannot_store_register): Likewise.
8292 (the_low_target): Update .arch_setup, .num_regs and .regmap
8293 initializers. Add .regset_bitmap initializer.
8294 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8295 initializer.
8296 * linux-bfin-low.c (the_low_target): Likewise.
8297 * linux-cris-low.c (the_low_target): Likewise.
8298 * linux-crisv32-low.c (the_low_target): Likewise.
8299 * linux-ia64-low.c (the_low_target): Likewise.
8300 * linux-m32r-low.c (the_low_target): Likewise.
8301 * linux-m68k-low.c (the_low_target): Likewise.
8302 * linux-ppc-low.c (the_low_target): Likewise.
8303 * linux-s390-low.c (the_low_target): Likewise.
8304 * linux-sh-low.c (the_low_target): Likewise.
8305 * linux-sparc-low.c (the_low_target): Likewise.
8306 * linux-tic6x-low.c (the_low_target): Likewise.
8307 * linux-x86-low.c (the_low_target): Likewise.
8308 * linux-xtensa-low.c (the_low_target): Likewise.
8309 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8310 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8311 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8312 srv_xmlfiles.
8313 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8314 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8315
c03e6ccc
YQ
83162012-02-29 Yao Qi <yao@codesourcery.com>
8317 Pedro Alves <palves@redhat.com>
8318
8319 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8320 `step_over_finished' is true.
8321
644cebc9
PA
83222012-02-27 Pedro Alves <palves@redhat.com>
8323
8324 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8325 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8326
c14d7ab2
PA
83272012-02-27 Pedro Alves <palves@redhat.com>
8328
8329 PR server/9684
8330 * linux-low.c (pid_is_stopped): New.
8331 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8332
412c89dd
LM
83332012-02-25 Luis Machado <lgustavo@codesourcery.com>
8334
8335 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8336 of conditions.
8337
b745defe
MR
83382012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8339
8340 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8341
9f3a5c85
LM
83422012-02-24 Luis Machado <lgustavo@codesourcery>
8343
8344 * server.c (handle_query): Advertise support for target-side
8345 breakpoint condition evaluation.
8346 (process_point_options): New function.
8347 (process_serial_event): When inserting a breakpoint, check for
8348 a target-side condition that should be evaluated.
8349
8350 * mem-break.c: Include regcache.h and ax.h.
8351 (point_cond_list_t): New data structure.
8352 (breakpoint) <cond_list>: New field.
8353 (find_gdb_breakpoint_at): Make non-static.
8354 (delete_gdb_breakpoint_at): Clear any target-side
8355 conditions.
8356 (clear_gdb_breakpoint_conditions): New function.
8357 (add_condition_to_breakpoint): Likewise.
8358 (add_breakpoint_condition): Likewise.
8359 (gdb_condition_true_at_breakpoint): Likewise.
8360 (gdb_breakpoint_here): Return result directly instead
8361 of going through a local variable.
8362
8363 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8364 (clear_gdb_breakpoint_conditions): Likewise.
8365 (add_breakpoint_condition): Likewise.
8366 (gdb_condition_true_at_breakpoint): Likewise.
8367
8368 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8369 (need_step_over_p): Take target-side breakpoint condition into
8370 consideration.
8371
5e1dc496
LM
83722012-02-24 Luis Machado <lgustavo@codesourcery>
8373
8374 * server.h: Include tracepoint.h.
8375 (agent_mem_read, agent_get_trace_state_variable_value,
8376 agent_set_trace_state_variable_value,
8377 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8378 get_set_tsv_func_addr): New prototypes.
8379
8380 * ax.h: New include file.
8381 * ax.c: New source file.
8382
8383 * tracepoint.c: Include ax.h.
8384 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8385 agent_expr, eval_result_type): Move to ax.h.
8386 (parse_agent_expr): Rename to ...
8387 (gdb_parse_agent_expr): ... this, make it non-static and move
8388 to ax.h.
8389 (unparse_agent_expr) Rename to ...
8390 (gdb_unparse_agent_expr): ... this, make it non-static and move
8391 to ax.h.
8392 (eval_agent_expr): Rename to ...
8393 (eval_tracepoint_agent_expr): ... this.
8394 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8395 forward declarations.
8396 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8397 (agent_get_trace_state_variable_value): New function.
8398 (agent_set_trace_state_variable_value): New function.
8399 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8400 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8401 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8402 (condition_true_at_tracepoint): Likewise.
8403 (parse_agent_expr): Rename to ...
8404 (gdb_parse_agent_expr): ... this and move to ax.c.
8405 (unparse_agent_expr): Rename to ...
8406 (gdb_unparse_agent_expr): ... this and move to ax.c.
8407 (gdb_agent_op_name): Move to ax.c.
8408 (eval_agent_expr): Rename to ...
8409 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8410 and move to ax.c.
8411 (eval_tracepoint_agent_expr): New function.
8412 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8413 non-static.
5e1dc496
LM
8414 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8415 ax.c.
8416 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8417 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8418 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8419 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8420 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8421 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8422 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8423 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8424 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8425 (compile_bytecodes): Remove forward declaration.
8426 (is_goto_target): Move to ax.c.
8427 (compile_bytecodes): Move to ax.c and call
8428 agent_get_trace_state_variable_value (...) and
8429 agent_set_trace_state_variable_value (...).
8430
8431 * Makefile.in: Update ax.c and IPA dependencies.
8432
277e4e52
PA
84332012-02-24 Pedro Alves <palves@redhat.com>
8434
8435 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8436 (cmd_bigqtbuffer_circular): ... this. Only handle
8437 'QTBuffer:circular:'.
8438 (handle_tracepoint_general_set): Adjust.
8439
bf4c19f7
YQ
84402012-02-16 Yao Qi <yao@codesourcery.com>
8441
8442 * inferiors.c: Move code to ...
8443 * dll.c: .... here. New.
8444 * server.h: Declare clear_dlls.
8445 * Makefile.in (SFILES): Add dll.c.
8446 (OBS): Add dll.o
8447 (dll.o): New rule.
8448
d73f2619
YQ
84492012-02-11 Yao Qi <yao@codesourcery.com>
8450
8451 * server.c: (handle_monitor_command): Add a new parameter
8452 `own_buf'.
8453 (handle_query): Update caller.
8454
f8255c2a
JB
84552012-02-09 Joel Brobecker <brobecker@adacore.com>
8456
8457 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8458 * configure, config.in: Regenerate.
8459 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8460 is not defined.
8461
da84f473
PA
84622012-02-02 Pedro Alves <palves@redhat.com>
8463
8464 Try SIGKILL first, then PTRACE_KILL.
8465 * linux-low.c (linux_kill_one_lwp): New.
8466 (linux_kill_one_lwp): Rename to ...
8467 (kill_one_lwp_callback): ... this. Use the new
8468 linux_kill_one_lwp.
8469
e886a173
PA
84702012-02-02 Pedro Alves <palves@redhat.com>
8471
8472 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8473 inferior.
8474
be07f1a2
PA
84752012-01-27 Pedro Alves <palves@redhat.com>
8476
8477 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8478 (elf_64_file_p): Make static.
8479 (linux_pid_exe_is_elf_64_file): New.
8480 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8481 Delete declarations.
8482 (linux_pid_exe_is_elf_64_file): Declare.
8483 * linux-x86-low.c (x86_arch_setup): Use
8484 linux_pid_exe_is_elf_64_file.
8485
d8301ad1
JK
84862012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8487
8488 * linux-low.c (linux_wait_for_event_1): Rename to ...
8489 (linux_wait_for_event): ... here and merge it with former
8490 linux_wait_for_event - new variable wait_ptid, use it.
8491 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8492
01b17894
PA
84932012-01-23 Pedro Alves <palves@redhat.com>
8494
8495 * server.c (main): Avoid yet another case of infinite loop while
8496 detaching/killing after a longjmp.
8497
e825046f
JK
84982012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8499
8500 Code cleanup.
8501 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8502
b9e7b9c3
UW
85032012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8504
8505 * hostio.c (handle_readlink): New function.
8506 (handle_vFile): Call it to handle "vFile:readlink" packets.
8507
901f9912
UW
85082012-01-20 Pedro Alves <palves@redhat.com>
8509 Ulrich Weigand <ulrich.weigand@linaro.org>
8510
8511 * server.c (handle_v_requests): Only support vAttach and vRun to
8512 start multiple processes when in extended protocol mode.
8513
fc1ab1a0
PA
85142012-01-17 Pedro Alves <palves@redhat.com>
8515
8516 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8517 memalign plus mprotect to allocate the scratch buffer.
8518
7d5d4e98
PA
85192012-01-13 Pedro Alves <palves@redhat.com>
8520
8521 * server.c (attach_inferior): Clear `cont_thread'.
8522
f128d5e9
PA
85232012-01-13 Pedro Alves <palves@redhat.com>
8524
8525 * server.c (main): Avoid infinite loop while detaching/killing
8526 after a longjmp.
8527
06db92f0
DE
85282012-01-09 Doug Evans <dje@google.com>
8529
8530 * server.c (start_inferior): Set last_ptid in --wrapper case.
8531
32d92999
YQ
85322012-01-06 Yao Qi <yao@codesourcery.com>
8533
8534 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8535 defined.
8536 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8537
5e0a92a9
YQ
85382012-01-04 Yao Qi <yao@codesourcery.com>
8539
8540 * tracepoint.c (cmd_qtdp): Print debug message
8541 for static tracepoint.
8542
ae639e8c
YQ
85432012-01-04 Yao Qi <yao@codesourcery.com>
8544
8545 * tracepoint.c (trace_vdebug): Differentiate debug message
8546 between gdbserver and IPA.
8547
f72429c5
YQ
85482012-01-03 Yao Qi <yao@codesourcery.com>
8549
8550 * tracepoint.c (tracepoint_was_hit): Don't collect for
8551 static tracepoint.
8552
12c3e59c
JB
85532012-01-02 Joel Brobecker <brobecker@adacore.com>
8554
8555 * terminal.h: Reformat copyright header.
8556
67827812
JB
85572012-01-02 Joel Brobecker <brobecker@adacore.com>
8558
8559 * server.c (gdbserver_version): Update copyright year.
8560 * gdbreplay.c (gdbreplay_version): Likewise.
8561
3e52c33d
JK
85622011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8563
8564 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8565
8566 Revert:
8567 2011-12-18 Hui Zhu <teawater@gmail.com>
8568 * linux-low.c (linux_create_inferior): Save return value to ret.
8569
66f1260e
HZ
85702011-12-18 Hui Zhu <teawater@gmail.com>
8571
8572 * linux-low.c (linux_create_inferior): Save return value to ret.
8573
e77616d7
DE
85742011-12-16 Doug Evans <dje@google.com>
8575
e7b06c57
DE
8576 * linux-low.c (linux_create_inferior): If stdio connection,
8577 redirect stdin from /dev/null, stdout to stderr.
8578 * remote-utils.c (remote_is_stdio): New static global.
8579 (remote_connection_is_stdio): New function.
8580 (remote_prepare): Handle stdio connection.
8581 (remote_open): Ditto.
8582 (remote_close): Don't close stdin for stdio connections.
8583 (read_prim,write_prim): New functions. Replace all calls to
8584 read/write to these.
8585 * server.c (main): Watch for "-" argument. Move call to
8586 remote_prepare before start_inferior.
8587 * server.h (STDIO_CONNECTION_NAME): New macro.
8588 (remote_connection_is_stdio): Declare.
8589
e77616d7
DE
8590 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8591 in debugging output.
8592
82067193
YQ
85932011-12-15 Yao Qi <yao@codesourcery.com>
8594
8595 * tracepoint.c: Include sys/syscall.h.
8596 (gdb_ust_thread): Remove preprocessor conditional.
8597
82bfbe7e
PA
85982011-12-14 Pedro Alves <pedro@codesourcery.com>
8599
8600 * linux-low.c (linux_detach_one_lwp): Call
8601 the_low_target.prepare_to_resume before detaching.
8602
712c6575
YQ
86032011-12-14 Yao Qi <yao@codesourcery.com>
8604
8605 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8606 of write.
8607
d54d1edf
YQ
86082011-12-14 Yao Qi <yao@codesourcery.com>
8609
8610 * i386-low.c (i386_low_stopped_data_address): Initialize local
8611 variable `control'.
8612
6210a125
PA
86132011-12-13 Pedro Alves <pedro@codesourcery.com>
8614
8615 PR remote/13492
8616
8617 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8618 DR_CONTROL unless necessary. Extend comments.
8619 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8620 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8621
2ece8244
YQ
86222011-12-13 Yao Qi <yao@codesourcery.com>
8623
8624 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8625 macros.
8626 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8627
784867a5
JK
86282011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8629
8630 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8631 Print new debug message for such case.
8632
6bf36717
JK
86332011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8634
8635 Fix overlapping memcpy.
8636 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8637 the read_inferior_memory transfer.
8638 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8639 write_inferior_memory transfer.
8640 (set_fast_tracepoint_jump): New variable buf. Use it for the
8641 read_inferior_memory and write_inferior_memory transfers.
8642 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8643 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8644 Use it for the write_inferior_memory transfer.
8645 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8646 buffers.
8647
50275556
MR
86482011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8649
8650 * linux-low.c (fetch_register, store_register): Make code
8651 consistent, fix formatting.
8652
7325beb4
MR
86532011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8654
8655 * linux-low.c (usr_store_inferior_registers): Factor out code
8656 to handle individual registers into...
8657 (store_register): ... this new function.
8658
c642a434
UW
86592011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8660
8661 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8662 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8663 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8664 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8665 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8666 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8667 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8668 (srv_xmlfiles): Add new XML files.
8669
8670 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8671 and <sys/uio.h>.
8672 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8673 (init_registers_s390_linux32v1): Add prototype.
8674 (init_registers_s390_linux32v2): Likewise.
8675 (init_registers_s390_linux64v1): Likewise.
8676 (init_registers_s390_linux64v2): Likewise.
8677 (init_registers_s390x_linux64v1): Likewise.
8678 (init_registers_s390x_linux64v2): Likewise.
8679 (s390_num_regs): Increment to 52.
8680 (s390_regmap): Add orig_r2 register.
8681 (s390_num_regs_3264): Increment to 68.
8682 (s390_regmap_3264): Add orig_r2 register.
8683 (s390_collect_ptrace_register): Handle orig_r2 register.
8684 (s390_supply_ptrace_register): Likewise.
8685 (s390_fill_last_break): New function.
8686 (s390_store_last_break): Likewise.
8687 (s390_fill_system_call): New function.
8688 (s390_store_system_call): Likewise.
8689 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8690 register sets.
8691 (s390_check_regset): New function.
8692 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8693 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8694 Update target_regsets for available register sets.
8695
2268b414
JK
86962011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8697 Jan Kratochvil <jan.kratochvil@redhat.com>
8698
8699 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8700 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8701 New.
8702 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8703 * linux-low.h (struct process_info_private): New member r_debug.
8704 * server.c (handle_qxfer_libraries): Call
8705 the_target->qxfer_libraries_svr4.
8706 (handle_qxfer_libraries_svr4): New function.
8707 (qxfer_packets): New entry "libraries-svr4".
8708 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8709 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8710 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8711 PACKET_qXfer_libraries_svr4.
8712
d6db1fab
UW
87132011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8714
8715 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8716 PSW address/mask between 8-byte and 16-byte formats.
8717 (s390_supply_ptrace_register): Likewise.
8718 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8719 basic addressing mode bit.
8720
242f5f1c
SS
87212011-11-24 Stan Shebs <stan@codesourcery.com>
8722
8723 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8724
f196051f
SS
87252011-11-17 Stan Shebs <stan@codesourcery.com>
8726
8727 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8728 (tracing_start_time): New global.
8729 (tracing_stop_time): New global.
8730 (tracing_user_name): New global.
8731 (tracing_notes): New global.
8732 (tracing_stop_note): New global.
8733 (cmd_qtstart): Set traceframe_usage, start_time.
8734 (stop_tracing): Set stop_time.
8735 (cmd_qtstatus): Report additional status.
8736 (cmd_qtp): New function.
8737 (handle_tracepoint_query): Call it.
8738 (cmd_qtnotes): New function.
8739 (handle_tracepoint_general_set): Call it.
8740 (get_timestamp): Rename from tsv_get_timestamp.
8741
405f8e94
SS
87422011-11-14 Stan Shebs <stan@codesourcery.com>
8743 Kwok Cheung Yeung <kcy@codesourcery.com>
8744
8745 * linux-x86-low.c (small_jump_insn): New.
8746 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8747 trampoline and error message, build a trampoline and issue a small
8748 jump instruction to it.
8749 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8750 trampoline and error message.
8751 (x86_get_min_fast_tracepoint_insn_len): New.
8752 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8753 * linux-low.h (struct linux_target_ops): Add arguments to
8754 install_fast_tracepoint_jump_pad operation, add new operation.
8755 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8756 arguments.
8757 (linux_get_min_fast_tracepoint_insn_len): New function.
8758 (linux_target_op): Add new operation.
8759 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8760 (gdb_trampoline_buffer_end): Ditto.
8761 (gdb_trampoline_buffer_error): Ditto.
8762 (struct ipa_sym_addresses): Add fields for new IPA variables.
8763 (symbol_list): Add entries for new IPA variables.
8764 (struct tracepoint): Add fields to hold the address range of the
8765 trampoline used by the tracepoint.
8766 (trampoline_buffer_head): New static variable.
8767 (trampoline_buffer_tail): Ditto.
8768 (claim_trampoline_space): New function.
8769 (have_fast_tracepoint_trampoline_buffer): New function.
8770 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8771 structure.
8772 (install_fast_tracepoint): Ditto, also add error buffer argument.
8773 (cmd_qtminftpilen): New function.
8774 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8775 (fast_tracepoint_from_trampoline_address): New function.
8776 (fast_tracepoint_collecting): Handle trampoline as part of jump
8777 pad space.
8778 (set_trampoline_buffer_space): New function.
8779 (initialize_tracepoint): Initialize new IPA variables.
8780 * target.h (struct target_ops): Add arguments to
8781 install_fast_tracepoint_jump_pad operation, add new
8782 get_min_fast_tracepoint_insn_len operation.
8783 (target_get_min_fast_tracepoint_insn_len): New.
8784 (install_fast_tracepoint_jump_pad): Add arguments.
8785 * server.h (IPA_BUFSIZ): Define.
8786 * linux-i386-ipa.c: Include extra header files.
8787 (initialize_fast_tracepoint_trampoline_buffer): New function.
8788 (initialize_low_tracepoint): Call it.
8789 * server.h (set_trampoline_buffer_space): Declare.
8790 (claim_trampoline_space): Ditto.
8791 (have_fast_tracepoint_trampoline_buffer): Ditto.
8792
1e4d1764
YQ
87932011-11-14 Yao Qi <yao@codesourcery.com>
8794
8795 * server.c (handle_query): Handle InstallInTrace for qSupported.
8796 * tracepoint.c (add_tracepoint): Sort list.
8797 (install_tracepoint, download_tracepoint): New.
8798 (cmd_qtdp): Call them to install and download tracepoints.
8799 (sort_tracepoints): Removed.
8800 (cmd_qtstart): Update.
8801
5c73ff4e
YQ
88022011-11-14 Yao Qi <yao@codesourcery.com>
8803
8804 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8805 * mem-break.h: Declare.
8806 * tracepoint.c (cmd_qtstart): Move some code to ...
8807 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8808 New.
8809 (download_tracepoints): Move some code to ...
8810 (download_tracepoint_1): ... here. New.
8811
86a30030
YQ
88122011-11-08 Yao Qi <yao@codesourcery.com>
8813
8814 * remote-utils.c (relocate_instruction): A comment fix.
8815
8d26e50c
JB
88162011-11-07 Joel Brobecker <brobecker@adacore.com>
8817
8818 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8819 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8820 dr_status_mirror and dr_control_mirror from debug_reg_state.
8821 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8822 (i386_initial_stuff): Remove use of deleted globals.
8823 (i386_get_thread_context, i386_set_thread_context,
8824 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8825 from debug_reg_state.
8826
a59306a3
YQ
88272011-11-05 Yao Qi <yao@codesourcery.com>
8828
8829 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8830 address as TPOINT's.
8831
3065dfb6
SS
88322011-11-02 Stan Shebs <stan@codesourcery.com>
8833
8834 * tracepoint.c (agent_mem_read_string): New function.
8835 (eval_agent_expr): Call it for tracenz.
8836 * server.c (handle_query): Report support for tracenz.
8837
fd0d8c7c
YQ
88382011-11-02 Yao Qi <yao@codesourcery.com>
8839
8840 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8841
609086b1
YQ
88422011-11-02 Yao Qi <yao@codesourcery.com>
8843
8844 * target.h: Fix a typo in comment.
8845
b9fd1791
PA
88462011-10-31 Pedro Alves <pedro@codesourcery.com>
8847
8848 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8849 clobber the breakpoints' shadows with fast tracepoint jumps.
8850 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8851 * target.c (write_inferior_memory): Also pass MYADDR down to
8852 check_mem_write.
8853
03583c20
UW
88542011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8855
8856 * configure.ac: Check support for personality routine.
8857 * configure: Regenerate.
8858 * config.in: Likewise.
8859 * linux-low.c: Include <sys/personality.h>.
8860 Define ADDR_NO_RANDOMIZE if necessary.
8861 (linux_create_inferior): Disable address space randomization when
8862 forking inferior, if requested.
8863 (linux_supports_disable_randomization): New function.
8864 (linux_target_ops): Install it.
8865 * server.h (disable_randomization): Declare.
8866 * server.c (disable_randomization): New global variable.
8867 (handle_general_set): Handle QDisableRandomization.
8868 (handle_query): Likewise for qSupported.
8869 (main): Support --disable-randomization and --no-disable-randomization
8870 command line arguments.
8871 * target.h (struct target_ops): Add supports_disable_randomization.
8872 (target_supports_disable_randomization): New macro.
8873
723b724b
MF
88742011-09-29 Mike Frysinger <vapier@gentoo.org>
8875
8876 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8877 ifdef check.
8878 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8879 [!PT_GETDSBT] (target_loadmap): New definition.
8880 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8881 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8882 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8883 and PT_GETDSBT to LINUX_LOADMAP.
8884 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8885 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8886
55329a5c 88872011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8888
8889 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8890 (arm_linux_hwbp_cap): New static variable.
8891 (arm_linux_get_hwbp_cap): Replace by ...
8892 (arm_linux_init_hwbp_cap): ... this new function.
8893 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8894 (arm_linux_get_hw_watchpoint_count): Likewise.
8895 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8896 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8897 (arm_prepare_to_resume): Use perror_with_name instead of error.
8898
55329a5c 88992011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8900
8901 * linux-arm-low.c: Include <signal.h>.
8902 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8903 (struct arm_linux_hwbp_cap): New data type.
8904 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8905 (struct arm_linux_hw_breakpoint): New data type.
8906 (MAX_BPTS, MAX_WPTS): Define.
8907 (struct arch_process_info, struct arch_lwp_info): New data types.
8908 (arm_linux_get_hwbp_cap): New function.
8909 (arm_linux_get_hw_breakpoint_count): Likewise.
8910 (arm_linux_get_hw_watchpoint_count): Likewise.
8911 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8912 (arm_hwbp_control_initialize): Likewise.
8913 (arm_hwbp_control_is_enabled): Likewise.
8914 (arm_hwbp_control_is_initialized): Likewise.
8915 (arm_hwbp_control_disable): Likewise.
8916 (arm_linux_hw_breakpoint_equal): Likewise.
8917 (arm_linux_hw_point_initialize): Likewise.
8918 (struct update_registers_data): New data structure.
8919 (update_registers_callback: New function.
8920 (arm_insert_point): Likewise.
8921 (arm_remove_point): Likewise.
8922 (arm_stopped_by_watchpoint): Likewise.
8923 (arm_stopped_data_address): Likewise.
8924 (arm_new_process): Likewise.
8925 (arm_new_thread): Likewise.
8926 (arm_prepare_to_resume): Likewise.
8927 (the_low_target): Register arm_insert_point, arm_remove_point,
8928 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8929 arm_new_thread, and arm_prepare_to_resume.
8930
6b9801d4
SS
89312011-09-15 Stan Shebs <stan@codesourcery.com>
8932
8933 * server.h (struct emit_ops): Add compare-goto fields.
8934 * tracepoint.c (gdb_agent_op_sizes): New table.
8935 (emit_eq_goto): New function.
8936 (emit_ne_goto): New function.
8937 (emit_lt_goto): New function.
8938 (emit_le_goto): New function.
8939 (emit_gt_goto): New function.
8940 (emit_ge_goto): New function.
8941 (is_goto_target): New function.
8942 (compile_bytecodes): Recognize special cases of compare-goto
8943 combinations and call specialized emitters for them.
8944 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8945 (amd64_emit_ne_goto): New function.
8946 (amd64_emit_lt_goto): New function.
8947 (amd64_emit_le_goto): New function.
8948 (amd64_emit_gt_goto): New function.
8949 (amd64_emit_ge_goto): New function.
8950 (amd64_emit_ops): Add the new functions.
8951 (i386_emit_eq_goto): New function.
8952 (i386_emit_ne_goto): New function.
8953 (i386_emit_lt_goto): New function.
8954 (i386_emit_le_goto): New function.
8955 (i386_emit_gt_goto): New function.
8956 (i386_emit_ge_goto): New function.
8957 (i386_emit_ops): Add the new functions.
8958
bf15cbda
SS
89592011-09-08 Stan Shebs <stan@codesourcery.com>
8960
8961 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8962 (i386_emit_epilogue): Restore %ebx.
8963
943ca1dd
JZ
89642011-08-31 Jie Zhang <jzhang918@gmail.com>
8965
8966 * server.c (step_thread): Remove definition.
8967 (process_serial_event): Don't handle Hs.
8968 * server.h (step_thread): Remove declaration.
8969 * target.c (set_desired_inferior): Remove use of step_thread.
8970
e3deef73
LM
89712011-08-24 Luis Machado <lgustavo@codesourcery.com>
8972
8973 * linux-low.c: Include linux-procfs.h.
8974 (linux_attach_lwp_1): Update comments.
8975 (linux_attach): Scan for existing threads when attaching to a
8976 process that is the tgid.
8977 * Makefile.in: Update dependencies.
8978
13da1c97
LM
89792011-08-24 Luis Machado <lgustavo@codesourcery.com>
8980
8981 * configure.srv: Add linux-procfs.o dependencies.
8982
881127c9
YQ
89832011-08-14 Yao Qi <yao@codesourcery.com>
8984
8985 * target.h (struct target_ops): Fix indent.
8986 * win32-low.c (win32_target_ops): Fix comment.
8987
58dbd541
YQ
89882011-08-14 Andrew Jenner <andrew@codesourcery.com>
8989 Yao Qi <yao@codesourcery.com>
8990
8991 * Makefile.in (clean): Remove tic6x-*.c files.
8992 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8993 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8994 (tic6x-c64xp-linux.c): Likewise.
8995 * configure.srv: Add support for tic6x-*-uclinux.
8996 * linux-tic6x-low.c: New.
8997 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8998
78d85199
YQ
89992011-08-14 Andrew Stubbs <ams@codesourcery.com>
9000 Yao Qi <yao@codesourcery.com>
9001
9002 * target.h (struct target_ops): Add read_loadmap.
9003 * linux-low.c (struct target_loadseg): New type.
9004 (struct target_loadmap): New type.
9005 (linux_read_loadmap): New function.
9006 (linux_target_ops): Add linux_read_loadmap.
9007 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9008 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9009 to NULL.
78d85199 9010
a959a88d
EZ
90112011-08-05 Eli Zaretskii <eliz@gnu.org>
9012
9013 * win32-low.c: Include <stdint.h>.
9014
1ced966e
PA
90152011-07-22 Pedro Alves <pedro@codesourcery.com>
9016
9017 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9018 to the inferior here.
9019 (i386_remove_aligned_watchpoint): Ditto.
9020 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9021 fit part of the watchpoint in the debug registers.
9022 (i386_update_inferior_debug_regs): New.
9023 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9024 registers, and only update the inferior on success.
9025 (i386_low_remove_watchpoint): Ditto.
9026
d26e3629
KY
90272011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9028
9029 * linux-low.c (compare_ints, unique, list_threads, show_process,
9030 linux_core_of_thread): Delete.
9031 (linux_target_ops): Change linux_core_of_thread to
9032 linux_common_core_of_thread.
9033 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9034 * utils.c (malloc_failure): Change type of argument.
9035 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9036 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9037 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9038 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9039 (IPA_OBJS): Add common-utils-ipa.o.
9040 (ptid_h, linux_osdata_h): New macros.
9041 (server_h): Add common/common-utils.h, common/xml-utils.h,
9042 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9043 common/ptid.h.
9044 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9045 ptid.o, buffer.o): New rules.
9046 (linux-low.o): Add common/linux-osdata.h as a dependency.
9047 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9048 * configure.ac: Add AC_HEADER_DIRENT check.
9049 * config.in: Regenerate.
9050 * configure: Regenerate.
9051 * remote-utils.c (xml_escape_text): Delete.
9052 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9053 buffer_xml_printf): Move to common/buffer.c.
9054 * server.c (main): Remove call to initialize_inferiors.
9055 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9056 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9057 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9058 internal_error, gdb_assert, gdb_assert_fail): Delete.
9059 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9060 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9061 common/buffer.h.
9062 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9063 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9064 initialize_inferiors): Delete.
9065
2275a1a7
PA
90662011-07-20 Pedro Alves <pedro@codesourcery.com>
9067
9068 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9069 symbol error.
9070
0a5b1e09
PA
90712011-05-31 Pedro Alves <pedro@codesourcery.com>
9072
9073 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9074 assertion.
9075 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9076
6938fd34
YQ
90772011-05-26 Yao Qi <yao@codesourcery.com>
9078
9079 * Makefile.in (thread-db.o): Track dependence to
9080 common/gdb_thread_db.h.
9081 * thread-db.c: include gdb_thread_db.h from right place.
9082
b481f9e0
TT
90832011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9084
9085 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9086 __FILE__ and __LINE__ to internal_error.
9087
98a5dd13
DE
90882011-05-13 Doug Evans <dje@google.com>
9089
9090 * thread-db.c (try_thread_db_load_from_sdir): New function.
9091 (try_thread_db_load_from_dir): New function.
9092 (thread_db_load_search): Handle $sdir, ignore $pdir.
9093 Remove trying of system directories if search of
9094 libthread-db-search-path fails, that is now done via $sdir.
9095
d248b706
KY
90962011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9097
9098 * server.c (handle_query): Add EnableDisableTracepoints to the list
9099 of supported features.
43aaf8b6 9100 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9101 tracepoints.
43aaf8b6
PA
9102 (cmd_qtenable_disable): New.
9103 (cmd_qtstart): Install tracepoints even if disabled.
9104 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9105 receiving a QTEnable or QTDisable packet.
9106 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9107 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9108 tracepoints.
9109 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9110
84e578fb
DE
91112011-05-10 Doug Evans <dje@google.com>
9112
9113 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9114
71f55dd8
DE
91152011-05-04 Doug Evans <dje@google.com>
9116
9117 * linux-low.c (linux_join): Skip process lookup.
9118 * spu-low.c (spu_join): Ditto.
9119 * server.c (join_inferiors_callback): Delete.
9120 (process_serial_event): For 'D' packet (detach) call join_inferior
9121 directly.
9122
4d393d60
JM
91232011-05-04 Joseph Myers <joseph@codesourcery.com>
9124
9125 * README: Don't mention xscale*-*-linux*.
9126 * configure.srv (xscale*-*-linux*): Don't handle target.
9127
b00ad6ff
NF
91282011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9129
9130 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9131 casting pointers.
9132 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9133 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9134 (i386_emit_void_call_2): Likewise.
9135
af96c192
YQ
91362011-04-26 Yao Qi <yao@codesourcery.com>
9137
43aaf8b6
PA
9138 * linux-low.c: Move common macros to linux-ptrace.h.
9139 Include linux-ptrace.h.
af96c192
YQ
9140 * Makefile.in (linux_ptrace_h): New.
9141 (linux-low.o): Depends on linux-ptrace.h.
9142
03f2bd59
JK
91432011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9144
9145 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9146 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9147 (remote_prepare): New function with most of the TCP code from ...
9148 (remote_open): ... here. Detect PORT here unconditionally. Move also
9149 setting transport_is_reliable.
9150 * server.c (run_once): New variable.
9151 (gdbserver_usage): Document it.
9152 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9153 the first run if RUN_ONCE.
9154 * server.h (run_once, remote_prepare): New declarations.
9155
7a9dd1b2
TT
91562011-04-19 Tom Tromey <tromey@redhat.com>
9157
9158 * win32-low.c (handle_load_dll): Remove duplicate "the".
9159
81239425
PM
91602011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9161
9162 Remove support for old Cygwin 1.5 versions.
9163 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9164 function to avoid warning.
9165 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9166 warning.
9167
9e0627f1
PM
91682011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9169
9170 * gdbserver/server.h (Macro _): Define it if not available.
9171
588eebee
MS
91722011-03-14 Michael Snyder <msnyder@vmware.com>
9173
348af9f7 9174 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9175
43f70d4c
JB
91762011-03-10 Joel Brobecker <brobecker@adacore.com>
9177
9178 * Makefile.in (maintainer-clean realclean distclean): Remove
9179 "make ... subdir_do" command.
9180
348af9f7
MS
91812011-03-10 Michael Snyder <msnyder@vmware.com>
9182
9183 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9184
9185 * server.c (handle_v_run): Free alloced buffer on early return.
9186
e637a4f5
YQ
91872011-03-09 Yao Qi <yao@codesourcery.com>
9188
9189 Revert:
9190 2011-03-04 Yao Qi <yao@codesourcery.com>
9191
9192 * Makefile.in: Remove GNU make feature --directory.
9193
9194 2011-03-05 Yao Qi <yao@codesourcery.com>
9195
9196 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9197 (subdir_do): New make target. Copied from gdb/Makefile.
9198 (maintainer-clean, realclean, distclean, clean): Call corresponding
9199 make targets in common/Makefile.
9200
9201 2011-02-11 Yao Qi <yao@codesourcery.com>
9202
9203 * configure.ac: Call AC_PROG_RANLIB.
9204 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9205 * configure: Regenerate.
9206
e6edda56
JK
92072011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9208
9209 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9210
e5141119
JB
92112011-03-06 Yao Qi <yao@codesourcery.com>
9212
9213 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9214
64794aa4
JB
92152011-03-05 Yao Qi <yao@codesourcery.com>
9216
9217 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9218 (subdir_do): New make target. Copied from gdb/Makefile.
9219 (maintainer-clean, realclean, distclean, clean): Call corresponding
9220 make targets in common/Makefile.
9221
7a762829
YQ
92222011-03-04 Yao Qi <yao@codesourcery.com>
9223
9224 * Makefile.in: Remove GNU make feature --directory.
9225
348af9f7
MS
92262011-03-04 Michael Snyder <msnyder@vmware.com>
9227
9228 * server.c (queue_stop_reply): Call xmalloc not malloc.
9229
92302011-03-02 Michael Snyder <msnyder@vmware.com>
9231
9232 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9233
9f72fee2
MS
92342011-02-28 Michael Snyder <msnyder@vmware.com>
9235
588eebee
MS
9236 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9237 (cmd_qtframe): Ditto.
9238 (cmd_qtbuffer): Ditto.
9239 (cmd_bigqtbuffer): Ditto.
9240
9f72fee2
MS
9241 * utils.c (decimal2str): Initialize 'width' to nine, then
9242 don't mess with it.
9243
8040bd49
UW
92442011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9245
9246 * hostio.c (require_data): Free *data, not data.
9247
7e52cbd0
JK
92482011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9249
9250 * hostio.c (require_data): Use free, not xfree.
9251
9130f83e
MS
92522011-02-27 Michael Snyder <msnyder@vmware.com>
9253
4b812f4e
MS
9254 * server.c (handle_query): Discard unused value.
9255
9130f83e
MS
9256 * hostio.c (require_data): Free malloc memory before returning
9257 error.
9258
69d37113
MS
92592011-02-26 Michael Snyder <msnyder@vmware.com>
9260
9261 * linux-low.c (list_threads): Call closedir for dirent.
9262
35f5825a
MS
92632011-02-27 Michael Snyder <msnyder@vmware.com>
9264
2a589cef
MS
9265 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9266 a case statement falls through.
9267
0adea5f7
MS
9268 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9269
35f5825a
MS
9270 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9271 in comparison.
9272
238f1c74
MS
92732011-02-26 Michael Snyder <msnyder@vmware.com>
9274
9275 * utils.c (decimal2str): Eliminate dead code and dead param.
9276 (pulongest): Drop dead param from call to decimal2str.
9277 (plongest): Ditto.
9278
633ff500
JB
92792011-02-24 Joel Brobecker <brobecker@adacore.com>
9280
9281 Revert the following patch (not approved yet):
9282 2011-02-21 Hui Zhu <teawater@gmail.com>
9283 * tracepoint.c (tp_printf): New function.
9284 (eval_agent_expr): Handle gdb_agent_op_printf.
9285
f9c6ff72
HZ
92862011-02-21 Hui Zhu <teawater@gmail.com>
9287
9288 * tracepoint.c (tp_printf): New function.
9289 (eval_agent_expr): Handle gdb_agent_op_printf.
9290
94d5e490
TT
92912011-02-18 Tom Tromey <tromey@redhat.com>
9292
9293 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9294 (tracepoint.o): Likewise.
9295 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9296 (gdb_agent_op_names): Likewise.
9297
c7f96d2b
TT
92982011-02-18 Tom Tromey <tromey@redhat.com>
9299
9300 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9301 gdb_agent_op_rot>: New constants.
9302 (gdb_agent_op_names): Add pick and roll.
9303 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9304 cases.
9305
0feedb2c
JK
93062011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9307
9308 * aclocal.m4: Regenerated with aclocal-1.11.1.
9309
b3b9301e
PA
93102011-02-14 Pedro Alves <pedro@codesourcery.com>
9311
9312 * server.c (handle_qxfer_traceframe_info): New.
9313 (qxfer_packets): Register "traceframe-info".
9314 (handle_query): Report support for qXfer:traceframe-info:read+.
9315 * tracepoint.c (match_blocktype): New.
9316 (traceframe_find_block_type): Rename to ...
9317 (traceframe_walk_blocks): ... this. Add callback filter argument,
9318 and use it.
9319 (traceframe_find_block_type): New, reimplemented on top of
9320 traceframe_walk_blocks.
9321 (build_traceframe_info_xml): New.
9322 (traceframe_read_info): New.
9323 * server.h (traceframe_read_info): Declare.
9324
4f3e6fb7
YQ
93252011-02-11 Yao Qi <yao@codesourcery.com>
9326
9327 * configure.ac: Call AC_PROG_RANLIB.
9328 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9329 * configure: Regenerate.
9330
764880b7
PA
93312011-02-07 Pedro Alves <pedro@codesourcery.com>
9332
9333 * server.c (gdb_read_memory): Change return semantics to allow
9334 partial transfers.
9335 (handle_search_memory_1): Adjust.
9336 (process_serial_event) <'m' packet>: Handle partial transfers.
9337 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9338
1c79eb8a
PA
93392011-01-28 Pedro Alves <pedro@codesourcery.com>
9340
9341 * regcache.c (init_register_cache): Initialize
9342 regcache->register_status.
9343 (free_register_cache): Release regcache->register_status.
9344 (regcache_cpy): Copy register_status.
9345 (registers_to_string): Print 'x's for unavailable registers.
9346 (supply_register): Mark the register's status valid or
9347 unavailable, depending on whether a buffer was passed in or not.
9348 (supply_register_zeroed): New.
9349 (supply_regblock): Mark the registers' status valid or
9350 unavailable, depending on whether a buffer was passed in or not.
9351 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9352 (struct regcache): New `register_status' field.
9353 (supply_register_zeroed): Declare.
9354 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9355 supply_register_zeroed, rather than passing a NULL buffer to
9356 supply_register.
9357 * tracepoint.c (fetch_traceframe_registers): Update comment.
9358
85724a0e
PA
93592011-01-28 Pedro Alves <pedro@codesourcery.com>
9360
9361 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9362 buffer explicit.
9363
d08aafef
PA
93642011-01-25 Pedro Alves <pedro@codesourcery.com>
9365
9366 * server.h (decode_xfer_write): Change prototype.
9367 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9368 and don't extract the annex here.
9369 * server.c (decode_xfer_read): Remove `annex' parameter,
9370 and don't extract the annex here.
9371 (decode_xfer): New.
9372 (struct qxfer): New.
9373 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9374 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9375 (handle_qxfer_statictrace): New functions, abstracted out from
9376 handle_query, and made to use the struct qxfer interface.
9377 (handle_threads_qxfer_proper): Rename to ...
9378 (handle_qxfer_threads_proper): ... this.
9379 (handle_threads_qxfer): Rename to ...
9380 (handle_qxfer_threads): ... this. Adjust.
9381 (qxfer_packets): New array.
9382 (handle_qxfer): New function.
9383 (handle_query): Use handle_qxfer.
9384
493e2a69
MS
93852011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9386
9387 * gdbreplay.c: Shorten lines of >= 80 columns.
9388 * linux-low.c: Ditto.
9389 * linux-ppc-low.c: Ditto.
9390 * linux-s390-low.c: Ditto.
9391 * linux-sparc-low.c: Ditto.
9392 * linux-x86-low.c: Ditto.
9393 * linux-xtensa-low.c: Ditto.
9394 * mem-break.c: Ditto.
9395 * nto-low.c: Ditto.
9396 * regcache.h: Ditto.
9397 * remote-utils.c: Ditto.
9398 * server.c: Ditto.
9399 * server.h: Ditto.
9400 * thread-db.c: Ditto.
9401 * tracepoint.c: Ditto.
9402 * utils.c: Ditto.
9403 * win32-low.h: Ditto.
9404
44944448
JB
94052011-01-05 Joel Brobecker <brobecker@adacore.com>
9406
9407 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9408 update.
9409
71ce852c
JB
94102011-01-01 Joel Brobecker <brobecker@adacore.com>
9411
9412 * server.c (gdbserver_version): Update copyright year in version
9413 output.
9414 * gdbreplay.c (gdbreplay_version): Ditto.
9415
eb826dc6
MF
94162010-12-29 Jie Zhang <jie.zhang@analog.com>
9417
9418 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9419 * linux-bfin-low.c: New file.
9420 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9421 PT_DATA_ADDR for BFIN targets.
9422 * Makefile.in (SFILES): Add linux-bfin-low.c.
9423 (clean): Remove reg-bfin.c.
9424 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9425 * README: Mention supported Blackfin targets.
9426
39ab222a
MF
94272010-12-23 Mike Frysinger <vapier@gentoo.org>
9428
9429 * .gitignore: New file.
9430
a1f2ce7d
MF
94312010-11-16 Mike Frysinger <vapier@gentoo.org>
9432
9433 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9434
f474844c
JZ
94352010-10-22 Jie Zhang <jie@codesourcery.com>
9436
9437 * Makefile.in: Add FLAGS_TO_PASS variable.
9438 (install): Remove dependency of install-only and recursively
9439 invoke make for install-only.
9440
f1048712
DE
94412010-10-04 Doug Evans <dje@google.com>
9442
9443 * Makefile.in (uninstall): Use $(DESTDIR).
9444
b53a1623
PA
94452010-09-24 Pedro Alves <pedro@codesourcery.com>
9446
e6ee044d
PA
9447 PR gdb/11842
9448
b53a1623
PA
9449 * linux-x86-low.c (compat_siginfo_from_siginfo)
9450 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9451 si_code is < 0. Check for si_code == SI_TIMER before checking for
9452 si_code < 0.
9453
fa1bd1e4
JB
94542010-09-13 Joel Brobecker <brobecker@adacore.com>
9455
9456 * lynx-i386-low.c: New file.
9457 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9458
47fac8f8
JB
94592010-09-13 Joel Brobecker <brobecker@adacore.com>
9460
9461 * lynx-low.c (ptrace_request_to_str): Remove handling for
9462 request values that have been removed in LynxOS 5.x.
9463
1adfc54d
JB
94642010-09-13 Joel Brobecker <brobecker@adacore.com>
9465
9466 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9467 <ptrace.h>
9468
c2a66c29
NS
94692010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9470
9471 * configure.ac: Add --enable-inprocess-agent option.
9472 * configure: Rebuilt.
9473
32fcada3
YQ
94742010-09-06 Yao Qi <yao@codesourcery.com>
9475
9476 * linux-low.c (linux_kill): Remove unused variable.
9477 (linux_stabilize_threads): Likewise.
9478 * server.c (start_inferior): Likewise.
9479 (queue_stop_reply_callback): Likewise.
9480 * tracepoint.c (do_action_at_tracepoint): Likewise.
9481
0cccb683
YQ
94822010-09-06 Yao Qi <yao@codesourcery.com>
9483
9484 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9485 on return.
9486
423ec54c
JK
94872010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9488
9489 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9490
12ac6819
PA
94912010-09-06 Pedro Alves <pedro@codesourcery.com>
9492
9493 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9494 "$(IPA_DEPFILES)".
9495
8ed54b31
JB
94962010-09-01 Joel Brobecker <brobecker@adacore.com>
9497
9498 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9499 gdbserver/lynx-ppc-low.c: New files.
9500 * Makefile.in (lynx_low_h): New variable.
9501 (lynx-low.o, lynx-ppc-low.o): New rules.
9502 * configure.ac: On LynxOS, link with -lnetinet.
9503 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9504 * configure: regenerate.
9505
bb0116a4
JB
95062010-09-01 Joel Brobecker <brobecker@adacore.com>
9507
9508 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9509 * configure.ac: Add check for vasprintf and vsnprintf.
9510 * configure, config.in: Regenerate.
9511 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9512
a778ab81 95132010-09-01 Joel Brobecker <brobecker@adacore.com>
9514
9515 * gdbreplay.c: Move include of alloca.h up, next to include of
9516 malloc.h.
9517 * server.h: Add include of malloc.h.
9518 * mem-break.c: Remove include of malloc.h.
9519 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9520
8b034a19 95212010-09-01 Joel Brobecker <brobecker@adacore.com>
9522
9523 * Makefile.in (memmem.o): Build with -Wno-error.
9524
95252010-09-01 Joel Brobecker <brobecker@adacore.com>
9526
9527 * utils.c (xsnprintf): Make non-static.
9528 * server.h: Add xsnprintf declaration.
9529 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9530 replace calls to snprintf by calls to xsnprintf throughout.
9531
95322010-09-01 Joel Brobecker <brobecker@adacore.com>
9533
9534 * configure.ac: Add configure check for alloca.
9535 * configure, config.in: Regenerate.
9536 * server.h: Include alloca.h if it exists.
9537 * gdbreplay.c: Include alloca.h if it exists.
9538
1a981360
PA
95392010-08-28 Pedro Alves <pedro@codesourcery.com>
9540
9541 * linux-low.c (__SIGRTMIN): Define if not already defined.
9542 (linux_create_inferior): Check for __ANDROID__ rather than
9543 __SIGRTMIN.
9544 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9545 are already deferred.
9546 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9547 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9548 stopped and already has a pending signal to report.
9549 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9550 a pending signal to report or is moving out of a jump pad.
9551 (linux_init_signals): Check for __ANDROID__ rather than
9552 __SIGRTMIN.
9553
b4d51a55
PA
95542010-08-28 Pedro Alves <pedro@codesourcery.com>
9555
9556 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9557 debug_threads check. Avoid a linear search when not doing debug
9558 output.
9559
ec48365d
PA
95602010-08-27 Pedro Alves <pedro@codesourcery.com>
9561
9562 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9563 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9564 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9565 (process_event): Change local fd's type to gdb_fildes_t.
9566 (create_file_handler): Adjust prototype.
9567 (delete_file_handler): Adjust prototype.
9568 (handle_file_event): Adjust prototype. Use pfildes.
9569 (create_file_event): Adjsut prototype.
9570 * remote-utils.c (remote_desc, listen_desc): Change type to
9571 gdb_fildes_t.
9572 * server.h: New gdb_fildes_t typedef.
9573 [USE_WIN32API]: Include winsock2.h.
9574 (delete_file_handler, add_file_handler): Adjust prototypes.
9575 (pfildes): Declare.
9576 * utils.c (pfildes): New.
9577
854d88f0
PA
95782010-08-27 Pedro Alves <pedro@codesourcery.com>
9579
9580 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9581 * configure: Regenerate.
9582
0146f85b
PA
95832010-08-27 Pedro Alves <pedro@codesourcery.com>
9584
9585 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9586 (linux_done_accessing_memory): ... this.
9587 (linux_target_ops): Adjust.
9588 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9589 * nto-low.c (nto_target_ops): Adjust comment.
9590 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9591 * spu-low.c (spu_target_ops): Adjust comment.
9592 * target.h (target_ops): Rename unprepare_to_access_memory field
9593 to done_accessing_memory.
9594 (unprepare_to_access_memory): Rename to ...
9595 (done_accessing_memory): ... this.
9596
90d74c30
PA
95972010-08-26 Pedro Alves <pedro@codesourcery.com>
9598
9599 * linux-low.c (linux_prepare_to_access_memory): New.
9600 (linux_unprepare_to_access_memory): New.
9601 (linux_target_ops): Install them.
9602 * server.c (read_memory): Rename to ...
9603 (gdb_read_memory): ... this. Use
9604 prepare_to_access_memory/prepare_to_access_memory.
9605 (write_memory): Rename to ...
9606 (gdb_write_memory): ... this. Use
9607 prepare_to_access_memory/prepare_to_access_memory.
9608 (handle_search_memory_1): Adjust.
9609 (process_serial_event): Adjust.
9610 * target.h (struct target_ops): New fields
9611 prepare_to_access_memory and unprepare_to_access_memory.
9612 (prepare_to_access_memory, unprepare_to_access_memory): New.
9613 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9614 prepare_to_access_memory/prepare_to_access_memory.
9615 * nto-low.c (nto_target_ops): Adjust.
9616 * spu-low.c (spu_target_ops): Adjust.
9617 * win32-low.c (win32_target_ops): Adjust.
9618
fd467969
PA
96192010-08-26 Pedro Alves <pedro@codesourcery.com>
9620
9621 * Makefile.in (WARN_CFLAGS): Get it from configure.
9622 (WERROR_CFLAGS): New.
9623 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9624 * configure.ac: Introduce --enable-werror, which adds -Werror to
9625 the compiler command line. Enabled by default. Disable with
9626 --disable-werror. Add -Wdeclaration-after-statement
9627 Wpointer-arith and -Wformat-nonliteral to warning flags.
9628 * configure: Regenerate.
9629
331e2f5f
PA
96302010-08-26 Pedro Alves <pedro@codesourcery.com>
9631
9632 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9633
e581f2b4
PA
96342010-08-26 Pedro Alves <pedro@codesourcery.com>
9635
9636 * gdbreplay.c (remote_error): New.
9637 (gdbchar): New.
9638 (expect): Use gdbchar. Check for error reading from GDB.
9639 Clarify sync error output.
9640 (play): Check for errors writing to GDB.
9641 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9642 * remote-utils.c (getpkt): Check for errors writing to the remote
9643 descriptor.
9644
3c11dd79
PA
96452010-08-25 Pedro Alves <pedro@codesourcery.com>
9646
9647 * linux-low.c (linux_wait_1): Move non-debugging code out of
9648 `debug_threads' control.
9649
d20a8ad9
PA
96502010-08-25 Pedro Alves <pedro@codesourcery.com>
9651
9652 * linux-low.c (linux_wait_1): Don't set last_status here.
9653 * server.c (push_event, queue_stop_reply_callback): Assert we're
9654 not pushing a TARGET_WAITKIND_IGNORE event.
9655 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9656 (myresume, handle_target_event): Set the thread's last_resume_kind
9657 and last_status from the target returned status.
9658
964e4306
PA
96592010-08-25 Pedro Alves <pedro@codesourcery.com>
9660
9661 PR threads/10729
9662
9663 * linux-x86-low.c (update_debug_registers_callback): New.
9664 (i386_dr_low_set_addr): Use it.
9665 (i386_dr_low_get_addr): New.
9666 (i386_dr_low_set_control): Use update_debug_registers_callback.
9667 (i386_dr_low_get_control): New.
9668 (i386_dr_low_get_status): Adjust.
9669 * linux-low.c (linux_stop_lwp): New.
9670 * linux-low.h (linux_stop_lwp): Declare.
9671
9672 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9673 argument instead of a i386_debug_reg_state.
9674 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9675 a i386_debug_reg_state.
9676 (i386_insert_aligned_watchpoint): Adjust.
9677 (i386_remove_aligned_watchpoint): Adjust.
9678 (i386_low_stopped_data_address): Read the debug registers from the
9679 inferior instead of from the mirrors.
9680 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9681 (i386_dr_low_get_addr): Declare.
9682 (i386_dr_low_get_control): Declare.
9683 (i386_dr_low_get_status): Change prototype.
9684
9685 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9686 (i386_dr_low_get_addr): New.
9687 (i386_dr_low_get_control): New.
9688 (i386_dr_low_get_status): Adjust prototype. Return
9689 dr_status_mirror.
9690 (i386_initial_stuff): Clear dr_status_mirror and
9691 dr_control_mirror.
9692 (i386_get_thread_context): Adjust.
9693 (i386_set_thread_context): Adjust.
9694 (i386_thread_added): Adjust.
9695
5f21a75b
PA
96962010-08-24 Pedro Alves <pedro@codesourcery.com>
9697
9698 * linux-low.h (linux_thread_area): Delete declaration.
9699
3e4c1235
TS
97002010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9701
9702 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9703 after its termination.
9704
1971b033
PA
97052010-08-09 Pedro Alves <pedro@codesourcery.com>
9706
9707 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9708 (gdb_wants_all_stopped): Delete.
9709 (linux_wait_1): Don't call them.
9710 * server.c (handle_v_cont): Tag all threads as want-stopped.
9711 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9712 stopped as "client-wants-stopped".
9713
310444ac
PA
97142010-07-31 Pedro Alves <pedro@codesourcery.com>
9715
9716 * Makefile.in (signals_h): New.
9717 (server_h): Depend on it.
9718 (server.o): Don't depend on $(signals_def).
9719 (signals.o): Depend on $(signals_def).
9720
a19cae16
JK
97212010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9722
9723 * Makefile.in (signals_def): New.
9724 (server_h): Append include/gdb/signals.h and signals_def.
9725 (server.o): Append signals_def.
9726
30d50328
JK
97272010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9728
9729 * server.c (handle_target_event): Use target_signal_to_host for
9730 resume_info.sig initialization.
9731 * target.h (struct thread_resume) <sig>: New comment.
9732
5c3216e2
OS
97332010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9734
c6f46ca0
OS
9735 * server.c (handle_query): strcpy() the returned string from paddress()
9736 instead of sprintf().
5c3216e2
OS
9737 * utils.c (paddress): Return phex_nz().
9738
6bd31874
JB
97392010-07-07 Joel Brobecker <brobecker@adacore.com>
9740
9741 * server.c (handle_v_cont): Call mourn_inferior if process
9742 just exited.
9743 (myresume): Likewise.
9744
0fb4aa4b
PA
97452010-07-01 Pedro Alves <pedro@codesourcery.com>
9746
9747 Static tracepoints, and integration with UST.
9748
9749 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9750 * mem-break.c (uninsert_all_breakpoints)
9751 (reinsert_all_breakpoints): New.
9752 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9753 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9754 (gdb_agent_ust_loaded, helper_thread_id)
9755 (gdb_agent_helper_thread_id): New macros.
9756 (struct ipa_sym_addresses): Add addr_ust_loaded,
9757 addr_helper_thread_id, addr_cmd_buf.
9758 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9759 (in_process_agent_loaded_ust): New.
9760 (write_e_ust_not_loaded): New.
9761 (maybe_write_ipa_ust_not_loaded): New.
9762 (struct collect_static_trace_data_action): New.
9763 (enum tracepoint_type) <static_tracepoint>: New.
9764 (struct tracepoint) <handle>: Mention static tracepoints.
9765 (struct static_tracepoint_ctx): New.
9766 (CMD_BUF_SIZE): New.
9767 (add_tracepoint_action): Handle static tracepoint actions.
9768 (unprobe_marker_at): New.
9769 (clear_installed_tracepoints): Handle static tracepoints.
9770 (cmd_qtdp): Handle static tracepoints.
9771 (probe_marker_at): New.
9772 (cmd_qtstart): Handle static tracepoints.
9773 (response_tracepoint): Handle static tracepoints.
9774 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9775 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9776 (get_context_regcache): Handle static tracepoints.
9777 (do_action_at_tracepoint): Handle static tracepoint actions.
9778 (traceframe_find_block_type): Handle static trace data blocks.
9779 (traceframe_read_sdata): New.
9780 (download_tracepoints): Download static tracepoint actions.
9781 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9782 (GDB_PROBE_NAME): New.
9783 (ust_ops): New.
9784 (GET_UST_SYM): New.
9785 (USTF): New.
9786 (dlsym_ust): New.
9787 (ust_marker_to_static_tracepoint): New.
9788 (gdb_probe): New.
9789 (collect_ust_data_at_tracepoint): New.
9790 (gdb_ust_probe): New.
9791 (UNIX_PATH_MAX, SOCK_DIR): New.
9792 (gdb_ust_connect_sync_socket): New.
9793 (resume_thread, stop_thread): New.
9794 (run_inferior_command): New.
9795 (init_named_socket): New.
9796 (gdb_ust_socket_init): New.
9797 (cstr_to_hexstr): New.
9798 (next_st): New.
9799 (first_marker, next_marker): New.
9800 (response_ust_marker): New.
9801 (cmd_qtfstm, cmd_qtsstm): New.
9802 (unprobe_marker_at, probe_marker_at): New.
9803 (cmd_qtstmat, gdb_ust_thread): New.
9804 (gdb_ust_init): New.
9805 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9806 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9807 (ST_REGENTRY): New.
9808 (x86_64_st_collect_regmap): New.
9809 (X86_64_NUM_ST_COLLECT_GREGS): New.
9810 (AMD64_RIP_REGNUM): New.
9811 (supply_static_tracepoint_registers): New.
9812 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9813 (ST_REGENTRY): New.
9814 (i386_st_collect_regmap): New.
9815 (i386_NUM_ST_COLLECT_GREGS): New.
9816 (supply_static_tracepoint_registers): New.
9817 * server.c (handle_query): Handle qXfer:statictrace:read.
9818 <qSupported>: Report support for StaticTracepoints, and
9819 qXfer:statictrace:read features.
9820 * server.h (traceframe_read_sdata)
9821 (supply_static_tracepoint_registers): Declare.
9822 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9823 (unpack_varlen_hex): Include in IPA build.
9824 * Makefile.in (ustlibs, ustinc): New.
9825 (IPA_OBJS): Add remote-utils-ipa.o.
9826 ($(IPA_LIB)): Link -ldl and -lpthread.
9827 (UST_CFLAGS): New.
9828 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9829 * config.in, configure: Regenerate.
9830
9e4344e5
PA
98312010-06-20 Ian Lance Taylor <iant@google.com>
9832 Pedro Alves <pedro@codesourcery.com>
9833
9834 * linux-x86-low.c (always_true): Delete.
9835 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9836 trying to fool the compiler with always_true.
9837
c6beb2cb
PA
98382010-06-20 Pedro Alves <pedro@codesourcery.com>
9839
9840 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9841 conditions in gdbserver.
9842
d2ed6730
UW
98432010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9844
9845 * spu-low.c (spu_read_memory): Wrap around local store limit.
9846 (spu_write_memory): Likewise.
9847
4e29fb54
PA
98482010-06-15 Pedro Alves <pedro@codesourcery.com>
9849
9850 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9851 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9852 LONGEST uses.
9853 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9854 uses.
9855 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9856 uses with LONGEST uses.
9857
6a271cae
PA
98582010-06-14 Stan Shebs <stan@codesourcery.com>
9859 Pedro Alves <pedro@codesourcery.com>
9860
9861 Bytecode compiler.
9862
9863 * linux-x86-low.c: Include limits.h.
9864 (add_insns): New.
9865 (always_true): New.
9866 (EMIT_ASM): New.
9867 (EMIT_ASM32): New.
9868 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9869 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9870 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9871 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9872 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9873 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9874 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9875 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9876 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9877 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9878 (amd64_emit_void_call_2): New.
9879 (amd64_emit_ops): New.
9880 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9881 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9882 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9883 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9884 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9885 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9886 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9887 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9888 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9889 (i386_emit_stack_adjust, i386_emit_int_call_1)
9890 (i386_emit_void_call_2): New.
9891 (i386_emit_ops): New.
9892 (x86_emit_ops): New.
9893 (the_low_target): Install x86_emit_ops.
9894 * server.h (struct emit_ops): New.
9895 (get_raw_reg_func_addr): Declare.
9896 (current_insn_ptr, emit_error): Declare.
9897 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9898 (set_trace_state_variable_value): New defines.
9899 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9900 addr_get_trace_state_variable_value and
9901 addr_set_trace_state_variable_value.
9902 (symbol_list): New fields for get_raw_reg,
9903 get_trace_state_variable_value and set_trace_state_variable_value.
9904 (condfn): New typedef.
9905 (struct tracepoint): New field `compiled_cond'.
9906 (do_action_at_tracepoint): Clear compiled_cond.
9907 (get_trace_state_variable_value, set_trace_state_variable_value):
9908 Export in the IPA.
9909 (condition_true_at_tracepoint): If there's a compiled condition,
9910 run that.
9911 (current_insn_ptr, emit_error): New globals.
9912 (struct bytecode_address): New.
9913 (get_raw_reg_func_addr): New.
9914 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9915 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9916 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9917 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9918 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9919 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9920 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9921 (compile_tracepoint_condition, compile_bytecodes): New.
9922 * target.h (emit_ops): Forward declare.
9923 (struct target_ops): New field emit_ops.
9924 (target_emit_ops): New.
9925 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9926 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9927 * linux-low.c (linux_emit_ops): New.
9928 (linux_target_ops): Install it.
9929 * linux-low.h (struct linux_target_ops): New field emit_ops.
9930
92b72907
UW
99312010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9932
9933 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9934 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9935
fa593d66
PA
99362010-06-01 Pedro Alves <pedro@codesourcery.com>
9937 Stan Shebs <stan@codesourcery.com>
9938
9939 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9940 (all): Depend on $(extra_libraries).
9941 (install-only): Install the IPA.
9942 (IPA_OBJS, IPA_LIB): New.
9943 (clean): Remove the IPA lib.
9944 (IPAGENT_CFLAGS): New.
9945 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9946 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9947 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9948 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9949 * configure.ac: Check for atomic builtins support in the compiler.
9950 (IPA_DEPFILES, extra_libraries): Define.
9951 * configure.srv (ipa_obj): Add description.
9952 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9953 (i[34567]86-*-linux*): Set ipa_obj.
9954 (x86_64-*-linux*): Set ipa_obj.
9955 * linux-low.c (stabilizing_threads): New.
9956 (supports_fast_tracepoints): New.
9957 (linux_detach): Stabilize threads before detaching.
9958 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9959 the lwp is either not stabilizing, or is moving out of a jump pad.
9960 (linux_fast_tracepoint_collecting): New.
9961 (maybe_move_out_of_jump_pad): New.
9962 (enqueue_one_deferred_signal): New.
9963 (dequeue_one_deferred_signal): New.
9964 (linux_wait_for_event_1): If moving out of a jump pad, defer
9965 pending signals to later.
9966 (linux_stabilize_threads): New.
9967 (linux_wait_1): Check if threads need moving out of jump pads, and
9968 do it if so.
9969 (stuck_in_jump_pad_callback): New.
9970 (move_out_of_jump_pad_callback): New.
9971 (lwp_running): New.
9972 (linux_resume_one_lwp): Handle moving out of jump pads.
9973 (linux_set_resume_request): Dequeue deferred signals.
9974 (need_step_over_p): Also step over fast tracepoint jumps.
9975 (start_step_over): Also uninsert fast tracepoint jumps.
9976 (finish_step_over): Also reinsert fast tracepoint jumps.
9977 (linux_install_fast_tracepoint_jump): New.
9978 (linux_target_ops): Install linux_stabilize_threads and
9979 linux_install_fast_tracepoint_jump_pad.
9980 * linux-low.h (linux_target_ops) <get_thread_area,
9981 install_fast_tracepoint_jump_pad>: New fields.
9982 (struct lwp_info) <collecting_fast_tracepoint,
9983 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9984 (linux_get_thread_area): Declare.
9985 * linux-x86-low.c (jump_insn): New.
9986 (x86_get_thread_area): New.
9987 (append_insns): New.
9988 (push_opcode): New.
9989 (amd64_install_fast_tracepoint_jump_pad): New.
9990 (i386_install_fast_tracepoint_jump_pad): New.
9991 (x86_install_fast_tracepoint_jump_pad): New.
9992 (the_low_target): Install x86_get_thread_area and
9993 x86_install_fast_tracepoint_jump_pad.
9994 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9995 (struct fast_tracepoint_jump): New.
9996 (fast_tracepoint_jump_insn): New.
9997 (fast_tracepoint_jump_shadow): New.
9998 (find_fast_tracepoint_jump_at): New.
9999 (fast_tracepoint_jump_here): New.
10000 (delete_fast_tracepoint_jump): New.
10001 (set_fast_tracepoint_jump): New.
10002 (uninsert_fast_tracepoint_jumps_at): New.
10003 (reinsert_fast_tracepoint_jumps_at): New.
10004 (set_breakpoint_at): Use write_inferior_memory.
10005 (uninsert_raw_breakpoint): Use write_inferior_memory.
10006 (check_mem_read): Mask out fast tracepoint jumps.
10007 (check_mem_write): Mask out fast tracepoint jumps.
10008 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10009 (set_fast_tracepoint_jump): Declare.
10010 (delete_fast_tracepoint_jump)
10011 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10012 (reinsert_fast_tracepoint_jumps_at): Declare.
10013 * regcache.c: Don't compile many functions when building the
10014 in-process agent library.
10015 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10016 the register buffer in the heap.
10017 (free_register_cache): If the register buffer isn't owned by the
10018 regcache, don't free it.
10019 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10020 pre-existing register caches.
10021 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10022 type.
10023 (convert_ascii_to_int): : Constify `from' parameter type.
10024 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10025 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10026 the needed buffer in-place.
10027 (relocate_instruction): New.
10028 * server.c (handle_query) <qSymbols>: If the target supports
10029 tracepoints, give it a chance of looking up symbols. Report
10030 support for fast tracepoints.
10031 (handle_status): Stabilize threads.
10032 (process_serial_event): Adjust.
10033 * server.h (struct fast_tracepoint_jump): Forward declare.
10034 (struct process_info) <fast_tracepoint_jumps>: New field.
10035 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10036 (decode_X_packet, decode_M_packet): Adjust.
10037 (relocate_instruction): Declare.
10038 (in_process_agent_loaded): Declare.
10039 (tracepoint_look_up_symbols): Declare.
10040 (struct fast_tpoint_collect_status): Declare.
10041 (fast_tracepoint_collecting): Declare.
10042 (force_unlock_trace_buffer): Declare.
10043 (handle_tracepoint_bkpts): Declare.
10044 (initialize_low_tracepoint)
10045 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10046 * target.h (struct target_ops) <stabilize_threads,
10047 install_fast_tracepoint_jump_pad>: New fields.
10048 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10049 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10050 [HAVE_STDINT_H]: Include stdint.h.
10051 (trace_debug_1): Rename to ...
10052 (trace_vdebug): ... this.
10053 (trace_debug): Rename to ...
10054 (trace_debug_1): ... this. Add `level' parameter.
10055 (trace_debug): New.
10056 (ATTR_USED, ATTR_NOINLINE): New.
10057 (IP_AGENT_EXPORT): New.
10058 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10059 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10060 (about_to_request_buffer_space, trace_buffer_is_full)
10061 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10062 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10063 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10064 (traceframe_write_count, traceframes_created)
10065 (trace_state_variables)
10066 New renaming defines.
10067 (struct ipa_sym_addresses): New.
10068 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10069 (symbol_list): New.
10070 (ipa_sym_addrs): New.
10071 (all_tracepoint_symbols_looked_up): New.
10072 (in_process_agent_loaded): New.
10073 (write_e_ipa_not_loaded): New.
10074 (maybe_write_ipa_not_loaded): New.
10075 (tracepoint_look_up_symbols): New.
10076 (debug_threads) [IN_PROCESS_AGENT]: New.
10077 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10078 (UNKNOWN_SIDE_EFFECTS): New.
10079 (stop_tracing): New.
10080 (flush_trace_buffer): New.
10081 (stop_tracing_bkpt): New.
10082 (flush_trace_buffer_bkpt): New.
10083 (read_inferior_integer): New.
10084 (read_inferior_uinteger): New.
10085 (read_inferior_data_pointer): New.
10086 (write_inferior_data_pointer): New.
10087 (write_inferior_integer): New.
10088 (write_inferior_uinteger): New.
10089 (struct collect_static_trace_data_action): Delete.
10090 (enum tracepoint_type): New.
10091 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10092 <actions_str, step_actions, step_actions_str>: Only include in
10093 GDBserver.
fa593d66
PA
10094 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10095 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10096 (tracepoints): Use IP_AGENT_EXPORT.
10097 (last_tracepoint): Don't include in the IPA.
10098 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10099 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10100 (alloced_trace_state_variables): New.
10101 (trace_state_variables): Use IP_AGENT_EXPORT.
10102 (traceframe_t): Delete unused variable.
10103 (circular_trace_buffer): Don't include in the IPA.
10104 (trace_buffer_start): Delete.
10105 (struct trace_buffer_control): New.
10106 (trace_buffer_free): Delete.
10107 (struct ipa_trace_buffer_control): New.
10108 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10109 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10110 New.
10111 (trace_buffer_ctrl): New.
10112 (TRACE_BUFFER_CTRL_CURR): New.
10113 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10114 Reimplement as macros.
10115 (trace_buffer_wrap): Delete.
10116 (traceframe_write_count, traceframe_read_count)
10117 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10118 (struct tracepoint_hit_ctx) <type>: New field.
10119 (struct fast_tracepoint_ctx): New.
10120 (memory_barrier): New.
10121 (cmpxchg): New.
10122 (record_tracepoint_error): Update atomically in the IPA.
10123 (clear_inferior_trace_buffer): New.
10124 (about_to_request_buffer_space): New.
10125 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10126 updating the same buffer.
10127 (add_tracepoint): Default the tracepoint's type to trap
10128 tracepoint, and orig_size to -1.
10129 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10130 internal variables.
10131 (create_trace_state_variable): New parameter `gdb'. Handle it.
10132 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10133 (cmd_qtdp): Handle fast tracepoints.
10134 (cmd_qtdv): Adjust.
10135 (max_jump_pad_size): New.
10136 (gdb_jump_pad_head): New.
10137 (get_jump_space_head): New.
10138 (claim_jump_space): New.
10139 (sort_tracepoints): New.
10140 (MAX_JUMP_SIZE): New.
10141 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10142 IPA.
10143 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10144 support. Upload fast traceframes, and delete internal IPA
10145 breakpoints.
10146 (stop_tracing_handler): New.
10147 (flush_trace_buffer_handler): New.
10148 (cmd_qtstop): Upload fast tracepoints.
10149 (response_tracepoint): Handle fast tracepoints.
10150 (tracepoint_finished_step): Upload fast traceframes. Set the
10151 tracepoint hit context's tracepoint type.
10152 (handle_tracepoint_bkpts): New.
10153 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10154 type. Add comment about fast tracepoints.
10155 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10156 non-existing action_str field.
10157 (get_context_regcache): Handle fast tracepoints.
10158 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10159 to the regcache.
10160 (fast_tracepoint_from_jump_pad_address): New.
10161 (fast_tracepoint_from_ipa_tpoint_address): New.
10162 (collecting_t): New.
10163 (force_unlock_trace_buffer): New.
10164 (fast_tracepoint_collecting): New.
10165 (collecting): New.
10166 (gdb_collect): New.
10167 (write_inferior_data_ptr): New.
10168 (target_tp_heap): New.
10169 (target_malloc): New.
10170 (download_agent_expr): New.
10171 (UALIGN): New.
10172 (download_tracepoints): New.
10173 (download_trace_state_variables): New.
10174 (upload_fast_traceframes): New.
10175 (IPA_FIRST_TRACEFRAME): New.
10176 (IPA_NEXT_TRACEFRAME_1): New.
10177 (IPA_NEXT_TRACEFRAME): New.
10178 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10179 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10180 (gdb_jump_pad_buffer_end): New.
10181 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10182 (initialize_tracepoint): Adjust.
10183 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10184 buffer. Initialize the low module.
10185 * utils.c (PREFIX, TOOLNAME): New.
10186 (malloc_failure): Use PREFIX.
10187 (error): In the IPA, an error causes an exit.
10188 (fatal, warning): Use PREFIX.
10189 (internal_error): Use TOOLNAME.
10190 (NUMCELLS): Increase to 10.
10191 * configure, config.in: Regenerate.
10192
d149dd1d
PA
101932010-06-01 Pedro Alves <pedro@codesourcery.com>
10194
10195 * server.c (handle_query) <qSupported>: Do two passes over the
10196 qSupported string to avoid nesting strtok.
10197
f6528abd
JK
101982010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10199
10200 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10201 (CDEPS): New.
10202 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10203 -Wl,--dynamic-list.
10204 * configure: Regenerate.
10205 * proc-service.list: New.
10206
ca2a87a0
JK
102072010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10208
10209 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10210 New comment.
10211
363a6e9f
OS
102122010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10213
10214 * gdbreplay.c (remote_open): Check error return from socket() call by
10215 its equality to -1 not by it being negative.
10216 * remote-utils.c (remote_open): Likewise.
10217
d23b6cb1
PA
102182010-05-23 Pedro Alves <pedro@codesourcery.com>
10219
10220 * config.h: Regenerate.
10221
28d3cf85
MK
102222010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10223
10224 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10225 doesn't provide PTRACE_GET_THREAD_AREA.
10226
fea36a59
MK
102272010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10228
10229 * linux-m68k-low.c: Include <asm/ptrace.h>
10230 (ps_get_thread_area): Implement.
10231
24b066ba
DE
102322010-05-03 Doug Evans <dje@google.com>
10233
10234 * event-loop.c (struct callback_event): New struct.
10235 (callback_list): New global.
10236 (append_callback_event, delete_callback_event): New functions.
10237 (process_callback): New function.
10238 (start_event_loop): Call it.
10239 * remote-utils.c (NOT_SCHEDULED): Define.
10240 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10241 moved out of readchar.
10242 (readchar): Rewrite. Call reschedule before returning.
10243 (reset_readchar): New function.
10244 (remote_close): Call it.
10245 (process_remaining, reschedule): New functions.
10246 * server.h (callback_handler_func): New typedef.
10247 (append_callback_event, delete_callback_event): Declare.
10248
9836d6ea
PA
102492010-05-03 Pedro Alves <pedro@codesourcery.com>
10250
10251 * proc-service.c (ps_pglobal_lookup): Use
10252 thread_db_look_up_one_symbol.
10253 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10254 parameter. Use it instead of all_symbols_looked_up.
10255 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10256 field.
10257 (all_symbols_looked_up): Don't declare.
10258 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10259 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10260 field.
10261 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10262 Set all_symbols_looked_up here.
10263 (thread_db_look_up_one_symbol): New.
10264 (thread_db_get_tls_address): Adjust.
10265 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10266 thread_db object on the heap, and tentatively set it in the
10267 process structure.
10268 (thread_db_init): Don't set all_symbols_looked_up here.
10269 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10270
7984d532
PA
102712010-05-03 Pedro Alves <pedro@codesourcery.com>
10272
10273 * linux-low.c (linux_kill, linux_detach): Adjust.
10274 (status_pending_p_callback): Remove redundant statement. Check
10275 for !TARGET_WAITIKIND_IGNORE, instead of
10276 TARGET_WAITKIND_STOPPED.
10277 (handle_tracepoints): Make sure LWP is locked. Adjust.
10278 (linux_wait_for_event_1): Adjust.
10279 (linux_cancel_breakpoints): New.
10280 (unsuspend_one_lwp): New.
10281 (unsuspend_all_lwps): New.
10282 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10283 (send_sigstop_callback): Change return type to int, add new
10284 `except' parameter and handle it.
10285 (suspend_and_send_sigstop_callback): New.
10286 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10287 pass them down. If SUSPEND, also increment the lwp's suspend
10288 count.
10289 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10290 (need_step_over_p): Don't consider suspended LWPs.
10291 (start_step_over): Adjust.
10292 (proceed_one_lwp): Change return type to int, add new `except'
10293 parameter and handle it.
10294 (unsuspend_and_proceed_one_lwp): New.
10295 (proceed_all_lwps): Use find_inferior instead of
10296 for_each_inferior.
10297 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10298 also decrement the suspend count of LWPs. Pass `except' down,
10299 instead of hacking its suspend count.
10300 (linux_pause_all): Add `freeze' parameter. Adjust.
10301 (linux_unpause_all): New.
10302 (linux_target_ops): Install linux_unpause_all.
10303 * server.c (handle_status): Adjust.
10304 * target.h (struct target_ops): New fields `unpause_all' and
10305 `cancel_breakpoints'. Add new parameter to `pause_all'.
10306 (pause_all): Add new `freeze' parameter.
10307 (unpause_all): New.
10308 (cancel_breakpoints): New.
10309 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10310 cancel breakpoints.
10311 (cmd_qtstart): Pause threads.
10312 (stop_tracing): Pause threads, and cancel breakpoints.
10313 * win32-low.c (win32_target_ops): Adjust.
10314
e471f25b
PA
103152010-05-03 Pedro Alves <pedro@codesourcery.com>
10316
10317 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10318 the inferior right away from here...
10319 (linux_wait_1): ... to here, and adjust to check the thread's
10320 last_resume_kind instead of the lwp's step or stop_expected flags.
10321
1915ef4f
PA
103222010-05-02 Pedro Alves <pedro@codesourcery.com>
10323
10324 * README: Use consistent `GDB' and `GDBserver' spellings.
10325
f9e39928
PA
103262010-05-02 Pedro Alves <pedro@codesourcery.com>
10327
10328 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10329 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10330 (linux_detach_one_lwp): Assume the lwp is stopped.
10331 (any_thread_of): Delete.
10332 (linux_detach): Stop all lwps here. Don't blindly delete all
10333 breakpoints.
10334 (delete_lwp_callback): New.
10335 (linux_mourn): Delete all lwps of the process that is gone.
10336 (linux_wait_1): Don't delete the last lwp of the process here.
10337 * mem-break.h (mark_breakpoints_out): Declare.
10338 * mem-break.c (mark_breakpoints_out): New.
10339 (free_all_breakpoints): Use it.
10340 * server.c (handle_target_event): If the process is gone, mark
10341 breakpoints out.
10342 * thread-db.c (struct thread_db) <create_bp>: New field.
10343 (thread_db_enable_reporting): Fix prototype. Store a thread event
10344 breakpoint reference in the thread_db struct.
10345 (thread_db_load_search): Clear the thread_db object.
10346 (try_thread_db_load_1): Ditto.
10347 (switch_to_process): New.
10348 (disable_thread_event_reporting): Use it.
10349 (remove_thread_event_breakpoints): New.
10350 (thread_db_detach, thread_db_mourn): Use it.
10351
1e7fc18c
PA
103522010-05-01 Pedro Alves <pedro@codesourcery.com>
10353
10354 * linux-low.c (linux_enable_event_reporting): New.
10355 (linux_wait_for_event_1, handle_extended_wait): Use it.
10356
02fc4de7
PA
103572010-04-30 Pedro Alves <pedro@codesourcery.com>
10358
10359 * linux-low.c (linux_kill_one_lwp, linux_kill)
10360 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10361 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10362 SIGSTOP even if the LWP is stopped.
10363 (send_sigstop_callback): New.
10364 (stop_all_lwps): Use send_sigstop_callback instead.
10365 (linux_resume_one_thread): Adjust.
10366 (proceed_one_lwp): Still proceed an LWP that the client has
10367 requested to stop, if we haven't reported it as stopped yet. Make
10368 sure that LWPs the client want stopped, have a pending SIGSTOP.
10369
bc3b5632
DE
103702010-04-26 Doug Evans <dje@google.com>
10371
ae1ada35
DE
10372 * server.c (handle_general_set): Make static.
10373
bc3b5632
DE
10374 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10375 Print received char after testing for error/eof instead of before.
10376 (input_interrupt): Tweak comment.
10377
65730243
DE
103782010-04-23 Doug Evans <dje@google.com>
10379
10380 * server.c (start_inferior): Print inferior argv if --debug.
10381
a8ae7dc0
AR
103822010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10383
10384 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10385 * nto-x86-low.c: Include server.h
10386
1c07cc19
PM
103872010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10388
10389 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10390 be consistent with other sources of this directory.
10391 (init_registers_amd64): Correct name of source file of this function
10392 in the comment.
10393
e0a61e09
PM
103942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10395
10396 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10397 64-bit executables.
10398
54709339
PM
103992010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10400
10401 * win32-i386-low.c: Add 64-bit support.
10402 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10403 (init_registers_amd64): Declare.
10404 (mappings): Add 64-bit version of array.
10405 (init_windows_x86): New function.
10406 (the_low_target): Change init_arch field to init_windows_x86.
10407
e8f0053d
PM
104082010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10409
10410 * win32-low.c: Adapt to support also 64-bit architecture.
10411 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10412 (get_image_name): Use SIZE_T type for local variable `done'.
10413 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10414 (toolhelp_get_dll_name): Idem.
10415 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10416 Use uintptr_t typecast to avoid warning.
10417 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10418 (handle_exception): Use phex_nz to avoid warning.
10419 (win32_wait): Remove unused local variable `process'.
10420
c481e77e
PM
104212010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10422
10423 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10424 `amd64-avx.o'.
10425
12ea4b69
PM
104262010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10427
10428 * configure.ac: Use `ws2_32' library for srv_mingw.
10429 * configure: Regenerate.
10430 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10431 * remote-utils.c: Likewise.
10432
f6d1620c
L
104332010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10434
10435 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10436 if __x86_64__ is defined.
10437
8e642873
PM
104382010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10439
10440 * configure: Regenerate.
10441
711e434b
PM
104422010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10443
10444 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10445 * target.h (target_ops): New get_tib_address field.
10446 * win32-low.h (win32_thread_info): Add thread_local_base field.
10447 * win32-low.c (child_add_thread): Add tlb argument.
10448 Set thread_local_base field to TLB.
10449 (get_child_debug_event): Adapt to child_add_thread change.
10450 (win32_get_tib_address): New function.
10451 (win32_target_ops): Set get_tib_address field to
10452 win32_get_tib_address.
10453 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10454
505106cd
PA
104552010-04-12 Pedro Alves <pedro@codesourcery.com>
10456
505106cd
PA
10457 * linux-low.c (linux_mourn): Also remove the process.
10458 * server.c (handle_target_event): Don't remove the process here.
10459 * nto-low.c (nto_mourn): New.
10460 (nto_target_ops): Install it.
10461 * spu-low.c (spu_mourn): New.
10462 (spu_target_ops): Install it.
10463 * win32-low.c (win32_mourn): New.
10464 (win32_target_ops): Install it.
10465
e8470a06
PA
104662010-04-12 Pedro Alves <pedro@codesourcery.com>
10467
10468 * server.h (buffer_xml_printf): Remove redundant `;'.
10469
45ba0d02
PA
104702010-04-12 Pedro Alves <pedro@codesourcery.com>
10471
10472 * regcache.c (set_register_cache): Invalidate regcaches before
10473 changing the register cache layout.
10474 (regcache_invalidate_one): Allow a NULL regcache.
10475 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10476 regcaches before changing the register cache layout or the target
10477 regsets.
10478
59e04013
L
104792010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10480
10481 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10482 variable warning on Linux/x86-64.
10483
8336d594
PA
104842010-04-11 Pedro Alves <pedro@codesourcery.com>
10485
10486 GDBserver disconnected tracing support.
10487
10488 * linux-low.c (linux_remove_process): Delete.
10489 (add_lwp): Don't set last_resume_kind here.
10490 (linux_kill): Use `mourn'.
10491 (linux_detach): Use `thread_db_detach', and `mourn'.
10492 (linux_mourn): New.
10493 (linux_attach_lwp_1): Adjust comment.
10494 (linux_attach): last_resume_kind moved the thread_info; adjust.
10495 (status_pending_p_callback): Adjust.
10496 (linux_wait_for_event_1): Adjust.
10497 (count_events_callback, select_singlestep_lwp_callback)
10498 (select_event_lwp_callback, cancel_breakpoints_callback)
10499 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10500 (proceed_one_lwp): Adjust.
10501 (linux_async): Add debug output.
10502 (linux_thread_stopped): New.
10503 (linux_pause_all): New.
10504 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10505 linux_pause_all.
10506 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10507 (thread_db_free): Delete declaration.
10508 (thread_db_detach, thread_db_mourn): Declare.
10509 * thread-db.c (thread_db_init): Use thread_db_mourn.
10510 (thread_db_free): Delete, split in two.
10511 (disable_thread_event_reporting): New.
10512 (thread_db_detach): New.
10513 (thread_db_mourn): New.
10514
10515 * server.h (struct thread_info) <last_resume_kind>: New field.
10516 <attached>: Add comment.
10517 <gdb_detached>: New field.
10518 (handler_func): Change return type to int.
10519 (handle_serial_event, handle_target_event): Ditto.
10520 (gdb_connected): Declare.
10521 (tracing): Delete.
10522 (disconnected_tracing): Declare.
10523 (stop_tracing): Declare.
10524
10525 * server.c (handle_query) <qSupported>: Report support for
10526 disconnected tracing.
10527 (queue_stop_reply_callback): Account for running threads.
10528 (gdb_wants_thread_stopped): New.
10529 (gdb_wants_all_threads_stopped): New.
10530 (gdb_reattached_process): New.
10531 (handle_status): Clear the `gdb_detached' flag of all processes.
10532 In all-stop, stop all threads.
10533 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10534 (process_serial_event): If the remote connection breaks, or if an
10535 exit was forced with "monitor exit", force an event loop exit.
10536 Handle disconnected tracing on detach.
10537 (handle_serial_event): Adjust.
10538 (handle_target_event): If GDB isn't connected, forward events back
10539 to the inferior, unless the last process exited, in which case,
10540 exit gdbserver. Adjust interface.
10541
10542 * remote-utils.c (remote_open): Don't block in accept. Instead
10543 register an event loop source on the listen socket file
10544 descriptor. Refactor bits into ...
10545 (listen_desc): ... this new global.
10546 (gdb_connected): ... this new function.
10547 (enable_async_notification): ... this new function.
10548 (handle_accept_event): ... this new function.
10549 (remote_close): Clear remote_desc.
10550
10551 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10552
10553 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10554 New fields.
10555 (mourn_inferior): Define.
10556 (target_process_qsupported): Avoid the dangling else problem.
10557 (thread_stopped): Define.
10558 (pause_all): Define.
10559 (target_waitstatus_to_string): Declare.
10560 * target.c (target_waitstatus_to_string): New.
10561
10562 * tracepoint.c (tracing): Make extern.
10563 (disconnected_tracing): New.
10564 (stop_tracing): Make extern. Handle tracing stops due to GDB
10565 disconnecting.
10566 (cmd_qtdisconnected): New.
10567 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10568 (handle_tracepoint_general_set): Handle QTDisconnected.
10569
10570 * event-loop.c (event_handler_func): Change return type to int.
10571 (process_event): Bail out if the event handler wants the event
10572 loop to stop.
10573 (handle_file_event): Ditto.
10574 (start_event_loop): Bail out if the event handler wants the event
10575 loop to stop.
10576
10577 * nto-low.c (nto_target_ops): Adjust.
10578 * spu-low.c (spu_wait): Don't remove the process here.
10579 (spu_target_ops): Adjust.
10580 * win32-low.c (win32_wait): Don't remove the process here.
10581 (win32_target_ops): Adjust.
10582
5d267c4c
PA
105832010-04-11 Pedro Alves <pedro@codesourcery.com>
10584
10585 * regcache.c (realloc_register_cache): Invalidate inferior's
10586 regcache before recreating it.
10587
623ccd72
PA
105882010-04-09 Pedro Alves <pedro@codesourcery.com>
10589
10590 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10591
219f2f23
PA
105922010-04-09 Stan Shebs <stan@codesourcery.com>
10593 Pedro Alves <pedro@codesourcery.com>
10594
10595 * server.h (LONGEST): New.
10596 (struct thread_info) <while_stepping>: New field.
10597 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10598 Declare.
10599 (initialize_tracepoint, handle_tracepoint_general_set)
10600 (handle_tracepoint_query, tracepoint_finished_step)
10601 (tracepoint_was_hit, release_while_stepping_state_list):
10602 (current_traceframe): Declare.
10603 * server.c (handle_general_set): Handle tracepoint packets.
10604 (read_memory): New.
10605 (write_memory): New.
10606 (handle_search_memory_1): Use read_memory.
10607 (handle_query): Report support for conditional tracepoints, trace
10608 state variables, and tracepoint sources. Handle tracepoint
10609 queries.
10610 (main): Initialize the tracepoints module.
10611 (process_serial_event): Handle traceframe reads/writes.
10612
10613 * linux-low.c (handle_tracepoints): New.
10614 (linux_wait_1): Call it.
10615 (linux_resume_one_lwp): Handle while-stepping.
10616 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10617 (linux_target_ops): Install them.
10618 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10619 New field.
10620 * linux-x86-low.c (x86_supports_tracepoints): New.
10621 (the_low_target). Install it.
10622
10623 * mem-break.h (delete_breakpoint): Declare.
10624 * mem-break.c (delete_breakpoint): Make external.
10625
10626 * target.h (struct target_ops): Add `supports_tracepoints',
10627 `read_pc', and `write_pc' fields.
10628 (target_supports_tracepoints): Define.
10629 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10630 (phex_nz): New.
10631
10632 * regcache.h (struct regcache) <registers_owned>: New field.
10633 (init_register_cache, regcache_cpy): Declare.
10634 (regcache_read_pc, regcache_write_pc): Declare.
10635 (register_cache_size): Declare.
10636 (supply_regblock): Declare.
10637 * regcache.c (init_register_cache): New.
10638 (new_register_cache): Use it.
10639 (regcache_cpy): New.
10640 (register_cache_size): New.
10641 (supply_regblock): New.
10642 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10643
219f2f23
PA
10644 * tracepoint.c: New.
10645
10646 * Makefile.in (OBS): Add tracepoint.o.
10647 (tracepoint.o): New rule.
10648
3a13a53b
L
106492010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10650
10651 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10652 (i386-mmx.o): New.
10653 (i386-mmx.c): Likewise.
10654 (i386-mmx-linux.o): Likewise.
10655 (i386-mmx-linux.c): Likewise.
10656
10657 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10658 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10659 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10660 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10661
10662 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10663 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10664 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10665
1570b33e
L
106662010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10667
10668 * Makefile.in (clean): Updated.
10669 (i386-avx.o): New.
10670 (i386-avx.c): Likewise.
10671 (i386-avx-linux.o): Likewise.
10672 (i386-avx-linux.c): Likewise.
10673 (amd64-avx.o): Likewise.
10674 (amd64-avx.c): Likewise.
10675 (amd64-avx-linux.o): Likewise.
10676 (amd64-avx-linux.c): Likewise.
10677
10678 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10679 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10680 (srv_amd64_regobj): Add amd64-avx.o.
10681 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10682 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10683 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10684 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10685 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10686 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10687 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10688
10689 * i387-fp.c: Include "i386-xstate.h".
10690 (i387_xsave): New.
10691 (i387_cache_to_xsave): Likewise.
10692 (i387_xsave_to_cache): Likewise.
10693 (x86_xcr0): Likewise.
10694
10695 * i387-fp.h (i387_cache_to_xsave): Likewise.
10696 (i387_xsave_to_cache): Likewise.
10697 (x86_xcr0): Likewise.
10698
10699 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10700 * linux-crisv32-low.c (target_regsets): Likewise.
10701 * linux-m68k-low.c (target_regsets): Likewise.
10702 * linux-mips-low.c (target_regsets): Likewise.
10703 * linux-ppc-low.c (target_regsets): Likewise.
10704 * linux-s390-low.c (target_regsets): Likewise.
10705 * linux-sh-low.c (target_regsets): Likewise.
10706 * linux-sparc-low.c (target_regsets): Likewise.
10707 * linux-xtensa-low.c (target_regsets): Likewise.
10708
10709 * linux-low.c: Include <sys/uio.h>.
10710 (regsets_fetch_inferior_registers): Support nt_type.
10711 (regsets_store_inferior_registers): Likewise.
10712 (linux_process_qsupported): New.
10713 (linux_target_ops): Add linux_process_qsupported.
10714
10715 * linux-low.h (regset_info): Add nt_type.
10716 (linux_target_ops): Add process_qsupported.
10717
10718 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10719 and <sys/uio.h>.
10720 (init_registers_i386_avx_linux): New.
10721 (init_registers_amd64_avx_linux): Likewise.
10722 (xmltarget_i386_linux_no_xml): Likewise.
10723 (xmltarget_amd64_linux_no_xml): Likewise.
10724 (PTRACE_GETREGSET): Likewise.
10725 (PTRACE_SETREGSET): Likewise.
10726 (x86_fill_xstateregset): Likewise.
10727 (x86_store_xstateregset): Likewise.
10728 (use_xml): Likewise.
10729 (x86_linux_update_xmltarget): Likewise.
10730 (x86_linux_process_qsupported): Likewise.
10731 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10732 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10733 init_registers_i386_linux here. Call
10734 x86_linux_update_xmltarget.
10735 (the_low_target): Add x86_linux_process_qsupported.
10736
10737 * server.c (handle_query): Call target_process_qsupported.
10738
10739 * target.h (target_ops): Add process_qsupported.
10740 (target_process_qsupported): New.
10741
fc7238bb
PA
107422010-04-03 Pedro Alves <pedro@codesourcery.com>
10743
10744 * inferiors.c (add_thread): Set last_status kind to
10745 TARGET_WAITKIND_IGNORE.
10746 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10747 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10748 (linux_wait_1): Move `thread' local definition to block that uses
10749 it. Don't NULL initialize `event_child'.
10750 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10751 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10752 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10753
bdabb078
PA
107542010-04-01 Pedro Alves <pedro@codesourcery.com>
10755
10756 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10757 an extended waitstatus, or by a watchpoint.
10758 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10759 thread was stepping or has been stopped by a watchpoint.
10760
d3bbe7a0
PA
107612010-04-01 Pedro Alves <pedro@codesourcery.com>
10762
10763 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10764 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10765 of another, then delete the previous, and validate all
10766 breakpoints.
10767 (validate_inserted_breakpoint): New.
10768 (delete_disabled_breakpoints): New.
10769 (validate_breakpoints): New.
10770 (check_mem_read): Validate breakpoints before trusting their
10771 shadow. Delete disabled breakpoints.
10772 (check_mem_write): Validate breakpoints before trusting they
10773 should be inserted. Delete disabled breakpoints.
10774 * mem-break.h (validate_breakpoints):
10775 * server.c (handle_query): Validate breakpoints when we see a
10776 qSymbol query.
10777
8b07ae33
PA
107782010-04-01 Pedro Alves <pedro@codesourcery.com>
10779
10780 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10781 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10782 if we could tell there's a GDB breakpoint at stop_pc.
10783 (need_step_over_p): Don't do a step over if we find a GDB
10784 breakpoint at the resume PC.
10785
10786 * mem-break.c (struct raw_breakpoint): New.
10787 (enum bkpt_type): New type `gdb_breakpoint'.
10788 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10789 fields. New field `raw'.
10790 (find_raw_breakpoint_at): New.
10791 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10792 breakpoint instead.
10793 (set_breakpoint_at): Adjust.
10794 (delete_raw_breakpoint): New.
10795 (release_breakpoint): New.
10796 (delete_breakpoint): Rename to...
10797 (delete_breakpoint_1): ... this. Add proc parameter. Use
10798 release_breakpoint. Return ENOENT.
10799 (delete_breakpoint): Reimplement.
10800 (find_breakpoint_at): Delete.
10801 (find_gdb_breakpoint_at): New.
10802 (delete_breakpoint_at): Delete.
10803 (set_gdb_breakpoint_at): New.
10804 (delete_gdb_breakpoint_at): New.
10805 (gdb_breakpoint_here): New.
10806 (set_reinsert_breakpoint): Use release_breakpoint.
10807 (uninsert_breakpoint): Rename to ...
10808 (uninsert_raw_breakpoint): ... this.
10809 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10810 (reinsert_raw_breakpoint): Change parameter type to
10811 raw_breakpoint.
10812 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10813 instead.
10814 (check_breakpoints): Adjust. Use release_breakpoint.
10815 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10816 (breakpoint_inserted_here): Ditto.
10817 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10818 Don't trust the breakpoint's shadow if it is not inserted.
10819 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10820 (delete_all_breakpoints): Adjust.
10821 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10822 use delete_breakpoint_1.
10823
10824 * mem-break.h (breakpoints_supported): Delete declaration.
10825 (set_gdb_breakpoint_at): Declare.
10826 (gdb_breakpoint_here): Declare.
10827 (delete_breakpoint_at): Delete.
10828 (delete_gdb_breakpoint_at): Declare.
10829
10830 * server.h (struct raw_breakpoint): Forward declare.
10831 (struct process_info): New field `raw_breakpoints'.
10832
10833 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10834 breakpoints.
10835
6bf5e0ba
PA
108362010-03-24 Pedro Alves <pedro@codesourcery.com>
10837
10838 * linux-low.c (status_pending_p_callback): Fix comment.
10839 (linux_wait_for_event_1): Move most of the internal breakpoint
10840 handling from here...
10841 (linux_wait_1): ... to here.
10842 (count_events_callback): New.
10843 (select_singlestep_lwp_callback): New.
10844 (select_event_lwp_callback): New.
10845 (cancel_breakpoints_callback): New.
10846 (select_event_lwp): New.
10847 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10848 priority to all LWPs that have had events that should be reported
10849 to the client. Cancel breakpoints when about to reporting the
10850 event to the client, not while stopping lwps. No longer cancel
10851 finished single-steps here.
10852 (cancel_finished_single_step): Delete.
10853 (cancel_finished_single_steps): Delete.
10854
414a389f
PA
108552010-03-24 Pedro Alves <pedro@codesourcery.com>
10856
10857 * mem-break.c (enum bkpt_type): New.
10858 (struct breakpoint): New field `type'.
10859 (set_breakpoint_at): Change return type to struct breakpoint
10860 pointer. Set type to `other_breakpoint' by default.
10861 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10862 in the breakpoint list.
10863 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10864 (reinsert_breakpoint): Rename to ...
10865 (reinsert_raw_breakpoint): ... this.
10866 (reinsert_breakpoints_at): Adjust.
10867 * mem-break.h (struct breakpoint): Declare.
10868 (set_breakpoint_at): Change return type to struct breakpoint
10869 pointer.
10870
2280c721
PA
108712010-03-24 Pedro Alves <pedro@codesourcery.com>
10872
10873 * server.c (handle_query): Assign, not compare.
10874
d50171e4
PA
108752010-03-24 Pedro Alves <pedro@codesourcery.com>
10876
10877 Teach linux gdbserver to step-over-breakpoints.
10878
10879 * linux-low.c (can_hardware_single_step): New.
10880 (supports_breakpoints): New.
10881 (handle_extended_wait): If stopping threads, read the stop pc of
10882 the new cloned LWP.
10883 (get_pc): New.
10884 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10885 low target doesn't support retrieving the PC.
10886 (add_lwp): Set last_resume_kind to resume_continue.
10887 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10888 (linux_attach): Don't clear stop_expected. Set the lwp's
10889 last_resume_kind to resume_stop.
10890 (linux_detach_one_lwp): Don't check for removed breakpoints.
10891 (check_removed_breakpoint): Delete.
10892 (status_pending_p): Rename to ...
10893 (status_pending_p_callback): ... this. Don't check for removed
10894 breakpoints. Don't consider threads that are stopped from GDB's
10895 perspective.
10896 (linux_wait_for_lwp): Always read the stop_pc here.
10897 (cancel_breakpoint): New.
10898 (step_over_bkpt): New global.
10899 (linux_wait_for_event_1): Implement stepping over breakpoints.
10900 (gdb_wants_lwp_stopped): New.
10901 (gdb_wants_all_stopped): New.
10902 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10903 single-step traps here. Store the thread's last reported target
10904 wait status.
10905 (send_sigstop): Don't clear stop_expected. Always set it,
10906 instead.
10907 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10908 (cancel_finished_single_step): New.
10909 (cancel_finished_single_steps): New.
10910 (wait_for_sigstop): Don't cancel finished single-step traps here.
10911 (linux_resume_one_lwp): Don't check for removed breakpoints.
10912 Don't set `step' on non-hardware step archs.
10913 (linux_set_resume_request): Ignore resume_stop requests if already
10914 stopping or stopped. Set the lwp's last_resume_kind.
10915 (resume_status_pending_p): Don't check for removed breakpoints.
10916 (need_step_over_p): New.
10917 (start_step_over): New.
10918 (finish_step_over): New.
10919 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10920 requests. Clear the thread's last reported target waitstatus.
10921 Don't use the `suspended' flag. Don't consider pending breakpoints.
10922 (linux_resume): Start a step-over if necessary.
10923 (proceed_one_lwp): New.
10924 (proceed_all_lwps): New.
10925 (unstop_all_lwps): New.
10926 * linux-low.h (struct lwp_info): Rewrite comment for the
10927 `suspended' flag. Add the `stop_pc' field. Delete the
10928 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10929 Add `'last_resume_kind' and `need_step_over' fields.
10930 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10931 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10932 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10933 (set_raw_breakpoint_at): New.
10934 (set_breakpoint_at): Rewrite to use it.
10935 (reinsert_breakpoint_handler): Delete.
10936 (set_reinsert_breakpoint): New.
10937 (reinsert_breakpoint_by_bp): Delete.
10938 (delete_reinsert_breakpoints): New.
10939 (uninsert_breakpoint): Rewrite.
10940 (uninsert_breakpoints_at): New.
10941 (reinsert_breakpoint): Rewrite.
10942 (reinsert_breakpoints_at): New.
10943 (check_breakpoints): Rewrite.
10944 (breakpoint_here): New.
10945 (breakpoint_inserted_here): New.
10946 (check_mem_read): Adjust.
10947 * mem-break.h (breakpoints_supported, breakpoint_here)
10948 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10949 (reinsert_breakpoint_by_bp): Delete declaration.
10950 (delete_reinsert_breakpoints): Declare.
10951 (reinsert_breakpoint): Delete declaration.
10952 (reinsert_breakpoints_at): Declare.
10953 (uninsert_breakpoint): Delete declaration.
10954 (uninsert_breakpoints_at): Declare.
10955 (check_breakpoints): Adjust prototype.
10956 * server.h: Adjust include order.
10957 (struct thread_info): Declare here. Add a `last_status' field.
10958
30ba68cb
MS
109592010-03-23 Michael Snyder <msnyder@vmware.com>
10960
10961 * server.c (crc32): New function.
10962 (handle_query): Add handling for 'qCRC:' request.
10963
b9a881c2
PA
109642010-03-23 Pedro Alves <pedro@codesourcery.com>
10965
10966 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10967 lwp had been stopped by a watchpoint.
10968
e92d13d5
PA
109692010-03-16 Pedro Alves <pedro@codesourcery.com>
10970
10971 * server.h (internal_error): Declare.
10972 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10973 * utils.c (internal_error): New function.
10974
64daa791
AS
109752010-03-15 Andreas Schwab <schwab@redhat.com>
10976
10977 * configure.srv: Fix typo setting srv_regobj.
10978
f52cd8cd
PA
109792010-03-15 Pedro Alves <pedro@codesourcery.com>
10980
10981 * linux-low.c (fetch_register): Avoid passing a non string literal
10982 format to `error'.
10983 (usr_store_inferior_registers): Ditto.
10984
93ae6fdc
PA
109852010-03-14 Pedro Alves <pedro@codesourcery.com>
10986
10987 * linux-low.c (linux_write_memory): Bail out early if peeking
10988 memory failed.
10989
c3adc08c
PA
109902010-03-14 Pedro Alves <pedro@codesourcery.com>
10991
10992 * linux-low.h (struct lwp_info): New fields
10993 `stopped_by_watchpoint' and `stopped_data_address'.
10994 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10995 here, and cache them in the lwp object.
10996 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10997 directly.
10998 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10999 field.
11000 (linux_stopped_by_watchpoint): Rewrite.
11001 (linux_stopped_data_address): Rewrite.
11002
bce522a2
PA
110032010-03-06 Simo Melenius <simo.melenius@iki.fi>
11004
11005 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11006 switching the current inferior, not before.
11007
90884b2b
L
110082010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11009
11010 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11011 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11012 i386-linux.c and amd64-linux.c.
11013 (reg-i386.o): Removed.
11014 (reg-i386.c): Likewise.
11015 (reg-i386-linux.o): Likewise.
11016 (reg-i386-linux.c): Likewise.
11017 (reg-x86-64.o): Likewise.
11018 (reg-x86-64.c): Likewise.
11019 (reg-x86-64-linux.o): Likewise.
11020 (reg-x86-64-linux.c): Likewise.
11021 (i386.o): New.
11022 (i386.c): Likewise.
11023 (i386-linux.o): Likewise.
11024 (i386-linux.c): Likewise.
11025 (amd64.o): Likewise.
11026 (amd64.c): Likewise.
11027 (amd64-linux.o): Likewise.
11028 (amd64-linux.c): Likewise.
11029
11030 * configure.srv (srv_i386_regobj): New.
11031 (srv_i386_linux_regobj): Likewise.
11032 (srv_amd64_regobj): Likewise.
11033 (srv_amd64_linux_regobj): Likewise.
11034 (srv_i386_32bit_xmlfiles): Likewise.
11035 (srv_i386_64bit_xmlfiles): Likewise.
11036 (srv_i386_xmlfiles): Likewise.
11037 (srv_amd64_xmlfiles): Likewise.
11038 (srv_i386_linux_xmlfiles): Likewise.
11039 (srv_amd64_linux_xmlfiles): Likewise.
11040 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11041 srv_xmlfiles to $srv_i386_xmlfiles.
11042 (i[34567]86-*-mingw32ce*): Likewise.
11043 (i[34567]86-*-mingw*): Likewise.
11044 (i[34567]86-*-nto*): Likewise.
11045 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11046 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11047 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11048 (x86_64-*-linux*): Likewise.
11049
11050 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11051 (init_registers_amd64_linux): New.
11052 (x86_arch_setup): Replace init_registers_x86_64_linux with
11053 init_registers_amd64_linux.
11054
193f13e6
MK
110552010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11056
11057 * configure.ac: Check for libdl. If it is not available link against
11058 static libthread_db.
11059 * configure: Regenerate.
11060
85d721b8
PA
110612010-02-22 Pedro Alves <pedro@codesourcery.com>
11062
11063 PR9605
11064
11065 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11066 handing a read watchpoint.
11067 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11068
6076632b
DE
110692010-02-12 Doug Evans <dje@google.com>
11070
11071 * linux-low.c (linux_supports_tracefork_flag): Document.
11072 (linux_look_up_symbols): Add comment.
11073
3327ccf7
L
110742010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11075
11076 * regcache.c (supply_register): Clear regcache if buf is NULL.
11077
0718675c 110782010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11079 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11080
11081 * inferiors.c (find_inferior): Add function documentation.
11082 (unloaded_dll): Handle the case where the unloaded dll has not
11083 been previously registered in the dll list.
11084
177321bd
DJ
110852010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11086
11087 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11088 (thumb2_breakpoint): New.
11089 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11090
2b009048
DJ
110912010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11092
11093 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11094 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11095 breakpoints.
11096
3be029c7
PA
110972010-01-21 Pedro Alves <pedro@codesourcery.com>
11098
11099 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11100
18f5de3b
JK
111012010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11102
11103 * linux-s390-low.c (s390_collect_ptrace_register)
11104 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11105
3743bb4f
DE
111062010-01-21 Doug Evans <dje@google.com>
11107
14ce3065
DE
11108 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11109 (PTRACE_ARG4_TYPE): New macro.
11110 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11111 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11112 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11113 (usr_store_inferior_registers): Ditto.
11114 (linux_read_memory, linux_write_memory): Ditto.
11115 (linux_test_for_tracefork): Ditto.
11116
3743bb4f
DE
11117 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11118 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11119
8b315be5
PA
111202010-01-21 Pedro Alves <pedro@codesourcery.com>
11121
11122 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11123 target.
11124
85492558
PA
111252010-01-21 Pedro Alves <pedro@codesourcery.com>
11126
11127 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11128 prototype to take a regcache. Adjust.
11129
442ea881
PA
111302010-01-20 Pedro Alves <pedro@codesourcery.com>
11131
11132 * regcache.h (struct thread_info): Forward declare.
11133 (struct regcache): New.
11134 (new_register_cache): Adjust prototype.
11135 (get_thread_regcache): Declare.
11136 (free_register_cache): Adjust prototype.
11137 (registers_to_string, registers_from_string): Ditto.
11138 (supply_register, supply_register_by_name, collect_register)
11139 (collect_register_as_string, collect_register_by_name): Ditto.
11140 * regcache.c (struct inferior_regcache_data): Delete.
11141 (get_regcache): Rename to ...
11142 (get_thread_regcache): ... this. Adjust. Switch inferior before
11143 fetching registers.
11144 (regcache_invalidate_one): Adjust.
11145 (regcache_invalidate): Fix prototype.
11146 (new_register_cache): Return the new register cache.
11147 (free_register_cache): Change prototype.
11148 (realloc_register_cache): Adjust.
11149 (registers_to_string): Change prototype to take a regcache. Adjust.
11150 (registers_from_string): Ditto.
11151 (register_data): Ditto.
11152 (supply_register): Ditto.
11153 (supply_register_by_name): Ditto.
11154 (collect_register): Ditto.
11155 (collect_register_as_string): Ditto.
11156 (collect_register_by_name): Ditto.
11157 * server.c (process_serial_event): Adjust.
11158 * linux-low.h (regset_fill_func, regset_store_func): Change
11159 prototype.
11160 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11161 Change prototype.
11162 * linux-low.c (get_stop_pc): Adjust.
11163 (check_removed_breakpoint): Adjust.
11164 (linux_wait_for_event): Adjust.
11165 (linux_resume_one_lwp): Adjust.
11166 (fetch_register): Add regcache parameter. Adjust.
11167 (usr_store_inferior_registers): Ditto.
11168 (regsets_fetch_inferior_registers): Ditto.
11169 (regsets_store_inferior_registers): Ditto.
11170 (linux_fetch_registers, linux_store_registers): Ditto.
11171 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11172 regcache. Adjust.
43aaf8b6
PA
11173 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11174 Ditto.
442ea881
PA
11175 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11176 prototype to take a regcache.
11177 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11178 * remote-utils.c (convert_ascii_to_int, outreg)
11179 (prepare_resume_reply): Change prototype to take a regcache.
11180 Adjust.
11181 * target.h (struct target_ops) <fetch_registers, store_registers>:
11182 Change prototype to take a regcache.
11183 (fetch_inferior_registers, store_inferior_registers): Change
11184 prototype to take a regcache. Adjust.
11185 * proc-service.c (ps_lgetregs): Adjust.
11186 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11187 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11188 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11189 take a regcache. Adjust.
11190 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11191 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11192 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11193 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11194 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11195 (cris_cannot_fetch_register):
11196 (cris_breakpoint_at): Change prototype to take a regcache.
11197 Adjust.
11198 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11199 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11200 to take a regcache. Adjust.
11201 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11202 Adjust.
11203 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11204 take a regcache. Adjust.
11205 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11206 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11207 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11208 * linux-mips-low.c (mips_get_pc):
11209 (mips_set_pc): Change prototype to take a regcache. Adjust.
11210 (mips_reinsert_addr): Adjust.
11211 (mips_collect_register): Change prototype to take a regcache.
11212 Adjust.
11213 (mips_supply_register):
11214 (mips_collect_register_32bit, mips_supply_register_32bit)
11215 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11216 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11217 * linux-ppc-low.c (ppc_supply_ptrace_register)
11218 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11219 (parse_spufs_run): Adjust.
11220 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11221 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11222 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11223 take a regcache. Adjust.
11224 * linux-s390-low.c (s390_collect_ptrace_register)
11225 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11226 (s390_set_pc): Change prototype to take a regcache. Adjust.
11227 (s390_arch_setup): Adjust.
11228 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11229 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11230 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11231 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11232 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11233 regcache. Adjust.
11234 (sparc_breakpoint_at): Adjust.
11235 * linux-xtensa-low.c (xtensa_fill_gregset):
11236 (xtensa_store_gregset):
11237 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11238 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11239 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11240 prototype to take a regcache. Adjust.
11241 * win32-arm-low.c (arm_fetch_inferior_register)
11242 (arm_store_inferior_register): Change prototype to take a
11243 regcache. Adjust.
11244 * win32-i386-low.c (i386_fetch_inferior_register)
11245 (i386_store_inferior_register): Change prototype to take a
11246 regcache. Adjust.
11247 * win32-low.c (child_fetch_inferior_registers)
11248 (child_store_inferior_registers): Change prototype to take a
11249 regcache. Adjust.
11250 (win32_wait): Adjust.
11251 (win32_fetch_inferior_registers): Change prototype to take a
11252 regcache. Adjust.
11253 (win32_store_inferior_registers): Adjust.
11254 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11255 store_inferior_register>: Change prototype to take a regcache.
11256
60c3d7b0
DE
112572010-01-20 Doug Evans <dje@google.com>
11258
11259 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11260 #ifdef.
11261 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11262 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11263
dc146f7c
VP
112642010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11265
11266 * linux-low.c (linux_core_of_thread): New.
11267 (compare_ints, show_process, list_threads): New.
11268 (linux_qxfer_osdata): Report threads and cores.
11269 (linux_target_op): Register linux_core_of_thread.
11270 * remote-utils.c (prepare_resume_reply): Report the core.
11271 (buffer_xml_printf): Support %d specifier.
11272 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11273 New.
11274 (handle_query): Handle qXfer:threads. Announce availability
11275 thereof.
11276 * target.h (struct target_ops): New field core_of_thread.
11277
7803799a
UW
112782010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11279
11280 * Makefile.in (clean): Remove new generated files.
11281 (reg-s390.o, reg-s390.c): Remove rules.
11282 (reg-s390x.o, reg-s390x.c): Likewise.
11283 (s390-linux32.o, s390-linux32.c): Add rules.
11284 (s390-linux64.o, s390-linux64.c): Likewise.
11285 (s390x-linux64.o, s390x-linux64.c): Likewise.
11286 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11287 * linux-s390-low.c: Include <elf.h>.
11288 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11289 (init_registers_s390): Remove prototype.
11290 (init_registers_s390x): Likewise.
11291 (init_registers_s390_linux32): Add prototype.
11292 (init_registers_s390_linux64): Likewise.
11293 (init_registers_s390x_linux64): Likewise.
11294 (s390_num_regs_3264): New define.
11295 (s390_regmap_3264): New global variable.
11296 (s390_cannot_fetch_register): Remove obsolete check.
11297 (s390_cannot_store_register): Likewise.
11298 (s390_collect_ptrace_register): Handle upper/lower register halves.
11299 (s390_supply_ptrace_register): Likewise.
11300 (s390_fill_gregset): Update to register number changes.
11301 (s390_get_hwcap): New routine.
11302 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11303 Install appropriate regmap and register set.
11304
6e7ffa39
JB
113052010-01-01 Joel Brobecker <brobecker@adacore.com>
11306
11307 * server.c (gdbserver_version): Update copyright year to 2010.
11308 * gdbreplay.c (gdbreplay_version): Likewise.
11309
957f3f49
DE
113102009-12-28 Doug Evans <dje@google.com>
11311
11312 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11313 elf/external.h. Include <elf.h> instead but only if necessary.
11314
ca5c370d
PA
113152009-12-28 Pedro Alves <pedro@codesourcery.com>
11316
11317 * linux-low.c (linux_remove_process): Remove `detaching'
11318 parameter. Don't release/detach from thread_db here.
11319 (linux_kill): Release/detach from thread_db here, ...
11320 (linux_detach): ... and here, before actually detaching.
11321 (linux_wait_1): ... and here, when a process exits.
11322 * thread-db.c (any_thread_of): New.
11323 (thread_db_free): Switch the current inferior to a thread of the
11324 passed in process.
11325
4ee62156
DE
113262009-12-21 Doug Evans <dje@google.com>
11327
d90e6a88
DE
11328 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11329
c5f62d5f
DE
11330 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11331 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11332 warning ifndef __NR_tkill. Move setting of errno there too.
11333 Delete unnecessary resetting of errno after syscall.
11334 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11335
10e86dd7
DE
11336 * configure.ac: Check for dladdr.
11337 * config.in: Regenerate.
11338 * configure: Regenerate.
11339 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11340 (try_thread_db_load): Update.
11341
4ee62156
DE
11342 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11343
00f515da
DE
113442009-12-18 Doug Evans <dje@google.com>
11345
e9464885
DE
11346 * event-loop.c: Include unistd.h if it exists.
11347
07d4f67e
DE
11348 * linux-low.c (my_waitpid): Move definition away from being in
11349 between linux_tracefork_child/linux_test_for_tracefork.
11350
00f515da
DE
11351 * gdb_proc_service.h (psaddr_t): Fix type.
11352 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11353 signature to match glibc.
11354
1de1badb
DE
113552009-12-16 Doug Evans <dje@google.com>
11356
11357 * linux-low.c (linux_read_memory): Fix argument to read.
11358
aeeb81d1
PA
113592009-11-26 Pedro Alves <pedro@codesourcery.com>
11360
11361 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11362 events, don't leave current_inferior pointing at null.
11363
10357975
PA
113642009-11-26 Pedro Alves <pedro@codesourcery.com>
11365
11366 * win32-low.c (LOG): Delete.
11367 (OUTMSG): Output to stderr.
11368 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11369 on compile time LOG macro.
11370 (win32_wait): Fix debug output.
11371
cf6e3471
PA
113722009-11-26 Pedro Alves <pedro@codesourcery.com>
11373
11374 * win32-low.c (win32_add_one_solib): If the dll name is
11375 "ntdll.dll", prepend the system directory to the dll path.
11376
0c85e18e
MK
113772009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11378
11379 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11380
9ac544ce 113812009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11382 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11383
11384 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11385 * configure.ac: Check for __mcoldfire__ and set
11386 gdb_cv_m68k_is_coldfire.
11387 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11388 reg-cf.o and reg-m68k.o.
11389 * configure: Regenerated.
11390
fd7dd3e6
PA
113912009-11-16 Pedro Alves <pedro@codesourcery.com>
11392
11393 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11394 Pass it to thread_db_free.
11395 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11396 proper `detaching' argument to linux_remove_process.
11397 * linux-low.h (thread_db_free): Add `detaching' parameter.
11398 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11399 to thread_db_free.
11400 (thread_db_free): Add `detaching' parameter. Only
11401 call td_ta_clear_event if detaching from process.
11402
75aa492e
MK
114032009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11404
11405 * thread-db.c (thread_db_free): Fix typo.
11406
21e1bee4
PP
114072009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11408
11409 PR gdb/10838
11410 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11411
8838b45e
NS
114122009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11413
11414 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11415 with an i686 compiler.
11416 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11417 needed.
11418 * configure: Rebuilt.
11419
8a35fb51
SL
114202009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11421
11422 PR gdb/10783
11423
11424 * server.c (handle_search_memory_1): Correct read_addr initialization
11425 in loop for searching subsequent chunks.
11426
96f15937
PP
114272009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11428
11429 * configure.ac: New --with-libthread-db option.
11430 * thread-db.c: Allow direct dependence on libthread_db.
11431 (thread_db_free): Adjust.
11432 * config.in: Regenerate.
11433 * configure: Likewise.
889bf7c5 11434
5f7d1694
PP
114352009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11436
11437 PR gdb/10757
11438 * thread-db.c (attach_thread): New function.
11439 (maybe_attach_thread): Return success/failure.
11440 (find_new_threads_callback): Adjust.
889bf7c5
PA
11441 (thread_db_find_new_threads): Loop until no new threads.
11442
88e3b899
PA
114432009-10-13 Pedro Alves <pedro@codesourcery.com>
11444
11445 * proc-service.c (ps_lgetregs): Formatting.
11446
cdbfd419
PP
114472009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11448
11449 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11450 * configure.ac: Adjust.
11451 * linux-low.h (struct process_info_private): Move members to struct
11452 thread_db.
11453 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11454 * linux-low.c (linux_remove_process): Adjust.
11455 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11456 * server.c (handle_query): Move code ...
11457 (handle_monitor_command): ... here. New function.
11458 * target.h (struct target_ops): New member.
11459 * thread-db.c (struct thread_db): New.
11460 (libthread_db_search_path): New variable.
11461 (thread_db_create_event, thread_db_enable_reporting)
11462 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11463 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11464 (try_thread_db_load_1, dladdr_to_soname): New functions.
11465 (try_thread_db_load, thread_db_load_search): New functions.
11466 (thread_db_init): Search for libthread_db.
11467 (thread_db_free): New function.
11468 (thread_db_handle_monitor_command): Likewise.
11469 * config.in: Regenerate.
11470 * configure: Regenerate.
889bf7c5 11471
4168d2d6
UW
114722009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11473
11474 * spu-low.c (spu_kill): Wait for inferior to terminate.
11475 Call clear_inferiors.
11476 (spu_detach): Call clear_inferiors.
11477
81ecdfbb
RW
114782009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11479
11480 * aclocal.m4: Regenerate.
11481 * config.in: Likewise.
11482 * configure: Likewise.
11483
0b9ff2c0
UW
114842009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11485
11486 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11487 (parse_spufs_run): New function.
11488 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11489 (ppc_breakpoint_at): Handle SPU breakpoints.
11490
efcbbd14
UW
114912009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11492
11493 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11494 (SPUFS_MAGIC): Define.
11495 (spu_enumerate_spu_ids): New function.
11496 (linux_qxfer_spu): New function.
11497 (linux_target_ops): Install linux_qxfer_spu.
11498
f4d9bade
UW
114992009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11500
11501 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11502 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11503 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11504 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11505 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11506 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11507 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11508 (init_registers_powerpc_cell32l): Add prototype.
11509 (init_registers_powerpc_cell64l): Likewise.
11510 (ppc_arch_setup): Detect Cell/B.E. architecture.
11511
96e946ca
RW
115122009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11513
11514 * Makefile.in (datarootdir): New variable.
11515
58d6951d
DJ
115162009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11517
11518 * linux-low.c (linux_write_memory): Update debugging output.
11519 * Makefile.in (clean): Add new descriptions.
11520 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11521 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11522 * configure.srv: Add new files for arm*-*-linux*.
11523 * linux-arm-low.c: Add new declarations.
11524 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11525 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11526 (HWCAP_VFPv3D16): New.
11527 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11528 instead of __IWMMXT__.
11529 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11530 (arm_arch_setup): New.
11531 (target_regsets): Remove #ifdef. Add VFP regset.
11532 (the_low_target): Use arm_arch_setup.
11533
12b42a12
DJ
115342009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11535
11536 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11537 the main thread again.
11538
ac8c974e
AR
115392009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11540
11541 Adding Neutrino gdbserver.
11542 * configure: Regenerated.
11543 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11544 * configure.srv (i[34567]86-*-nto*): New target.
11545 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11546 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11547 (nto_comctrl) [__QNX__]: New function.
11548 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11549
4424e0c3 115502009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11551
11552 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11553 srv_tgtobj.
11554
912cf4ba
PA
115552009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11556 Pedro Alves <pedro@codesourcery.com>
11557
11558 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11559 don't support CONTEXT_EXTENDED_REGISTERS.
11560 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11561 (the_low_target): Install them.
11562 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11563 failing with ERROR_PIPE_NOT_CONNECTED.
11564
aa5ca48f
DE
115652009-06-30 Doug Evans <dje@google.com>
11566 Pierre Muller <muller@ics.u-strasbg.fr>
11567
11568 Add h/w watchpoint support to x86-linux, win32-i386.
11569 * Makefile.in (SFILES): Add i386-low.c
11570 (i386_low_h): Define.
11571 (i386-low.o): Add dependencies.
11572 (linux-x86-low.o): Add i386-low.h dependency.
11573 (win32-i386-low.o): Ditto.
11574 * i386-low.c: New file.
11575 * i386-low.h: New file.
11576 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11577 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11578 * linux-low.c (linux_add_process): Initialize arch_private.
11579 (linux_remove_process): Free arch_private.
11580 (add_lwp): Initialize arch_private.
11581 (delete_lwp): Free arch_private.
11582 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11583 provided.
11584 * linux-low.h (process_info_private): New member arch_private.
11585 (lwp_info): New member arch_private.
11586 (linux_target_ops): New members new_process, new_thread,
11587 prepare_to_resume.
11588 (ptid_of): New macro.
11589 * linux-x86-low.c: Include stddef.h, i386-low.h.
11590 (arch_process_info): New struct.
11591 (arch_lwp_info): New struct.
11592 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11593 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11594 (i386_dr_low_get_status): New function.
11595 (x86_insert_point, x86_remove_point): New functions.
11596 (x86_stopped_by_watchpoint): New function.
11597 (x86_stopped_data_address): New function.
11598 (x86_linux_new_process, x86_linux_new_thread): New functions.
11599 (x86_linux_prepare_to_resume): New function.
11600 (the_low_target): Add entries for insert_point, remove_point,
11601 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11602 prepare_to_resume.
11603 * server.c (debug_hw_points): New global.
11604 (monitor_show_help): Document set debug-hw-points.
11605 (handle_query): Process "set debug-hw-points".
11606 * server.h (debug_hw_points): Declare.
11607 (paddress): Declare.
11608 * utils.c (NUMCELLS, CELLSIZE): New macros.
11609 (get_sell, xsnprintf, paddress): New functions.
11610 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11611 remove_point, stopped_by_watchpoint, stopped_data_address.
11612 * win32-i386-low.c: Include i386-low.h.
11613 (debug_reg_state): Replaces dr.
11614 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11615 (i386_dr_low_get_status): New function.
11616 (i386_insert_point, i386_remove_point): New functions.
11617 (i386_stopped_by_watchpoint): New function.
11618 (i386_stopped_data_address): New function.
11619 (i386_initial_stuff): Update.
11620 (get_thread_context,set_thread_context,i386_thread_added): Update.
11621 (the_low_target): Add entries for insert_point,
11622 remove_point, stopped_by_watchpoint, stopped_data_address.
11623 * win32-low.c (win32_insert_watchpoint): New function.
11624 (win32_remove_watchpoint): New function.
11625 (win32_stopped_by_watchpoint): New function.
11626 (win32_stopped_data_address): New function.
11627 (win32_target_ops): Add entries for insert_watchpoint,
11628 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11629 * win32-low.h (win32_target_ops): New members insert_point,
11630 remove_point, stopped_by_watchpoint, stopped_data_address.
11631
d993e290
PA
116322009-06-25 Pedro Alves <pedro@codesourcery.com>
11633
11634 * server.c (process_serial_event): Re-return unsupported, not
11635 error, if the type isn't recognized. Re-allow supporting only
11636 insert or remove packets. Also call require_running for
11637 breakpoints. Add missing break statement to default case. Tidy.
11638 * target.h (struct target_ops): Rename insert_watchpoint to
11639 insert_point, and remove_watchpoint to remove_point.
11640
11641 * linux-low.h (struct linux_target_ops): Likewise.
11642 * linux-low.c (linux_insert_watchpoint): Rename to ...
11643 (linux_insert_point): ... this. Adjust.
11644 (linux_remove_watchpoint): Rename to ...
11645 (linux_remove_point): ... this. Adjust.
11646 (linux_target_ops): Adjust.
11647 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11648 (cris_insert_point): ... this.
11649 (cris_remove_watchpoint): Rename to ...
11650 (cris_remove_point): ... this.
11651 (the_low_target): Adjust.
11652
0f54c268
PM
116532009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11654
11655 * server.c (handle_v_kill): Pass signal_pid to
11656 kill_inferior if multi_process is zero.
11657
c6314022
AR
116582009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11659
11660 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11661 * target.h (target_ops): Comment for *_watchpoint to make it clear
11662 the functions can get types '0' and '1'.
11663
4463ce24
AR
116642009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11665
11666 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11667 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11668 * regcache.c (get_regcache): Likewise.
11669 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11670 * win32-low.c (child_fetch_inferior_registers): Remove check for
11671 regno 0.
11672
cf8fd78b
PA
116732009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11674 Pedro Alves <pedro@codesourcery.com>
11675
11676 * target.h (struct target_ops) <supports_multi_process>: New
11677 callback.
11678 (target_supports_multi_process): New.
11679 * server.c (handle_query): Even if GDB reports support, only
11680 enable multi-process if the target also supports it. Report
11681 multi-process support only if the target backend supports it.
11682 * linux-low.c (linux_supports_multi_process): New function.
11683 (linux_target_ops): Install it as target_supports_multi_process
11684 callback.
11685
47c0c975
DE
116862009-05-24 Doug Evans <dje@google.com>
11687
e09875d4
DE
11688 Global renaming of find_thread_pid to find_thread_ptid.
11689 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11690 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11691 All callers updated.
11692
e27d73f6
DE
11693 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11694 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11695 directly.
11696
47c0c975
DE
11697 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11698 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11699 (linux_resume_one_lwp): Ditto.
11700
2acc282a
DE
117012009-05-23 Doug Evans <dje@google.com>
11702
11703 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11704 from struct inferior_list_entry * to struct lwp_info *.
11705 All callers updated.
11706
9f1036c1
DE
117072009-05-13 Doug Evans <dje@google.com>
11708
11709 * linux-x86-low.c: Don't include assert.h.
11710 (x86_siginfo_fixup): Use fatal, not assert.
11711 (x86_arch_setup): Fix comment.
11712
d0722149
DE
117132009-05-12 Doug Evans <dje@google.com>
11714
11715 Biarch support for i386/amd64 gdbserver.
11716 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11717 Add linux-x86-low.c.
11718 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11719 (linux-x86-low.o): Add.
11720 * linux-x86-64-low.c: Delete.
11721 * linux-i386-low.c: Delete.
11722 * linux-x86-low.c: New file.
11723 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11724 linux-x86-low.o.
11725 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11726 linux-x86-low.o.
11727 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11728 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11729 (linux_child_pid_to_exec_file): New function.
11730 (elf_64_header_p, elf_64_file_p): New functions.
11731 (siginfo_fixup): New function.
11732 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11733 give target a chance to convert layout.
11734 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11735 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11736
fdeb2a12
DE
117372009-05-07 Doug Evans <dje@google.com>
11738
11739 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11740 (regsets_store_inferior_registers): Ditto.
11741
a6dbe5df
PA
117422009-05-06 Pedro Alves <pedro@codesourcery.com>
11743
11744 PR server/10048
11745
11746 * linux-low.c (must_set_ptrace_flags): Delete.
11747 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11748 of the global.
11749 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11750 `lwp->must_set_ptrace_flags' instead.
ba42693b 11751 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11752 (linux_wait_1): ... not here.
11753
5091eb23
DE
117542009-04-30 Doug Evans <dje@google.com>
11755
9f767825
DE
11756 * inferiors.c (started_inferior_callback): New function.
11757 (attached_inferior_callback): New function.
11758 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11759 * server.c (print_started_pid, print_attached_pid): New functions.
11760 (detach_or_kill_for_exit): New function.
11761 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11762 * server.h (have_started_inferiors_p): Declare.
11763 (have_attached_inferiors_p): Declare.
11764
5091eb23
DE
11765 * inferiors.c (remove_process): Fix memory leak, free process.
11766 * linux-low.c (linux_remove_process): New function.
11767 (linux_kill): Call it instead of remove_process.
11768 (linux_detach, linux_wait_1): Ditto.
11769
155c8968
PA
117702009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11771
11772 * configure.srv: Add x86 Windows CE target.
11773
7fe519cb
UW
117742009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11775
11776 * inferiors.c (get_thread_process): Make global.
11777 * server.h (get_thread_process): Add prototype.
11778 * thread-db.c (find_one_thread): Use get_thread_process
11779 instead of current_process.
11780 (thread_db_get_tls_address): Do not crash if called when
11781 thread layer is not yet initialized.
11782
5472f405
UW
117832009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11784
11785 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11786 * spu-low.c (current_tid): Rename to ...
11787 (current_ptid): ... this.
11788 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11789 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11790 ptid_get_lwp (current_ptid) instead of current_tid.
11791 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11792 instead of current_tid. Use find_process_pid to verify pid
11793 argument is valid. Pass proper argument to remove_process.
11794 (spu_thread_alive): Compare current_ptid instead of current_tid.
11795 (spu_resume): Likewise.
11796
55ac2b99
PA
117972009-04-02 Pedro Alves <pedro@codesourcery.com>
11798
11799 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11800 variable.
11801
95954743
PA
118022009-04-01 Pedro Alves <pedro@codesourcery.com>
11803
11804 Implement the multiprocess extensions, and add linux multiprocess
11805 support.
11806
11807 * server.h (ULONGEST): Declare.
11808 (struct ptid, ptid_t): New.
11809 (minus_one_ptid, null_ptid): Declare.
11810 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11811 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11812 (struct inferior_list_entry): Change `id' type from unsigned from
11813 to ptid_t.
11814 (struct sym_cache, struct breakpoint, struct
11815 process_info_private): Forward declare.
11816 (struct process_info): Declare.
11817 (current_process): Declare.
11818 (all_processes): Declare.
11819 (initialize_inferiors): Declare.
11820 (add_thread): Adjust to use ptid_t.
11821 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11822 (add_process, remove_process, find_thread_pid): Declare.
11823 (find_inferior_id): Adjust to use ptid_t.
11824 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11825 (multi_process): Declare.
11826 (push_event): Adjust to use ptid_t.
11827 (read_ptid, write_ptid): Declare.
11828 (prepare_resume_reply): Adjust to use ptid_t.
11829 (clear_symbol_cache): Declare.
11830 * inferiors.c (all_processes): New.
11831 (null_ptid, minus_one_ptid): New.
11832 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11833 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11834 (add_thread): Change unsigned long to ptid. Remove gdb_id
11835 parameter. Adjust.
11836 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11837 (gdb_id_to_thread): Rename to ...
11838 (find_thread_pid): ... this. Change unsigned long to ptid.
11839 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11840 (loaded_dll, pull_pid_from_list): Adjust.
11841 (add_process, remove_process, find_process_pid)
11842 (get_thread_process, current_process, initialize_inferiors): New.
11843 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11844 (struct target_waitstatus) <related_pid>: Ditto.
11845 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11846 return type to int.
11847 (struct target_ops) <join>: Add `pid' argument.
11848 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11849 (struct target_ops) <wait>: Add `ptid' field. Change return type
11850 to ptid.
11851 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11852 (mywait): Add `ptid' argument. Change return type to ptid_t.
11853 (target_pid_to_str): Declare.
11854 * target.c (set_desired_inferior): Adjust to use ptids.
11855 (mywait): Add new `ptid' argument. Adjust.
11856 (target_pid_to_str): New.
11857 * mem-break.h (free_all_breakpoints): Declare.
11858 * mem-break.c (breakpoints): Delelete.
11859 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11860 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11861 to use per-process breakpoint list.
11862 (free_all_breakpoints): New.
11863 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11864 (symbol_cache, all_symbols_looked_up): Delete.
11865 (hexchars): New.
11866 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11867 read_ptid): New.
11868 (prepare_resume_reply): Change ptid argument's type from unsigned
11869 long to ptid_t. Adjust. Implement W;process and X;process.
11870 (free_sym_cache, clear_symbol_cache): New.
11871 (look_up_one_symbol): Adjust to per-process symbol cache. *
11872 * server.c (cont_thread, general_thread, step_thread): Change type
11873 to ptid_t.
11874 (attached): Delete.
11875 (multi_process): New.
11876 (last_ptid): Change type to ptid_t.
11877 (struct vstop_notif) <ptid>: Change type to ptid_t.
11878 (queue_stop_reply, push_event): Change `ptid' argument's type to
11879 ptid_t.
11880 (discard_queued_stop_replies): Add `pid' argument.
11881 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11882 changes. Don't reference the `attached' global.
11883 (attach_inferior): Adjust to mywait interface changes.
11884 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11885 features. Handle and report "multiprocess+". Handle
11886 "qAttached:PID".
11887 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11888 changes.
11889 (handle_v_kill): New.
11890 (handle_v_stopped): Adjust to use target_pid_to_str.
11891 (handle_v_requests): Allow multiple attaches and runs when
11892 multiprocess extensions are in effect. Handle "vKill".
11893 (myresume): Adjust to use ptids.
11894 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11895 (handle_status): Adjust to discard_queued_stop_replies interface
11896 change.
11897 (first_thread_of, kill_inferior_callback)
11898 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11899 (main): Call initialize_inferiors. Adjust to use ptids, killing
11900 and detaching from all inferiors. Handle multiprocess packet
11901 variants.
11902 * linux-low.h: Include gdb_proc_service.h.
11903 (struct process_info_private): New.
11904 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11905 <lwpid_of>: Use ptid_get_lwp.
11906 (get_lwp_thread): Adjust.
11907 (struct lwp_info): Add `dead' member.
11908 (find_lwp_pid): Declare.
11909 * linux-low.c (thread_db_active): Delete.
11910 (new_inferior): Adjust comment.
11911 (inferior_pid): Delete.
11912 (linux_add_process): New.
11913 (handle_extended_wait): Adjust.
11914 (add_lwp): Change unsigned long to ptid.
11915 (linux_create_inferior): Add process to processes table. Adjust
11916 to use ptids. Don't set new_inferior here.
11917 (linux_attach_lwp): Rename to ...
11918 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11919 it. Adjust to use ptids.
11920 (linux_attach_lwp): New.
11921 (linux_attach): Add process to processes table. Don't set
11922 new_inferior here.
11923 (struct counter): New.
11924 (second_thread_of_pid_p, last_thread_of_process_p): New.
11925 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11926 multiple processes.
11927 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11928 processes. Remove process from process table.
11929 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11930 to multiple processes.
11931 (any_thread_of): New.
11932 (linux_detach): Add `pid' argument, and handle it. Remove process
11933 from processes table.
11934 (linux_join): Add `pid' argument. Handle it.
11935 (linux_thread_alive): Change unsighed long argument to ptid_t.
11936 Consider dead lwps as not being alive.
11937 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11938 threads we're not interested in.
11939 (same_lwp, find_lwp_pid): New.
11940 (linux_wait_for_lwp): Change `pid' argument's type from int to
11941 ptid_t. Adjust.
11942 (linux_wait_for_event): Rename to ...
11943 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11944 from int to ptid_t. Adjust.
11945 (linux_wait_for_event): New.
11946 (linux_wait_1): Add `ptid' argument. Change return type to
11947 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11948 that exit from the process table.
11949 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11950 Adjust.
11951 (mark_lwp_dead): New.
11952 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11953 stopping all threads, mark its main lwp as dead.
11954 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11955 ptids.
11956 (fetch_register, usr_store_inferior_registers)
11957 (regsets_fetch_inferior_registers)
11958 (regsets_store_inferior_registers, linux_read_memory)
11959 (linux_write_memory): Inline `inferior_pid'.
11960 (linux_look_up_symbols): Adjust to use per-process
11961 `thread_db_active'.
11962 (linux_request_interrupt): Adjust to use ptids.
11963 (linux_read_auxv): Inline `inferior_pid'.
11964 (initialize_low): Don't reference thread_db_active.
11965 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11966 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11967 (ps_getpid): Return the pid of the current inferior.
11968 * thread-db.c (proc_handle, thread_agent): Delete.
11969 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11970 per-process data.
11971 (find_one_thread): Change argument type to ptid_t. Adjust to
11972 per-process data.
11973 (maybe_attach_thread): Adjust to per-process data and ptids.
11974 (thread_db_find_new_threads): Ditto.
11975 (thread_db_init): Ditto.
11976 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11977 processes table. Adjust to use ptids.
11978 (spu_kill, spu_detach): Adjust interface. Remove process from
11979 processes table.
11980 (spu_join, spu_thread_alive): Adjust interface.
11981 (spu_wait): Adjust interface. Remove process from processes
11982 table. Adjust to use ptids.
11983 * win32-low.c (current_inferior_tid): Delete.
11984 (current_inferior_ptid): New.
11985 (debug_event_ptid): New.
11986 (thread_rec): Take a ptid. Adjust.
11987 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11988 (child_delete_thread): Ditto.
11989 (do_initial_child_stuff): Add `attached' argument. Add process to
11990 processes table.
11991 (child_fetch_inferior_registers, child_store_inferior_registers):
11992 Adjust.
11993 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11994 (win32_attach): Pass 1 to do_initial_child_stuff.
11995 (win32_kill): Adjust interface. Remove process from processes
11996 table.
11997 (win32_detach): Ditto.
11998 (win32_join): Adjust interface.
11999 (win32_thread_alive): Take a ptid.
12000 (win32_resume): Adjust to use ptids.
12001 (get_child_debug_event): Ditto.
12002 (win32_wait): Adjust interface. Remove exiting process from
12003 processes table.
12004
bd99dc85
PA
120052009-04-01 Pedro Alves <pedro@codesourcery.com>
12006
12007 Non-stop mode support.
12008
12009 * server.h (non_stop): Declare.
12010 (gdb_client_data, handler_func): Declare.
12011 (delete_file_handler, add_file_handler, start_event_loop):
12012 Declare.
12013 (handle_serial_event, handle_target_event, push_event)
12014 (putpkt_notif): Declare.
12015 * target.h (enum resume_kind): New.
12016 (struct thread_resume): Replace `step' field by `kind' field.
12017 (TARGET_WNOHANG): Define.
12018 (struct target_ops) <wait>: Add `options' argument.
12019 <supports_non_stop, async, start_non_stop>: New fields.
12020 (target_supports_non_stop, target_async): New.
12021 (start_non_stop): Declare.
12022 (mywait): Add `options' argument.
12023 * target.c (mywait): Add `options' argument. Print child exit
12024 notifications here.
12025 (start_non_stop): New.
12026 * server.c (non_stop, own_buf, mem_buf): New globals.
12027 (struct vstop_notif): New.
12028 (notif_queue): New global.
12029 (queue_stop_reply, push_event, discard_queued_stop_replies)
12030 (send_next_stop_reply): New.
12031 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12032 interface changes.
12033 (attach_inferior): In non-stop mode, don't wait for the target
12034 here.
12035 (handle_general_set): Handle QNonStop.
12036 (handle_query): When handling qC, return the current general
12037 thread, instead of the first thread of the list.
12038 (handle_query): If the backend supports non-stop mode, include
12039 QNonStop+ in the qSupported query response.
12040 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12041 and non-stop mode.
12042 (handle_v_attach, handle_v_run): Handle non-stop mode.
12043 (handle_v_stopped): New.
12044 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12045 (myresume): Adjust to use resume_kind. Handle non-stop.
12046 (queue_stop_reply_callback): New.
12047 (handle_status): Handle non-stop mode.
12048 (main): Clear non_stop flag on reconnection. Use the event-loop.
12049 Refactor serial protocol handling from here ...
12050 (process_serial_event): ... to this new function. When GDB
12051 selects any thread, select one here. In non-stop mode, wait until
12052 GDB acks all pending events before exiting.
12053 (handle_serial_event, handle_target_event): New.
12054 * remote-utils.c (remote_open): Install remote_desc in the event
12055 loop.
12056 (remote_close): Remove remote_desc from the event loop.
12057 (putpkt_binary): Rename to...
12058 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12059 (putpkt_binary): New as wrapper around putpkt_binary_1.
12060 (putpkt_notif): New.
12061 (prepare_resume_reply): In non-stop mode, don't change the
12062 general_thread.
12063 * event-loop.c: New.
12064 * Makefile.in (OBJ): Add event-loop.o.
12065 (event-loop.o): New rule.
12066
12067 * linux-low.h (pid_of): Moved here.
12068 (lwpid_of): New.
12069 (get_lwp_thread): Use lwpid_of.
12070 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12071 * linux-low.c (pid_of): Delete.
12072 (inferior_pid): Use lwpid_of.
12073 (linux_event_pipe): New.
12074 (target_is_async_p): New.
12075 (delete_lwp): New.
12076 (handle_extended_wait): Use lwpid_of.
12077 (add_lwp): Don't set lwpid field.
12078 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12079 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12080 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12081 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12082 first. Adjust to linux_wait_for_event interface changes. Use
12083 lwpid_of.
12084 (linux_detach): Don't delete the main lwp here.
12085 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12086 (status_pending_p): Don't consider explicitly suspended lwps.
12087 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12088 pointer. Add OPTIONS argument. Change return type to int. Use
12089 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12090 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12091 pointer. Add status pointer argument. Return a pid instead of a
12092 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12093 changes. In non-stop mode, don't switch to a random thread.
12094 (linux_wait): Rename to...
12095 (linux_wait_1): ... this. Add target_options argument, and handle
12096 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12097 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12098 clean exit and signal exit code. Don't stop all threads in
12099 non-stop mode. In all-stop mode, only stop all threads when
12100 reporting a stop to GDB. Handle explicit thread stop requests.
12101 (async_file_flush, async_file_mark): New.
12102 (linux_wait): New.
12103 (send_sigstop): Use lwpid_of.
12104 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12105 interface changes. In non-stop mode, don't switch to a random
12106 thread.
12107 (linux_resume_one_lwp): Use lwpid_of.
12108 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12109 (linux_resume_one_thread): ... this. Handle resume_stop. In
12110 non-stop mode, don't look for pending flag in all threads.
12111 (resume_status_pending_p): Don't consider explicitly suspended
12112 threads.
12113 (my_waitpid): Reimplement. Emulate __WALL.
12114 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12115 Use lwpid_of.
12116 (sigchld_handler, linux_supports_non_stop, linux_async)
12117 (linux_start_non_stop): New.
12118 (linux_target_ops): Register linux_supports_non_stop, linux_async
12119 and linux_start_non_stop.
12120 (initialize_low): Install SIGCHLD handler.
12121 * thread-db.c (thread_db_create_event, find_one_thread)
12122 (thread_db_get_tls_address): Use lwpid_of.
12123 * win32-low.c (win32_detach): Adjust to use resume_kind.
12124 (win32_wait): Add `options' argument.
12125 * spu-low.c (spu_resume): Adjust to use resume_kind.
12126 (spu_wait): Add `options' argument.
12127
5b1c542e
PA
121282009-04-01 Pedro Alves <pedro@codesourcery.com>
12129
12130 Decouple target code from remote protocol.
12131
12132 * target.h (enum target_waitkind): New.
12133 (struct target_waitstatus): New.
12134 (struct target_ops) <wait>: Return an unsigned long. Take a
12135 target_waitstatus pointer instead of a char pointer.
12136 (mywait): Likewise.
12137 * target.c (mywait): Change prototype to return an unsigned long.
12138 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12139 * server.h (thread_from_wait, old_thread_from_wait): Delete
12140 declarations.
12141 (prepare_resume_reply): Change prototype to take a
12142 target_waitstatus.
12143 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12144 (last_status, last_ptid): New.
12145 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12146 pid instead of a signal.
12147 (attach_inferior): Remove "status" and "signal" parameters.
12148 Adjust.
12149 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12150 not as an address.
12151 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12152 (handle_v_requests, myresume): Remove "status" and "signal"
12153 parameters. Adjust.
12154 (handle_status): New.
12155 (main): Delete local `status'. Adjust.
12156 * remote-utils.c: Include target.h.
12157 (prepare_resume_reply): Change prototype to take a
12158 target_waitstatus. Adjust.
12159
12160 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12161 interface.
12162 * spu-low.c (spu_wait): Adjust.
12163 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12164 Delete.
12165 (win32_wait): Adjust.
12166
2bd7c093
PA
121672009-04-01 Pedro Alves <pedro@codesourcery.com>
12168
12169 * target.h (struct thread_resume): Delete leave_stopped member.
12170 (struct target_ops): Add a `n' argument to the `resume' callback.
12171 * server.c (start_inferior): Adjust.
12172 (handle_v_cont, myresume): Adjust.
12173 * linux-low.c (check_removed_breakpoint): Adjust to resume
12174 interface change, and to removed leave_stopped field.
12175 (resume_ptr): Delete.
12176 (struct thread_resume_array): New.
12177 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12178 resume interface change.
12179 (linux_continue_one_thread, linux_queue_one_thread)
12180 (resume_status_pending_p): Check if the resume field is NULL
12181 instead of checking the leave_stopped member.
12182 (linux_resume): Adjust to the target resume interface change.
12183 * spu-low.c (spu_resume): Adjust to the target resume interface
12184 change.
12185 * win32-low.c (win32_detach, win32_resume): Ditto.
12186
c35fafde
PA
121872009-04-01 Pedro Alves <pedro@codesourcery.com>
12188
12189 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12190 flag.
12191 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12192 pending.
12193 (linux_continue_one_thread): Only preserve the stepping flag if
12194 there's a pending breakpoint.
12195
0a59d50b
PA
121962009-03-31 Pedro Alves <pedro@codesourcery.com>
12197
12198 * server.c (main): After the inferior having exited, call
12199 remote_close before exiting gdbserver.
12200
f04c6d38
TJB
122012009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12202
12203 Fix size of FPSCR in Power 7 processors.
12204 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12205 (PPC_FEATURE_HAS_DFP): New #define.
12206 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12207 size of the FPSCR.
12208
78e5cee6
PA
122092009-03-23 Pedro Alves <pedro@codesourcery.com>
12210
12211 * server.c (handle_query) Whitespace and formatting.
12212
1b3f6016
PA
122132009-03-22 Pedro Alves <pedro@codesourcery.com>
12214
12215 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12216 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12217 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12218 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12219 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12220 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12221 Makefile.in, configure.ac: Fix whitespace throughout.
12222 * configure: Regenerate.
12223
a07b2135
PA
122242009-03-22 Pedro Alves <pedro@codesourcery.com>
12225
12226 * inferiors.c (find_inferior): Make it safe for the callback
12227 function to delete the currently iterated inferior.
12228
67cc2626
PA
122292009-03-22 Pedro Alves <pedro@codesourcery.com>
12230
12231 * Makefile.in (linuw_low_h): Move higher.
12232 (thread-db.o): Depend on $(linux_low_h).
12233
54a0b537
PA
122342009-03-17 Pedro Alves <pedro@codesourcery.com>
12235
12236 Rename "process" to "lwp" throughout.
12237
12238 * linux-low.c (all_processes): Rename to...
12239 (all_lwps): ... this.
12240 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12241 (add_process): Rename to ...
12242 (add_lwp): ... this. Adjust.
12243 (linux_create_inferior): Adjust.
12244 (linux_attach_lwp): Adjust.
12245 (linux_attach): Adjust.
12246 (linux_kill_one_process): Rename to ...
12247 (linux_kill_one_lwp): ... this. Adjust.
12248 (linux_kill): Adjust.
12249 (linux_detach_one_process): Rename to ...
12250 (linux_detach_one_lwp): ... this. Adjust.
12251 (linux_detach): Adjust.
12252 (check_removed_breakpoint): Adjust.
12253 (status_pending_p): Adjust.
12254 (linux_wait_for_process): Rename to ...
12255 (linux_wait_for_lwp): ... this. Adjust.
12256 (linux_wait_for_event): Adjust.
12257 (send_sigstop): Adjust.
12258 (wait_for_sigstop): Adjust.
12259 (stop_all_processes): Rename to ...
12260 (stop_all_lwps): ... this.
12261 (linux_resume_one_process): Rename to ...
12262 (linux_resume_one_lwp): ... this. Adjust.
12263 (linux_set_resume_request, linux_continue_one_thread)
12264 (linux_queue_one_thread, resume_status_pending_p)
12265 (usr_store_inferior_registers, regsets_store_inferior_registers)
12266 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12267 Adjust.
12268 * linux-low.h (get_process): Rename to ...
12269 (get_lwp): ... this. Adjust.
12270 (get_thread_process): Rename to ...
12271 (get_thread_lwp): ... this. Adjust.
12272 (get_process_thread): Rename to ...
12273 (get_lwp_thread): ... this. Adjust.
12274 (struct process_info): Rename to ...
12275 (struct lwp_info): ... this.
12276 (all_processes): Rename to ...
12277 (all_lwps): ... this.
12278 * proc-service.c (ps_lgetregs): Adjust.
12279 * thread-db.c (thread_db_create_event, find_one_thread)
12280 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12281
0b16c5cf
PA
122822009-03-14 Pedro Alves <pedro@codesourcery.com>
12283
12284 * server.c (handle_query): Handle "qAttached".
12285
32de4b9d
NS
122862009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12287
12288 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12289 GPLv3, update license URL.
12290
2aecd87f
DE
122912009-03-01 Doug Evans <dje@google.com>
12292
93efd302 12293 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12294 (server_h): Add gdb_signals.h.
12295 (signals.o): Update.
12296 * server.h (target_signal_from_host,target_signal_to_host_p)
12297 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12298
86b1f9c5
PM
122992009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12300
12301 * remote-utils.c (getpkt): Also generate remote-debug
12302 information if noack_mode is set.
12303
4aa995e1
PA
123042009-02-06 Pedro Alves <pedro@codesourcery.com>
12305
12306 * server.c (handle_query): Report qXfer:siginfo:read and
12307 qXfer:siginfo:write as supported and handle them.
12308 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12309 * linux-low.c (linux_xfer_siginfo): New.
12310 (linux_target_ops): Set it.
12311
62709adf
PA
123122009-01-26 Pedro Alves <pedro@codesourcery.com>
12313
12314 * server.c (gdbserver_usage): Mention --remote-debug.
12315 (main): Accept '--remote-debug' switch.
12316
aef93bd7
DE
123172009-01-18 Doug Evans <dje@google.com>
12318
12319 * regcache.c (new_register_cache): No need to check result of xcalloc.
12320 * server.c (handle_search_memory): Back out calls to xmalloc,
12321 result is checked and error is returned to user upon failure.
12322 (handle_query): Ditto. Add more checks for result of malloc.
12323 (handle_v_cont): Check result of malloc, report error back to
12324 user upon failure.
12325 (handle_v_run): Ditto. Call freeargv.
12326 * server.h (freeargv): Declare.
12327 * utils.c (freeargv): New fn.
12328
54363045
DE
123292009-01-15 Doug Evans <dje@google.com>
12330
f626972c
DE
12331 * gdbreplay.c (perror_with_name): Make arg const char *.
12332 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12333 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12334 * utils.c (perror_with_name): Make arg const char *.
54363045 12335
18aae699
PA
123362009-01-14 Pedro Alves <pedro@codesourcery.com>
12337
12338 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12339 when handling a EXIT_PROCESS_DEBUG_EVENT.
12340
ff703abe
JB
123412009-01-06 Joel Brobecker <brobecker@adacore.com>
12342
12343 * gdbreplay.c (gdbreplay_version): Update copyright year.
12344 * server.c (gdbserver_version): Likewise.
12345
f21cc1a2 123462009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12347
12348 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12349 (handle_extended_wait): Improve comment.
0e21c1ec 12350
bca929d3
DE
123512008-12-13 Doug Evans <dje@google.com>
12352
12353 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12354 * server.h (ATTR_MALLOC): New macro.
12355 (xmalloc,xcalloc,xstrdup): Declare.
12356 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12357 * inferiors.c: Ditto.
12358 * linux-low.c: Ditto.
12359 * mem-break.c: Ditto.
12360 * regcache.c: Ditto.
12361 * remote-utils.c: Ditto.
12362 * server.c: Ditto.
12363 * target.c: Ditto.
12364 * win32-low.c: Ditto.
12365
97438e3f
DE
123662008-12-12 Doug Evans <dje@google.com>
12367
896c7fbb
DE
12368 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12369 in debugging printf.
12370
97438e3f
DE
12371 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12372
e3b886f8
DE
123732008-12-09 Doug Evans <dje@google.com>
12374
12375 * linux-low.h (struct process_info): Delete member tid, unused.
12376 * thread-db.c (find_one_thread): Update.
12377 (maybe_attach_thread): Update.
12378
07e059b5
VP
123792008-12-02 Pedro Alves <pedro@codesourcery.com>
12380
889bf7c5
PA
12381 * target.h (struct target_ops): Add qxfer_osdata member.
12382 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12383 and dirent.h.
12384 (linux_qxfer_osdata): New functions.
12385 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12386 callback.
12387 * server.c (handle_query): Handle "qXfer:osdata:read:".
12388 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12389 (buffer_xml_printf): New functions.
12390 * server.h (struct buffer): New.
12391 (buffer_grow_str, buffer_grow_str0): New macros.
12392 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12393 (buffer_xml_printf): Declare.
07e059b5 12394
4cab47ab
DE
123952008-11-24 Doug Evans <dje@google.com>
12396
12397 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12398
f142445f
DJ
123992008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12400
12401 * server.c (handle_v_run): Always use the supplied argument list.
12402
d0107bb6 124032008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12404
d0107bb6
BW
12405 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12406 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12407
2c4ad781
TJB
124082008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12409
12410 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12411 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12412 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12413 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12414 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12415 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12416 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12417 XML target descriptions.
12418 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12419 when inferior is running on an ISA 2.05 or later processor. Add
12420 special case to return offset for full 64-bit slot of FPSCR when
12421 in 32-bits.
12422
dfb64f85
DJ
124232008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12424
12425 * Makefile.in (SFILES, clean): Added sparc64 files.
12426 (reg-sparc64.o, reg-sparc64.c): New.
12427 * configure.srv (sparc*-*-linux*): New configuration.
12428 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12429 syscall arguments for SPARC.
12430 (regsets_store_inferior_registers): Likewise.
12431 * linux-sparc-low.c: New file.
12432
66b6e1dd
DE
124332008-10-21 Doug Evans <dje@google.com>
12434
12435 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12436 (READLINE_DIR,READLINE_DEP): Delete.
12437 (INTERNAL_CFLAGS): Update.
12438 (LINTFLAGS): Update.
12439
9b710a42
PA
124402008-10-10 Pedro Alves <pedro@codesourcery.com>
12441
12442 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12443 whole argv from the last run, not just argv[0].
12444
5822d809
PA
124452008-09-08 Pedro Alves <pedro@codesourcery.com>
12446
12447 * regcache.c (new_register_cache): Return NULL if the register
12448 cache size isn't known yet.
12449 (free_register_cache): Avoid dereferencing a NULL regcache.
12450
74aac56f
DJ
124512008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12452
12453 * configure.srv: Merge MIPS and MIPS64.
12454
400b20f5
MR
124552008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12456
12457 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12458
677c5bb1
LM
124592008-08-18 Luis Machado <luisgpm@br.ibm.com>
12460
12461 * Makefile.in: Add required vsx dependencies.
12462
12463 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12464 Declare init_registers_powerpc_vsx32l.
12465 Declare init_registers_powerpc_vsx64l.
12466 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12467 (ppc_arch_setup): Check for VSX in hwcap.
12468 (ppc_fill_vsxregset): New function.
12469 (ppc_store_vsxregset): New function.
12470 Add new VSX entry in regset_info target_regsets.
12471
12472 * configure.srv: Add new VSX dependencies.
12473
a6f3e723
SL
124742008-08-12 Pedro Alves <pedro@codesourcery.com>
12475
12476 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12477 (remote_open): Set or clear transport_is_reliable.
12478 (putpkt_binary): Don't expect acks in noack mode.
12479 (getpkt): Don't send ack/nac in noack mode.
12480 * server.c (handle_general_set): Handle QStartNoAckMode.
12481 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12482 qSupported.
12483 (main): Reset noack_mode on every connection.
12484 * server.h (noack_mode): Declare.
12485
a417dc56
RW
124862008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12487
12488 * Makefile.in (GDBREPLAY_OBS): New variable.
12489 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12490
3221518c
UW
124912008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12492 Daniel Jacobowitz <dan@codesourcery.com>
12493
12494 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12495 (usr_store_inferior_registers): Likewise.
12496 (regsets_store_inferior_registers): Likewise.
12497
ec56be1b
PA
124982008-07-31 Rolf Jansen <rj@surtec.com>
12499 Pedro Alves <pedro@codesourcery.com>
12500
12501 * configure.ac: Check for memmem declaration.
12502 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12503 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12504 (disable_packet_qfThreadInfo): Unconditionally compile.
12505 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12506 * configure, config.in: Regenerate.
12507
2fe5e3ff
DE
125082008-07-28 Doug Kwan <dougkwan@google.com>
12509
12510 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12511 (linux_write_memory): Remove declaration of errno.
12512
836acd6d
UW
125132008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12514
12515 * linux-low.c (handle_extended_wait): Do not use "status"
12516 variable uninitialized.
12517
aeba519e
PA
125182008-07-07 Pedro Alves <pedro@codesourcery.com>
12519
12520 * server.c (handle_v_attach): Inhibit reporting dll changes.
12521
db42f210
PA
125222008-06-27 Pedro Alves <pedro@codesourcery.com>
12523
12524 * remote-utils.c (prepare_resume_reply): If requested, don't
12525 output "thread:TID" in the T stop reply.
12526
12527 * server.c (disable_packet_vCont, disable_packet_Tthread)
12528 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12529 (handle_query): If requested, disable support for qC, qfThreadInfo
12530 and qsThreadInfo.
12531 (handle_v_requests): If requested, disable support for vCont.
12532 (gdbserver_show_disableable): New.
12533 (main): Handle --disable-packet and --disable-packet=LIST.
12534
12535 * server.h (disable_packet_vCont, disable_packet_Tthread)
12536 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12537
8e4c5421
CD
125382008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12539
12540 * server.c (gdbserver_usage): Mention --version.
12541
6e23a804
DJ
125422008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12543
12544 * Makefile.in (gdbreplay.o): New rule.
12545
90aa6a40
JM
125462008-06-06 Joseph Myers <joseph@codesourcery.com>
12547
12548 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12549 message, not gdbserver.
12550
c16158bc 125512008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12552 Nathan Sidwell <nathan@codesourcery.com>
12553 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12554
12555 * acinclude.m4: Include ../../config/acx.m4.
12556 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12557 * configure, config.in: Regenerate.
12558 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12559 * server.c (gdbserver_version): Print PKGVERSION.
12560 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12561 (main): Adjust gdbserver_usage calls.
12562 * gdbreplay.c (version, host_name): Add declarations.
12563 (gdbreplay_version, gdbreplay_usage): New.
12564 (main): Accept --version and --help options.
12565
aeb75bf5
DJ
125662008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12567
12568 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12569 (arm_breakpoint_at): Handle Thumb.
12570 (the_low_target): Add comment.
12571
76b233dd
UW
125722008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12573
12574 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12575
08388c79
DE
125762008-05-09 Doug Evans <dje@google.com>
12577
a3c83fae
DE
12578 * server.h (decode_search_memory_packet): Declare.
12579 * remote-utils.c (decode_search_memory_packet): New fn.
12580 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12581 (handle_search_memory): New fn.
12582 (handle_query): Process qSearch:memory packets.
12583
bb9c3d36
UW
125842008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12585
12586 * regcache.c (registers_length): Remove.
12587 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12588 full register packet.
12589 * regcache.h (registers_length): Remove prototype.
12590 * server.h (PBUFSIZ): Define to 16384.
12591
7284e1be
UW
125922008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12593
12594 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12595 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12596 powerpc-64l.o, and powerpc-altivec64l.o.
12597 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12598 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12599 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12600 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12601 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12602 to srv_xmlfiles.
12603
12604 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12605 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12606 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12607 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12608 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12609 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12610 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12611 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12612 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12613 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12614 (clean): Update.
12615
12616 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12617 (init_registers_powerpc_32l): ... this new prototype.
12618 (init_registers_powerpc_32): Remove, replace by ...
12619 (init_registers_powerpc_altivec32l): ... this new prototype.
12620 (init_registers_powerpc_e500): Remove, replace by ...
12621 (init_registers_powerpc_e500l): ... this new prototype.
12622 (init_registers_ppc64): Remove, replace by ...
12623 (init_registers_powerpc_64l): ... this new prototype.
12624 (init_registers_powerpc_64): Remove, replace by ...
12625 (init_registers_powerpc_altivec64l): ... this new prototype.
12626 (ppc_num_regs): Set to 73.
12627 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12628 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12629 (ppc_cannot_store_register): Handle orig_r3 and trap.
12630 (ppc_arch_setup): Update init_registers_... calls.
12631 (ppc_fill_gregset): Handle orig_r3 and trap.
12632
12633 * inferiors.c (clear_inferiors): Reset current_inferior.
12634
fdc59709
PB
126352008-04-23 Paolo Bonzini <bonzini@gnu.org>
12636
889bf7c5
PA
12637 * acinclude.m4: Add override.m4.
12638 * configure: Regenerate.
fdc59709 12639
c9b2f845
UW
126402008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12641
12642 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12643 initial call to init_register_ppc64.
12644
550512b8
UW
126452008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12646
43aaf8b6
PA
12647 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12648 single powerpc*-*-linux* case.
550512b8
UW
12649 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12650
b6430ec3
UW
126512008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12652
12653 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12654 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12655 from reg_xmlfiles.
12656 * linux-ppc-low.c: Include <elf.h>.
12657 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12658 (ppc_hwcap): New global variable.
12659 (ppc_regmap): Remove __SPE__ #ifdef sections.
12660 (ppc_regmap_e500): New global variable.
12661 (ppc_cannot_store_register): Update __SPE__ special case.
12662 (ppc_get_hwcap): New function.
12663 (ppc_arch_setup): Use it to determine whether inferior supports
12664 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12665 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12666 Do not access registers if target does not support AltiVec.
12667 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12668 Do not access registers if target does not support SPE.
12669 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12670
52fa2412
UW
126712008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12672
12673 * linux-low.c (disabled_regsets, num_regsets): New.
12674 (use_regsets_p): Delete.
12675 (linux_wait_for_process): Clear disabled_regsets.
12676 (regsets_fetch_inferior_registers): Check and set it.
12677 (regsets_store_inferior_registers): Likewise.
12678 (linux_fetch_registers, linux_store_registers): Do not use
12679 use_regsets_p.
12680 (initialize_low): Allocate disabled_regsets.
12681
e28b3332
DJ
126822008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12683
12684 * Makefile.in (LIBOBJS): New.
12685 (OBS): Use LIBOBJS.
12686 (memmem.o): New rule.
12687 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12688 * configure: Regenerated.
12689
4536995d
UW
126902008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12691
12692 * server.c (handle_query): Never return "unsupported" for
12693 qXfer:features:read queries.
12694
221c031f
UW
126952008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12696
12697 * server.c (get_features_xml): Fix inverted condition.
12698 (handle_query): Always support qXfer:feature:read.
12699
ccd213ac
DJ
127002008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12701
12702 * server.c (wrapper_argv): New.
12703 (start_inferior): Handle wrapper_argv. If set, expect an extra
12704 trap.
12705 (gdbserver_usage): Document --wrapper.
12706 (main): Parse --wrapper.
12707
6fe305f7
UW
127082008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12709
12710 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12711 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12712 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12713 (ppc_set_pc): Likewise.
12714 (ppc_arch_setup): New function.
12715 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12716 of collect_register.
889bf7c5 12717 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12718
5b0a002e
UW
127192008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12720
12721 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12722 instead of linux-ppc64-low.o.
12723 * linux-ppc64-low.c: Remove file.
12724 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12725 (linux-ppc64-low.o): Remove rule.
12726
12727 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12728 (init_registers_powerpc_64): Likewise.
12729 (ppc_regmap): Conditionally define depending on __powerpc64__.
12730 (ppc_cannot_store_register): Do not special-case "fpscr" when
12731 compiled on __powerpc64__.
12732 (ppc_collect_ptrace_register): New function.
12733 (ppc_supply_ptrace_register): New function.
12734 (ppc_breakpoint): Change type to "unsigned int".
12735 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12736 (the_low_target): Conditionally provide initializers for the
889bf7c5 12737 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12738 collect_ptrace_register and supply_ptrace_register members.
12739
9b4b61c8
UW
127402008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12741
12742 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12743 * server.c (gdbserver_xmltarget): Define.
12744 (get_features_xml): Use it to replace "target.xml" and arch_string.
12745
12746 * configure.srv: Remove srv_xmltarget. Add XML files that were
12747 mentioned there to srv_xmlfiles instead. Remove conditional tests
12748 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12749 srv_xmlfiles and srv_regobj to include all possible choices.
12750 * configure.ac (srv_xmltarget): Remove.
12751 (srv_xmlfiles): Do not add "target.xml".
12752 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12753 checks for supplementary target information.
12754 * configure: Regenerate.
12755 * Makefile.in (XML_TARGET): Remove.
12756 (target.xml): Remove rule.
12757 (clean): Do not clean up target.xml.
12758 (.PRECIOUS): Do not mention target.xml.
12759
12760 * target.h (struct target_ops): Remove arch_string member.
12761 * linux-low.c (linux_arch_string): Remove.
12762 (linux_target_ops): Remove arch_string initializer.
12763 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12764 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12765 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12766 * spu-low.c (spu_arch_string): Remove.
12767 (spu_target_ops): Remove arch_string initializer.
12768 * win32-low.c (win32_arch_string): Remove.
12769 (win32_target_ops): Remove arch_string initializer.
12770 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12771 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12772 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12773
ee1a7ae4
UW
127742008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12775
12776 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12777 by collect_ptrace_register and supply_ptrace_register hooks.
12778 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12779 instead of checking for the_low_target.left_pad_xfer.
12780 (usr_store_inferior_registers): Use collect_ptrace_register callback
12781 instead of checking for the_low_target.left_pad_xfer.
12782
12783 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12784 (s390_supply_ptrace_register): Likewise.
12785 (s390_fill_gregset): Call s390_collect_ptrace_register.
12786 (the_low_target): Update.
12787
12788 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12789 (ppc_supply_ptrace_register): Likewise.
12790 (the_low_target): Update.
12791
12792 * linux-i386-low.c (the_low_target): Update.
12793 * linux-x86-64-low.c (the_low_target): Update.
12794
d61ddec4
UW
127952008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12796
12797 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12798 reg-s390.o and reg-s390x.o.
12799
12800 * linux-low.c (new_inferior): New global variable.
12801 (linux_create_inferior, linux_attach): Set it.
12802 (linux_wait_for_process): Call the_low_target.arch_setup after the
12803 target has stopped for the first time.
12804 (initialize_low): Do not call the_low_target.arch_setup.
12805
12806 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12807 (s390_set_pc): Likewise.
12808 (s390_arch_setup): New function.
12809 (the_low_target): Use s390_arch_setup as arch_setup routine.
12810
12811 * regcache.c (realloc_register_cache): New function.
12812 (set_register_cache): Call it for each existing regcache.
12813
d05b4ac3
UW
128142008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12815
12816 * server.h (init_registers): Remove prototype.
12817
12818 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12819 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12820 instead of init_registers ().
12821 * linux-arm-low.c (init_registers_arm): Add prototype.
12822 (init_registers_arm_with_iwmmxt): Likewise.
12823 (the_low_target): Add initializer for arch_setup field.
12824 * linux-cris-low.c (init_registers_cris): Add prototype.
12825 (the_low_target): Add initializer for arch_setup field.
12826 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12827 (the_low_target): Add initializer for arch_setup field.
12828 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12829 (the_low_target): Add initializer for arch_setup field.
12830 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12831 (the_low_target): Add initializer for arch_setup field.
12832 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12833 (the_low_target): Add initializer for arch_setup field.
12834 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12835 (the_low_target): Add initializer for arch_setup field.
12836 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12837 (init_registers_mips64_linux): Likewise.
12838 (the_low_target): Add initializer for arch_setup field.
12839 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12840 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12841 (the_low_target): Add initializer for arch_setup field.
12842 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12843 (init_registers_powerpc_64): Likewise.
12844 (the_low_target): Add initializer for arch_setup field.
12845 * linux-s390-low.c (init_registers_s390): Add prototype.
12846 (init_registers_s390x): Likewise.
12847 (the_low_target): Add initializer for arch_setup field.
12848 * linux-sh-low.c (init_registers_sh): Add prototype.
12849 (the_low_target): Add initializer for arch_setup field.
12850 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12851 (the_low_target): Add initializer for arch_setup field.
12852 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12853 (the_low_target): Add initializer for arch_setup field.
12854
12855 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12856 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12857 instead of init_registers ().
12858 * win32-arm-low.c (init_registers_arm): Add prototype.
12859 (the_low_target): Add initializer for arch_setup field.
12860 * win32-i386-low.c (init_registers_i386): Add prototype.
12861 (the_low_target): Add initializer for arch_setup field.
12862
12863 * spu-low.c (init_registers_spu): Add prototype.
12864 (initialize_low): Call initialie_registers_spu () instead of
12865 initialize_registers ().
12866
fd96d250
PA
128672008-02-19 Pedro Alves <pedro@codesourcery.com>
12868
12869 * server.c (handle_v_requests): When handling the vRun and vAttach
12870 packets, if already debugging a process, don't kill it. Return an
12871 error instead.
12872
d41b6bb4
DJ
128732008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12874
12875 * server.c (handle_query): Correct length check.
12876
5ac588cf
PA
128772008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12878
12879 * win32-low.c (do_initial_child_stuff): Add process handle
12880 parameter. Set current_process_handle and current_process_id from the
12881 parameters. Clear globals.
12882 (win32_create_inferior): Don't set current_process_handle and
12883 current_process_id here. Instead pass them on the call to
12884 do_initial_child_stuff.
12885 (win32_attach): Likewise.
12886 (win32_clear_inferiors): New.
12887 (win32_kill): Don't close the current process handle or the
12888 current thread handle here. Instead call win32_clear_inferiors.
12889 (win32_detach): Don't open a new handle to the process. Call
12890 win32_clear_inferiors.
12891 (win32_join): Don't rely on current_process_handle; open a new
12892 handle using the process id.
12893 (win32_wait): Call win32_clear_inferiors when the inferior process
12894 has exited.
12895
ecd7ecbc
DJ
128962008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12897
12898 * server.c (monitor_show_help): Add "exit".
12899
1525d545
MG
129002008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12901
ecd7ecbc 12902 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12903 (clean): Add reg-xtensa.c.
12904 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12905 * configure.srv (xtensa*-*-linux*) New target.
12906 * linux-xtensa-low.c: New.
12907 * xtensa-xtregs.c: New.
1525d545 12908
59a016f0
PA
129092008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12910
12911 * hostio.c: Don't include errno.h.
12912 (errno_to_fileio_errno): Move to hostio-errno.
12913 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12914 error number outputting to the target->hostio_last_error callback.
12915 (hostio_packet_error): Use FILEIO_EINVAL directly.
12916 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12917 calls to hostio_error.
12918 * hostio-errno.c: New.
12919 * server.h (hostio_last_error_from_errno): Declare.
12920 * target.h (target_ops): Add hostio_last_error member.
12921 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12922 as hostio_last_error handler.
889bf7c5 12923 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12924 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12925 (wince_hostio_last_error): New functions.
12926 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12927 as hostio_last_error handler.
12928 (win32_target_ops) [!_WIN32_WCE]: Register
12929 hostio_last_error_from_errno as hostio_last_error handler.
12930 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12931 (hostio-errno.o): New rule.
12932 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12933 * configure.srv (srv_hostio_err_objs): New variable. Default to
12934 hostio-errno.o.
12935 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12936 * configure: Regenerate.
12937
2d717e4f
DJ
129382008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12939
12940 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12941 (linux_kill, linux_detach): Clean up the process list.
12942 * remote-utils.c (remote_open): Improve port number parsing.
12943 (putpkt_binary, input_interrupt): Only send interrupts if the target
12944 is running.
12945 * server.c (extended_protocol): Make static.
12946 (attached): Define earlier.
12947 (exit_requested, response_needed, program_argv): New variables.
12948 (target_running): New.
12949 (start_inferior): Clear attached here.
12950 (attach_inferior): Set attached here.
12951 (require_running): Define.
12952 (handle_query): Use require_running and target_running. Implement
12953 "monitor exit".
12954 (handle_v_attach, handle_v_run): New.
12955 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12956 (gdbserver_usage): Update.
12957 (main): Redo argument parsing. Handle --debug and --multi. Handle
12958 --attach along with other options or after the port. Save
12959 program_argv. Support no initial program. Resynchronize
12960 communication with GDB after an error. Handle "monitor exit".
12961 Use require_running and target_running. Always allow the extended
12962 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12963 restart in extended mode.
12964 * README: Refer to the GDB manual. Update --attach usage.
12965
7407e2de
AS
129662007-12-20 Andreas Schwab <schwab@suse.de>
12967
12968 * linux-low.c (STACK_SIZE): Define.
12969 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12970 (linux_test_for_tracefork): Likewise.
12971
b65d95c5
DJ
129722007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12973
12974 * linux-low.c (linux_wait_for_event): Update messages. Do not
12975 reinsert auto-delete breakpoints.
12976 * mem-break.c (struct breakpoint): Change return type of handler to
12977 int.
12978 (set_breakpoint_at): Update handler type.
12979 (reinsert_breakpoint_handler): Return 1 instead of calling
12980 delete_breakpoint.
12981 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12982 setting a new one.
12983 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12984 * mem-break.h (set_breakpoint_at): Update handler type.
12985 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12986 * win32-low.c (auto_delete_breakpoint): New.
12987 (get_child_debug_event): Use it.
12988
4e799345
DJ
129892007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12990
12991 * configure.ac: Check for pread and pwrite.
12992 * hostio.c (handle_pread): Fall back to lseek and read.
12993 (handle_pwrite): Fall back to lseek and write.
12994 * config.in, configure: Regenerated.
12995
27524b67
DJ
129962007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12997
12998 * server.c (myresume): Add own_buf argument.
12999 (main): Update calls.
13000
a20d5e98
DJ
130012007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13002
13003 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13004 * remote-utils.c (remote_open): Do not call disable_async_io.
13005 (block_async_io): Delete.
13006 (unblock_async_io): Make static.
13007 (initialize_async_io): New.
13008 * server.c (handle_v_cont): Handle async I/O here.
13009 (myresume): Likewise. Move other common resume tasks here...
13010 (main): ... from here. Call initialize_async_io. Disable async
13011 I/O before the main loop.
13012 * server.h (initialize_async_io): Declare.
13013 (block_async_io, unblock_async_io): Delete prototypes.
13014 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13015
b79d787e
DJ
130162007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13017
13018 * remote-utils.c (readchar): Allow binary data in received messages.
13019
d97903b2
PA
130202007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13021
13022 * win32-low.c (attaching): New global.
13023 (win32_create_inferior): Clear the `attaching' global.
13024 (win32_attach): Set the `attaching' global.
13025 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13026 attaching. Only set a breakpoint at the entry point if not
13027 attaching.
13028
311de423
PA
130292007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13030
13031 * server.c (main): Don't report dll events on the initial
13032 connection on attaches.
13033
6c2d16d2
PA
130342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13035
13036 * server.c (main): Relax numerical bases supported for the pid of
13037 the --attach command line argument.
13038
5ca906e6
PA
130392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13040
13041 * win32-low.c (win32_attach): Call OpenProcess before
13042 DebugActiveProcess, not after. Add last error output to error
13043 call.
13044
9c6c8194
PA
130452007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13046
13047 * win32-low.c (win32_get_thread_context)
13048 (win32_set_thread_context): New functions.
13049 (thread_rec): Use win32_get_thread_context.
13050 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13051 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13052 field.
13053
4d5d1aaa
PA
130542007-12-03 Leo Zayas
13055 Pedro Alves <pedro_alves@portugalmail.pt>
13056
13057 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13058 global variables.
13059 (child_add_thread): Minor cleanup.
13060 (child_continue): Resume artificially suspended threads before
13061 calling ContinueDebugEvent.
13062 (suspend_one_thread): New.
13063 (fake_breakpoint_event): New.
13064 (get_child_debug_event): Change return type to int. Check here if
13065 gdb sent an interrupt request. If a soft interrupt was requested,
13066 fake a breakpoint event. Return 0 if there is no event to handle,
13067 and 1 otherwise.
13068 (win32_wait): Don't check here if gdb sent an interrupt request.
13069 Ensure there is a valid event to handle.
13070 (win32_request_interrupt): Add soft interruption method as last
13071 resort.
13072
c436e841
PA
130732007-12-03 Leo Zayas
13074 Pedro Alves <pedro_alves@portugalmail.pt>
13075
13076 * win32-low.h (win32_thread_info): Add descriptions to the
13077 structure members. Replace `suspend_count' counter by a
13078 `suspended' flag.
13079 * win32-low.c (thread_rec): Update condition of when to get the
13080 context from the inferior. Rely on ContextFlags being set if it
13081 has already been retrieved. Only suspend the inferior thread if
13082 we haven't already. Warn if that fails.
13083 (continue_one_thread): s/suspend_count/suspended/. Only call
13084 ResumeThread once. Warn if that fails.
13085
e7b5fa67
PA
130862007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13087
13088 * win32-low.c (win32_wait): Don't read from the inferior when it
13089 has already exited.
13090
a385171d
PA
130912007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13092
13093 * Makefile.in (win32_low_h): New variable.
13094 (win32-low.o): Add dependency on $(win32_low_h).
13095 (win32-arm-low.o, win32-i386-low.o): New rules.
13096
f80c84b3
DJ
130972007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13098
13099 * hostio.c: Correct copyright year.
13100
a6b151f1
DJ
131012007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13102
13103 * Makefile.in (OBS): Add hostio.o.
13104 (hostio.o): New rule.
13105 * server.h (handle_vFile): Declare.
13106 * hostio.c: New file.
13107 * server.c (handle_v_requests): Take packet_len and new_packet_len
13108 for binary packets. Call handle_vFile.
13109 (main): Update call to handle_v_requests.
13110
f9387fc3
DJ
131112007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13112
13113 * linux-low.c: Include <sched.h>.
13114
51c2684e
DJ
131152007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13116
13117 * linux-low.c (linux_tracefork_grandchild): New.
13118 (linux_tracefork_child): Use clone.
13119 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13120
75f83163
JB
131212007-10-31 Joel Brobecker <brobecker@adacore.com>
13122
13123 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13124
da5898ce
DJ
131252007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13126
13127 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13128
24a09b5f
DJ
131292007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13130
13131 * inferiors.c (change_inferior_id): Delete.
13132 (add_pid_to_list, pull_pid_from_list): New.
13133 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13134 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13135 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13136 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13137 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13138 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13139 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13140 (using_threads): Always set to 1.
13141 (handle_extended_wait): New.
13142 (add_process): Do not set TID.
13143 (linux_create_inferior): Set must_set_ptrace_flags.
13144 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13145 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13146 (linux_thread_alive): Rename TID argument to LWPID.
13147 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13148 (linux_wait_for_event): Do not use TID or check using_threads. Update
13149 call to dead_thread_notify. Call handle_extended_wait.
13150 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13151 (send_sigstop): Delete sigstop_sent.
13152 (wait_for_sigstop): Avoid TID.
13153 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13154 (linux_test_for_tracefork): New.
13155 (linux_lookup_signals): Use thread_db_active and
13156 linux_supports_tracefork_flag.
13157 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13158 * linux-low.h (get_process_thread): Avoid TID.
13159 (struct process_ifo): Move thread_known and tid to the end. Remove
13160 sigstop_sent.
13161 (linux_attach_lwp, thread_db_init): Update prototypes.
13162 * server.h (change_inferior_id): Delete prototype.
13163 (add_pid_to_list, pull_pid_from_list): New prototypes.
13164 * thread-db.c (thread_db_use_events): New.
13165 (find_first_thread): Rename to...
13166 (find_one_thread): ...this. Update callers and messages. Do not
13167 call fatal. Check thread_db_use_events. Do not call
13168 change_inferior_id or new_thread_notify.
13169 (maybe_attach_thread): Update. Do not call new_thread_notify.
13170 (thread_db_init): Set thread_db_use_events. Check use_events.
13171 * utils.c (fatal, warning): Correct message prefix.
13172
30ed0a8f
DJ
131732007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13174
13175 * Makefile.in (clean): Remove new files.
13176 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13177 (powerpc-64.o, powerpc-64.c): New rules.
13178 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13179 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13180 with SPE.
13181 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13182 SPE targets.
13183 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13184 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13185 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13186 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13187 (target_regsets): Add AltiVec and SPE register sets.
13188 * configure.ac: Check for AltiVec and SPE.
13189 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13190 (ppc_fill_vrregset, ppc_store_vrregset): New.
13191 (target_regsets): Add AltiVec register set.
13192 * configure: Regenerated.
13193
fd462a61
DJ
131942007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13195
13196 * linux-low.c (O_LARGEFILE): Define.
13197 (linux_read_memory): Use /proc/PID/mem.
13198 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13199 * configure, config.in: Regenerated.
13200
69f223ed
DJ
132012007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13202
13203 * linux-low.c (linux_wait_for_event): Do not pass signals while
13204 single-stepping.
13205
aec18585
PA
132062007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13207
13208 * win32-low.c (create_process): New.
13209 (win32_create_inferior): Use create_process instead of
13210 CreateProcess. If create_process failed retry appending an ".exe"
13211 suffix. Store the GetLastError result immediatelly after
13212 create_process calls and use it on the call to error.
13213
34d86ddd
PA
132142007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13215
13216 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13217
5a0e3bd0
JB
132182007-08-23 Joel Brobecker <brobecker@adacore.com>
13219
13220 * configure.ac: Switch license to GPLv3.
13221
f88c79e6
MS
132222007-08-01 Michael Snyder <msnyder@access-company.com>
13223
13224 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13225
6b3d9b83
PA
132262007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13227
13228 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13229 typedef.
13230 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13231 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13232 CloseToolhelp32Snapshot.
13233 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13234 CloseToolhelp32Snapshot.
13235
c588c53c
MS
132362007-07-27 Michael Snyder <michael.snyder@access-company.com>
13237
13238 * server.c (main): Check for inferior exit before main loop.
13239
aa0403d9
PA
132402007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13241
13242 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13243 instead of on tmp_desc.
13244
255e7678
DJ
132452007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13246 Daniel Jacobowitz <dan@codesourcery.com>
13247
13248 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13249 (add_thread): Minor cleanups.
13250 (clear_inferiors): Move lower in the file. Clear the DLL
13251 list.
13252 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13253 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13254 (xml_escape_text): New.
13255 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13256 for qSupported.
13257 (handle_v_cont): Report errors.
13258 (gdbserver_version): Update.
13259 (main): Correct size of own_buf. Do not report initial DLL events.
13260 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13261 (unloaded_dll, xml_escape_text): New.
13262 * win32-low.c (enum target_waitkind): Update comments.
13263 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13264 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13265 (win32_EnumProcessModules, win32_GetModuleInformation)
13266 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13267 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13268 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13269 (win32_Module32First, win32_Module32Next, load_toolhelp)
13270 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13271 (get_child_debug_event): Handle DLL events.
13272 (win32_wait): Likewise.
13273
0d37add9
DJ
132742007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13275
13276 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13277 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13278
45e2715e
PA
132792007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13280
13281 * win32-low.c (handle_output_debug_string): Ignore event if not
13282 waiting.
13283
c5674cf1
PA
132842007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13285
13286 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13287
2bbe3cc1
DJ
132882007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13289
13290 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13291
ae13219e
DJ
132922007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13293
13294 * inferiors.c (change_inferior_id): Add comment.
13295 * linux-low.c (check_removed_breakpoint): Add an early
13296 prototype. Improve debug output.
13297 (linux_attach): Doc update.
13298 (linux_detach_one_process, linux_detach): Clean up before releasing
13299 each process.
13300 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13301 * linux-low.h (struct process_info): Doc improvement.
13302 * mem-break.c (delete_all_breakpoints): New.
13303 * mem-break.h (delete_all_breakpoints): New prototype.
13304 * thread-db.c (find_first_thread): New.
13305 (thread_db_create_event): Call it instead of
13306 thread_db_find_new_threads. Clean up unused variables.
13307 (maybe_attach_thread): Remove first thread handling.
13308 (thread_db_find_new_threads): Use find_first_thread.
13309 (thread_db_get_tls_address): Likewise.
13310
4105de34
DJ
133112007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13312
13313 * thread-db.c (thread_db_find_new_threads): Add prototype.
13314 (thread_db_create_event): Check for the main thread before adding
13315 a new thread.
13316 (maybe_attach_thread): Only enable event reporting if TID == 0.
13317 (thread_db_get_tls_address): Check for new threads.
13318
2b876972
DJ
133192007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13320
13321 * linux-low.c (linux_create_inferior): Try execv before execvp.
13322 * spu-low.c (spu_create_inferior): Likewise.
13323
7a245884
DJ
133242007-06-13 Mike Frysinger <vapier@gentoo.org>
13325
13326 * linux-low.c (linux_create_inferior): Change execv to execvp.
13327 * spu-low.c (spu_create_inferior): Likewies.
13328
117ce543
DJ
133292007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13330
13331 * Makefile.in (clean): Clean new files instead of deleted ones.
13332 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13333 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13334 rules.
13335 * configure.srv: Specify XML files and new regformats for MIPS and
13336 MIPS64 GNU/Linux.
13337 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13338 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13339 an entry for the restart register.
13340 (mips_cannot_fetch_register, mips_cannot_store_register)
13341 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13342 register names to match the XML descriptions.
13343 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13344 restart register instead of $0.
13345
0e7f50da
UW
133462007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13347 Markus Deuling <deuling@de.ibm.com>
13348
13349 * remote-utils.c (decode_xfer_write): New function.
13350 * server.h (decode_xfer_write): Add prototype.
13351 * server.c (handle_query): Add PACKET_LEN argument. Support
13352 qXfer:spu:read and qXfer:spu:write packets.
13353 (main): Pass packet_len to handle_query.
13354 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13355 * target.h (target_ops): Add qxfer_spu.
13356
374c1d38
UW
133572007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13358
13359 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13360 accessing non-seekable spufs files.
13361
bb63802a
UW
133622007-05-16 Markus Deuling <deuling@de.ibm.com>
13363
889bf7c5 13364 * server.c (handle_query): Add reply for qC packet.
bb63802a 13365
7390519e
PA
133662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13367 Leo Zayas <lerele@champenstudios@com>
13368
13369 * server.h (check_remote_input_interrupt_request): New function.
13370 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13371 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13372 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13373 (check_remote_input_interrupt_request): New function.
13374 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13375 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13376 winapi_GenerateConsoleCtrlEvent): New typedefs.
13377 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13378 to 250 ms.
13379 (win32_wait): Check for remote interrupt request
13380 with check_remote_input_interrupt_request.
13381 (win32_request_interrupt): New function.
13382 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13383
34b34921
PA
133842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13385
13386 * win32-low.c (debug_registers_changed,
13387 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13388 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13389 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13390 (thread_rec): Get context using the low target.
13391 (child_add_thread): Call thread_added on the low target,
13392 which does the same thing.
13393 (regptr): Delete.
13394 (do_initial_child_stuff): Remove debug registers references.
13395 Set context using the low target. Resume threads after
13396 setting the contexts.
13397 (child_continue): Remove dead variable. Remove debug
13398 registers references.
13399 (child_fetch_inferior_registers): Go through the low target.
13400 (do_child_store_inferior_registers): Remove.
13401 (child_store_inferior_registers): Go through the low target.
13402 (win32_resume): Remove debug registers references.
13403 Set context using the low target.
13404 (handle_exception): Change return type to void. Don't record
13405 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13406 first chance exception.
889bf7c5 13407 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13408 goto loop. Always return after waiting for debug event.
13409 (win32_wait): Convert to switch statement. Handle spurious
13410 events.
13411
13412 * win32-i386-low.c (debug_registers_changed,
13413 debug_registers_used): New.
13414 (initial_stuff): Rename to ...
13415 (i386_initial_stuff): ... this. Clear debug registers
13416 state variables.
13417 (store_debug_registers): Delete.
13418 (i386_get_thread_context): New.
13419 (load_debug_registers): Delete.
13420 (i386_set_thread_context): New.
13421 (i386_thread_added): New.
13422 (single_step): Rename to ...
13423 (i386_single_step): ... this.
13424 (do_fetch_inferior_registers): Rename to ...
13425 (i386_fetch_inferior_register): ... this.
13426 (i386_store_inferior_register): New.
13427 (the_low_target): Adapt to new interface.
13428
13429 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13430 (arm_get_thread_context): New.
13431 (arm_set_thread_context): New.
13432 (regptr): New.
13433 (do_fetch_inferior_registers): Rename to ...
13434 (arm_fetch_inferior_register): ... this.
13435 (arm_store_inferior_register): New.
13436 (arm_wince_breakpoint): Reimplement as unsigned long.
13437 (arm_wince_breakpoint_len): Define.
13438 (the_low_target): Adapt to new interface.
13439
13440 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13441 load_debug_registers. Add get_thread_context, set_thread_context,
13442 thread_added and store_inferior_register. Rename
13443 fetch_inferior_registers to fetch_inferior_register.
13444 (regptr): Remove declaration.
13445
dd6953e1
PA
134462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13447
13448 * linux-low.c (linux_detach): Change return type to int. Return 0.
13449 * spu-low.c (spu_detach): Likewise.
13450
444d6139
PA
134512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13452
13453 * target.h (target_ops): Change return type of detach to int.
13454 Add join.
13455 (join_inferior): New.
13456 * server.c (main): Don't skip detach support on mingw32.
13457 If the inferior doesn't support detaching return error.
13458 Call join_inferior instead of using waitpid.
13459 * linux-low.c (linux_join): New.
13460 (linux_target_op): Add linux_join.
13461 * spu-low.c (spu_join): New.
13462 (spu_target_ops): Add spu_join.
13463 * win32-low.c (win32_detach): Adapt to new interface.
13464 Reopen current_process_handle before detaching. Issue a child
13465 resume before detaching.
13466 (win32_join): New.
13467 (win32_target_op): Add win32_join.
13468
1d5315fe
PA
134692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13470
13471 * win32-low.c (win32-attach): Fix return value.
13472 * target.h (target_ops): Describe ATTACH return values.
13473
bf914831
PA
134742007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13475
13476 * win32-low.c (GETPROCADDRESS): Define.
13477 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13478 (winapi_DebugSetProcessKillOnExit): Likewise.
13479 (win32_create_inferior): Force usage of ansi CreateProcessA.
13480 (win32_attach): Use GETPROCADDRESS.
13481 (win32_detach): Likewise.
13482
f72f3e60
PA
134832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13484
13485 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13486
ed50f18f
PA
134872007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13488
13489 * win32-low.c: Commit leftover changes from 2007-03-29.
13490
0c2ead7e
DJ
134912007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13492
13493 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13494 fields short instead of int. Add explicit padding.
13495 (i387_cache_to_fsave): Remove unnecessary casts.
13496 (i387_fsave_to_cache): Doc fix.
13497 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13498
73725ff3
DJ
134992007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13500
13501 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13502 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13503
d99f33d8
PA
135042007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13505
13506 * configure.srv (arm*-*-mingw32ce*): Move near the other
13507 arm targets.
13508
68070c10
PA
135092007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13510
2482afc6 13511 * configure.ac: Add errno checking.
68070c10
PA
13512 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13513 sys/file.h and malloc.h.
13514 (AC_CHECK_DECLS): Add perror.
13515 (srv_mingwce): Handle.
2482afc6 13516 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13517 win32-i386-low.o to srv_tgtobj.
13518 (i[34567]86-*-mingw*): Likewise.
13519 (arm*-*-mingw32ce*): Add case.
13520 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13521 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13522 [__MINGW32CE__] (strerror): New function.
13523 [__MINGW32CE__] (errno): Define to GetLastError.
13524 [__MINGW32CE__] (COUNTOF): New macro.
13525 (remote_open): Remove extra close call.
13526 * mem-break.c (delete_breakpoint_at): New function.
13527 * mem-break.h (delete_breakpoint_at): Declare.
13528 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13529 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13530 [USE_WIN32API] (read, write): Add char* casts.
13531 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13532 * server.h: Include wincecompat.h on Windows CE.
13533 [HAVE_ERRNO_H]: Check.
13534 (perror): Declare if not declared.
13535 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13536 (perror_with_name): Remove errno declaration.
13537 * wincecompat.h: New.
13538 * wincecompat.c: New.
13539 * win32-low.h: New.
13540 * win32-arm-low.c: New.
13541 * win32-i386-low.c: New.
13542 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13543 (OUTMSG2): Make it safe.
13544 (_T): New macro.
13545 (COUNTOF): New macro.
13546 (NUM_REGS): Get it from the low target.
13547 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13548 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13549 (thread_rec): Let low target handle debug registers.
13550 (child_add_thread): Likewise.
13551 (child_init_thread_list): Likewise.
13552 (continue_one_thread): Likewise.
13553 (regptr): New.
13554 (do_child_fetch_inferior_registers): Move to ...
13555 * win32-i386-low.c: ... here, and rename to ...
13556 (do_fetch_inferior_registers): ... this.
889bf7c5 13557 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13558 Go through the low target.
13559 (do_child_store_inferior_registers): Use regptr.
13560 (strwinerror): New function.
13561 (win32_create_inferior): Handle Windows CE.
13562 Use strwinerror instead of strerror on Windows error
13563 codes. Add program to the error output.
13564 Don't close the main thread handle on Windows CE.
13565 (win32_attach): Use coredll.dll on Windows CE.
13566 (win32_kill): Close current process and current
13567 thread handles.
13568 (win32_detach): Use coredll.dll on Windows CE.
13569 (win32_resume): Let low target handle debug registers, and
13570 step request.
13571 (handle_exception): Add/Remove initial breakpoint. Avoid
13572 non-existant WSTOPSIG on Windows CE.
13573 (win32_read_inferior_memory): Cast to remove warning.
13574 (win32_arch_string): Go through the low target.
13575 (initialize_low): Call set_breakpoint_data with the low
13576 target's breakpoint.
13577 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13578 FOP_REGNUM, mappings): Move to ...
13579 * win32-i386-low.c: ... here.
13580 * win32-low.c (win32_thread_info): Move to ...
13581 * win32-low.h: ... here.
13582 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13583 win32-arm-low.c and wincecompat.c.
13584 (all:): Add $EXEEXT.
13585 (install-only:): Likewise.
13586 (gdbserver:): Likewise.
13587 (gdbreplay:): Likewise.
13588 * config.in: Regenerate.
13589 * configure: Regenerate.
13590
41093d81
PA
135912007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13592
13593 * win32-low.c: Rename typedef thread_info to
13594 win32_thread_info throughout.
13595
544afa54
PA
135962007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13597
13598 * win32-i386-low.c: Rename to ...
13599 * win32-low.c: ... this.
13600 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13601 * Makefile.in: Likewise.
13602
bce7165d
PA
136032007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13604
13605 * remote-utils.c (monitor_output): Constify msg parameter.
13606 * server.h (monitor_output): Likewise.
13607 * win32-i386-low.c (handle_output_debug_string): New.
13608 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13609 handle_output_debug_string.
13610 (get_child_debug_event): Likewise.
13611
506c7aa0
DJ
136122007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13613
13614 * server.c (main): Correct strtoul check.
13615
42c81e2a
DJ
136162007-03-27 Jon Ringle <jon@ringle.org>
13617
13618 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13619
9453113a
DJ
136202007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13621
13622 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13623
64a69107
DJ
136242007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13625
13626 * terminal.h: Check HAVE_SGTTY_H.
13627
136282007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13629
13630 * remote-utils.c (remote_open): Print out the assigned port number.
13631
c74d0ad8
DJ
136322007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13633
13634 * remote-utils.c (monitor_output): New function.
13635 * server.c (debug_threads): Define here.
13636 (monitor_show_help): New function.
13637 (handle_query): Handle qRcmd.
13638 (main): Do not handle 'd' packet.
13639 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13640 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13641 of debug_threads.
13642
de7c3b4a
PA
136432007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13644
13645 * Makefile.in (EXEEXT): New.
13646 (clean): Use $(EXEEXT).
13647
ef57601b
PA
136482007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13649
13650 * target.h (target_ops): Rename send_signal to request_interrupt,
13651 and remove enum target_signal parameter.
13652 * linux-low.c (linux_request_interrupt): Rename from
13653 linux_send_signal, and always send SIGINT.
13654 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13655 and always send SIGINT.
13656 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13657 of send_signal.
13658 (input_interrupt): Likewise.
13659
820f2bda
PA
136602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13661
13662 * server.c (get_features_xml): Check if target implemented
13663 arch_string.
13664 * win32-i386-low.c (win32_arch_string): New.
13665 (win32_target_ops): Add win32_arch_string as arch_string member.
13666
ab39bf24
UW
136672007-02-22 Markus Deuling <deuling@de.ibm.com>
13668
13669 * spu-low.c (spu_arch_string): New.
13670 (spu_target_ops): Add spu_arch_string.
13671
61ff6e04
DJ
136722007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13673
13674 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13675 * configure.ac: Do not check for terminal.h.
13676 * configure, config.in: Regenerated.
13677
fb1e4ffc
DJ
136782007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13679
13680 * Makefile.in (OBS): Add $(XML_BUILTIN).
13681 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13682 (clean): Update.
13683 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13684 (arm-with-iwmmxt.c): New.
13685 * config.in, configure: Regenerate.
13686 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13687 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13688 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13689 (arm*-*-linux*): Add iWMMXt and regset support.
13690 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13691 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13692 (arm_store_wmmxregset, target_regsets): New.
13693 * server.c (get_features_xml): Take annex argument. Check builtin
13694 XML documents.
13695 (handle_query): Handle multiple annexes.
13696
0f48aa01
DJ
136972007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13698
13699 * remote-utils.c [USE_WIN32API] (read, write): Define.
13700 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13701 write.
13702
23181151
DJ
137032007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13704
13705 * linux-i386-low.c (the_low_target): Set arch_string.
13706 * linux-x86-64-low.c (the_low_target): Likewise.
13707 * linux-low.c (linux_arch_string): New.
13708 (linux_target_ops): Add it.
13709 * linux-low.h (struct linux_target_ops): Add arch_string.
13710 * server.c (write_qxfer_response): Use const void * for DATA.
13711 (get_features_xml): New.
13712 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13713 * target.h (struct target_ops): Add arch_string method.
13714
9d606399
DJ
137152007-01-03 Denis Pilat <denis.pilat@st.com>
13716 Daniel Jacobowitz <dan@codesourcery.com>
13717
13718 * linux-low.c (linux_kill): Handle being called with no threads.
13719 * win32-i386-low.c (win32_kill): Likewise.
13720 (get_child_debug_event): Clear current_process_handle.
13721
137222006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13723 Daniel Jacobowitz <dan@codesourcery.com>
13724
13725 * remote-utils.c (remote_open): Check the type of specified
13726 serial port devices before opening them.
13727 * server.c (main): Kill the inferior if an error occurs during
13728 the first remote_open.
13729
a5e13d24
DJ
137302006-12-05 Markus Deuling <deuling@de.ibm.com>
13731
13732 * README: Update supported targets.
13733
186947f7
DJ
137342006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13735
13736 * Makefile.in (clean): Remove reg-mips64.c.
13737 (reg-mips64.c, reg-mips64.o): New rules.
13738 * configure.srv: Handle mips64. Include regset support for mips.
13739 * linux-mips-low.c (union mips_register): New.
13740 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13741 (mips_breakpoint, mips_breakpoint_at): Use int.
13742 (mips_collect_register, mips_supply_register)
13743 (mips_collect_register_32bit, mips_supply_register_32bit)
13744 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13745 (mips_store_fpregset, target_regsets): New.
13746 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13747
a13e2c95
UW
137482006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13749
13750 * configure.srv: Add target "spu*-*-*".
13751 * Makefile.in (clean): Remove reg-spu.c.
13752 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13753 * spu-low.c: New file.
13754
cb7283db
DJ
137552006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13756
13757 * configure.ac: Correct td_thr_tls_get_addr test.
13758 * configure: Regenerated.
13759
89be2091
DJ
137602006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13761
13762 * linux-low.c (linux_wait_for_event): Reformat. Use the
13763 pass_signals array.
13764 * remote-utils.c (decode_address_to_semicolon): New.
13765 * server.c (pass_signals, handle_general_set): New.
13766 (handle_query): Mention QPassSignals for qSupported.
13767 (main): Call handle_general_set.
13768 * server.h (pass_signals, decode_address_to_semicolon): New.
13769
000ef4f0
DJ
137702006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13771
13772 * server.c (handle_query): Correct error handling for read_auxv.
13773
b7149293
UW
137742005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13775
13776 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13777 and srv_linux_thread_db to yes.
13778 * linux-s390-low.c (s390_fill_gregset): New function.
13779 (target_regsets): Define data structure.
13780
dae5f5cf
DJ
137812006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13782
13783 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13784 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13785 * config.in, configure: Regenerated.
13786 * inferiors.c (gdb_id_to_thread): New function.
13787 (gdb_id_to_thread_id): Use it.
13788 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13789 * linux-low.h (struct process_info): Add th member.
13790 (thread_db_get_tls_address): New prototype.
13791 * remote-utils.c (decode_address): Make non-static.
13792 * server.c (handle_query): Handle qGetTLSAddr.
13793 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13794 * target.h (struct target_ops): Add get_tls_address.
13795 * thread-db.c (maybe_attach_thread): Save the thread handle.
13796 (thread_db_get_tls_address): New.
13797
32ca6d61
DJ
137982006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13799
13800 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13801 (linux_resume_one_process): Take a siginfo_t *. Update all
13802 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13803 (struct pending_signals): Add a siginfo_t.
13804 (linux_wait_for_process): Always set last_status.
13805 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13806 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13807 * linux-low.h (struct process_info): Add last_status.
13808
5ffff7c1
DJ
138092006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13810
13811 * remote-utils.c (try_rle): New function.
13812 (putpkt_binary): Use it.
13813
8695c747
DJ
138142006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13815
13816 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13817 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13818 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13819 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13820 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13821 point registers.
13822
290fadea
RS
138232006-08-08 Richard Sandiford <richard@codesourcery.com>
13824
13825 * server.c (terminal_fd): New variable.
13826 (old_foreground_pgrp): Likewise.
13827 (restore_old_foreground_pgrp): New function.
13828 (start_inferior): Record the terminal file descriptor in terminal_fd
13829 and its original foreground group in old_foreground_pgrp. Register
13830 restore_old_foreground_pgrp with atexit().
13831
9f2e1e63
DJ
138322006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13833
13834 * server.c (handle_query): Correct qPart to qXfer.
13835
b80864fb
DJ
138362006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13837
13838 * configure.ac: Check for more headers which are missing on
13839 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13840 * configure.srv: Add Cygwin and mingw32.
13841 * remote-utils.c: Don't include headers unconditionally which
13842 are missing on mingw32. Include <winsock.h> for mingw32.
13843 (remote_open): Adjust for mingw32 support. Flush
13844 standard error after writing to it.
13845 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13846 (unblock_async_io, enable_async_io, disable_async_io)
13847 (readchar, getpkt): Update for Winsock support.
13848 (prepare_resume_reply): Expect a protocol signal number.
13849 * server.c: Disable <sys/wait.h> on mingw32.
13850 (start_inferior): Adjust for mingw32 support. Flush
13851 standard error after writing to it.
13852 (attach_inferior): Likewise. Use protocol signal
13853 numbers.
13854 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13855 and names.
13856 * win32-i386-low.c: New file.
13857 * Makefile.in (XM_CLIBS): Set.
13858 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13859 (win32-i386-low.o): New dependency rule.
13860 * linux-low.c (linux_wait): Use target signal numbers.
13861 * target.h (struct target_ops): Doc fix.
13862 * server.h (target_signal_to_name): New prototype.
13863 * gdbreplay.c: Don't include headers unconditionally which
13864 are missing on mingw32. Include <winsock.h> for mingw32.
13865 (remote_close, remote_open): Adjust for Winsock support.
13866 * configure, config.in: Regenerated.
13867
0876f84a
DJ
138682006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13869
13870 * server.c (decode_xfer_read, write_qxfer_response): New.
13871 (handle_query): Take a packet length argument. Handle
13872 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13873 the qSupported response.
13874 (main): Update call to handle_query.
13875
01f9e8fa
DJ
138762006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13877
13878 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13879 (putpkt_binary): Renamed from putpkt and adjusted for binary
13880 data.
13881 (putpkt): New wrapper for putpkt_binary.
13882 (readchar): Don't mask off the high bit.
13883 (decode_X_packet): New function.
13884 * server.c (main): Call putpkt_binary if a handler sets the packet
13885 length. Save the length of the incoming packet. Handle 'X'.
13886 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13887
be2a5f71
DJ
138882006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13889
13890 * server.c (handle_query): Handle qSupported.
13891
ea025f5f
DJ
138922006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13893
13894 * remote-utils.c (all_symbols_looked_up): New variable.
13895 (look_up_one_symbol): Check it.
13896 * server.h (look_up_one_symbol): New declaration.
13897 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13898
9308fc88
DJ
138992006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13900
13901 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13902 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13903 (PTRACE_GET_THREAD_AREA): Define.
13904 (ps_get_thread_area): New function.
13905
52fb6437
NS
139062006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13907
13908 * configure.srv (m68k*-*-uclinux*): New target.
13909 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13910 (linux_resume_one_process): Remove extraneous cast.
13911 (linux_read_offsets): New.
13912 (linux_target_op): Add linux_read_offsets on mmuless systems.
13913 * server.c (handle_query): Add qOffsets logic.
13914 * target.h (struct target_ops): Add read_offsets.
13915
21b0f40c
DJ
139162006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13917
13918 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13919 (PTRACE_GET_THREAD_AREA): Define.
13920 (ps_get_thread_area): New function.
13921 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13922 (linux-x86-64-low.o): Update.
13923
0050a760
DJ
139242006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13925
13926 * configure.ac: Remove checks for prfpregset_t.
13927 * gdb_proc_service.h: New file.
13928 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13929 new "gdb_proc_service.h".
13930 * proc-service.c: Likewise.
13931 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13932 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13933 * Makefile.in (gdb_proc_service_h): Updated.
13934 * configure, config.in: Regenerated.
13935
b92a518e
DJ
139362006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13937
13938 * remote-utils.c (prepare_resume_reply): Move declaration
13939 of gdb_id_from_wait to the top of the block.
13940
545587ee
DJ
139412006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13942
13943 * linux-low.c (regsets_store_inferior_registers): Read the regset
13944 from the target before filling it.
13945
9db87ebd
DJ
139462006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13947
13948 * server.c (attach_inferior): Return SIGTRAP for a successful
13949 attach.
13950
dd24457d
DJ
139512006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13952
13953 * Makefile.in (OBS): Add version.o.
13954 (STAGESTUFF): Delete.
13955 (version.o): Add dependencies.
13956 (version.c): Replace rule.
13957 (clean): Remove version.c.
13958 * server.c (gdbserver_version): New.
13959 (gdbserver_usage): Use printf.
13960 (main): Handle --version and --help.
13961 * server.h (version, host_name): Add declarations.
13962
6f0f660e
EZ
139632005-12-23 Eli Zaretskii <eliz@gnu.org>
13964
889bf7c5
PA
13965 * linux-arm-low.c:
13966 * linux-arm-low.c:
13967 * inferiors.c:
13968 * i387-fp.h:
13969 * i387-fp.c:
13970 * gdbreplay.c:
13971 * regcache.c:
13972 * proc-service.c:
13973 * mem-break.h:
13974 * mem-break.c:
13975 * linux-x86-64-low.c:
13976 * linux-sh-low.c:
13977 * linux-s390-low.c:
13978 * linux-ppc64-low.c:
13979 * linux-ppc-low.c:
13980 * linux-mips-low.c:
13981 * linux-m68k-low.c:
13982 * linux-m32r-low.c:
13983 * linux-low.h:
13984 * linux-low.c:
13985 * linux-ia64-low.c:
13986 * linux-i386-low.c:
13987 * linux-crisv32-low.c:
13988 * thread-db.c:
13989 * terminal.h:
13990 * target.h:
13991 * target.c:
13992 * server.h:
13993 * server.c:
13994 * remote-utils.c:
13995 * regcache.h:
13996 * utils.c:
13997 * Makefile.in:
13998 * configure.ac:
6f0f660e
EZ
13999 * gdbserver.1: Add (C) after Copyright. Update the FSF
14000 address.
14001
9d1fb177
DJ
140022005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14003
14004 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14005 (arm_breakpoint_at): Recognize both breakpoints.
14006 (the_low_target): Use the correct breakpoint instruction.
14007
011a70c2
DJ
140082005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14009
14010 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14011 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14012 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14013 (the_low_target): Update.
14014
7fb85e41
AS
140152005-10-25 Andreas Schwab <schwab@suse.de>
14016
14017 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14018
14019 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14020 (ia64_num_regs): Reduce to 462.
14021
3db0444b
DJ
140222005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14023
14024 * acinclude.m4: Correct quoting.
14025 * aclocal.m4: Regenerated.
14026
14027 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14028 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14029 (thread_db_init): Call thread_db_err_str.
14030 * configure.ac: Check for TD_VERSION.
14031 * config.in, configure: Regenerated.
14032
bee0189a
DJ
140332005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14034
14035 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14036
e9d25b98
DJ
140372005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14038
14039 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14040 is not available. Define HAVE_PTRACE_GETREGS if it is.
14041 * config.in, configure: Regenerated.
14042 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14043 * linux-i386-low.c, linux-m68k-low.c: Update to use
14044 HAVE_PTRACE_GETREGS.
14045 * linux-low.c (regsets_fetch_inferior_registers)
14046 (regsets_store_inferior_registers): Only return 0 if we processed
14047 GENERAL_REGS.
14048 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14049 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14050
a06660f7
DJ
140512005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14052
14053 * inferiors.c (struct thread_info): Add gdb_id.
14054 (add_thread): Add gdb_id argument.
14055 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14056 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14057 calls to add_thread.
14058 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14059 * server.c (handle_query): Use thread_to_gdb_id.
14060 (handle_v_cont, main): Use gdb_id_to_thread_id.
14061 * server.h (add_thread): Update prototype.
14062 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14063 prototypes.
14064
5a1f5858
DJ
140652005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14066
14067 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14068 left-padded registers.
14069 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14070 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14071
e122f1f5
SE
140722005-07-01 Steve Ellcey <sje@cup.hp.com>
14073
14074 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14075 * configure: Regenerate.
14076 * config.in: Regenerate.
14077 * server.h (NEED_DECLARATION_STRERROR):
14078 Replace with !HAVE_DECL_STRERROR.
14079
d592fa2f
DJ
140802005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14081
14082 * linux-low.c (linux_wait, linux_send_signal): Don't test
14083 an unsigned long variable for > 0 if it could be MAX_ULONG.
14084 * server.c (myresume): Likewise.
14085 * target.c (set_desired_inferior): Likewise.
14086
ccbd4912
MK
140872005-06-13 Mark Kettenis <kettenis@gnu.org>
14088
14089 * configure.ac: Simplify and improve check for socklen_t.
14090 * configure, config.in: Regenerate.
14091
f450004a
DJ
140922005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14093
14094 * acconfig.h: Remove.
14095 * configure.ac: Add a test for socklen_t. Use three-argument
14096 AC_DEFINE throughout.
14097 * config.in: Regenerated using autoheader 2.59.
14098 * configure: Regenerated.
14099
14100 * gdbreplay.c (socklen_t): Provide a default.
14101 (remote_open): Use socklen_t.
14102 * remote-utils.c (socklen_t): Provide a default.
14103 (remote_open): Use socklen_t.
14104 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14105 unsigned char.
14106
14107 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14108 char for buffers.
14109 * linux-low.c (linux_read_memory, linux_write_memory)
14110 (linux_read_auxv): Likewise.
14111 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14112 (check_mem_write): Likewise.
14113 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14114 Likewise.
14115 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14116 (registers_from_string, register_data): Likewise.
14117 * server.c (handle_query, main): Likewise.
14118 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14119 (decode_M_packet): Likewise.
14120 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14121 * target.h (struct target_ops): Update read_memory, write_memory,
14122 and read_auxv.
14123 (read_inferior_memory, write_inferior_memory): Update.
14124 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14125 to unsigned char *.
14126 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14127 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14128 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14129 linux-s390-low.c, linux-sh-low.c: Update for changes in
14130 read_inferior_memory and the_low_target->breakpoint.
14131
eee84df1
DJ
141322005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14133
14134 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14135 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14136 * configure.srv: Add powerpc64-*-linux*.
14137 * linux-ppc64-low.c: New file.
14138
45b134e5
OF
141392005-05-23 Orjan Friberg <orjanf@axis.com>
14140
14141 * linux-cris-low.c: New file with support for CRIS.
14142 * linux-crisv32-low.c: Ditto for CRISv32.
14143 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14144 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14145 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14146 reg-crisv32.o, and reg-crisv32.c to make rules.
14147 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14148 recognized targets.
14149
48d93c75
UW
141502005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14151
14152 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14153 of sizeof (PTRACE_XFER_TYPE).
14154 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14155
e013ee27
OF
141562005-05-12 Orjan Friberg <orjanf@axis.com>
14157
889bf7c5 14158 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14159 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14160 pointers for hardware watchpoint support.
14161 * linux-low.h (struct linux_target_ops): Ditto.
14162 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14163 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14164 to linux_target_ops.
14165 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14166 reply packet.
14167 * server.c (main): Recognize 'Z' and 'z' packets.
14168
b0ded00b
UW
141692005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14170
14171 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14172 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14173 (the_low_target): Add new members.
14174
8643e2ad
DJ
141752005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14176
14177 * proc-service.c (ps_lgetregs): Search all_processes instead of
14178 all_threads.
14179
fc620387
DJ
141802005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14181
14182 * server.c (start_inferior): Change return type to int.
14183 (attach_inferior): Change sigptr to int *.
14184 (handle_v_cont, handle_v_requests): Change signal to int *.
14185 (main): Change signal to int.
14186
141872005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14188
14189 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14190 * configure.srv: Add m32r*-*-linux*.
14191 * linux-m32r-low.c: New file.
14192
e0e76420
DJ
141932005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14194
14195 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14196
a1928bad
DJ
141972005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14198
14199 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14200 Take unsigned long arguments for PIDs.
14201 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14202 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14203 (wait_for_sigstop, linux_resume_one_process)
14204 (regsets_fetch_inferior_registers, linux_send_signal)
14205 (linux_read_auxv): Likewise. Update the types of variables holding
14206 PIDs. Update format string specifiers.
14207 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14208 * remote-utils.c (prepare_resume_reply): Likewise.
14209 * server.c (cont_thread, general_thread, step_thread)
14210 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14211 unsigned long.
14212 (handle_query): Update format specifiers.
14213 (handle_v_cont, main): Use strtoul for thread IDs.
14214 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14215 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14216 (general_thread, step_thread, thread_from_wait)
14217 (old_thread_from_wait): Update.
14218 * target.h (struct thread_resume): Use unsigned long for THREAD.
14219 (struct target_ops): Use unsigned long for arguments to attach and
14220 thread_alive.
14221
dcdb98d2
DJ
142222005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14223
14224 * acinclude.m4: Include bfd/bfd.m4 directly.
14225 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14226 <agriffis@toolchain.org>.
14227 * aclocal.m4, configure: Regenerated.
14228
bec39cab
AC
142292005-01-07 Andrew Cagney <cagney@gnu.org>
14230
14231 * configure.ac: Rename configure.in, require autoconf 2.59.
14232 * configure: Re-generate.
14233
434c4c77
DJ
142342004-12-08 Daniel Jacobowitz <dan@debian.org>
14235
14236 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14237 LIBS when finished.
14238 * aclocal.m4: Regenerated.
14239 * configure: Regenerated.
14240
db1d3e1b
AS
142412004-11-21 Andreas Schwab <schwab@suse.de>
14242
14243 * linux-m68k-low.c (m68k_num_gregs): Define.
14244 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14245 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14246 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14247 (m68k_breakpoint_at): New. Add to the_low_target.
14248
14249 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14250 srv_linux_thread_db to yes.
14251
43360365
JB
142522004-10-20 Joel Brobecker <brobecker@gnat.com>
14253
14254 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14255 (ARCH_SET_FS): Likewise.
14256 (ARCH_GET_FS): Likewise.
14257 (ARCH_GET_GS): Likewise.
14258
fd500816
DJ
142592004-10-16 Daniel Jacobowitz <dan@debian.org>
14260
14261 * linux-i386-low.c (ps_get_thread_area): New.
14262 * linux-x86-64-low.c (ps_get_thread_area): New.
14263 * linux-low.c: Include <sys/syscall.h>.
14264 (linux_kill_one_process): Don't kill the first thread here.
14265 (linux_kill): Kill the first thread here.
14266 (kill_lwp): New function.
14267 (send_sigstop, linux_send_signal): Use it.
14268 * proc-service.c: Clean up #ifdefs.
14269 (fpregset_info): Delete.
14270 (ps_lgetregs): Update and enable implementation.
14271 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14272 implementations.
14273 * remote-utils.c (struct sym_cache, symbol_cache): New.
14274 (input_interrupt): Print a clearer message.
14275 (async_io_enabled): New variable.
14276 (enable_async_io, disable_async_io): Use it. Update comments.
14277 (look_up_one_symbol): Use the symbol cache.
14278 * thread-db.c (thread_db_look_up_symbols): New function.
14279 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14280
f6de3c42
DJ
142812004-10-16 Daniel Jacobowitz <dan@debian.org>
14282
14283 * configure.in: Test for -rdynamic.
14284 * configure: Regenerated.
14285 * Makefile (INTERNAL_LDFLAGS): New.
14286 (gdbserver, gdbreplay): Use it.
14287
2c0fc042
AC
142882004-09-02 Andrew Cagney <cagney@gnu.org>
14289
14290 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14291
075b3282
DJ
142922004-03-23 Daniel Jacobowitz <drow@mvista.com>
14293
14294 * linux-low.c (linux_wait): Clear all_processes list also.
14295
fa6a77dc
DJ
142962004-03-12 Daniel Jacobowitz <drow@mvista.com>
14297
14298 * linux-low.c: Include <errno.h>. Remove extern declaration of
14299 errno.
14300
6d782a97
DJ
143012004-03-12 Daniel Jacobowitz <drow@mvista.com>
14302
14303 * gdbreplay.c, server.h, utils.c: Update copyright years.
14304
3a7fb99b
DJ
143052004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14306
14307 * server.c (main): Print child status or termination signal from
14308 variable 'signal', not 'sig'.
14309
c3e735a6
DJ
143102004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14311
14312 * linux-low.c (linux_read_memory): Change return type to
14313 int. Check for and return error from ptrace().
14314 * target.c (read_inferior_memory): Change return type to int. Pass
14315 back return status from the_target->read_memory().
14316 * target.h (struct target_ops): Adapt *read_memory() prototype.
14317 Update comment.
14318 (read_inferior_memory): Adapt prototype.
14319 * server.c (main): Return an error packet if
14320 read_inferior_memory() returns an error.
14321
a59d1c82
DJ
143222004-03-04 Daniel Jacobowitz <drow@mvista.com>
14323
14324 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14325 Unify with other clean targets.
14326
dc3f8883
DJ
143272004-02-29 Daniel Jacobowitz <drow@mvista.com>
14328
14329 * server.c (handle_v_cont): Call set_desired_inferior.
14330
89a208da
DJ
143312004-02-29 Daniel Jacobowitz <drow@mvista.com>
14332
14333 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14334
62ea82f5
DJ
143352004-02-29 Daniel Jacobowitz <drow@mvista.com>
14336
14337 * linux-low.c (linux_wait): Unblock async I/O.
14338 (linux_resume): Block and enable async I/O.
14339 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14340 * server.h (block_async_io, unblock_async_io): Add prototypes.
14341
6910d122
DJ
143422004-02-29 Daniel Jacobowitz <drow@mvista.com>
14343
14344 * remote-utils.c (remote_open): Print a status notice after
14345 opening a TCP port.
14346 * server.c (attach_inferior): Print a status notice after
14347 attaching.
14348
143492004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14350
14351 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14352
c89dc5d4
DJ
143532004-02-26 Daniel Jacobowitz <drow@mvista.com>
14354
14355 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14356 error packet.
14357 * server.c, target.h: Update copyright years.
14358
4b8dad4a
RM
143592004-02-25 Roland McGrath <roland@redhat.com>
14360
14361 * target.h (struct target_ops): New member `read_auxv'.
14362 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14363 * linux-low.c (linux_read_auxv): New function.
14364 (linux_target_ops): Initialize `read_auxv' member to that.
14365
d7446758
JB
143662004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14367
14368 Committed by Jim Blandy <jimb@redhat.com>.
14369
14370 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14371 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14372 instead of GPR_SIZE to distiguish s390 and s390x targets.
14373
5544ad89
DJ
143742004-01-31 Daniel Jacobowitz <drow@mvista.com>
14375
14376 * linux-low.c: Update copyright year.
14377 (check_removed_breakpoint): Clear pending_is_breakpoint.
14378 (linux_set_resume_request, linux_queue_one_thread)
14379 (resume_status_pending_p): New functions.
14380 (linux_continue_one_thread): Use process->resume.
14381 (linux_resume): Only resume threads if there are no pending events.
14382 * linux-low.h (struct process_info): Add resume request
14383 pointer.
14384
2a68b70e
DJ
143852004-01-30 Daniel Jacobowitz <drow@mvista.com>
14386
14387 * regcache.c (new_register_cache): Clear the allocated register
14388 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14389
64386c31
DJ
143902003-10-13 Daniel Jacobowitz <drow@mvista.com>
14391
14392 * linux-low.c (linux_resume): Take a struct thread_resume *
14393 argument.
14394 (linux_wait): Update call.
14395 (resume_ptr): New static variable.
14396 (linux_continue_one_thread): Renamed from
14397 linux_continue_one_process. Use resume_ptr.
14398 (linux_resume): Use linux_continue_one_thread.
14399 * server.c (handle_v_cont, handle_v_requests): New functions.
14400 (myresume): New function.
14401 (main): Handle 'v' case.
14402 * target.h (struct thread_resume): New type.
14403 (struct target_ops): Change argument of "resume" to struct
14404 thread_resume *.
14405 (myresume): Delete macro.
14406
c938e9b0
L
144072003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14408
14409 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14410 (uninstall): Support DESTDIR.
14411
7f313d07
BC
14412Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14413
14414 * configure.srv: Add xscale*linux copy of arm*linux entry.
14415
3b2fc2ea
DJ
144162003-07-24 Daniel Jacobowitz <drow@mvista.com>
14417
14418 * linux-arm-low.c (arm_reinsert_addr): New function.
14419 (the_low_target): Add arm_reinsert_addr.
14420
1c0a559e
MK
144212003-07-08 Mark Kettenis <kettenis@gnu.org>
14422
14423 * mem-break.c: Remove whitespace at end of file.
14424
43d5792c
DJ
144252003-06-28 Daniel Jacobowitz <drow@mvista.com>
14426
14427 * configure.in: Check whether we need to prototype strerror.
14428 * server.h: Optionally prototype strerror.
14429 * gdbreplay.c (perror_with_name): Use strerror.
14430 * linux-low.c (linux_attach_lwp): Use strerror.
14431 * utils.c (perror_with_name): Use strerror.
14432 * config.in, configure: Regenerated.
14433
c8a86edf
DJ
144342003-06-28 Daniel Jacobowitz <drow@mvista.com>
14435
14436 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14437 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14438
73d37363
DJ
144392003-06-20 Daniel Jacobowitz <drow@mvista.com>
14440
14441 * Makefile.in (SFILES): Update.
14442 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14443 low-sun3.c: Remove files.
14444
6ad8ae5c
DJ
144452003-06-17 Daniel Jacobowitz <drow@mvista.com>
14446
14447 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14448 (linux_detach_one_process, linux_detach): New functions.
14449 (linux_target_ops): Add linux_detach.
14450 * server.c (main): Handle 'D' packet.
14451 * target.h (struct target_ops): Add "detach" member.
14452 (detach_inferior): Define.
14453
1581182a
MK
144542003-06-13 Mark Kettenis <kettenis@gnu.org>
14455
14456 From Kelley Cook <kelleycook@wideopenwest.com>:
14457 * configure.srv: Accept i[34567]86 variants.
14458
e5379b03
DJ
144592003-06-05 Daniel Jacobowitz <drow@mvista.com>
14460
14461 * linux-low.c (linux_wait_for_event): Correct comment typos.
14462 (linux_resume_one_process): Call check_removed_breakpoint.
14463 (linux_send_signal): New function.
14464 (linux_target_ops): Add linux_send_signal.
14465 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14466 of kill.
14467 * target.h (struct target_ops): Add send_signal.
14468
2ff29de4
JB
144692003-05-29 Jim Blandy <jimb@redhat.com>
14470
14471 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14472 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14473 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14474 away part of the register's value.
14475
254787d4
DJ
144762003-03-26 Daniel Jacobowitz <drow@mvista.com>
14477
14478 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14479 (linux_wait_for_event, linux_init_signals): Likewise.
14480
94e10508
DJ
144812003-03-17 Daniel Jacobowitz <drow@mvista.com>
14482
14483 * configure.in: Check for stdlib.h.
14484 * configure: Regenerated.
14485 * config.in: Regenerated.
14486
4c0711e0
DJ
144872003-01-04 Andreas Schwab <schwab@suse.de>
14488
14489 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14490
ef66e766
AC
144912003-01-02 Andrew Cagney <ac131313@redhat.com>
14492
14493 * Makefile.in: Remove obsolete code.
14494
a1358604
DJ
144952002-11-20 Daniel Jacobowitz <drow@mvista.com>
14496
14497 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14498 defined(PT_FPR0_HI).
14499
23ce3b1c
DJ
145002002-11-17 Stuart Hughes <seh@zee2.com>
14501
14502 * linux-arm-low.c (arm_num_regs): Increase.
14503 (arm_regmap): Include status register.
14504
145052002-11-17 Daniel Jacobowitz <drow@mvista.com>
14506
14507 * linux-low.c (register_addr): Remove incorrect -1 check.
14508
a9fa9f7d
DJ
145092002-08-29 Daniel Jacobowitz <drow@mvista.com>
14510
14511 * linux-low.c (linux_create_inferior): Call setpgid. Return
14512 the new PID.
14513 (unstopped_p, linux_signal_pid): Remove.
14514 (linux_target_ops): Remove linux_signal_pid.
14515 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14516 global instead of target method.
14517 * target.h (struct target_ops): Remove signal_pid. Update comment
14518 for create_inferior.
14519 * server.c (signal_pid): New variable.
14520 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14521 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14522 (attach_inferior): Set signal_pid.
14523
17574093
DJ
145242002-08-23 Daniel Jacobowitz <drow@mvista.com>
14525
14526 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14527
145282002-08-20 Jim Blandy <jimb@redhat.com>
14529
14530 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14531 default for this.
14532
145332002-08-01 Andrew Cagney <cagney@redhat.com>
14534
14535 * Makefile.in: Make chill references obsolete.
14536
145372002-07-24 Kevin Buettner <kevinb@redhat.com>
14538
14539 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14540 * configure: Regenerate.
14541 * config.in: Regenerate.
14542
145432002-07-09 David O'Brien <obrien@FreeBSD.org>
14544
14545 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14546 (perror_with_name, remote_close, remote_open, expect, play): Static.
14547
145482002-07-04 Michal Ludvig <mludvig@suse.cz>
14549
4b8dad4a 14550 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14551 byte offsets instead of an array of indexes.
14552 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14553
145542002-06-13 Daniel Jacobowitz <drow@mvista.com>
14555
14556 * regcache.c: Add comment.
14557
145582002-06-11 Daniel Jacobowitz <drow@mvista.com>
14559
14560 * thread-db.c: New file.
14561 * proc-service.c: New file.
14562 * acinclude.m4: New file.
14563 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14564 proc-service.o, and thread-db.o.
14565 (linux-low.o): Add USE_THREAD_DB.
14566 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14567 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14568 * aclocal.m4: Regenerated.
14569 * config.in: Regenerated.
14570 * configure: Regenerated.
14571 * configure.in: Check for proc_service.h, sys/procfs.h,
14572 thread_db.h, and linux/elf.h headrs.
14573 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14574 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14575 Check for -lthread_db and thread support.
14576 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14577 PowerPC, and SuperH.
14578 * i387-fp.c: Constify arguments.
14579 * i387-fp.h: Likewise.
14580 * inferiors.c: (struct thread_info): Renamed from
14581 `struct inferior_info'. Remove PID member. Use generic inferior
14582 list header. All uses updated.
14583 (inferiors, signal_pid): Removed.
14584 (all_threads): New variable.
14585 (get_thread): Define.
14586 (add_inferior_to_list): New function.
14587 (for_each_inferior): New function.
14588 (change_inferior_id): New function.
14589 (add_inferior): Removed.
14590 (remove_inferior): New function.
14591 (add_thread): New function.
14592 (free_one_thread): New function.
14593 (remove_thread): New function.
14594 (clear_inferiors): Use for_each_inferior and free_one_thread.
14595 (find_inferior): New function.
14596 (find_inferior_id): New function.
14597 (inferior_target_data): Update argument type.
14598 (set_inferior_target_data): Likewise.
14599 (inferior_regcache_data): Likewise.
14600 (set_inferior_regcache_data): Likewise.
14601 * linux-low.c (linux_bp_reinsert): Remove.
14602 (all_processes, stopping_threads, using_thrads)
14603 (struct pending_signals, debug_threads, pid_of): New.
14604 (inferior_pid): Replace with macro.
14605 (struct inferior_linux_data): Remove.
14606 (get_stop_pc, add_process): New functions.
14607 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14608 Use add_process and add_thread.
14609 (linux_attach_lwp): New function, based on old linux_attach. Use
14610 add_process and add_thread. Set stop_expected for new threads.
14611 (linux_attach): New function.
14612 (linux_kill_one_process): New function.
14613 (linux_kill): Kill all LWPs.
14614 (linux_thread_alive): Use find_inferior_id.
14615 (check_removed_breakpoints, status_pending_p): New functions.
14616 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14617 Update. Use WNOHANG. Wait for cloned processes also. Update process
14618 struct for the found process.
14619 (linux_wait_for_event): New function.
14620 (linux_wait): Use it. Support LWPs.
14621 (send_sigstop, wait_for_sigstop, stop_all_processes)
14622 (linux_resume_one_process, linux_continue_one_process): New functions.
14623 (linux_resume): Support LWPs.
14624 (REGISTER_RAW_SIZE): Remove.
14625 (fetch_register): Use register_size instead. Call supply_register.
14626 (usr_store_inferior_registers): Likewise. Call collect_register.
14627 Fix recursive case.
14628 (regsets_fetch_inferior_registers): Improve error message.
14629 (regsets_store_inferior_registers): Add debugging.
14630 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14631 (unstopped_p, linux_signal_pid): New functions.
14632 (linux_target_ops): Add linux_signal_pid.
14633 (linux_init_signals): New function.
14634 (initialize_low): Call it. Initialize using_threads.
14635 * regcache.c (inferior_regcache_data): Add valid
14636 flag.
14637 (get_regcache): Fetch registers lazily. Add fetch argument
14638 and update all callers.
14639 (regcache_invalidate_one, regcache_invalidate): New
14640 functions.
14641 (new_register_cache): Renamed from create_register_cache.
14642 Return the new regcache.
14643 (free_register_cache): Change argument to a void *.
14644 (registers_to_string, registers_from_string): Call get_regcache
14645 with fetch flag set.
14646 (register_data): Make static. Pass fetch flag to get_regcache.
14647 (supply_register): Call get_regcache with fetch flag clear.
14648 (collect_register): Call get_regcache with fetch flag set.
14649 (collect_register_as_string): New function.
14650 * regcache.h: Update.
14651 * remote-utils.c (putpkt): Flush after debug output and use
14652 stderr.
14653 Handle input interrupts while waiting for an ACK.
14654 (input_interrupt): Use signal_pid method.
14655 (getpkt): Flush after debug output and use stderr.
14656 (outreg): Use collect_register_as_string.
14657 (new_thread_notify, dead_thread_notify): New functions.
14658 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14659 and general_thread.
14660 (look_up_one_symbol): Flush after debug output.
14661 * server.c (step_thread, server_waiting): New variables.
14662 (start_inferior): Don't use signal_pid. Update call to mywait.
14663 (attach_inferior): Update call to mywait.
14664 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14665 (main): Don't fetch/store registers explicitly. Use
14666 set_desired_inferior. Support proposed ``Hs'' packet. Update
14667 calls to mywait.
14668 * server.h: Update.
14669 (struct inferior_list, struct_inferior_list_entry): New.
14670 * target.c (set_desired_inferior): New.
14671 (write_inferior_memory): Constify.
14672 (mywait): New function.
14673 * target.h: Update.
14674 (struct target_ops): New signal_pid method.
14675 (mywait): Removed macro, added prototype.
14676
14677 * linux-low.h (regset_func): Removed.
14678 (regset_fill_func, regset_store_func): New.
14679 (enum regset_type): New.
14680 (struct regset_info): Add type field. Use new operation types.
14681 (struct linux_target_ops): stop_pc renamed to get_pc.
14682 Add decr_pc_after_break and breakpoint_at.
14683 (get_process, get_thread_proess, get_process_thread)
14684 (strut process_info, all_processes, linux_attach_lwp)
14685 (thread_db_init): New.
14686
14687 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14688 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14689 (the_low_target): Add new members.
14690 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14691 (i386_store_fpxregset): Constify.
14692 (target_regsets): Add new kind identifier.
14693 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14694 (i386_set_pc): Add debugging.
14695 (i386_breakpoint_at): New function.
14696 (the_low_target): Add new members.
14697 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14698 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14699 (mips_breakpoint_at): New.
14700 (the_low_target): Add new members.
14701 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14702 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14703 (the_low_target): Add new members.
14704 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14705 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14706 (the_low_target): Add new members.
14707 * linux-x86-64-low.c (target_regsets): Add new kind
14708 identifier.
14709
147102002-05-15 Daniel Jacobowitz <drow@mvista.com>
14711
14712 From Martin Pool <mbp@samba.org>:
14713 * server.c (gdbserver_usage): New function.
14714 (main): Call it.
14715
147162002-05-14 Daniel Jacobowitz <drow@mvista.com>
14717
14718 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14719 stop_at -> stop_pc.
14720
147212002-05-04 Andrew Cagney <ac131313@redhat.com>
14722
14723 * Makefile.in: Remove obsolete code.
14724
147252002-04-24 Michal Ludvig <mludvig@suse.cz>
14726
14727 * linux-low.c (regsets_fetch_inferior_registers),
14728 (regsets_store_inferior_registers): Removed cast to int from
14729 ptrace() calls.
14730 * regcache.h: Added declaration of struct inferior_info.
14731
147322002-04-20 Daniel Jacobowitz <drow@mvista.com>
14733
14734 * inferiors.c (struct inferior_info): Add regcache_data.
14735 (add_inferior): Call create_register_cache.
14736 (clear_inferiors): Call free_register_cache.
14737 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14738 * regcache.c (struct inferior_regcache_data): New.
14739 (registers): Remove.
14740 (get_regcache): New function.
14741 (create_register_cache, free_register_cache): New functions.
14742 (set_register_cache): Don't initialize the register cache here.
14743 (registers_to_string, registers_from_string, register_data): Call
14744 get_regcache.
14745 * regcache.h: Add prototypes.
14746 * server.h: Likewise.
14747
147482002-04-20 Daniel Jacobowitz <drow@mvista.com>
14749
14750 * mem-break.c: New file.
14751 * mem-break.h: New file.
14752 * Makefile.in: Add mem-break.o rule; update server.h
14753 dependencies.
14754 * inferiors.c (struct inferior_info): Add target_data
14755 member.
14756 (clear_inferiors): Free target_data member if set.
14757 (inferior_target_data, set_inferior_target_data): New functions.
14758 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14759 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14760 * linux-low.c (linux_bp_reinsert): New variable.
14761 (struct inferior_linux_data): New.
14762 (linux_create_inferior): Use set_inferior_target_data.
14763 (linux_attach): Likewise. Call add_inferior.
14764 (linux_wait_for_one_inferior): New function.
14765 (linux_wait): Call it.
14766 (linux_write_memory): Add const.
14767 (initialize_low): Call set_breakpoint_data.
14768 * linux-low.h (struct linux_target_ops): Add breakpoint
14769 handling members.
14770 * server.c (attach_inferior): Remove extra add_inferior
14771 call.
14772 * server.h: Include mem-break.h. Update inferior.c
14773 prototypes.
14774 * target.c (read_inferior_memory)
14775 (write_inferior_memory): New functions.
14776 * target.h (read_inferior_memory)
14777 (write_inferior_memory): Change macros to prototypes.
14778 (struct target_ops): Update comments. Add const to write_memory
14779 definition.
14780
147812002-04-11 Daniel Jacobowitz <drow@mvista.com>
14782
14783 * linux-low.c (usr_store_inferior_registers): Support
14784 registers which are allowed to fail to store.
14785 * linux-low.h (linux_target_ops): Likewise.
14786 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14787 (ppc_cannot_store_register): FPSCR may not be storable.
14788
147892002-04-09 Daniel Jacobowitz <drow@mvista.com>
14790
14791 * server.h: Include <string.h> if HAVE_STRING_H.
14792 * ChangeLog: Correct paths in last ChangeLog entry.
14793
147942002-04-09 Daniel Jacobowitz <drow@mvista.com>
14795
14796 * linux-low.h: Remove obsolete prototypes.
14797 (struct linux_target_ops): New.
14798 (extern the_low_target): New.
14799 * linux-low.c (num_regs, regmap): Remove declarations.
14800 (register_addr): Use the_low_target explicitly.
14801 (fetch_register): Likewise.
14802 (usr_fetch_inferior_registers): Likewise.
14803 (usr_store_inferior_registers): Likewise.
14804 * linux-arm-low.c (num_regs): Remove.
14805 (arm_num_regs): Define.
14806 (arm_regmap): Renamed from regmap, made static.
14807 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14808 made static.
14809 (arm_cannot_store_register): Renamed from cannot_store_register,
14810 made static.
14811 (the_low_target): New.
14812 * linux-i386-low.c (num_regs): Remove.
14813 (i386_num_regs): Define.
14814 (i386_regmap): Renamed from regmap, made static.
14815 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14816 made static.
14817 (i386_cannot_store_register): Renamed from cannot_store_register,
14818 made static.
14819 (the_low_target): New.
14820 * linux-ia64-low.c (num_regs): Remove.
14821 (ia64_num_regs): Define.
14822 (ia64_regmap): Renamed from regmap, made static.
14823 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14824 made static.
14825 (ia64_cannot_store_register): Renamed from cannot_store_register,
14826 made static.
14827 (the_low_target): New.
14828 * linux-m68k-low.c (num_regs): Remove.
14829 (m68k_num_regs): Define.
14830 (m68k_regmap): Renamed from regmap, made static.
14831 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14832 made static.
14833 (m68k_cannot_store_register): Renamed from cannot_store_register,
14834 made static.
14835 (the_low_target): New.
14836 * linux-mips-low.c (num_regs): Remove.
14837 (mips_num_regs): Define.
14838 (mips_regmap): Renamed from regmap, made static.
14839 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14840 made static.
14841 (mips_cannot_store_register): Renamed from cannot_store_register,
14842 made static.
14843 (the_low_target): New.
14844 * linux-ppc-low.c (num_regs): Remove.
14845 (ppc_num_regs): Define.
14846 (ppc_regmap): Renamed from regmap, made static.
14847 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14848 made static.
14849 (ppc_cannot_store_register): Renamed from cannot_store_register,
14850 made static.
14851 (the_low_target): New.
14852 * linux-s390-low.c (num_regs): Remove.
14853 (s390_num_regs): Define.
14854 (s390_regmap): Renamed from regmap, made static.
14855 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14856 made static.
14857 (s390_cannot_store_register): Renamed from cannot_store_register,
14858 made static.
14859 (the_low_target): New.
14860 * linux-sh-low.c (num_regs): Remove.
14861 (sh_num_regs): Define.
14862 (sh_regmap): Renamed from regmap, made static.
14863 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14864 made static.
14865 (sh_cannot_store_register): Renamed from cannot_store_register,
14866 made static.
14867 (the_low_target): New.
14868 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14869 (the_low_target): New.
14870
148712002-04-09 Daniel Jacobowitz <drow@mvista.com>
14872
14873 * Makefile.in: Add stamp-h target.
14874 * configure.in: Create stamp-h.
14875 * configure: Regenerated.
14876
148772002-04-09 Daniel Jacobowitz <drow@mvista.com>
14878
14879 * inferiors.c: New file.
14880 * target.c: New file.
14881 * target.h: New file.
14882 * Makefile.in: Add target.o and inferiors.o. Update
14883 dependencies.
14884 * linux-low.c (inferior_pid): New static variable,
14885 moved from server.c.
14886 (linux_create_inferior): Renamed from create_inferior.
14887 Call add_inferior. Return 0 on success instead of a PID.
14888 (linux_attach): Renamed from myattach.
14889 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14890 (linux_thread_alive): Renamed from mythread_alive.
14891 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14892 child dies.
14893 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14894 (regsets_store_inferior_registers): Correct error message.
14895 Add missing ``return 0''.
14896 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14897 (linux_store_registers): Renamed from store_inferior_registers.
14898 (linux_read_memory): Renamed from read_inferior_memory.
14899 (linux_write_memory): Renamed from write_inferior_memory.
14900 (linux_target_ops): New structure.
14901 (initialize_low): Call set_target_ops ().
14902 * remote-utils.c (unhexify): New function.
14903 (hexify): New function.
14904 (input_interrupt): Send signals to ``signal_pid''.
14905 * server.c (inferior_pid): Remove.
14906 (start_inferior): Update create_inferior call.
14907 (attach_inferior): Call add_inferior.
14908 (handle_query): New function.
14909 (main): Call handle_query for `q' packets.
14910 * server.h: Include "target.h". Remove obsolete prototypes.
14911 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14912
149132002-04-09 Daniel Jacobowitz <drow@mvista.com>
14914
14915 * Makefile.in: Add WARN_CFLAGS. Update configury
14916 dependencies.
14917 * configure.in: Check for <string.h>
14918 * configure: Regenerate.
14919 * config.in: Regenerate.
14920 * gdbreplay.c: Include needed system headers.
14921 (remote_open): Remove strchr prototype.
14922 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14923 * regcache.c (supply_register): Change buf argument to const void *.
14924 (supply_register_by_name): Likewise.
14925 (collect_register): Change buf argument to void *.
14926 (collect_register_by_name): Likewise.
14927 * regcache.h: Add missing prototypes.
14928 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14929 * server.c (handle_query): New function.
14930 (attached): New static variable, moved out of main.
14931 (main): Quiet longjmp clobber warnings.
14932 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14933 * utils.c (error): Remove NORETURN.
14934 (fatal): Likewise.