]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
e13cb306
PA
12017-05-05 Pedro Alves <palves@redhat.com>
2
3 * configure: Regenerate.
4
c94fee56
SDJ
52017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
6
7 * configure: Regenerate.
8
a0ff9e1a
SM
92017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10
11 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
12 software_single_step change of return type to
13 std::vector<CORE_ADDR>.
14 * linux-low.c (install_software_single_step_breakpoints):
15 Likewise.
16 * linux-low.h (install_software_single_step_breakpoints):
17 Likewise.
18
be628ab8
SDJ
192017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
20
21 * remote-utils.c: Include "gdb_termios.h" instead of
22 "terminal.h".
23 * terminal.h: Delete file.
24
7c5ded6a
SDJ
252017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
26
27 * server.c: Include <vector>.
28 <program_argv, wrapper_argv>: Convert to std::vector.
29 (start_inferior): Rewrite function to use C++.
30 (handle_v_run): Likewise. Update code that calculates the argv
31 based on the vRun packet; use C++.
32 (captured_main): Likewise.
33
436252de
SM
342017-04-06 Simon Marchi <simon.marchi@ericsson.com>
35
36 * server.c (handle_v_cont): Initialize thread_resume::thread
37 with null_ptid.
38
9bf2a700
PA
392017-04-05 Pedro Alves <palves@redhat.com>
40
41 * configure: Regenerate.
42
a121b7c1
PA
432017-04-05 Pedro Alves <palves@redhat.com>
44
45 * gdbreplay.c (sync_error): Constify.
46 * linux-x86-low.c (push_opcode): Constify.
47
21c8a587
PA
482017-04-05 Pedro Alves <palves@redhat.com>
49
50 * win32-low.c (get_child_debug_event)
51 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
52 Report TARGET_WAITKIND_SPURIOUS instead.
53
fb32b4f7
PA
542017-04-05 Pedro Alves <palves@redhat.com>
55
56 * remote-utils.c (remote_prepare, remote_open): Constify.
57 * remote-utils.h (remote_prepare, remote_open): Constify.
58 * server.c (captured_main): Constify 'port' handling.
59
65dd1e59
SM
602017-04-04 Simon Marchi <simon.marchi@ericsson.com>
61
62 * Makefile.in (clean): Clear .deps.
63
8fa5b777
SM
642017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
65
66 * .gitignore: Remove generated files, replace with wildcard.
67 * (clean): Replace removal of generated files with wildcard.
68 (version.c): Replace with...
69 (version-generated.c): ...this.
70 (xml-builtin.c): Replace with...
71 (xml-builtin-generated.c): ...this.
72 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
73 (%.c: *regformats*): Replace with...
74 (%-generated.c: *regformats*): ...this.
75
a12e714b
MF
762017-03-27 Max Filippov <jcmvbkbc@gmail.com>
77
78 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
79 (xtensa_fill_gregset): Call collect_register_by_name for
80 threadptr register.
81 (xtensa_store_gregset): Call supply_register_by_name for
82 threadptr register.
83
1a09b50a
MF
842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
85
86 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
87 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
88 (xtensa_store_gregset): Call supply_register for all registers in
89 a0_regnum..a0_regnum + C0_NREGS range.
90
1a01e7c6
SM
912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
92
93 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
94 (ax-ipa.o: ax.c): Remove.
95 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
96 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
97 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
98 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
99 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
100
36bc18a8
SM
1012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
102
103 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
104 (print-utils-ipa.o: ../common/print-utils.c): Remove.
105 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
106 (errors-ipa.o: ../common/errors.c): Remove.
107 (format-ipa.o: ../common/format.c): Remove.
108 (common-utils-ipa.o: ../common/common-utils.c): Remove.
109
a8ebe3d5
SM
1102017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * Makefile.in (%-ipa.o: %.c): New rule.
113 (tracepoint-ipa.o: tracepoint.c): Remove.
114 (utils-ipa.o: utils.c): Remove.
115 (remote-utils-ipa.o: remote-utils.c): Remove.
116 (regcache-ipa.o: regcache.c): Remove.
117 (i386-linux-ipa.o: i386-linux.c): Remove.
118 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
119 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
120 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
121 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
122 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
123 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
124 (amd64-linux-ipa.o: amd64-linux.c): Remove.
125 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
126 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
127 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
128 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
129 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
130 (aarch64-ipa.o: aarch64.c): Remove.
131 (s390-linux32-ipa.o: s390-linux32.c): Remove.
132 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
133 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
134 (s390-linux64-ipa.o: s390-linux64.c): Remove.
135 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
136 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
137 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
138 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
139 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
140 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
141 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
142 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
143 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
144 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
145 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
146 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
147 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
148 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
149 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
150 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
151 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
152 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
153 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
154 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
155 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
156 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
157 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
158 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
159 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
160 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
161 (tdesc-ipa.o: tdesc.c): Remove.
162 (x32-linux-ipa.o: x32-linux.c): Remove.
163 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
164 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
165
50cfacb7
SM
1662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
167
168 * Makefile.in (%.o: ../arch/%.c): New rule.
169 (arm.o: ../arch/arm.c): Remove.
170 (arm-linux.o: ../arch/arm-linux.c): Remove.
171 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
172 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
173
c5a22423
SM
1742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
175
176 * Makefile.in (%.o: ../nat/%.c): New rule.
177 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
178 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
179 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
180 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
181 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
182 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
183 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
184 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
185 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
186 (linux-personality.o: ../nat/linux-personality.c): Remove.
187 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
188 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
189 (x86-linux.o: ../nat/x86-linux.c): Remove.
190 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
191 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
192
6bda016b
SM
1932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
194
195 * Makefile.in (%.o: ../common/%.c): New rule.
196 (signals.o: ../common/signals.c): Remove.
197 (print-utils.o: ../common/print-utils.c): Remove.
198 (rsp-low.o: ../common/rsp-low.c): Remove.
199 (common-utils.o: ../common/common-utils.c): Remove.
200 (posix-strerror.o: ../common/posix-strerror.c): Remove.
201 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
202 (vec.o: ../common/vec.c): Remove.
203 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
204 (xml-utils.o: ../common/xml-utils.c): Remove.
205 (ptid.o: ../common/ptid.c): Remove.
206 (buffer.o: ../common/buffer.c): Remove.
207 (format.o: ../common/format.c): Remove.
208 (filestuff.o: ../common/filestuff.c): Remove.
209 (agent.o: ../common/agent.c): Remove.
210 (errors.o: ../common/errors.c): Remove.
211 (environ.o: ../common/environ.c): Remove.
212 (common-debug.o: ../common/common-debug.c): Remove.
213 (cleanups.o: ../common/cleanups.c): Remove.
214 (common-exceptions.o: ../common/common-exceptions.c): Remove.
215 (fileio.o: ../common/fileio.c): Remove.
216 (common-regcache.o: ../common/common-regcache.c): Remove.
217 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
218 (new-op.o: ../common/new-op.c): Remove.
219 (btrace-common.o: ../common/btrace-common.c): Remove.
220
21122961
SM
2212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
222
223 * Makefile.in (%.o: ../target/%.c): New rule.
224 (waitstatus.o: ../target/waitstatus.c): Remove.
225
c362e621
SM
2262017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
227
228 * Makefile.in
229 (%.c: ../regformats/%.dat,
230 (%.c: ../regformats/arm/%.dat,
231 (%.c: ../regformats/i386/%.dat,
232 (%.c: ../regformats/rs6000/%.dat): New rules.
233 (aarch64.c): Remove.
234 (reg-arm.c): Remove.
235 (arm-with-iwmmxt.c): Remove.
236 (arm-with-vfpv2.c): Remove.
237 (arm-with-vfpv3.c): Remove.
238 (arm-with-neon.c): Remove.
239 (reg-bfin.c): Remove.
240 (reg-cris.c): Remove.
241 (reg-crisv32.c): Remove.
242 (i386.c): Remove.
243 (i386-linux.c): Remove.
244 (i386-avx.c): Remove.
245 (i386-avx-linux.c): Remove.
246 (i386-avx-avx512.c): Remove.
247 (i386-avx-avx512-linux.c): Remove.
248 (i386-mpx.c): Remove.
249 (i386-mpx-linux.c): Remove.
250 (i386-avx-mpx-avx512-pku.c): Remove.
251 (i386-avx-mpx-avx512-pku-linux.c): Remove.
252 (i386-avx-mpx.c): Remove.
253 (i386-avx-mpx-linux.c): Remove.
254 (i386-mmx.c): Remove.
255 (i386-mmx-linux.c): Remove.
256 (reg-ia64.c): Remove.
257 (reg-m32r.c): Remove.
258 (reg-m68k.c): Remove.
259 (reg-cf.c): Remove.
260 (mips-linux.c): Remove.
261 (mips-dsp-linux.c): Remove.
262 (mips64-linux.c): Remove.
263 (mips64-dsp-linux.c): Remove.
264 (nios2-linux.c): Remove.
265 (powerpc-32.c): Remove.
266 (powerpc-32l.c): Remove.
267 (powerpc-altivec32l.c): Remove.
268 (powerpc-cell32l.c): Remove.
269 (powerpc-vsx32l.c): Remove.
270 (powerpc-isa205-32l.c): Remove.
271 (powerpc-isa205-altivec32l.c): Remove.
272 (powerpc-isa205-vsx32l.c): Remove.
273 (powerpc-e500l.c): Remove.
274 (powerpc-64l.c): Remove.
275 (powerpc-altivec64l.c): Remove.
276 (powerpc-cell64l.c): Remove.
277 (powerpc-vsx64l.c): Remove.
278 (powerpc-isa205-64l.c): Remove.
279 (powerpc-isa205-altivec64l.c): Remove.
280 (powerpc-isa205-vsx64l.c): Remove.
281 (s390-linux32.c): Remove.
282 (s390-linux32v1.c): Remove.
283 (s390-linux32v2.c): Remove.
284 (s390-linux64.c): Remove.
285 (s390-linux64v1.c): Remove.
286 (s390-linux64v2.c): Remove.
287 (s390-te-linux64.c): Remove.
288 (s390-vx-linux64.c): Remove.
289 (s390-tevx-linux64.c): Remove.
290 (s390x-linux64.c): Remove.
291 (s390x-linux64v1.c): Remove.
292 (s390x-linux64v2.c): Remove.
293 (s390x-te-linux64.c): Remove.
294 (s390x-vx-linux64.c): Remove.
295 (s390x-tevx-linux64.c): Remove.
296 (tic6x-c64xp-linux.c): Remove.
297 (tic6x-c64x-linux.c): Remove.
298 (tic6x-c62x-linux.c): Remove.
299 (reg-sh.c): Remove.
300 (reg-sparc64.c): Remove.
301 (reg-spu.c): Remove.
302 (amd64.c): Remove.
303 (amd64-linux.c): Remove.
304 (amd64-avx.c): Remove.
305 (amd64-avx-linux.c): Remove.
306 (amd64-avx-avx512.c): Remove.
307 (amd64-avx-avx512-linux.c): Remove.
308 (amd64-mpx.c): Remove.
309 (amd64-mpx-linux.c): Remove.
310 (amd64-avx-mpx-avx512-pku.c): Remove.
311 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
312 (amd64-avx-mpx.c): Remove.
313 (amd64-avx-mpx-linux.c): Remove.
314 (x32.c): Remove.
315 (x32-linux.c): Remove.
316 (x32-avx.c): Remove.
317 (x32-avx-linux.c): Remove.
318 (x32-avx-avx512.c): Remove.
319 (x32-avx-avx512-linux.c): Remove.
320 (reg-xtensa.c): Remove.
321 (reg-tilegx.c): Remove.
322 (reg-tilegx32.c): Remove.
323
1672e0d9
SDJ
3242017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
325
326 * Makefile.in (SFILES): Add "common/environ.c".
327 (OBJS): Add "common/environ.h".
328
239b6d10
WT
3292017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
330
331 * configure.ac: Check if the fs_base and gs_base members of
332 `struct user_regs_struct' exist.
333 * config.in: Regenerated.
334 * configure: Likewise.
335
694b382c
AT
3362017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
337
338 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
339 target_read_memory.
340 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
341 (get_next_pcs_syscall_next_pc): Likewise.
342
7dc53023
LM
3432016-12-23 Luis Machado <lgustavo@codesourcery.com>
344
345 * win32-i386-low.c: Fix incorrect reference to a couple source files.
346 * nto-x86-low.c: Likewise.
347
ad02e4fe
SM
3482016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
349
350 * Makefile.in: Include disable-implicit-rules.mk.
351
dcb07cfa
PA
3522016-11-23 Pedro Alves <palves@redhat.com>
353
354 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
355 (debug_vprintf): Use std::chrono::steady_clock instead of
356 gettimeofday. Use '.' instead of ':'.
357 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
358 (get_timestamp): Use std::chrono::steady_clock instead of
359 gettimeofday.
360
8629c02c
SM
3612016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
362
363 * Makefile.in: Fix whitespace formatting.
364
b593ecca
SM
3652016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
366
367 * Makefile.in (SFILES, OBS): Flatten list and order
368 alphabetically.
369
9986ba08
PA
3702016-11-23 Pedro Alves <palves@redhat.com>
371
372 * event-loop.c (handle_file_event): Use warning.
373 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
374 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
375 Use warning.
376
4eefa7bc
PA
3772016-11-23 Pedro Alves <palves@redhat.com>
378
379 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
380 output.
381 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
382 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
383 debug_printf and debug_flush for debug output.
384 * server.c (handle_general_set): Likewise.
385 * thread-db.c (try_thread_db_load): Use debug_printf for debug
386 output.
387
5443506e
SM
3882016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
389
390 * Makefile.in (.c.o): Replace rule with ...
391 (%.o: %.c): ... this one.
392
3b165252
SM
3932016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
394
395 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
396 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
397 make.
398 * configure.ac: Remove checks for the make program.
399 * configure: Re-generate.
400
0bcda685
PA
4012016-10-28 Pedro Alves <palves@redhat.com>
402
403 * Makefile.in (CXX_DIALECT): Get from configure.
404 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
405 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
406 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
407 * config.in: Regenerate.
408 * configure: Regenerate.
409
c3805894
YQ
4102016-10-27 Yao Qi <yao.qi@linaro.org>
411
412 * linux-low.c (linux_supports_range_stepping): Return true if
413 can_software_single_step return true.
414
89342618
YQ
4152016-10-27 Yao Qi <yao.qi@linaro.org>
416
417 * inferiors.c (find_inferior_in_random): New function.
418 * inferiors.h (find_inferior_in_random): Declare.
419 * linux-low.c (linux_wait_for_event_filtered): Call
420 find_inferior_in_random instead of find_inferior.
421
e3652c84
YQ
4222016-10-27 Yao Qi <yao.qi@linaro.org>
423
424 * linux-low.c (linux_wait_1): If single-step breakpoints are
425 inserted, remove them.
426
5a04c4cf
PA
4272016-10-26 Pedro Alves <palves@redhat.com>
428
429 * linux-low.c (handle_extended_wait): Link parent/child fork
430 threads.
431 (linux_wait_1): Unlink them.
432 (linux_set_resume_request): Ignore resume requests for
433 already-resumed and unhandled fork child threads.
434 * linux-low.h (struct lwp_info) <fork_relative>: New field.
435 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
436 New functions.
437 (handle_v_requests) <vCont>: Don't call require_running.
438 * server.h (in_queued_stop_replies): New declaration.
439
cb93dc7f
YQ
4402016-10-24 Yao Qi <yao.qi@linaro.org>
441
442 PR server/20733
443 * linux-aarch64-low.c (append_insns): Cast the return value to
444 'uint32_t *'.
445
a1078bea
YQ
4462016-10-10 Yao Qi <yao.qi@linaro.org>
447
448 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
449
1fb77080
SDJ
4502016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
451
452 * target.c (target_supports_multi_process): New function, moved
453 from...
454 * target.h (target_supports_multi_process): ... here. Remove
455 macro.
456
39b5a3b9
TT
4572016-10-05 Tom Tromey <tom@tromey.com>
458
459 PR remote/20655:
460 * tracepoint.c (handle_tracepoint_bkpts): Check
461 ipa_error_tracepoint, not ipa_stopping_tracepoint.
462
c1d0b70a
YQ
4632016-10-05 Yao Qi <yao.qi@linaro.org>
464
465 * configure.srv: Update the path of arm-*.xml files.
466
0a69eedb
YQ
4672016-10-05 Terry Guo <terry.guo@arm.com>
468 Yao Qi <yao.qi@linaro.org>
469
470 * Makefile.in: Adjust the path of rules.
471 * configure.srv: Update the path of xml files.
472 * regformats/arm-with-iwmmxt.dat: Regenerated.
473 * regformats/arm-with-neon.dat: Likewise.
474 * regformats/arm-with-vfpv2.dat: Likewise.
475 * regformats/arm-with-vfpv3.dat Likewise.
476
17e16485
YQ
4772016-09-30 Yao Qi <yao.qi@linaro.org>
478
479 PR gdbserver/20627
480 * target.c (target_stop_and_wait): Don't call
481 target_continue_no_signal, use resume_stop instead.
482
edeeb602
YQ
4832016-09-26 Yao Qi <yao.qi@linaro.org>
484
485 * linux-low.c (linux_wait_1): Call debug_exit.
486
503b1c39
PA
4872016-09-23 Pedro Alves <palves@redhat.com>
488
489 * Makefile.in (SFILES): Add common/new-op.c.
490 (OBS): Add common/new-op.o.
491 (new-op.o): New rule.
492
74172ecf
SM
4932016-09-21 Simon Marchi <simon.marchi@ericsson.com>
494
495 * .gitinore: Ignore more files.
496
fc6cda2e
YQ
4972016-09-21 Yao Qi <yao.qi@linaro.org>
498
499 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
500 23.
501
bc1e6c81
SDJ
5022016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
503
504 * server.c (start_inferior): Call target_mourn_inferior instead of
505 mourn_inferior; pass ptid_t argument to it.
506 (resume): Likewise.
507 (handle_target_event): Likewise.
508 * target.c (target_mourn_inferior): New function.
509 * target.h (mourn_inferior): Delete macro.
510
0e00e962
AA
5112016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
512
513 * linux-low.c (lwp_is_stepping): New function.
514
1d8cb77d
CL
5152016-09-06 Carl Love <cel@us.ibm.com>
516
517 * server.c (start_inferior): Fixed comment, requested comment change
518 didn't get updated correctly. Removed reference to ptrace () call as
519 it is only true on Linux systems.
520
7313bced
CL
5212016-09-06 Carl Love <cel@us.ibm.com>
522
523 * server.c (start_inferior): Do not call
524 function target_post_create_inferior () if the
525 inferior process has already exited.
526
cf6de44d
PA
5272016-09-05 Pedro Alves <palves@redhat.com>
528
529 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
530 (COMPILE.pre, CC_LD): Use CXX directly.
531 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
532 * acinclude.m4: Don't include build-with-cxx.m4.
533 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
534 * configure: Regenerate.
535
c1da6748
AT
5362016-09-02 Akash Trehan <akash.trehan123@gmail.com>
537
538 PR gdb/19495
539 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
540 call writing data to own_buf.
541
f2b9e3df
SDJ
5422016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
543
544 * target.c (mywait): Call target_wait instead of
545 the_target->wait.
546 (target_wait): New function.
547
049a8570
SDJ
5482016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
549
550 * server.c (start_inferior): New variable 'ptid'. Replace calls
551 to the_target->resume by target_continue{,_no_signal}, depending
552 on the case.
553 * target.c (target_stop_and_wait): Call target_continue_no_signal
554 instead of the_target->resume.
555 (target_continue): New function.
556
3aa5cfa0
AT
5572016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
558
559 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
560
754653a7
AZ
5612016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
562
563 PR server/20491
564 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
565 ps_prochandle.
566 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
567 * linux-arm-low.c (ps_get_thread_area): Likewise.
568 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
569 * linux-m68k-low.c (ps_get_thread_area): Likewise.
570 * linux-mips-low.c (ps_get_thread_area): Likewise.
571 * linux-nios2-low.c (ps_get_thread_area): Likewise.
572 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
573 * linux-x86-low.c (ps_get_thread_area): Likewise.
574 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
575
ed036b40
PA
5762016-08-19 Pedro Alves <palves@redhat.com>
577
578 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
579
c8ef42ee
PA
5802016-08-19 Pedro Alves <palves@redhat.com>
581
582 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
583 comment. Use memcpy instead of casting through unsigned long.
584
9c235a72
PA
5852016-08-19 Pedro Alves <palves@redhat.com>
586
587 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
588 allocating around 0x80000000.
589
201506da
PA
5902016-08-19 Pedro Alves <palves@redhat.com>
591
592 PR gdb/20415
593 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
594 (x32-avx512-linux-ipa.o): New rules.
595 * configure.ac (x86_64-*-linux*): New x32 check.
596 * configure.srv (ipa_x32_linux_regobj): New.
597 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
598 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
599 descriptions.
600 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
601 descriptions.
602 * configure: Regenerate.
603
f348d89a
PA
6042016-08-09 Pedro Alves <palves@redhat.com>
605
606 PR gdb/18653
607 * Makefile.in (OBS): Add signals-state-save-restore.o.
608 (signals-state-save-restore.o): New rule.
609 * config.in: Regenerate.
610 * configure: Regenerate.
611 * linux-low.c: Include "signals-state-save-restore.h".
612 (linux_create_inferior): Call
613 restore_original_signals_state.
614 * server.c: Include "dispositions-save-restore.h".
615 (captured_main): Call save_original_signals_state.
616
1baf5149
PA
6172016-08-05 Pedro Alves <palves@redhat.com>
618
619 * configure: Regenerate.
620
fcd4a73d
YQ
6212016-08-04 Yao Qi <yao.qi@linaro.org>
622
623 * linux-low.c (regsets_fetch_inferior_registers): Check
624 errno is ESRCH or not.
625
979659d0
YQ
6262016-08-02 Yao Qi <yao.qi@linaro.org>
627
628 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
629 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
630 (thread_db_load_search): Update.
631 (try_thread_db_load_1): Don't look for td_ta_event_addr,
632 td_ta_set_event and td_ta_event_getmsg.
633
6598661d
PA
6342016-07-26 Pedro Alves <palves@redhat.com>
635
636 PR server/20414
637 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
638 of unsigned long for 64-bit registers and use uint32_t instead of
639 unsigned int for 32-bit registers.
640
9cf12d57
PA
6412016-07-26 Pedro Alves <palves@redhat.com>
642
643 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
644 to 'ptrace'.
645
305450ed
TT
6462016-07-21 Tom Tromey <tom@tromey.com>
647
648 * configure: Rebuild.
649
2583da7c
YQ
6502016-07-21 Yao Qi <yao.qi@linaro.org>
651
652 * mem-break.c (find_gdb_breakpoint): Cast bp to
653 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
654
21536b36
YQ
6552016-07-21 Yao Qi <yao.qi@linaro.org>
656
657 * server.c (handle_v_requests): Support s and S actions
658 if target_supports_software_single_step return true.
659
8901d193
YQ
6602016-07-21 Yao Qi <yao.qi@linaro.org>
661
662 * linux-low.c (resume_stopped_resumed_lwps): If resume request
663 is resume_step, call maybe_hw_step.
664 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
665 and unstop them.
666 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
667 breakpoints or not.
668 (proceed_one_lwp): If resume request is resume_step, install
669 reinsert breakpoints and call maybe_hw_step.
670
0e9a339e
YQ
6712016-07-21 Yao Qi <yao.qi@linaro.org>
672
673 * linux-low.c (proceed_one_lwp): Declare.
674 (linux_resume_one_thread): Remove local variable 'step'.
675 Lift code enqueue signal. Call proceed_one_lwp instead of
676 linux_resume_one_lwp.
677
4281b351
YQ
6782016-07-21 Yao Qi <yao.qi@linaro.org>
679
680 * linux-low.c (linux_resume_one_thread): Call
681 enqueue_pending_signal.
682
984a2c04
YQ
6832016-07-21 Yao Qi <yao.qi@linaro.org>
684
685 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
686 * inferiors.c (do_restore_current_thread_cleanup): New function.
687 (make_cleanup_restore_current_thread): Likewise.
688 * linux-low.c (install_software_single_step_breakpoints): Call
689 make_cleanup_restore_current_thread. Switch current_thread to
690 thread.
691
bec903c9
YQ
6922016-07-21 Yao Qi <yao.qi@linaro.org>
693
694 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
695 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
696 (clone_one_breakpoint): Likewise.
697 (delete_reinsert_breakpoints): Change parameter to thread.
698 Callers updated.
699 (has_reinsert_breakpoints): Likewise.
700 (uninsert_reinsert_breakpoints): Likewise.
701 (reinsert_reinsert_breakpoints): Likewise.
702 * mem-break.h (set_reinsert_breakpoint): Update declaration.
703 (delete_reinsert_breakpoints): Likewise.
704 (reinsert_reinsert_breakpoints): Likewise.
705 (uninsert_reinsert_breakpoints): Likewise.
706 (has_reinsert_breakpoints): Likewise.
707
63c40ec7
YQ
7082016-07-21 Yao Qi <yao.qi@linaro.org>
709
710 * inferiors.c (get_thread_process): Make parameter const.
711 * inferiors.h (get_thread_process): Update declaration.
712 * mem-break.c (clone_all_breakpoints): Remove all parameters.
713 Add new parameters child_thread and parent_thread. Callers
714 updated.
715 * mem-break.h (clone_all_breakpoints): Update declaration.
716
9aa76cd0
YQ
7172016-07-21 Yao Qi <yao.qi@linaro.org>
718
719 * mem-break.c (struct breakpoint) <cond_list>: Remove.
720 <command_list, handler>: Remove.
721 (struct gdb_breakpoint): New.
722 (struct other_breakpoint): New.
723 (struct reinsert_breakpoint): New.
724 (is_gdb_breakpoint): New function.
725 (any_persistent_commands): Update command_list if
726 is_gdb_breakpoint returns true.
727 (set_breakpoint): Create breakpoints according to their types.
728 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
729 (set_gdb_breakpoint_1): Likewise.
730 (set_gdb_breakpoint): Likewise.
731 (clear_breakpoint_conditions): Change parameter type to
732 'struct gdb_breakpoint *'.
733 (clear_breakpoint_commands): Likewise.
734 (clear_breakpoint_conditions_and_commands): Likewise.
735 (add_condition_to_breakpoint): Likewise.
736 (add_breakpoint_condition): Likewise.
737 (add_commands_to_breakpoint): Likewise.
738 (check_breakpoints): Check other_breakpoint.
739 (clone_one_breakpoint): Clone breakpopint according to its type.
740 * mem-break.h (struct gdb_breakpoint): Declare.
741 (set_gdb_breakpoint): Update declaration.
742 (clear_breakpoint_conditions_and_commands): Likewise.
743 (add_breakpoint_condition): Likewise.
744 (add_breakpoint_commands): Likewise.
745 * server.c (process_point_options): Change parameter type to
746 'struct gdb_breakpoint *'.
747
811f8301
YQ
7482016-07-21 Yao Qi <yao.qi@linaro.org>
749
750 * mem-break.c (set_breakpoint_at): Rename it to ...
751 (set_breakpoint_type_at): ... it.
752 (set_breakpoint_at): Call set_breakpoint_type_at.
753 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
754 * mem-break.h (set_breakpoint_at): Update comments.
755
b1c51e36
CLT
7562016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
757
758 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
759 to buf parameter.
760 (nios2_store_gregset): Likewise.
761
ced2dffb
PA
7622016-07-01 Pedro Alves <palves@redhat.com>
763 Antoine Tremblay <antoine.tremblay@ericsson.com>
764
765 * linux-low.c: Change interface to take the target lwp_info
766 pointer directly and return void. Handle detaching from a zombie
767 thread.
768 (linux_detach_lwp_callback): New function.
769 (linux_detach): Detach from the leader thread after detaching from
770 the clone threads.
771
2ac09a5b
YQ
7722016-06-28 Yao Qi <yao.qi@linaro.org>
773
774 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
775 for variable new_offset.
776 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
777 (aarch64_ftrace_insn_reloc_cb): Likewise.
778 (aarch64_ftrace_insn_reloc_tb): Likewise.
779 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
780 PRIx64 instead of PRIx32.
781
79e7fd4f
YQ
7822016-06-28 Yao Qi <yao.qi@linaro.org>
783
784 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
785 (the_low_target): Install arm_get_syscall_trapinfo.
786
061fc021
YQ
7872016-06-28 Yao Qi <yao.qi@linaro.org>
788
789 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
790 function.
791 (the_low_target): Install aarch64_get_syscall_trapinfo.
792
4cc32bec
YQ
7932016-06-28 Yao Qi <yao.qi@linaro.org>
794
795 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
796 Callers updated.
797 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
798 Remove parameter sysno.
799 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
800 sysret.
801
782c1122
AA
8022016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
803
804 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
805 (s390_emit_ne_goto): Likewise.
806 (s390_emit_lt_goto): Likewise.
807 (s390_emit_le_goto): Likewise.
808 (s390_emit_gt_goto): Likewise.
809 (s390_emit_ge_goto): Likewise.
810 (s390x_emit_eq_goto): Likewise.
811 (s390x_emit_ne_goto): Likewise.
812 (s390x_emit_lt_goto): Likewise.
813 (s390x_emit_le_goto): Likewise.
814 (s390x_emit_gt_goto): Likewise.
815 (s390x_emit_ge_goto): Likewise.
816 (s390_emit_ops_impl): Mark variable static.
817 (s390x_emit_ops): Likewise.
818
2e7b624b
YQ
8192016-06-17 Yao Qi <yao.qi@linaro.org>
820
821 * linux-low.c (handle_extended_wait): Call
822 uninsert_reinsert_breakpoints for the parent process. Remove
823 reinsert breakpoints from the child process. Reinsert them to
824 the parent process when vfork is done.
825 * mem-break.c (uninsert_reinsert_breakpoints): New function.
826 (reinsert_reinsert_breakpoints): New function.
827 * mem-break.h (uninsert_reinsert_breakpoints): Declare
828 (reinsert_reinsert_breakpoints): Declare.
829
8a81c5d7
YQ
8302016-06-17 Yao Qi <yao.qi@linaro.org>
831
832 * linux-low.c (handle_extended_wait): If the parent is doing
833 step-over, remove the reinsert breakpoints from the forked child.
834
f50bf8e5
YQ
8352016-06-17 Yao Qi <yao.qi@linaro.org>
836
837 * linux-low.c (unsuspend_all_lwps): Declare.
838 (linux_low_filter_event): If thread exited, call finish_step_over.
839 If step-over is finished, unsuspend other threads.
840
8376a3cb
YQ
8412016-06-17 Yao Qi <yao.qi@linaro.org>
842
843 * linux-low.c (linux_resume_one_lwp_throw): Assert
844 has_reinsert_breakpoints returns false.
845 * mem-break.c (delete_disabled_breakpoints): Assert
846 bp type isn't reinsert_breakpoint.
847
f79b145d
YQ
8482016-06-17 Yao Qi <yao.qi@linaro.org>
849
850 * linux-low.c (maybe_hw_step): New function.
851 (linux_resume_one_lwp_throw): Call maybe_hw_step.
852 (finish_step_over): Switch current_thread to lwp temporarily,
853 and assert has_reinsert_breakpoints returns true.
854 (proceed_one_lwp): Call maybe_hw_step.
855 * mem-break.c (has_reinsert_breakpoints): New function.
856 * mem-break.h (has_reinsert_breakpoints): Declare.
857
0ae534d2
JT
8582016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
859
860 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
861
fcdad592
YQ
8622016-05-17 Yao Qi <yao.qi@linaro.org>
863
864 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
865 instead of find_inferior.
866
9e784964
YQ
8672016-05-05 Yao Qi <yao.qi@linaro.org>
868
869 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
870 Initialize res to zero.
871
cf2ebb6e
YQ
8722016-05-05 Yao Qi <yao.qi@linaro.org>
873
874 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
875 to uint32_t.
876
c1aebf87
UW
8772016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
878
879 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
880 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
881 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
882
35fd2deb 8832016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 884 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
885
886 * tracepoint.c (write_inferior_int8): New function.
887 (cmd_qtenable_disable): Write enable flag using
888 write_inferior_int8.
889
484b3c32
YQ
8902016-04-25 Yao Qi <yao.qi@linaro.org>
891
892 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
893 (need_step_over_p): Return zero if the LWP has pending signals
894 can be delivered on software single step target.
895
85ba7d86
YQ
8962016-04-25 Yao Qi <yao.qi@linaro.org>
897
898 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
899 return instead of error.
900
3539aa13
YQ
9012016-04-22 Yao Qi <yao.qi@linaro.org>
902
903 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
904 to 23.
905
5b061e98
YQ
9062016-04-22 Yao Qi <yao.qi@linaro.org>
907
908 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
909 signal when stepping over breakpoint with software single
910 step.
911
3451269c
PA
9122016-04-21 Pedro Alves <palves@redhat.com>
913
914 * linux-s390-low.c (s390_collect_ptrace_register)
915 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
916 add casts.
917 (s390_check_regset): Use void * instead of gdb_byte *.
918
a2358508
PA
9192016-04-20 Pedro Alves <palves@redhat.com>
920
921 * configure: Renegerate.
922
6885166d
YQ
9232016-04-20 Yao Qi <yao.qi@linaro.org>
924
925 * linux-aarch32-low.c: Include "arch/arm-linux.h".
926 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
927 number 16.
928 (arm_store_gregset): Likewise.
929
2b863f51
WT
9302016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
931
932 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
933 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
934 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
935 (amd64-avx-mpx-linux.c): New rules.
936 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
937 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
938 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
939 (srv_amd64_regobj): Add amd64-avx-mpx.o.
940 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
941 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
942 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
943 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
944 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
945 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
946 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
947 * linux-x86-low.c (x86_linux_read_description): Add case for
948 X86_XSTATE_AVX_MPX_MASK.
949 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
950 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
951 init_registers_i386_avx_mpx_linux.
952 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
953 (initialize_low_tracepoint): Call
954 init_registers_i386_avx_mpx_linux.
955 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
956 (initialize_low_tracepoint): Call
957 init_registers_amd64_avx_mpx_linux.
958 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
959 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
960 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
961 declarations.
962
9b30624b
PA
9632016-04-18 Pedro Alves <palves@redhat.com>
964
965 * configure: Regenerate.
966
45e3745e
AT
9672016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
968
969 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
970 (aarch64_emit_sub): Likewise.
971
2afc13ff
PA
9722016-04-12 Pedro Alves <palves@redhat.com>
973
974 * utils.c (prepare_to_throw_exception): Delete.
975
6e774b13
SM
9762016-04-05 Simon Marchi <simon.marchi@ericsson.com>
977
978 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
979
4dca19f8
MK
9802016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
981
982 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
983
d0a9981f
MK
9842016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
985
986 * linux-aarch64-ipa.c: Add <elf.h> include.
987 * linux-ppc-ipa.c: Add <elf.h> include.
988 * linux-s390-ipa.c: Add <elf.h> include.
989
252db07e
MK
9902016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
991
992 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
993 (get_raw_reg_ptr): Likewise.
994 (get_trace_state_variable_value_ptr): Likewise.
995 (set_trace_state_variable_value_ptr): Likewise.
996 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
997 char *.
998
14e2b6d9
MK
9992016-03-31 Wei-cheng Wang <cole945@gmail.com>
1000 Marcin Kościelnicki <koriakin@0x04.net>
1001
1002 PR/17221
1003 * linux-ppc-low.c (emit_insns): New function.
1004 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1005 (ppc_emit_prologue): New function.
1006 (ppc_emit_epilogue): New function.
1007 (ppc_emit_add): New function.
1008 (ppc_emit_sub): New function.
1009 (ppc_emit_mul): New function.
1010 (ppc_emit_lsh): New function.
1011 (ppc_emit_rsh_signed): New function.
1012 (ppc_emit_rsh_unsigned): New function.
1013 (ppc_emit_ext): New function.
1014 (ppc_emit_zero_ext): New function.
1015 (ppc_emit_log_not): New function.
1016 (ppc_emit_bit_and): New function.
1017 (ppc_emit_bit_or): New function.
1018 (ppc_emit_bit_xor): New function.
1019 (ppc_emit_bit_not): New function.
1020 (ppc_emit_equal): New function.
1021 (ppc_emit_less_signed): New function.
1022 (ppc_emit_less_unsigned): New function.
1023 (ppc_emit_ref): New function.
1024 (ppc_emit_const): New function.
1025 (ppc_emit_reg): New function.
1026 (ppc_emit_pop): New function.
1027 (ppc_emit_stack_flush): New function.
1028 (ppc_emit_swap): New function.
1029 (ppc_emit_stack_adjust): New function.
1030 (ppc_emit_call): New function.
1031 (ppc_emit_int_call_1): New function.
1032 (ppc_emit_void_call_2): New function.
1033 (ppc_emit_if_goto): New function.
1034 (ppc_emit_goto): New function.
1035 (ppc_emit_eq_goto): New function.
1036 (ppc_emit_ne_goto): New function.
1037 (ppc_emit_lt_goto): New function.
1038 (ppc_emit_le_goto): New function.
1039 (ppc_emit_gt_goto): New function.
1040 (ppc_emit_ge_goto): New function.
1041 (ppc_write_goto_address): New function.
1042 (ppc_emit_ops_impl): New static variable.
1043 (ppc64v1_emit_prologue): New function.
1044 (ppc64v2_emit_prologue): New function.
1045 (ppc64_emit_epilogue): New function.
1046 (ppc64_emit_add): New function.
1047 (ppc64_emit_sub): New function.
1048 (ppc64_emit_mul): New function.
1049 (ppc64_emit_lsh): New function.
1050 (ppc64_emit_rsh_signed): New function.
1051 (ppc64_emit_rsh_unsigned): New function.
1052 (ppc64_emit_ext): New function.
1053 (ppc64_emit_zero_ext): New function.
1054 (ppc64_emit_log_not): New function.
1055 (ppc64_emit_bit_and): New function.
1056 (ppc64_emit_bit_or): New function.
1057 (ppc64_emit_bit_xor): New function.
1058 (ppc64_emit_bit_not): New function.
1059 (ppc64_emit_equal): New function.
1060 (ppc64_emit_less_signed): New function.
1061 (ppc64_emit_less_unsigned): New function.
1062 (ppc64_emit_ref): New function.
1063 (ppc64_emit_const): New function.
1064 (ppc64v1_emit_reg): New function.
1065 (ppc64v2_emit_reg): New function.
1066 (ppc64_emit_pop): New function.
1067 (ppc64_emit_stack_flush): New function.
1068 (ppc64_emit_swap): New function.
1069 (ppc64v1_emit_call): New function.
1070 (ppc64v2_emit_call): New function.
1071 (ppc64v1_emit_int_call_1): New function.
1072 (ppc64v2_emit_int_call_1): New function.
1073 (ppc64v1_emit_void_call_2): New function.
1074 (ppc64v2_emit_void_call_2): New function.
1075 (ppc64_emit_if_goto): New function.
1076 (ppc64_emit_eq_goto): New function.
1077 (ppc64_emit_ne_goto): New function.
1078 (ppc64_emit_lt_goto): New function.
1079 (ppc64_emit_le_goto): New function.
1080 (ppc64_emit_gt_goto): New function.
1081 (ppc64_emit_ge_goto): New function.
1082 (ppc64v1_emit_ops_impl): New static variable.
1083 (ppc64v2_emit_ops_impl): New static variable.
1084 (ppc_emit_ops): New function.
1085 (linux_low_target): Wire in ppc_emit_ops.
1086
a2174ba4
MK
10872016-03-31 Wei-cheng Wang <cole945@gmail.com>
1088 Marcin Kościelnicki <koriakin@0x04.net>
1089
1090 PR/17221
1091 * Makefile.in: Add powerpc-*-ipa.o
1092 * configure.srv: Add ipa_obj for powerpc*-linux.
1093 * linux-ppc-ipa.c: New file.
1094 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1095 includes.
1096 (PPC_FIELD): New macro.
1097 (PPC_SEXT): New macro.
1098 (PPC_OP6): New macro.
1099 (PPC_BO): New macro.
1100 (PPC_LI): New macro.
1101 (PPC_BD): New macro.
1102 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1103 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1104 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1105 (ppc_get_thread_area): New function.
1106 (is_elfv2_inferior): New function.
1107 (gen_ds_form): New function.
1108 (GEN_STD): New macro.
1109 (GEN_STDU): New macro.
1110 (GEN_LD): New macro.
1111 (GEN_LDU): New macro.
1112 (gen_d_form): New function.
1113 (GEN_ADDI): New macro.
1114 (GEN_ADDIS): New macro.
1115 (GEN_LI): New macro.
1116 (GEN_LIS): New macro.
1117 (GEN_ORI): New macro.
1118 (GEN_ORIS): New macro.
1119 (GEN_LWZ): New macro.
1120 (GEN_STW): New macro.
1121 (GEN_STWU): New macro.
1122 (gen_xfx_form): New function.
1123 (GEN_MFSPR): New macro.
1124 (GEN_MTSPR): New macro.
1125 (GEN_MFCR): New macro.
1126 (GEN_MTCR): New macro.
1127 (GEN_SYNC): New macro.
1128 (GEN_LWSYNC): New macro.
1129 (gen_x_form): New function.
1130 (GEN_OR): New macro.
1131 (GEN_MR): New macro.
1132 (GEN_LWARX): New macro.
1133 (GEN_STWCX): New macro.
1134 (GEN_CMPW): New macro.
1135 (gen_md_form): New function.
1136 (GEN_RLDICL): New macro.
1137 (GEN_RLDICR): New macro.
1138 (gen_i_form): New function.
1139 (GEN_B): New macro.
1140 (GEN_BL): New macro.
1141 (gen_b_form): New function.
1142 (GEN_BNE): New macro.
1143 (GEN_LOAD): New macro.
1144 (GEN_STORE): New macro.
1145 (gen_limm): New function.
1146 (gen_atomic_xchg): New function.
1147 (gen_call): New function.
1148 (ppc_relocate_instruction): New function.
1149 (ppc_install_fast_tracepoint_jump_pad): New function.
1150 (ppc_get_min_fast_tracepoint_insn_len): New function.
1151 (ppc_get_ipa_tdesc_idx): New function.
1152 (the_low_target): Wire in the new functions.
1153 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1154 tdescs.
1155 * linux-ppc-tdesc.h: New file.
1156
a13c4696
MK
11572016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1158
1159 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1160 (alloc_jump_pad_buffer): New function.
1161 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1162 (alloc_jump_pad_buffer): New function.
1163 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1164 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1165 (alloc_jump_pad_buffer): New function.
1166 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1167 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1168 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1169 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1170
1cda1512
MK
11712016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1172
1173 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1174 * linux-amd64-ipa.c: Likewise.
1175 * linux-i386-ipa.c: Likewise.
1176 * linux-s390-ipa.c: Likewise.
1177 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1178 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1179 set_trace_state_variable_value_ptr.
1180 (struct ipa_sym_addresses): Likewise.
1181 (symbol_list): Likewise.
1182 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1183 accessing gdb_collect directly.
1184 (gdb_collect_ptr_type): New typedef.
1185 (get_raw_reg_ptr_type): New typedef.
1186 (get_trace_state_variable_value_ptr_type): New typedef.
1187 (set_trace_state_variable_value_ptr_type): New typedef.
1188 (gdb_collect_ptr): New global.
1189 (get_raw_reg_ptr): New global.
1190 (get_trace_state_variable_value_ptr): New global.
1191 (set_trace_state_variable_value_ptr): New global.
1192 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1193 accessing get_raw_reg directly.
1194 (get_get_tsv_func_addr): Likewise for
1195 get_trace_state_variable_value_ptr.
1196 (get_set_tsv_func_addr): Likewise for
1197 set_trace_state_variable_value_ptr.
1198 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1199
72fb5488
SM
12002016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1201
1202 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1203
28170b88
MK
12042016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1205
1206 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1207 packets.
1208 (relocate_instruction): Remove own_buf.
1209 * server.c (own_buf): Make global.
1210 (handle_v_requests): Make global.
1211 * server.h (own_buf): New declaration.
1212 (handle_v_requests): New prototype.
1213
f39e8743
MK
12142016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1215
1216 PR 18377
1217 * linux-s390-low.c (add_insns): New function.
1218 (s390_emit_prologue): New function.
1219 (s390_emit_epilogue): New function.
1220 (s390_emit_add): New function.
1221 (s390_emit_sub): New function.
1222 (s390_emit_mul): New function.
1223 (s390_emit_lsh): New function.
1224 (s390_emit_rsh_signed): New function.
1225 (s390_emit_rsh_unsigned): New function.
1226 (s390_emit_ext): New function.
1227 (s390_emit_log_not): New function.
1228 (s390_emit_bit_and): New function.
1229 (s390_emit_bit_or): New function.
1230 (s390_emit_bit_xor): New function.
1231 (s390_emit_bit_not): New function.
1232 (s390_emit_equal): New function.
1233 (s390_emit_less_signed): New function.
1234 (s390_emit_less_unsigned): New function.
1235 (s390_emit_ref): New function.
1236 (s390_emit_if_goto): New function.
1237 (s390_emit_goto): New function.
1238 (s390_write_goto_address): New function.
1239 (s390_emit_litpool): New function.
1240 (s390_emit_const): New function.
1241 (s390_emit_call): New function.
1242 (s390_emit_reg): New function.
1243 (s390_emit_pop): New function.
1244 (s390_emit_stack_flush): New function.
1245 (s390_emit_zero_ext): New function.
1246 (s390_emit_swap): New function.
1247 (s390_emit_stack_adjust): New function.
1248 (s390_emit_set_r2): New function.
1249 (s390_emit_int_call_1): New function.
1250 (s390_emit_void_call_2): New function.
1251 (s390_emit_eq_goto): New function.
1252 (s390_emit_ne_goto): New function.
1253 (s390_emit_lt_goto): New function.
1254 (s390_emit_le_goto): New function.
1255 (s390_emit_gt_goto): New function.
1256 (s390_emit_ge_goto): New function.
1257 (s390x_emit_prologue): New function.
1258 (s390x_emit_epilogue): New function.
1259 (s390x_emit_add): New function.
1260 (s390x_emit_sub): New function.
1261 (s390x_emit_mul): New function.
1262 (s390x_emit_lsh): New function.
1263 (s390x_emit_rsh_signed): New function.
1264 (s390x_emit_rsh_unsigned): New function.
1265 (s390x_emit_ext): New function.
1266 (s390x_emit_log_not): New function.
1267 (s390x_emit_bit_and): New function.
1268 (s390x_emit_bit_or): New function.
1269 (s390x_emit_bit_xor): New function.
1270 (s390x_emit_bit_not): New function.
1271 (s390x_emit_equal): New function.
1272 (s390x_emit_less_signed): New function.
1273 (s390x_emit_less_unsigned): New function.
1274 (s390x_emit_ref): New function.
1275 (s390x_emit_if_goto): New function.
1276 (s390x_emit_const): New function.
1277 (s390x_emit_call): New function.
1278 (s390x_emit_reg): New function.
1279 (s390x_emit_pop): New function.
1280 (s390x_emit_stack_flush): New function.
1281 (s390x_emit_zero_ext): New function.
1282 (s390x_emit_swap): New function.
1283 (s390x_emit_stack_adjust): New function.
1284 (s390x_emit_int_call_1): New function.
1285 (s390x_emit_void_call_2): New function.
1286 (s390x_emit_eq_goto): New function.
1287 (s390x_emit_ne_goto): New function.
1288 (s390x_emit_lt_goto): New function.
1289 (s390x_emit_le_goto): New function.
1290 (s390x_emit_gt_goto): New function.
1291 (s390x_emit_ge_goto): New function.
1292 (s390_emit_ops): New function.
1293 (struct linux_target_ops): Fill in emit_ops hook.
1294
abd9baf9
MK
12952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1296
1297 PR 18377
1298 * Makefile.in: Add s390 IPA files.
1299 * configure.srv: Build IPA for s390.
1300 * linux-s390-ipa.c: New file.
1301 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1302 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1303 (tdesc_s390_linux32): Likewise.
1304 (init_registers_s390_linux32v1): Likewise.
1305 (tdesc_s390_linux32v1): Likewise.
1306 (init_registers_s390_linux32v2): Likewise.
1307 (tdesc_s390_linux32v2): Likewise.
1308 (init_registers_s390_linux64): Likewise.
1309 (tdesc_s390_linux64): Likewise.
1310 (init_registers_s390_linux64v1): Likewise.
1311 (tdesc_s390_linux64v1): Likewise.
1312 (init_registers_s390_linux64v2): Likewise.
1313 (tdesc_s390_linux64v2): Likewise.
1314 (init_registers_s390_te_linux64): Likewise.
1315 (tdesc_s390_te_linux64): Likewise.
1316 (init_registers_s390_vx_linux64): Likewise.
1317 (tdesc_s390_vx_linux64): Likewise.
1318 (init_registers_s390_tevx_linux64): Likewise.
1319 (tdesc_s390_tevx_linux64): Likewise.
1320 (init_registers_s390x_linux64): Likewise.
1321 (tdesc_s390x_linux64): Likewise.
1322 (init_registers_s390x_linux64v1): Likewise.
1323 (tdesc_s390x_linux64v1): Likewise.
1324 (init_registers_s390x_linux64v2): Likewise.
1325 (tdesc_s390x_linux64v2): Likewise.
1326 (init_registers_s390x_te_linux64): Likewise.
1327 (tdesc_s390x_te_linux64): Likewise.
1328 (init_registers_s390x_vx_linux64): Likewise.
1329 (tdesc_s390x_vx_linux64): Likewise.
1330 (init_registers_s390x_tevx_linux64): Likewise.
1331 (tdesc_s390x_tevx_linux64): Likewise.
1332 (have_hwcap_s390_vx): New static variable.
1333 (s390_arch_setup): Fill have_hwcap_s390_vx.
1334 (s390_get_thread_area): New function.
1335 (s390_ft_entry_gpr_esa): New const.
1336 (s390_ft_entry_gpr_zarch): New const.
1337 (s390_ft_entry_misc): New const.
1338 (s390_ft_entry_fr): New const.
1339 (s390_ft_entry_vr): New const.
1340 (s390_ft_main_31): New const.
1341 (s390_ft_main_64): New const.
1342 (s390_ft_exit_fr): New const.
1343 (s390_ft_exit_vr): New const.
1344 (s390_ft_exit_misc): New const.
1345 (s390_ft_exit_gpr_esa): New const.
1346 (s390_ft_exit_gpr_zarch): New const.
1347 (append_insns): New function.
1348 (s390_relocate_instruction): New function.
1349 (s390_install_fast_tracepoint_jump_pad): New function.
1350 (s390_get_min_fast_tracepoint_insn_len): New function.
1351 (s390_get_ipa_tdesc_idx): New function.
1352 (struct linux_target_ops): Wire in the above functions.
1353 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1354 * linux-s390-tdesc.h: New file.
1355
a4105d04
MK
13562016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1357
1358 * linux-s390-low.c (s390_supports_tracepoints): New function.
1359 (struct linux_target_ops): Fill supports_tracepoints hook.
1360
35ac8b3e
YQ
13612016-03-18 Yao Qi <yao.qi@linaro.org>
1362
1363 * linux-low.c (lwp_signal_can_be_delivered): New function.
1364 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1365
94610ec4
YQ
13662016-03-18 Yao Qi <yao.qi@linaro.org>
1367
1368 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1369 0 if signal is enqueued. Remove 'signal' from one debugging
1370 message. Move one debugging message to some lines below.
1371 Remove code setting 'signal' to 0.
1372
80aea927
YQ
13732016-03-18 Yao Qi <yao.qi@linaro.org>
1374
1375 * linux-low.c (linux_low_filter_event): Remove redundant
1376 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1377
b04fd3be
MK
13782016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1379
1380 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1381 (struct linux_target_ops): Wire in the above.
1382
c40c8d4b
YQ
13832016-03-03 Yao Qi <yao.qi@linaro.org>
1384
1385 * linux-low.c: Update comments to start_step_over.
1386
0f8288ae
YQ
13872016-03-03 Yao Qi <yao.qi@linaro.org>
1388
1389 PR server/19736
1390 * linux-low.c (handle_extended_wait): Set child suspended
1391 if event_lwp->bp_reinsert isn't zero.
1392
fdbd04a8
YQ
13932016-03-02 Yao Qi <yao.qi@linaro.org>
1394
1395 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1396 enqueue_pending_signal.
1397
6896a8fa
MK
13982016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1399
1400 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1401 is actually loaded.
1402
ab503087
MK
14032016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1404
1405 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1406 (s390_regmap_3264) [!__s390x__]: New global.
1407 (s390_collect_ptrace_register): Skip map entries containing -1.
1408 (s390_supply_ptrace_register): Ditto.
1409 (s390_fill_gprs_high): New function.
1410 (s390_store_gprs_high): New function.
1411 (s390_regsets): Add NT_S390_HIGH_GPRS.
1412 (s390_get_hwcap): Enable on 31-bit.
1413 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1414 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1415 Detect NT_S390_HIGH_GPRS.
1416 (s390_usrregs_info_3264): Enable on 31-bit.
1417 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1418 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1419
ae91f625
MK
14202016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1421
1422 PR gdb/13808
1423 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1424 * configure.srv: Ditto.
1425 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1426 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1427 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1428 (init_registers_amd64_linux): Remove prototype.
1429 (tdesc_amd64_linux): Remove declaration.
1430 (get_ipa_tdesc): New function.
1431 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1432 initialize remaining tdescs.
1433 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1434 (init_registers_i386_linux): Remove prototype.
1435 (tdesc_i386_linux): Remove declaration.
1436 (get_ipa_tdesc): New function.
1437 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1438 initialize remaining tdescs.
1439 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1440 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1441 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1442 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1443 (x86_get_ipa_tdesc_idx): New function.
1444 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1445 * linux-x86-tdesc.h: New file.
1446 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1447 (target_get_ipa_tdesc_idx): New macro.
1448 * tracepoint.c (ipa_tdesc_idx): New macro.
1449 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1450 (symbol_list): Add ipa_tdesc_idx.
1451 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1452 (ipa_tdesc): Remove.
1453 (ipa_tdesc_idx): New variable.
1454 (get_context_regcache): Use get_ipa_tdesc.
1455 (gdb_collect): Ditto.
1456 (gdb_probe): Ditto.
1457 * tracepoint.h (get_ipa_tdesc): New prototype.
1458 (ipa_tdesc): Remove.
1459
e7ad2f14
PA
14602016-02-24 Pedro Alves <palves@redhat.com>
1461
1462 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1463 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1464 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1465 Factor out common code between the USE_SIGTRAP_SIGINFO and
1466 !USE_SIGTRAP_SIGINFO blocks.
1467 (linux_low_filter_event): Call save_stop_reason instead of
1468 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1469 Update comments.
1470 (linux_wait_1): Update comments.
1471
657f9cde
WW
14722016-02-24 Wei-cheng Wang <cole945@gmail.com>
1473
1474 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1475 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1476 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1477 ppc_insert_point, ppc_remove_point.
1478
b00b61e1
MK
14792016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1480
1481 * linux-s390-low.c (s390_supports_z_point_type): New function.
1482 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1483
553cb527
YQ
14842016-02-16 Yao Qi <yao.qi@linaro.org>
1485
1486 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1487 PC. Get pc from regcache_read_pc.
1488
a5652c21
YQ
14892016-02-12 Yao Qi <yao.qi@linaro.org>
1490
1491 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1492 or linux_get_pc_32bit.
1493 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1494
ed443b61
YQ
14952016-02-12 Yao Qi <yao.qi@linaro.org>
1496
1497 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1498 arm_linux_get_next_pcs_fixup.
1499
020ecd38
MK
15002016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1501
1502 * tracepoint.c (x_tracepoint_action_download): Change
1503 write_inferior_data_ptr to write_inferior_data_pointer.
1504 (cmd_qtstart): Likewise.
1505 (write_inferior_data_ptr): Remove.
1506 (download_agent_expr): Change write_inferior_data_ptr to
1507 write_inferior_data_pointer.
1508 (download_tracepoint_1): Likewise.
1509 (download_tracepoint): Likewise.
1510 (download_trace_state_variables): Likewise.
1511
7cae9051
WW
15122016-02-11 Wei-cheng Wang <cole945@gmail.com>
1513 Marcin Kościelnicki <koriakin@0x04.net>
1514
1515 * tracepoint.c (struct tracepoint_action_ops): Remove.
1516 (struct tracepoint_action): Remove ops.
1517 (m_tracepoint_action_download, r_tracepoint_action_download)
1518 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1519 size and offset accordingly.
1520 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1521 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1522 (tracepoint_action_send, tracepoint_action_download): New functions.
1523 Helpers for trace action handlers.
1524 (add_tracepoint_action): Remove setup actions ops.
1525 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1526
9f6a71b4
YQ
15272016-02-10 Yao Qi <yao.qi@linaro.org>
1528
1529 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1530
1e94266c
SM
15312016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1532
1533 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1534 to AC_OUTPUT.
1535 * configure: Regenerate.
1536
8adce034
SM
15372016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1538
1539 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1540 void * to gdb_byte *.
1541 * linux-low.c (siginfo_fixup): Likewise.
1542 (linux_xfer_siginfo): Likewise.
1543 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1544 Likewise.
1545 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1546
93813b37
WT
15472016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1548
1549 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1550 to srv_tgtobj.
1551 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1552 to srv_tgtobj.
1553 * linux-x86-low.c [__x86_64__]: Include
1554 "nat/amd64-linux-siginfo.h".
1555 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1556 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1557 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1558 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1559 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1560 (cpt_si_fd, si_timerid, si_overrun): Move from
1561 nat/amd64-linux-siginfo.c.
1562 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1563
8424cc97
SM
15642016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1565
1566 * server.c (skip_to_semicolon): Remove.
1567 (process_point_options): Use strchrnul instead of
1568 skip_to_semicolon.
1569
4d18591b
YQ
15702016-01-26 Yao Qi <yao.qi@linaro.org>
1571
1572 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1573 * linux-low.c (install_software_single_step_breakpoints): Don't
1574 call regcache_read_pc.
1575 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1576 argument pc.
1577
d8020970
YQ
15782016-01-26 Yao Qi <yao.qi@linaro.org>
1579
1580 * linux-low.c (install_software_single_step_breakpoints): Call
1581 regcache_read_pc instead of get_pc.
1582
8b207339
YQ
15832016-01-26 Yao Qi <yao.qi@linaro.org>
1584
1585 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1586 (unblock_async_io): Rename to ...
1587 (block_unblock_async_io): ... it. New function.
1588 (enable_async_io): Don't install SIGIO handler. Unblock it
1589 instead.
1590 (disable_async_io): Don't ignore SIGIO. Block it instead.
1591 (initialize_async_io): Install SIGIO handler. Don't call
1592 unblock_async_io.
1593
18879fef
YQ
15942016-01-26 Yao Qi <yao.qi@linaro.org>
1595
1596 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1597 first character is '\003', call *the_target->request_interrupt.
1598
a0f8e08a
YQ
15992016-01-25 Yao Qi <yao.qi@linaro.org>
1600
1601 * remote-utils.c (new_thread_notify): Remove.
1602 (dead_thread_notify): Likewise.
1603 * remote-utils.h (new_thread_notify): Remove declaration.
1604 (dead_thread_notify): Likewise.
1605
cc5fd9ab
MK
16062016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1607
1608 * gdb.trace/pending.exp: Fix expected message on continue.
1609
99e8eb11
MK
16102016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1611
1612 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1613 it works properly on big-endian machines where sizeof (CORE_ADDR)
1614 != sizeof (void *).
1615
a994041d
PA
16162016-01-21 Pedro Alves <palves@redhat.com>
1617
1618 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1619 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1620 * configure: Regenerate.
1621
f7a6a40d
YQ
16222016-01-21 Yao Qi <yao.qi@linaro.org>
1623
1624 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1625 is_thumb and set it according to CPSR saved on the stack.
1626 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1627 arm_sigreturn_next_pc.
1628
6f69e520
YQ
16292016-01-18 Yao Qi <yao.qi@linaro.org>
1630
1631 * linux-low.c (linux_set_pc_64bit): New function.
1632 (linux_get_pc_64bit): New function.
1633 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1634 Declare.
1635 * linux-sparc-low.c (debug_threads): Remove declaration.
1636 (sparc_get_pc): Remove.
1637 (the_low_target): Use linux_get_pc_64bit instead of
1638 sparc_get_pc.
1639 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1640 (the_low_target): Use linux_get_pc_64bit and
1641 linux_set_pc_64bit.
1642
276d4552
YQ
16432016-01-18 Yao Qi <yao.qi@linaro.org>
1644
1645 * linux-arm-low.c (debug_threads): Remove declaration.
1646 (arm_get_pc, arm_set_pc): Remove.
1647 (the_low_target): Use linux_get_pc_32bit and
1648 linux_set_pc_32bit.
1649 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1650 (the_low_target): Use linux_get_pc_32bit and
1651 linux_set_pc_32bit.
1652 * linux-cris-low.c (debug_threads): Remove declaration.
1653 (cris_get_pc, cris_set_pc,): Remove.
1654 (the_low_target): Use linux_get_pc_32bit and
1655 linux_set_pc_32bit.
1656 * linux-crisv32-low.c (debug_threads): Remove declaration.
1657 (cris_get_pc, cris_set_pc): Remove.
1658 (the_low_target): Use linux_get_pc_32bit and
1659 linux_set_pc_32bit.
1660 * linux-low.c: Include inttypes.h.
1661 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1662 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1663 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1664 (the_low_target): Use linux_get_pc_32bit and
1665 linux_set_pc_32bit.
1666 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1667 (the_low_target): Use linux_get_pc_32bit and
1668 linux_set_pc_32bit.
1669 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1670 (the_low_target): Use linux_get_pc_32bit and
1671 linux_set_pc_32bit.
1672 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1673 (the_low_target): Use linux_get_pc_32bit and
1674 linux_set_pc_32bit.
1675 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1676 (the_low_target): Use linux_get_pc_32bit and
1677 linux_set_pc_32bit.
1678
eb0edac8
GB
16792016-01-18 Gary Benson <gbenson@redhat.com>
1680
1681 * configure.ac (AC_FUNC_FORK): New check.
1682 * config.in: Regenerate.
1683 * configure: Likewise.
1684
1b451dda
YQ
16852016-01-14 Yao Qi <yao.qi@linaro.org>
1686
1687 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1688 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1689 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1690 arm_get_next_pcs_ctor.
1691
82075af2
JS
16922016-01-12 Josh Stone <jistone@redhat.com>
1693 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1694
1695 * inferiors.h: Include "gdb_vecs.h".
1696 (struct process_info): Add syscalls_to_catch.
1697 * inferiors.c (remove_process): Free syscalls_to_catch.
1698 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1699 syscall_return stops.
1700 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1701 * server.c (handle_general_set): Handle QCatchSyscalls.
1702 (handle_query): Report support for QCatchSyscalls.
1703 * target.h (struct target_ops): Add supports_catch_syscall.
1704 (target_supports_catch_syscall): New macro.
1705 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1706 (struct lwp_info): Add syscall_state.
1707 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1708 Maintain syscall_state and syscalls_to_catch across exec.
1709 (get_syscall_trapinfo): New function, proxy to the_low_target.
1710 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1711 (linux_low_filter_event): Toggle syscall_state entry/return for
1712 syscall traps, and set it ignored for all others.
1713 (gdb_catching_syscalls_p): New function.
1714 (gdb_catch_this_syscall_p): New function.
1715 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1716 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1717 (linux_supports_catch_syscall): New function.
1718 (linux_target_ops): Install it.
1719 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1720 (the_low_target): Install it.
1721
8f13a3ce
MF
17222016-01-12 Mike Frysinger <vapier@gentoo.org>
1723
1724 * acinclude.m4: Include new ../warning.m4 file.
1725 * configure: Regenerated.
1726 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1727
5b3da067
MF
17282016-01-12 Mike Frysinger <vapier@gentoo.org>
1729
1730 * ax.c (is_goto_target): Mark static.
1731 * linux-low.c (register_addr): Likewise.
1732 (linux_fetch_registers, linux_store_registers): Likewise.
1733 * mem-break.c (any_persistent_commands): Fix old prototype.
1734 (add_commands_to_breakpoint): Mark static.
1735 * regcache.c (find_register_by_name): Delete unused func.
1736 * remote-utils.c (hex_or_minus_one): Mark static.
1737 * server.c (monitor_show_help): Mark static.
1738 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1739 handle_v_requests): Likewise.
1740
bc504a31
PA
17412016-01-12 Pedro Alves <palves@redhat.com>
1742
1743 Remove use of the registered trademark symbol throughout.
1744
5a0dd67a
YQ
17452016-01-08 Yao Qi <yao.qi@linaro.org>
1746
1747 * remote-utils.c (getpkt): If c is '\003', call target hook
1748 request_interrupt.
1749
b2ca446f
YQ
17502016-01-06 Yao Qi <yao.qi@linaro.org>
1751
1752 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1753 linux-aarch32-low.c.
1754 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1755 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1756 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1757 (thumb2_breakpoint): Declare.
1758 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1759 linux-aarch32-low.h.
1760 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1761 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1762 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1763
edd88788
JB
17642016-01-01 Joel Brobecker <brobecker@adacore.com>
1765
1766 * gdbreplay.c (gdbreplay_version): Change copyright year in
1767 version message.
1768 * server.c (gdbserver_version): Likewise.
1769
65da7f14
PP
17702015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1771
1772 * server.c (crc32_table): Delete.
1773 (crc32): Use libiberty's xcrc32 function.
1774
4abd5ed2
JB
17752015-12-22 Joel Brobecker <brobecker@adacore.com>
1776
1777 * lynx-low.c (lynx_delete_thread_callback): New function.
1778 (lynx_mourn): Properly delete our process and all of its
1779 threads. Remove call to clear_inferiors.
1780
0e50fe5c
JB
17812015-12-22 Joel Brobecker <brobecker@adacore.com>
1782
1783 * target.c (thread_search_callback): Add check that
1784 the thread_stopped target callback is not NULL before
1785 calling it.
1786
35adc03f
YQ
17872015-12-21 Yao Qi <yao.qi@linaro.org>
1788
1789 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1790 arm breakpoint.
1791
bd2b2909
AT
17922015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1793
1794 * server.c (handle_query): Call target_supports_software_single_step.
1795
7fe5e27e
AT
17962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1797
1798 * linux-low.c (single_step): New function.
1799 (linux_resume_one_lwp_throw): Call single_step.
1800 (start_step_over): Likewise.
1801
d9311bfa
AT
18022015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1803
1804 * Makefile.in (SFILES): Append arch/arm-linux.c,
1805 arch/arm-get-next-pcs.c.
1806 (arm-linux.o): New rule.
1807 (arm-get-next-pcs.o): New rule.
1808 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1809 arm-linux.o.
1810 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1811 to linux-aarch32-low.c.
1812 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1813 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1814 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1815 (thumb2_breakpoint_len): Likewise.
1816 (arm_is_thumb_mode): Make non-static.
1817 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1818 from linux-aarch32-low.c.
1819 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1820 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1821 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1822 (thumb2_breakpoint_len): Likewise.
1823 (arm_is_thumb_mode): New declaration.
1824 * linux-arm-low.c: Include arch/arm-linux.h
1825 aarch/arm-get-next-pcs.h, sys/syscall.h.
1826 (get_next_pcs_ops): New struct.
1827 (get_next_pcs_addr_bits_remove): New function.
1828 (get_next_pcs_is_thumb): New function.
1829 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1830 (arm_sigreturn_next_pc): Likewise.
1831 (get_next_pcs_syscall_next_pc): Likewise.
1832 (arm_gdbserver_get_next_pcs): Likewise.
1833 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1834 Initialize.
1835 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1836 * server.h: Include gdb_vecs.h.
1837
68ce2059
AT
18382015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1839
1840 * Makefile.in (SFILES): Append common/common-regcache.c.
1841 (OBS): Append common-regcache.o.
1842 (common-regcache.o): New rule.
1843 * regcache.c (init_register_cache): Initialize cache to
1844 REG_UNAVAILABLE.
1845 (regcache_raw_read_unsigned): New function.
1846 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1847 register_status enum.
1848
fa5308bd
AT
18492015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1850
1851 * linux-aarch64-low.c (the_low_targets): Rename
1852 breakpoint_reinsert_addr to get_next_pcs.
1853 * linux-arm-low.c (the_low_targets): Likewise.
1854 * linux-bfin-low.c (the_low_targets): Likewise.
1855 * linux-cris-low.c (the_low_targets): Likewise.
1856 * linux-crisv32-low.c (the_low_targets): Likewise.
1857 * linux-low.c (can_software_single_step): Likewise.
1858 (install_software_single_step_breakpoints): New function.
1859 (start_step_over): Use install_software_single_step_breakpoints.
1860 * linux-low.h: New CORE_ADDR vector.
1861 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1862 get_next_pcs.
1863 * linux-mips-low.c (the_low_targets): Likewise.
1864 * linux-nios2-low.c (the_low_targets): Likewise.
1865 * linux-sparc-low.c (the_low_targets): Likewise.
1866
4a6ed09b
PA
18672015-12-17 Pedro Alves <palves@redhat.com>
1868
1869 * linux-low.c (linux_kill_one_lwp): Remove references to
1870 LinuxThreads.
1871 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1872 to 'kill'.
1873 (linux_init_signals): Delete.
1874 (initialize_low): Adjust.
1875 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1876
7544db95
PA
18772015-12-16 Pedro Alves <palves@redhat.com>
1878
1879 * configure.ac (compiler warning flags): When testing a
1880 -Wno-foo option, check whether -Wfoo works instead.
1881 * configure: Regenerate.
1882
8020350c
DB
18832015-12-11 Don Breazeal <donb@codesourcery.com>
1884
1885 * server.c (process_serial_event): Don't exit from gdbserver
1886 in remote mode if there are still active inferiors.
1887
db91f502
YQ
18882015-12-11 Yao Qi <yao.qi@linaro.org>
1889
1890 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1891 arm_breakpoint_at if the process is 32-bit.
1892
b37a6290
YQ
18932015-12-11 Yao Qi <yao.qi@linaro.org>
1894
1895 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1896 arm breakpoint.
1897
17b1509a
YQ
18982015-12-07 Yao Qi <yao.qi@linaro.org>
1899
1900 * configure.srv: Append arm.o to srv_tgtobj for
1901 aarch64*-*-linux* target.
1902 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1903 from linux-arm-low.c.
1904 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1905 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1906 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1907 (thumb2_breakpoint_len): Likewise.
1908 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1909 (arm_breakpoint_kinds): Likewise.
1910 (arm_breakpoint_kind_from_pc): Likewise.
1911 (arm_sw_breakpoint_from_kind): Likewise.
1912 (arm_breakpoint_kind_from_current_state): Likewise.
1913 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1914 (arm_sw_breakpoint_from_kind): Declare.
1915 (arm_breakpoint_kind_from_current_state): Declare.
1916 (arm_breakpoint_at): Declare.
1917 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1918 arm_sw_breakpoint_from_kind if process is 32-bit.
1919 (aarch64_breakpoint_kind_from_pc): New function.
1920 (aarch64_breakpoint_kind_from_current_state): New function.
1921 (the_low_target): Initialize fields breakpoint_kind_from_pc
1922 and breakpoint_kind_from_current_state.
1923 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1924 linux-aarch32-low.c.
1925 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1926 (arm_breakpoint, arm_breakpoint_len): Likewise.
1927 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1928 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1929 (arm_is_thumb_mode): Likewise.
1930 (arm_breakpoint_at): Likewise.
1931 (arm_breakpoint_kind_from_pc): Likewise.
1932 (arm_sw_breakpoint_from_kind): Likewise.
1933 (arm_breakpoint_kind_from_current_state): Likewise.
1934
1935 Revert:
1936 2015-08-04 Yao Qi <yao.qi@linaro.org>
1937
1938 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1939 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1940 * server.c (extended_protocol): Remove "static".
1941 * server.h (extended_protocol): Declare it.
1942
ece66d65
JS
19432015-12-04 Josh Stone <jistone@redhat.com>
1944
1945 * target.h (struct target_ops) <arch_setup>: Rename to ...
1946 (struct target_ops) <post_create_inferior>: ... this.
1947 (target_arch_setup): Rename to ...
1948 (target_post_create_inferior): ... this, calling post_create_inferior.
1949 * server.c (start_inferior): Update target_arch_setup calls to
1950 target_post_create_inferior.
1951 * linux-low.c (linux_low_ptrace_options): Forward declare.
1952 (linux_arch_setup): Update its comment for general use.
1953 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1954 (struct linux_target_ops): Use linux_post_create_inferior.
1955 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1956 to post_create_inferior.
1957 * nto-low.c (struct nto_target_ops): Likewise.
1958 * spu-low.c (struct spu_target_ops): Likewise.
1959 * win32-low.c (struct win32_target_ops): Likewise.
1960
e58c48b4
AT
19612015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1962
1963 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1964
fbec8956
AT
19652015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1966
1967 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1968 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1969 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1970 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1971 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1972 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1973 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1974 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1975 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1976 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1977 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1978 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1979
9b4c5f87
AT
19802015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1981
1982 * linux-low.c (linux_look_up_symbols): Don't call
1983 linux_supports_traceclone.
1984 * linux-low.h (thread_db_init): Remove use_events argument.
1985 * thread-db.c (thread_db_use_event): Remove global variable.
1986 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1987 (struct thread_db) <td_create_bp>: Remove field.
1988 (thread_db_create_event): Remove function.
1989 (thread_db_enable_reporting): Likewise.
1990 (find_one_thread): Don't check for thread_db_use_events.
1991 (attach_thread): Likewise.
1992 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1993 (try_thread_db_load_1): Don't check for thread_db_use_events.
1994 (thread_db_init): Remove use_events argument and thread events
1995 handling.
1996 (remove_thread_event_breakpoints): Remove function.
1997 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1998
7d00775e
AT
19992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2000
2001 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2002 New function.
2003 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2004 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2005 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2006 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2007 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2008 Initialize.
2009 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2010 New function.
2011 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2012 * linux-low.c (can_hardware_single_step): Use
2013 supports_hardware_single_step.
2014 (can_software_single_step): New function.
2015 (start_step_over): Call can_software_single_step.
2016 (linux_supports_hardware_single_step): New function.
2017 (struct target_ops) <supports_software_single_step>: Initialize.
2018 * linux-low.h (struct linux_target_ops)
2019 <supports_hardware_single_step>: Initialize.
2020 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2021 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2022 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2023 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2024 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2025 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2026 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2027 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2028 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2029 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2030 Initialize.
2031 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2032 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2033 Initialize.
2034 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2035 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2036 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2037 New function.
2038 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2039 * target.h (struct target_ops): <supports_software_single_step>:
2040 New field.
2041 (target_supports_software_single_step): New macro.
2042
2d97cd35
AT
20432015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2044
2045 * linux-low.c (linux_wait_1): Fix pc advance condition.
2046 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2047 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2048
769ef81f
AT
20492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2050
2051 * linux-arm-low.c (arm_is_thumb_mode): New function.
2052 (arm_breakpoint_at): Use arm_is_thumb_mode.
2053 (arm_breakpoint_kind_from_current_state): New function.
2054 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2055 Initialize.
2056 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2057 (linux_breakpoint_kind_from_current_state): New function.
2058 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2059 * linux-low.h (struct linux_target_ops)
2060 <breakpoint_kind_from_current_state>: New field.
2061 * target.h (struct target_ops): Likewise.
2062 (target_breakpoint_kind_from_current_state): New macro.
2063
1bebeeca
PA
20642015-11-30 Pedro Alves <palves@redhat.com>
2065
2066 * linux-low.c (linux_resume): Wake up the event loop before
2067 returning.
2068
a67a9fae
PA
20692015-11-30 Pedro Alves <palves@redhat.com>
2070
2071 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2072 check.
2073 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2074 to -1.
2075 * target.c (struct thread_search): New structure.
2076 (thread_search_callback): New function.
2077 (prev_general_thread): New global.
2078 (prepare_to_access_memory, done_accessing_memory): New functions.
2079 * target.h (prepare_to_access_memory, done_accessing_memory):
2080 Replace macros with function declarations.
2081
f2faf941
PA
20822015-11-30 Pedro Alves <palves@redhat.com>
2083
2084 PR 14618
2085 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2086 report TARGET_WAITKIND_NO_RESUMED.
2087 * remote-utils.c (prepare_resume_reply): Handle
2088 TARGET_WAITKIND_NO_RESUMED.
2089 * server.c (report_no_resumed): New global.
2090 (handle_query) <qSupported>: Handle "no-resumed+". Report
2091 "no-resumed+" support.
2092 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2093 return error if the client doesn't support no-resumed events.
2094 (push_stop_notification): New function.
2095 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2096 events if the client supports them.
2097
a681f9c9
PA
20982015-11-30 Pedro Alves <palves@redhat.com>
2099
2100 * linux-low.c (thread_still_has_status_pending_p): Don't check
2101 vCont;t here.
2102 (lwp_resumed): New function.
2103 (status_pending_p_callback): Return early if the LWP is not
2104 supposed to be resumed.
2105
65706a29
PA
21062015-11-30 Pedro Alves <palves@redhat.com>
2107
2108 * linux-low.c (handle_extended_wait): Assert that the LWP's
2109 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2110 thread create events, leave the new child's status pending.
2111 (linux_low_filter_event): If GDB wants to hear about thread exit
2112 events, leave the LWP marked dead and don't delete it.
2113 (linux_wait_for_event_filtered): Don't check for thread exit.
2114 (filter_exit_event): New function.
2115 (linux_wait_1): Use it, when returning an exit event.
2116 (linux_resume_one_lwp_throw): Assert that the LWP's
2117 waitstatus is TARGET_WAITKIND_IGNORE.
2118 * remote-utils.c (prepare_resume_reply): Handle
2119 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2120 * server.c (report_thread_events): New global.
2121 (handle_general_set): Handle QThreadEvents.
2122 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2123 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2124 TARGET_WAITKIND_THREAD_EXITED.
2125 * server.h (report_thread_events): Declare.
2126
56cf4bed
PA
21272015-11-30 Pedro Alves <palves@redhat.com>
2128
2129 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2130 the thread's last_resume_kind was resume_stop.
2131
500c1d85
PA
21322015-11-30 Pedro Alves <palves@redhat.com>
2133
2134 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2135 before returning.
2136
de979965
PA
21372015-11-30 Pedro Alves <palves@redhat.com>
2138
2139 * server.c (handle_v_requests): Handle vCtrlC.
2140
34c65914
PA
21412015-11-30 Pedro Alves <palves@redhat.com>
2142
2143 * gdbthread.h (find_any_thread_of_pid): Declare.
2144 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2145 functions.
2146 * server.c (handle_query): If current_thread is NULL, look for
2147 another thread of the selected process.
2148
79efa585 21492015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 2150 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
2151
2152 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2153 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2154 name in reply.
2155 * target.h (struct target_ops) <thread_name>: New field.
2156 (target_thread_name): New macro.
2157
80d82c19
JB
21582015-11-23 Joel Brobecker <brobecker@adacore.com>
2159
2160 * regcache.h (regcache_invalidate_pid): Add declaration.
2161 * regcache.c (regcache_invalidate_pid): New function, extracted
2162 from regcache_invalidate.
2163 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2164 Add trivial documentation comment.
2165 * lynx-low.c: Use regcache_invalidate_pid instead of
2166 regcache_invalidate.
2167
64da5dd5
JB
21682015-11-23 Joel Brobecker <brobecker@adacore.com>
2169
2170 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2171 and Elf64_auxv_t if the target is Android.
2172
37ce4055
DE
21732015-11-22 Doug Evans <xdje42@gmail.com>
2174
2175 * target.h: #include <sys/types.h>.
2176
06e03fff
PA
21772015-11-19 Pedro Alves <palves@redhat.com>
2178
2179 * linux-low.c (linux_process_qsupported): Change prototype.
2180 Adjust.
2181 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2182 Change prototype.
2183 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2184 and adjust to loop over all features.
2185 * server.c (handle_query) <qSupported>: Adjust to call
2186 target_process_qsupported once, passing it a vector of unprocessed
2187 features.
2188 * target.h (struct target_ops) <process_qsupported>: Change
2189 prototype.
2190 (target_process_qsupported): Adjust.
2191
9a084706
PA
21922015-11-19 Pedro Alves <palves@redhat.com>
2193
2194 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2195 mode.
2196 * configure: Regenerate.
2197
dad44a1f
PA
21982015-11-19 Pedro Alves <palves@redhat.com>
2199
2200 * configure: Regenerate.
2201
231c0592
YQ
22022015-11-19 Yao Qi <yao.qi@linaro.org>
2203
2204 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2205 type to uint32_t.
2206
6c1c9a8b
YQ
22072015-11-19 Yao Qi <yao.qi@linaro.org>
2208
2209 * linux-aarch64-low.c (enum aarch64_operand_type): New.
2210 (struct aarch64_operand): Move enum out.
2211
9caa3311
YQ
22122015-11-19 Yao Qi <yao.qi@linaro.org>
2213
2214 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2215 struct user_fpsimd_state *.
2216 (aarch64_store_fpregset): Likewise.
2217
6a69a054
YQ
22182015-11-19 Yao Qi <yao.qi@linaro.org>
2219
2220 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2221 struct user_pt_regs *.
2222 (aarch64_store_gregset): Likewise.
2223
1798301e
PA
22242015-11-18 Pedro Alves <palves@redhat.com>
2225
2226 * Makefile.in (all_object_files): Add $IPA_OBJS.
2227
ce7715e2
PA
22282015-11-17 Pedro Alves <palves@redhat.com>
2229
2230 * win32-low.c (win32_resume): Use gdb_signal_from_host,
2231 GDB_SIGNAL_0 and gdb_signal_to_string.
2232
c0879059
PA
22332015-11-17 Pedro Alves <palves@redhat.com>
2234
2235 * win32-low.c (handle_output_debug_string): Remove parameter.
2236 (win32_kill): Remove our_status local and adjust call to
2237 handle_output_debug_string.
2238 (get_child_debug_event): Adjust call to
2239 handle_output_debug_string.
2240
1996e237
SM
22412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2242
2243 * linux-mips-low.c (mips_fill_gregset): Add cast.
2244 (mips_store_gregset): Likewise.
2245 (mips_fill_fpregset): Likewise.
2246 (mips_store_fpregset): Likewise.
2247
cbec665b
SM
22482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2249
2250 * linux-mips-low.c (mips_add_watchpoint): Rename private to
2251 priv.
2252
eb3e3c67
SM
22532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2254
2255 * linux-mips-low.c (mips_linux_new_thread): Change type of
2256 watch_type to enum target_hw_bp_type.
2257
171de4b8
SM
22582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2259
2260 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2261 Change return type to arm_hwbp_type.
2262
04248ead
SM
22632015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2264
2265 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2266 (arm_store_gregset): Likewise.
2267 * linux-arm-low.c (arm_get_hwcap): Likewise.
2268 (arm_read_description): Likewise.
2269
04b3479c
SM
22702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2271
2272 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2273
2bc84e8a
SM
22742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2275
2276 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2277 (ppc_fill_vsxregset): Likewise.
2278 (ppc_store_vsxregset): Likewise.
2279 (ppc_fill_vrregset): Likewise.
2280 (ppc_store_vrregset): Likewise.
2281 (ppc_fill_evrregset): Likewise.
2282 (ppc_store_evrregset): Likewise.
2283
e6c5bb05
SM
22842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
2285
2286 * linux-ppc-low.c (ppc_usrregs_info): Remove
2287 forward-declaration.
2288 (ppc_arch_setup): Move lower in file.
2289
7ea45d72
SM
22902015-10-30 Simon Marchi <simon.marchi@ericsson.com>
2291
2292 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2293 (ps_pdwrite): Likewise.
2294
69291610
HW
22952015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2296
2297 * linux-arm-low.c (arm_new_thread): Move pointer dereference
2298 to after assert checks.
2299
b42945fd
SM
23002015-10-29 Simon Marchi <simon.marchi@ericsson.com>
2301
2302 * proc-service.c (ps_pdread): Add/adjust casts.
2303 (ps_pdwrite): Add/adjust casts.
2304
d6f85c84
SM
23052015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2306
2307 * server.c (handle_search_memory_1): Cast return value of
2308 memmem.
2309
f98cd059
SM
23102015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
2311
2312 * server.c (write_qxfer_response): Change type of data to
2313 gdb_byte *.
2314
d2412fa5
PA
23152015-10-29 Pedro Alves <palves@redhat.com>
2316
2317 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2318
c17414a2
PA
23192015-10-29 Pedro Alves <palves@redhat.com>
2320
2321 * tracepoint.c (clear_installed_tracepoints): Add casts.
2322
e053fbc4
PA
23232015-10-29 Pedro Alves <palves@redhat.com>
2324
2325 * server.c (handle_v_cont, process_serial_event): Add enum
2326 gdb_signal casts to signal parsing code.
2327
add67df8
PA
23282015-10-29 Pedro Alves <palves@redhat.com>
2329
2330 * linux-low.h (NULL_REGSET): Define.
2331 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2332 * linux-arm-low.c (arm_regsets): Likewise.
2333 * linux-crisv32-low.c (cris_regsets): Likewise.
2334 * linux-m68k-low.c (m68k_regsets): Likewise.
2335 * linux-mips-low.c (mips_regsets): Likewise.
2336 * linux-nios2-low.c (nios2_regsets): Likewise.
2337 * linux-ppc-low.c (ppc_regsets): Likewise.
2338 * linux-s390-low.c (s390_regsets): Likewise.
2339 * linux-sh-low.c (sh_regsets): Likewise.
2340 * linux-sparc-low.c (sparc_regsets): Likewise.
2341 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2342 * linux-tile-low.c (tile_regsets): Likewise.
2343 * linux-x86-low.c (x86_regsets): Likewise.
2344 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2345
50bc912a
PA
23462015-10-29 Pedro Alves <palves@redhat.com>
2347
2348 * linux-low.h (NULL_REGSET): Define.
2349 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2350 * linux-arm-low.c (arm_regsets): Likewise.
2351 * linux-crisv32-low.c (cris_regsets): Likewise.
2352 * linux-m68k-low.c (m68k_regsets): Likewise.
2353 * linux-mips-low.c (mips_regsets): Likewise.
2354 * linux-nios2-low.c (nios2_regsets): Likewise.
2355 * linux-ppc-low.c (ppc_regsets): Likewise.
2356 * linux-s390-low.c (s390_regsets): Likewise.
2357 * linux-sh-low.c (sh_regsets): Likewise.
2358 * linux-sparc-low.c (sparc_regsets): Likewise.
2359 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2360 * linux-tile-low.c (tile_regsets): Likewise.
2361 * linux-x86-low.c (x86_regsets): Likewise.
2362 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2363
682b2546
DE
23642015-10-26 Doug Evans <dje@google.com>
2365
2366 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2367
963843d4
DE
23682015-10-26 Doug Evans <dje@google.com>
2369
2370 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2371
d41401ac
DE
23722015-10-26 Doug Evans <dje@google.com>
2373
2374 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2375 for debug_printf.
2376 (attach_thread, find_new_threads_callback): Ditto.
2377
3db28855
AT
23782015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2379
2380 * mem-break.h (set_breakpoint_data): Remove.
2381
fb78e89c
AT
23822015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2383
2384 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2385 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2386 (initialize_low): Remove set_breakpoint_data call.
2387 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2388 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2389 (initialize_low): Remove set_breakpoint_data call.
2390 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2391 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2392 (initialize_low): Remove set_breakpoint_data call.
2393
2e6ee069
AT
23942015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2395
2396 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2397 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2398 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2399 * target.h (target_breakpoint_kind_from_pc): New macro.
2400
1652a986
AT
24012015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2402
2403 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2404 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2405 the default breakpoint kind.
2406
abeead09
AT
24072015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2408
2409 * linux-arm-low.c (arm_supports_z_point_type): Add software
2410 breakpoint support.
2411
b0b4b501
AT
24122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2413
2414 * linux-arm-low.c: Refactor breakpoint definitions.
2415 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2416 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2417
8689682c
AT
24182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2419
2420 * Makefile.in: Add arm.c/o.
2421 * configure.srv: Likewise.
2422 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2423 (arm_breakpoint_kind_from_pc): New function.
2424 (arm_sw_breakpoint_from_kind): Return proper kind.
2425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2426
27165294
AT
24272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2428
2429 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2430 removal.
2431 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2432 (struct raw_breakpoint) <size>: Remove.
2433 (struct raw_breakpoint) <kind>: Add.
2434 (bp_size): New function.
2435 (bp_opcode): Likewise.
2436 (find_raw_breakpoint_at): Adjust for kind.
2437 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2438 (remove_memory_breakpoint): Adjust for kind call bp_size.
2439 (set_raw_breakpoint_at): Adjust for kind.
2440 (set_breakpoint): Likewise.
2441 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2442 (delete_raw_breakpoint): Adjust for kind.
2443 (delete_breakpoint): Likewise.
2444 (find_gdb_breakpoint): Likewise.
2445 (set_gdb_breakpoint_1): Likewise.
2446 (set_gdb_breakpoint): Likewise.
2447 (delete_gdb_breakpoint_1): Likewise.
2448 (delete_gdb_breakpoint): Likewise.
2449 (uninsert_raw_breakpoint): Likewise.
2450 (reinsert_raw_breakpoint): Likewise.
2451 (set_breakpoint_data): Remove.
2452 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2453 (check_mem_read): Adjust for kind call bp_size.
2454 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2455 (clone_one_breakpoint): Adjust for kind.
2456 * mem-break.h (set_gdb_breakpoint): Likewise.
2457 (delete_gdb_breakpoint): Likewise.
2458 * server.c (process_serial_event): Likewise.
2459
dd373349
AT
24602015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2461
2462 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2463 (struct linux_target_ops) <breakpoint>: Remove.
2464 (struct linux_target_ops) <breakpoint_len>: Remove.
2465 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2466 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2467 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2468 (arm_sw_breakpoint_from_kind): New function.
2469 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2470 (struct linux_target_ops) <breakpoint>: Remove.
2471 (struct linux_target_ops) <breakpoint_len>: Remove.
2472 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2473 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2474 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2475 (struct linux_target_ops) <breakpoint>: Remove.
2476 (struct linux_target_ops) <breakpoint_len>: Remove.
2477 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2478 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2479 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2480 (struct linux_target_ops) <breakpoint>: Remove.
2481 (struct linux_target_ops) <breakpoint_len>: Remove.
2482 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2483 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2484 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2485 and sw_breakpoint_from_kind to increment the pc.
2486 (linux_breakpoint_kind_from_pc): New function.
2487 (linux_sw_breakpoint_from_kind): New function.
2488 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2489 (initialize_low): Call breakpoint_kind_from_pc and
2490 sw_breakpoint_from_kind to replace breakpoint_data/len.
2491 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2492 New field.
2493 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2494 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2495 (struct linux_target_ops) <breakpoint>: Remove.
2496 (struct linux_target_ops) <breakpoint_len>: Remove.
2497 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2498 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2499 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2500 (struct linux_target_ops) <breakpoint>: Remove.
2501 (struct linux_target_ops) <breakpoint_len>: Remove.
2502 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2503 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2504 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2505 (struct linux_target_ops) <breakpoint>: Remove.
2506 (struct linux_target_ops) <breakpoint_len>: Remove.
2507 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2508 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2509 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2510 (struct linux_target_ops) <breakpoint>: Remove.
2511 (struct linux_target_ops) <breakpoint_len>: Remove.
2512 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2513 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2514 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2515 (struct linux_target_ops) <breakpoint>: Remove.
2516 (struct linux_target_ops) <breakpoint_len>: Remove.
2517 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2518 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2519 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2520 (struct linux_target_ops) <breakpoint>: Remove.
2521 (struct linux_target_ops) <breakpoint_len>: Remove.
2522 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2523 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2524 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2525 (struct linux_target_ops) <breakpoint>: Remove.
2526 (struct linux_target_ops) <breakpoint_len>: Remove.
2527 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2528 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2529 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2530 (struct linux_target_ops) <breakpoint>: Remove.
2531 (struct linux_target_ops) <breakpoint_len>: Remove.
2532 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2533 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2534 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2535 (struct linux_target_ops) <breakpoint>: Remove.
2536 (struct linux_target_ops) <breakpoint_len>: Remove.
2537 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2538 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2539 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2540 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2541 (struct linux_target_ops) <breakpoint>: Remove.
2542 (struct linux_target_ops) <breakpoint_len>: Remove.
2543 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2544 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2545 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2546 (struct linux_target_ops) <breakpoint>: Remove.
2547 (struct linux_target_ops) <breakpoint_len>: Remove.
2548 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2549 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2550
4cd98a19
AT
25512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2552
2553 * linux-cris-low.c (cris_get_pc): Remove void arg.
2554
774ee6d2
AR
25552015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2556
2557 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2558 variable name.
2559
833dcd29
AR
25602015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2561
2562 * inferiors.c (thread_pid_matches_callback): New function.
2563 (find_thread_process): New function.
2564 (remove_thread): Reset current_thread.
2565 (remove_process): Assert threads have been removed first.
2566
8d689ee5
YQ
25672015-10-15 Yao Qi <yao.qi@linaro.org>
2568
2569 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2570 if it is 3.
2571 (aarch64_remove_point): Likewise.
2572 * regcache.c (regcache_register_size): New function.
2573
1c2e1515
YQ
25742015-10-12 Yao Qi <yao.qi@linaro.org>
2575
2576 * linux-aarch64-low.c: Update all callers as emit_load_store
2577 is renamed to aarch64_emit_load_store.
2578
e1c587c3
YQ
25792015-10-12 Yao Qi <yao.qi@linaro.org>
2580
2581 * linux-aarch64-low.c: Update all callers of function renaming
2582 from emit_insn to aarch64_emit_insn.
2583
b6542f81
YQ
25842015-10-12 Yao Qi <yao.qi@linaro.org>
2585
2586 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2587 arch/aarch64-insn.h.
2588 (struct aarch64_memory_operand): Likewise.
2589 (ENCODE): Likewise.
2590 (emit_insn): Move to arch/aarch64-insn.c.
2591 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2592 (emit_load_store): Move to arch/aarch64-insn.c.
2593 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2594 (can_encode_int32): Remove.
2595
246994ce
YQ
25962015-10-12 Yao Qi <yao.qi@linaro.org>
2597
2598 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2599 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2600 (aarch64_relocate_instruction): Likewise.
2601 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2602 (struct aarch64_insn_visitor): Likewise.
2603
0badd99f
YQ
26042015-10-12 Yao Qi <yao.qi@linaro.org>
2605
2606 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2607 (struct aarch64_insn_visitor): New.
2608 (struct aarch64_insn_relocation_data): New.
2609 (aarch64_ftrace_insn_reloc_b): New function.
2610 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2611 (aarch64_ftrace_insn_reloc_cb): Likewise.
2612 (aarch64_ftrace_insn_reloc_tb): Likewise.
2613 (aarch64_ftrace_insn_reloc_adr): Likewise.
2614 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2615 (aarch64_ftrace_insn_reloc_others): Likewise.
2616 (visitor): New.
2617 (aarch64_relocate_instruction): Use visitor.
2618
dfaffe9d
YQ
26192015-10-12 Yao Qi <yao.qi@linaro.org>
2620
2621 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2622 int. Add argument buf.
2623 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2624 aarch64_relocate_instruction.
2625
70b439f0
YQ
26262015-10-12 Yao Qi <yao.qi@linaro.org>
2627
2628 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2629 argument insn. Remove local variable insn. Don't call
2630 target_read_uint32.
2631 (aarch64_install_fast_tracepoint_jump_pad): Call
2632 target_read_uint32.
2633
7781c06f
YQ
26342015-09-30 Yao Qi <yao.qi@linaro.org>
2635
2636 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2637 (emit_load_store_pair): Likewise.
2638
9a3c8263
SM
26392015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2640
2641 * dll.c (match_dll): Add cast(s).
2642 (unloaded_dll): Likewise.
2643 * linux-low.c (second_thread_of_pid_p): Likewise.
2644 (delete_lwp_callback): Likewise.
2645 (count_events_callback): Likewise.
2646 (select_event_lwp_callback): Likewise.
2647 (linux_set_resume_request): Likewise.
2648 * server.c (accumulate_file_name_length): Likewise.
2649 (emit_dll_description): Likewise.
2650 (handle_qxfer_threads_worker): Likewise.
2651 (visit_actioned_threads): Likewise.
2652 * thread-db.c (any_thread_of): Likewise.
2653 * tracepoint.c (same_process_p): Likewise.
2654 (match_blocktype): Likewise.
2655 (build_traceframe_info_xml): Likewise.
2656
224c3ddb
SM
26572015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2658
2659 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2660 assignment.
2661 (gdb_unparse_agent_expr): Likewise.
2662 * hostio.c (require_data): Likewise.
2663 (handle_pread): Likewise.
2664 * linux-low.c (disable_regset): Likewise.
2665 (fetch_register): Likewise.
2666 (store_register): Likewise.
2667 (get_dynamic): Likewise.
2668 (linux_qxfer_libraries_svr4): Likewise.
2669 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2670 (set_fast_tracepoint_jump): Likewise.
2671 (uninsert_fast_tracepoint_jumps_at): Likewise.
2672 (reinsert_fast_tracepoint_jumps_at): Likewise.
2673 (validate_inserted_breakpoint): Likewise.
2674 (clone_agent_expr): Likewise.
2675 * regcache.c (init_register_cache): Likewise.
2676 * remote-utils.c (putpkt_binary_1): Likewise.
2677 (decode_M_packet): Likewise.
2678 (decode_X_packet): Likewise.
2679 (look_up_one_symbol): Likewise.
2680 (relocate_instruction): Likewise.
2681 (monitor_output): Likewise.
2682 * server.c (handle_search_memory): Likewise.
2683 (handle_qxfer_exec_file): Likewise.
2684 (handle_qxfer_libraries): Likewise.
2685 (handle_qxfer): Likewise.
2686 (handle_query): Likewise.
2687 (handle_v_cont): Likewise.
2688 (handle_v_run): Likewise.
2689 (captured_main): Likewise.
2690 * target.c (write_inferior_memory): Likewise.
2691 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2692 * tracepoint.c (init_trace_buffer): Likewise.
2693 (add_tracepoint_action): Likewise.
2694 (add_traceframe): Likewise.
2695 (add_traceframe_block): Likewise.
2696 (cmd_qtdpsrc): Likewise.
2697 (cmd_qtdv): Likewise.
2698 (cmd_qtstatus): Likewise.
2699 (response_source): Likewise.
2700 (response_tsv): Likewise.
2701 (cmd_qtnotes): Likewise.
2702 (gdb_collect): Likewise.
2703 (initialize_tracepoint): Likewise.
2704
afbe19f8
PL
27052015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2706
2707 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2708 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2709 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2710 <NOP>: New.
2711 (enum aarch64_condition_codes): New enum.
2712 (w0): New static global.
2713 (fp): Likewise.
2714 (lr): Likewise.
2715 (struct aarch64_memory_operand) <type>: New
2716 MEMORY_OPERAND_POSTINDEX type.
2717 (postindex_memory_operand): New helper function.
2718 (emit_ret): New function.
2719 (emit_load_store_pair): New function, factored out of emit_stp
2720 with support for MEMORY_OPERAND_POSTINDEX.
2721 (emit_stp): Rewrite using emit_load_store_pair.
2722 (emit_ldp): New function.
2723 (emit_load_store): Likewise.
2724 (emit_ldr): Mention post-index instruction in comment.
2725 (emit_ldrh): New function.
2726 (emit_ldrb): New function.
2727 (emit_ldrsw): Mention post-index instruction in comment.
2728 (emit_str): Likewise.
2729 (emit_subs): New function.
2730 (emit_cmp): Likewise.
2731 (emit_and): Likewise.
2732 (emit_orr): Likewise.
2733 (emit_orn): Likewise.
2734 (emit_eor): Likewise.
2735 (emit_mvn): Likewise.
2736 (emit_lslv): Likewise.
2737 (emit_lsrv): Likewise.
2738 (emit_asrv): Likewise.
2739 (emit_mul): Likewise.
2740 (emit_sbfm): Likewise.
2741 (emit_sbfx): Likewise.
2742 (emit_ubfm): Likewise.
2743 (emit_ubfx): Likewise.
2744 (emit_csinc): Likewise.
2745 (emit_cset): Likewise.
2746 (emit_nop): Likewise.
2747 (emit_ops_insns): New helper function.
2748 (emit_pop): Likewise.
2749 (emit_push): Likewise.
2750 (aarch64_emit_prologue): New function.
2751 (aarch64_emit_epilogue): Likewise.
2752 (aarch64_emit_add): Likewise.
2753 (aarch64_emit_sub): Likewise.
2754 (aarch64_emit_mul): Likewise.
2755 (aarch64_emit_lsh): Likewise.
2756 (aarch64_emit_rsh_signed): Likewise.
2757 (aarch64_emit_rsh_unsigned): Likewise.
2758 (aarch64_emit_ext): Likewise.
2759 (aarch64_emit_log_not): Likewise.
2760 (aarch64_emit_bit_and): Likewise.
2761 (aarch64_emit_bit_or): Likewise.
2762 (aarch64_emit_bit_xor): Likewise.
2763 (aarch64_emit_bit_not): Likewise.
2764 (aarch64_emit_equal): Likewise.
2765 (aarch64_emit_less_signed): Likewise.
2766 (aarch64_emit_less_unsigned): Likewise.
2767 (aarch64_emit_ref): Likewise.
2768 (aarch64_emit_if_goto): Likewise.
2769 (aarch64_emit_goto): Likewise.
2770 (aarch64_write_goto_address): Likewise.
2771 (aarch64_emit_const): Likewise.
2772 (aarch64_emit_call): Likewise.
2773 (aarch64_emit_reg): Likewise.
2774 (aarch64_emit_pop): Likewise.
2775 (aarch64_emit_stack_flush): Likewise.
2776 (aarch64_emit_zero_ext): Likewise.
2777 (aarch64_emit_swap): Likewise.
2778 (aarch64_emit_stack_adjust): Likewise.
2779 (aarch64_emit_int_call_1): Likewise.
2780 (aarch64_emit_void_call_2): Likewise.
2781 (aarch64_emit_eq_goto): Likewise.
2782 (aarch64_emit_ne_goto): Likewise.
2783 (aarch64_emit_lt_goto): Likewise.
2784 (aarch64_emit_le_goto): Likewise.
2785 (aarch64_emit_gt_goto): Likewise.
2786 (aarch64_emit_ge_got): Likewise.
2787 (aarch64_emit_ops_impl): New static global variable.
2788 (aarch64_emit_ops): New target function, return
2789 &aarch64_emit_ops_impl.
2790 (struct linux_target_ops): Install it.
2791
bb903df0
PL
27922015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2793
2794 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2795 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2796 aarch64-ipa.o.
2797 * linux-aarch64-ipa.c: New file.
2798 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2799 and endian.h.
2800 (aarch64_get_thread_area): New target method.
2801 (extract_signed_bitfield): New helper function.
2802 (aarch64_decode_ldr_literal): New function.
2803 (enum aarch64_opcodes): New enum.
2804 (struct aarch64_register): New struct.
2805 (struct aarch64_operand): New struct.
2806 (x0): New static global.
2807 (x1): Likewise.
2808 (x2): Likewise.
2809 (x3): Likewise.
2810 (x4): Likewise.
2811 (w2): Likewise.
2812 (ip0): Likewise.
2813 (sp): Likewise.
2814 (xzr): Likewise.
2815 (aarch64_register): New helper function.
2816 (register_operand): Likewise.
2817 (immediate_operand): Likewise.
2818 (struct aarch64_memory_operand): New struct.
2819 (offset_memory_operand): New helper function.
2820 (preindex_memory_operand): Likewise.
2821 (enum aarch64_system_control_registers): New enum.
2822 (ENCODE): New macro.
2823 (emit_insn): New helper function.
2824 (emit_b): New function.
2825 (emit_bcond): Likewise.
2826 (emit_cb): Likewise.
2827 (emit_tb): Likewise.
2828 (emit_blr): Likewise.
2829 (emit_stp): Likewise.
2830 (emit_ldp_q_offset): Likewise.
2831 (emit_stp_q_offset): Likewise.
2832 (emit_load_store): Likewise.
2833 (emit_ldr): Likewise.
2834 (emit_ldrsw): Likewise.
2835 (emit_str): Likewise.
2836 (emit_ldaxr): Likewise.
2837 (emit_stxr): Likewise.
2838 (emit_stlr): Likewise.
2839 (emit_data_processing_reg): Likewise.
2840 (emit_data_processing): Likewise.
2841 (emit_add): Likewise.
2842 (emit_sub): Likewise.
2843 (emit_mov): Likewise.
2844 (emit_movk): Likewise.
2845 (emit_mov_addr): Likewise.
2846 (emit_mrs): Likewise.
2847 (emit_msr): Likewise.
2848 (emit_sevl): Likewise.
2849 (emit_wfe): Likewise.
2850 (append_insns): Likewise.
2851 (can_encode_int32_in): New helper function.
2852 (aarch64_relocate_instruction): New function.
2853 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2854 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2855 (struct linux_target_ops): Install aarch64_get_thread_area,
2856 aarch64_install_fast_tracepoint_jump_pad and
2857 aarch64_get_min_fast_tracepoint_insn_len.
2858
787749ea
PL
28592015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2860
2861 * Makefile.in (aarch64-insn.o): New rule.
2862 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2863
9812b2e6
YQ
28642015-09-21 Yao Qi <yao.qi@linaro.org>
2865
2866 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2867
18fe412b
YQ
28682015-09-21 Yao Qi <yao.qi@linaro.org>
2869
2870 * tracepoint.c (max_jump_pad_size): Remove.
2871
a0cc84cd
YQ
28722015-09-18 Yao Qi <yao.qi@linaro.org>
2873
2874 * linux-aarch64-low.c: Don't include sys/uio.h.
2875 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2876
d78908cf
WW
28772015-09-16 Wei-cheng Wang <cole945@gmail.com>
2878
2879 * tracepoint.c (eval_result_type): Change prototype.
2880 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2881
d57e0d50
PA
28822015-09-15 Pedro Alves <palves@redhat.com>
2883
2884 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2885 Check whether to report exec events instead of checking whether
2886 multiprocess is enabled.
2887
5a676acc
PA
28882015-09-15 Pedro Alves <palves@redhat.com>
2889
2890 PR remote/18965
2891 * remote-utils.c (prepare_resume_reply): Merge
2892 TARGET_WAITKIND_VFORK_DONE switch case with the
2893 TARGET_WAITKIND_FORKED case.
2894
7c5d0fad
YQ
28952015-09-15 Yao Qi <yao.qi@linaro.org>
2896
2897 * server.c (handle_query): Check string comparison using
2898 "else if" instead of "if".
2899
750ce8d1
YQ
29002015-09-15 Yao Qi <yao.qi@linaro.org>
2901
2902 * server.c (vCont_supported): New global variable.
2903 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2904 matches. Append ";vContSupported+" to own_buf.
2905 (handle_v_requests): Append ";s;S" to own_buf if target supports
2906 hardware single step or vCont_supported is false.
2907 (capture_main): Set vCont_supported to zero.
2908
70b90b91
YQ
29092015-09-15 Yao Qi <yao.qi@linaro.org>
2910
2911 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2912 it to ...
2913 (linux_supports_hardware_single_step): ... New function.
2914 (linux_target_ops): Update.
2915 * lynx-low.c (lynx_target_ops): Set field
2916 supports_hardware_single_step to target_can_do_hardware_single_step.
2917 * nto-low.c (nto_target_ops): Likewise.
2918 * spu-low.c (spu_target_ops): Likewise.
2919 * win32-low.c (win32_target_ops): Likewise.
2920 * target.c (target_can_do_hardware_single_step): New function.
2921 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2922 Remove. <supports_hardware_single_step>: New field.
2923 (target_supports_conditional_breakpoints): Remove.
2924 (target_supports_hardware_single_step): New macro.
2925 (target_can_do_hardware_single_step): Declare.
2926 * server.c (handle_query): Use target_supports_hardware_single_step
2927 instead of target_supports_conditional_breakpoints.
2928
ade90bde
YQ
29292015-09-15 Yao Qi <yao.qi@linaro.org>
2930
2931 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2932 function.
2933 (struct linux_target_ops the_low_target): Install
2934 aarch64_linux_siginfo_fixup.
2935
94585166
DB
29362015-09-11 Don Breazeal <donb@codesourcery.com>
2937 Luis Machado <lgustavo@codesourcery.com>
2938
2939 * linux-low.c (linux_mourn): Static declaration.
2940 (linux_arch_setup): Move in front of
2941 handle_extended_wait.
2942 (linux_arch_setup_thread): New function.
2943 (handle_extended_wait): Handle exec events. Call
2944 linux_arch_setup_thread. Make event_lwp argument a
2945 pointer-to-a-pointer.
2946 (check_zombie_leaders): Do not check stopped threads.
2947 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2948 (linux_low_filter_event): Add lwp and thread for exec'ing
2949 non-leader thread if leader thread has been deleted.
2950 Refactor code into linux_arch_setup_thread and call it.
2951 Pass child lwp pointer by reference to handle_extended_wait.
2952 (linux_wait_for_event_filtered): Update comment.
2953 (linux_wait_1): Prevent clobbering exec event status.
2954 (linux_supports_exec_events): New function.
2955 (linux_target_ops) <supports_exec_events>: Initialize new member.
2956 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2957 new member.
2958 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2959 * server.c (report_exec_events): New global variable.
2960 (handle_query): Handle qSupported query for exec-events feature.
2961 (captured_main): Initialize report_exec_events.
2962 * server.h (report_exec_events): Declare new global variable.
2963 * target.h (struct target_ops) <supports_exec_events>: New
2964 member.
2965 (target_supports_exec_events): New macro.
2966 * win32-low.c (win32_target_ops) <supports_exec_events>:
2967 Initialize new member.
2968
0568462b
MM
29692015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2970
2971 * linux-low.c (linux_low_enable_btrace): Remove.
2972 (linux_target_ops): Replace linux_low_enable_btrace with
2973 linux_enable_btrace.
2974
39edd165
YQ
29752015-09-03 Yao Qi <yao.qi@linaro.org>
2976
2977 * linux-aarch64-low.c (aarch64_insert_point): Call
2978 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2979 returns true.
2980
1db33b5a
UW
29812015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2982
2983 * linux-low.c (check_stopped_by_breakpoint): Use
2984 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2985
ab290430
PA
29862015-08-27 Pedro Alves <palves@redhat.com>
2987
2988 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2989
8d749320
SM
29902015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2991
6711b7f8
SM
2992 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2993 the XNEW-family equivalent.
8d749320
SM
2994 (compile_bytecodes): Likewise.
2995 * dll.c (loaded_dll): Likewise.
2996 * event-loop.c (append_callback_event): Likewise.
2997 (create_file_handler): Likewise.
2998 (create_file_event): Likewise.
2999 * hostio.c (handle_open): Likewise.
3000 * inferiors.c (add_thread): Likewise.
3001 (add_process): Likewise.
3002 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3003 * linux-arm-low.c (arm_new_process): Likewise.
3004 (arm_new_thread): Likewise.
3005 * linux-low.c (add_to_pid_list): Likewise.
3006 (linux_add_process): Likewise.
3007 (handle_extended_wait): Likewise.
3008 (add_lwp): Likewise.
3009 (enqueue_one_deferred_signal): Likewise.
3010 (enqueue_pending_signal): Likewise.
3011 (linux_resume_one_lwp_throw): Likewise.
3012 (linux_resume_one_thread): Likewise.
3013 (linux_read_memory): Likewise.
3014 (linux_write_memory): Likewise.
3015 * linux-mips-low.c (mips_linux_new_process): Likewise.
3016 (mips_linux_new_thread): Likewise.
3017 (mips_add_watchpoint): Likewise.
3018 * linux-x86-low.c (initialize_low_arch): Likewise.
3019 * lynx-low.c (lynx_add_process): Likewise.
3020 * mem-break.c (set_raw_breakpoint_at): Likewise.
3021 (set_breakpoint): Likewise.
3022 (add_condition_to_breakpoint): Likewise.
3023 (add_commands_to_breakpoint): Likewise.
3024 (clone_agent_expr): Likewise.
3025 (clone_one_breakpoint): Likewise.
3026 * regcache.c (new_register_cache): Likewise.
3027 * remote-utils.c (look_up_one_symbol): Likewise.
3028 * server.c (queue_stop_reply): Likewise.
3029 (start_inferior): Likewise.
3030 (queue_stop_reply_callback): Likewise.
3031 (handle_target_event): Likewise.
3032 * spu-low.c (fetch_ppc_memory): Likewise.
3033 (store_ppc_memory): Likewise.
3034 * target.c (set_target_ops): Likewise.
3035 * thread-db.c (thread_db_load_search): Likewise.
3036 (try_thread_db_load_1): Likewise.
3037 * tracepoint.c (add_tracepoint): Likewise.
3038 (add_tracepoint_action): Likewise.
3039 (create_trace_state_variable): Likewise.
3040 (cmd_qtdpsrc): Likewise.
3041 (cmd_qtro): Likewise.
3042 (add_while_stepping_state): Likewise.
3043 * win32-low.c (child_add_thread): Likewise.
3044 (get_image_name): Likewise.
3045
ed8b7b42
YQ
30462015-08-25 Yao Qi <yao.qi@linaro.org>
3047
3048 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3049
db3cb7cb
YQ
30502015-08-25 Yao Qi <yao.qi@linaro.org>
3051
3052 * Makefile.in (aarch64-linux.o): New rule.
3053 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3054 srv_tgtobj.
3055 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3056 (aarch64_init_debug_reg_state): Make it extern.
3057 (aarch64_linux_prepare_to_resume): Remove.
3058
f6011a1c
YQ
30592015-08-25 Yao Qi <yao.qi@linaro.org>
3060
3061 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3062 lwp_arch_private_info and ptid_of_lwp.
3063
88e2cf7e
YQ
30642015-08-25 Yao Qi <yao.qi@linaro.org>
3065
3066 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3067 Find proc_info by find_process_pid. All callers updated.
3068
5e35436e
YQ
30692015-08-25 Yao Qi <yao.qi@linaro.org>
3070
3071 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3072 Remove.
3073 (debug_reg_change_callback): Remove.
3074 (aarch64_notify_debug_reg_change): Remove.
3075
4a8a7965
YQ
30762015-08-25 Yao Qi <yao.qi@linaro.org>
3077
3078 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3079 Call current_lwp_ptid.
3080
32a271ee
YQ
30812015-08-25 Yao Qi <yao.qi@linaro.org>
3082
3083 * linux-aarch64-low.c (debug_reg_change_callback): Use
3084 debug_printf.
3085
0d51c8d7
YQ
30862015-08-25 Yao Qi <yao.qi@linaro.org>
3087
3088 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3089
31a43dd5
YQ
30902015-08-25 Yao Qi <yao.qi@linaro.org>
3091
3092 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3093
8ee52567
YQ
30942015-08-25 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3097 the code.
3098
ff3f0f45
YQ
30992015-08-25 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3102 Remove.
3103 (debug_reg_change_callback): Remove argument entry and add argument
3104 lwp. Remove local variable thread. Don't print thread id in the
3105 debugging output. Don't check whether pid of thread equals to pid.
3106 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3107 iterate_over_lwps instead find_inferior.
3108
3d40fbb5
PA
31092015-08-24 Pedro Alves <palves@redhat.com>
3110
3111 * inferiors.c (get_first_process): New function.
3112 * inferiors.h (get_first_process): New declaration.
3113 * remote-utils.c (read_ptid): Default to the first process in the
3114 list, instead of to the current thread's process.
3115
438e1e42
PA
31162015-08-24 Pedro Alves <palves@redhat.com>
3117
3118 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3119 * event-loop.c: Likewise.
3120 * remote-utils.c: Likewise.
3121 * tracepoint.c: Likewise.
3122
a8c6d4fc
PA
31232015-08-24 Pedro Alves <palves@redhat.com>
3124
3125 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3126 ptid_get_lwp.
3127
99b0bb12
PA
31282015-08-21 Pedro Alves <palves@redhat.com>
3129
3130 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3131 instead of literal 1.
3132
f8904751
PA
31332015-08-21 Pedro Alves <palves@redhat.com>
3134
3135 * tdesc.c (default_description): Explicitly zero-initialize.
3136
465a859e
PA
31372015-08-21 Pedro Alves <palves@redhat.com>
3138
3139 PR gdb/18749
3140 * inferiors.c (remove_thread): Discard any pending stop reply for
3141 this thread.
3142 * server.c (remove_all_on_match_pid): Rename to ...
3143 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3144 instead of a pid.
3145 (discard_queued_stop_replies): Change parameter to a ptid. Now
3146 extern.
3147 (handle_v_kill, kill_inferior_callback, captured_main)
3148 (process_serial_event): Adjust.
3149 * server.h (discard_queued_stop_replies): Declare.
3150
f0db101d
PA
31512015-08-21 Pedro Alves <palves@redhat.com>
3152
3153 * linux-low.c (wait_for_sigstop): Always switch to no thread
3154 selected if the previously current thread dies.
3155 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3156 process instead of the current thread's.
3157 * remote-utils.c (input_interrupt): Don't check if there's no
3158 current thread.
3159 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3160 current thread to the general thread fails, error out.
3161 (handle_qxfer_auxv, handle_qxfer_libraries)
3162 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3163 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3164 (handle_query): Check if there's a thread selected instead of
3165 checking whether there's any thread in the thread list.
3166 (handle_qxfer_threads, handle_qxfer_btrace)
3167 (handle_qxfer_btrace_conf): Don't error out early if there's no
3168 thread in the thread list.
3169 (handle_v_cont, myresume): Don't set the current thread to the
3170 continue thread.
3171 (process_serial_event) <Hg handling>: Also set thread_id if the
3172 previous general thread is still alive.
3173 (process_serial_event) <g/G handling>: If setting the current
3174 thread to the general thread fails, error out.
3175 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3176 thread's lwp instead of the current thread's.
3177 * target.c (set_desired_thread): If the desired thread was not
3178 found, leave the current thread pointing to NULL. Return an int
3179 (boolean) indicating success.
3180 * target.h (set_desired_thread): Change return type to int.
3181
40045d91
MF
31822015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3183
3184 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3185 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3186 #includes.
3187 (ps_get_thread_area): New function.
3188
45face3b
GB
31892015-08-19 Gary Benson <gbenson@redhat.com>
3190
3191 * hostio.c (handle_pread): Do not attempt to read more data
3192 than hostio_reply_with_data can fit in a packet.
3193
16d5f642
JB
31942015-08-18 Joel Brobecker <brobecker@adacore.com>
3195
3196 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3197
a738da3a
MF
31982015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3199
3200 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3201
33ebda9d
PA
32022015-08-06 Pedro Alves <palves@redhat.com>
3203
3204 * tracepoint.c (expr_eval_result): Now an int.
3205
a44892be
PA
32062015-08-06 Pedro Alves <palves@redhat.com>
3207
3208 * gdbthread.h (struct regcache): Forward declare.
3209 (struct thread_info) <regcache_data>: Now a struct regcache
3210 pointer.
3211 * inferiors.c (inferior_regcache_data)
3212 (set_inferior_regcache_data): Now work with struct regcache
3213 pointers.
3214 * inferiors.h (struct regcache): Forward declare.
3215 (inferior_regcache_data, set_inferior_regcache_data): Now work
3216 with struct regcache pointers.
3217 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3218 (free_register_cache_thread): Remove struct regcache pointer
3219 casts.
3220
608a1e46
PA
32212015-08-06 Pedro Alves <palves@redhat.com>
3222
3223 * server.c (captured_main): On error, print the exception message
3224 to stderr, and if run_once is set, throw a quit.
3225
f0ce0d3a
PA
32262015-08-06 Pedro Alves <palves@redhat.com>
3227
3228 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3229 the current thread.
3230
bf47e248
PA
32312015-08-06 Pedro Alves <palves@redhat.com>
3232
3233 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3234 reading beyond the passed in buffer length.
3235
b6b9ffcc
PL
32362015-08-06 Pierre Langlois <pierre.langlois@arm.com>
3237
3238 * tracepoint.c (symbol_list) <required>: Remove.
3239
863d01bd
PA
32402015-08-06 Pedro Alves <palves@redhat.com>
3241
3242 * linux-low.c (handle_extended_wait): Set the fork child's suspend
3243 count if stopping and suspending threads.
3244 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3245 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3246 (linux_detach): Complete an ongoing step-over.
3247 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
3248 throughout.
3249 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3250 (linux_wait_1): If passing a signal to the inferior after
3251 finishing a step-over, unsuspend and re-resume all lwps. If we
3252 see a single-step event but the thread should be continuing, don't
3253 pass the trap to gdb.
3254 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3255 internal_error instead of gdb_assert.
3256 (enqueue_pending_signal): New function.
3257 (check_ptrace_stopped_lwp_gone): Add debug output.
3258 (start_step_over): Use internal_error instead of gdb_assert.
3259 (complete_ongoing_step_over): New function.
3260 (linux_resume_one_thread): Don't resume a suspended thread.
3261 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3262 it stepping.
3263
00db26fa
PA
32642015-08-06 Pedro Alves <palves@redhat.com>
3265
3266 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3267 (linux_thread_alive): Use lwp_is_marked_dead.
3268 (extended_event_reported): Delete.
3269 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3270 instead of extended_event_reported.
3271 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
3272 as well.
3273 (lwp_is_marked_dead): New function.
3274 (lwp_running): Use lwp_is_marked_dead.
3275 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3276 comment.
3277
ad071a30
PA
32782015-08-06 Pedro Alves <palves@redhat.com>
3279
3280 * linux-low.c (linux_wait_1): Move fork event output out of the
3281 !report_to_gdb check. Pass event_child->waitstatus to
3282 target_waitstatus_to_string instead of ourstatus.
3283
524b57e6
YQ
32842015-08-04 Yao Qi <yao.qi@linaro.org>
3285
3286 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3287 if current_thread is 32 bit.
3288
6085d6f6
YQ
32892015-08-04 Yao Qi <yao.qi@linaro.org>
3290
3291 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3292 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3293 * server.c (extended_protocol): Remove "static".
3294 * server.h (extended_protocol): Declare it.
3295
8a7e4587
YQ
32962015-08-04 Yao Qi <yao.qi@linaro.org>
3297
3298 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3299 both aarch64 and aarch32.
3300 (aarch64_set_pc): Likewise.
3301
3b53ae99
YQ
33022015-08-04 Yao Qi <yao.qi@linaro.org>
3303
3304 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3305 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3306 arm-with-neon.xml to srv_xmlfiles.
3307 * linux-aarch64-low.c: Include linux-aarch32-low.h.
3308 (is_64bit_tdesc): New function.
3309 (aarch64_linux_read_description): New function.
3310 (aarch64_arch_setup): Call aarch64_linux_read_description.
3311 (regs_info): Rename to regs_info_aarch64.
3312 (aarch64_regs_info): Return right regs_info.
3313 (initialize_low_arch): Call initialize_low_arch_aarch32.
3314
bd9e6534
YQ
33152015-08-04 Yao Qi <yao.qi@linaro.org>
3316
3317 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3318 * linux-aarch32-low.c: New file.
3319 * linux-aarch32-low.h: New file.
3320 * linux-arm-low.c (arm_fill_gregset): Move it to
3321 linux-aarch32-low.c.
3322 (arm_store_gregset): Likewise.
3323 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3324 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3325 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3326 (regs_info): Rename to regs_info_arm.
3327 (arm_regs_info): Return regs_info_aarch32 if
3328 have_ptrace_getregset is 1 and target description is
3329 arm_with_neon or arm_with_vfpv3.
3330 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3331 Call initialize_low_arch_aarch32 instead.
3332
ded48a5e
YQ
33332015-08-04 Yao Qi <yao.qi@linaro.org>
3334
3335 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3336 * linux-low.c: ... here.
3337 * linux-low.h (have_ptrace_getregset): Declare it.
3338
96e9210f
PA
33392015-08-04 Pedro Alves <palves@redhat.com>
3340
3341 * thread-db.c (struct thread_db): Use new typedefs.
3342 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3343 CHK calls.
3344 (disable_thread_event_reporting): Cast result of dlsym to
3345 destination function pointer type.
3346 (thread_db_mourn): Use td_ta_delete_ftype.
3347
af60a1ef
SL
33482015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3349
3350 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3351 arch variant.
3352 (CDX_BREAKPOINT): Define for R2.
3353 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3354 (the_low_target): Add comments.
3355
e8b41681
YQ
33562015-07-30 Yao Qi <yao.qi@linaro.org>
3357
3358 * linux-arm-low.c (arm_hwcap): Remove it.
3359 (arm_read_description): New local variable arm_hwcap. Don't
3360 set arm_hwcap to zero.
3361
89abb039
YQ
33622015-07-30 Yao Qi <yao.qi@linaro.org>
3363
3364 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3365 Use regcache->tdesc instead.
3366 (arm_store_wmmxregset): Likewise.
3367 (arm_fill_vfpregset): Likewise.
3368 (arm_store_vfpregset): Likewise.
3369
deca266c
YQ
33702015-07-30 Yao Qi <yao.qi@linaro.org>
3371
3372 * linux-arm-low.c: Include arch/arm.h.
3373 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3374 (arm_store_gregset): Likewise.
3375
aa58a496
SM
33762015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3377
3378 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3379 ptrace's 4th parameter.
3380
50904b25
YQ
33812015-07-27 Yao Qi <yao.qi@linaro.org>
3382
3383 * configure.srv (case aarch64*-*-linux*): Don't set
3384 srv_linux_usrregs.
3385
5826e159
PA
33862015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3387
3388 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3389 sys/ptrace.h.
3390 * linux-arm-low.c: Likewise.
3391 * linux-cris-low.c: Likewise.
3392 * linux-crisv32-low.c: Likewise.
3393 * linux-low.c: Likewise.
3394 * linux-m68k-low.c: Likewise.
3395 * linux-mips-low.c: Likewise.
3396 * linux-nios2-low.c: Likewise.
3397 * linux-s390-low.c: Likewise.
3398 * linux-sparc-low.c: Likewise.
3399 * linux-tic6x-low.c: Likewise.
3400 * linux-tile-low.c: Likewise.
3401 * linux-x86-low.c: Likewise.
3402
54019719
PA
34032015-07-24 Pedro Alves <palves@redhat.com>
3404
3405 * config.in: Regenerate.
3406 * configure: Regenerate.
3407
eb7aa561
PA
34082015-07-24 Pedro Alves <palves@redhat.com>
3409
3410 * acinclude.m4: Include ../ptrace.m4.
3411 * configure.ac: Call GDB_AC_PTRACE.
3412 * config.in, configure: Regenerate.
3413
55d7b841
YQ
34142015-07-24 Yao Qi <yao.qi@linaro.org>
3415
3416 * linux-low.c (linux_create_inferior): Remove setting to
3417 proc->priv->new_inferior.
3418 (linux_attach): Likewise.
3419 (linux_low_filter_event): Likewise.
3420 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3421
c06cbd92
YQ
34222015-07-24 Yao Qi <yao.qi@linaro.org>
3423
3424 * linux-low.c (linux_arch_setup): New function.
3425 (linux_low_filter_event): If proc->tdesc is NULL and
3426 proc->attached is true, call the_low_target.arch_setup.
3427 Otherwise, keep status pending, and return.
3428 (linux_resume_one_lwp_throw): Don't call get_pc if
3429 thread->while_stepping isn't NULL. Don't call
3430 get_thread_regcache if proc->tdesc is NULL.
3431 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3432 (linux_target_ops): Install arch_setup.
3433 * server.c (start_inferior): Call the_target->arch_setup.
3434 * target.h (struct target_ops) <arch_setup>: New field.
3435 (target_arch_setup): New marco.
3436 * lynx-low.c (lynx_target_ops): Update.
3437 * nto-low.c (nto_target_ops): Update.
3438 * spu-low.c (spu_target_ops): Update.
3439 * win32-low.c (win32_target_ops): Update.
3440
5ae3ebba
YQ
34412015-07-24 Yao Qi <yao.qi@linaro.org>
3442
3443 * linux-low.c (linux_add_process): Don't set
3444 proc->priv->new_inferior.
3445 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3446 (linux_attach): Likewise.
3447
eb97750b
YQ
34482015-07-24 Yao Qi <yao.qi@linaro.org>
3449
3450 * server.c (start_inferior): Code refactor.
3451
51aee833
YQ
34522015-07-24 Yao Qi <yao.qi@linaro.org>
3453
3454 * server.c (process_serial_event): Set general_thread.
3455
af1b22f3
YQ
34562015-07-21 Yao Qi <yao.qi@linaro.org>
3457
3458 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3459 aarch64_linux_get_debug_reg_capacity.
3460
554717a3
YQ
34612015-07-17 Yao Qi <yao.qi@linaro.org>
3462
3463 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3464 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3465 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3466 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3467 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3468 (AARCH64_HWP_ALIGNMENT): Likewise.
3469 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3470 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3471 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3472 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3473 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3474 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3475 (struct aarch64_debug_reg_state): Likewise.
3476 (struct arch_lwp_info): Likewise.
3477 (aarch64_align_watchpoint): Likewise.
3478 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3479 (aarch64_watchpoint_length): Likewise.
3480 (aarch64_point_encode_ctrl_reg): Likewise
3481 (aarch64_point_is_aligned): Likewise.
3482 (aarch64_align_watchpoint): Likewise.
3483 (aarch64_linux_set_debug_regs):
3484 (aarch64_dr_state_insert_one_point): Likewise.
3485 (aarch64_dr_state_remove_one_point): Likewise.
3486 (aarch64_handle_breakpoint): Likewise.
3487 (aarch64_handle_aligned_watchpoint): Likewise.
3488 (aarch64_handle_unaligned_watchpoint): Likewise.
3489 (aarch64_handle_watchpoint): Likewise.
3490
c67ca4de
YQ
34912015-07-17 Yao Qi <yao.qi@linaro.org>
3492
3493 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3494 and don't aarch64_get_debug_reg_state. All callers update.
3495 (aarch64_handle_aligned_watchpoint): Likewise.
3496 (aarch64_handle_unaligned_watchpoint): Likewise.
3497 (aarch64_handle_watchpoint): Likewise.
3498 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3499 (aarch64_remove_point): Likewise.
3500
25abf979
YQ
35012015-07-17 Yao Qi <yao.qi@linaro.org>
3502
3503 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3504 debug_printf.
3505 (aarch64_handle_unaligned_watchpoint): Likewise.
3506
db1ff28b
JK
35072015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3508
3509 Revert the previous 3 commits:
3510 Move gdb_regex* to common/
3511 Move linux_find_memory_regions_full & co.
3512 gdbserver build-id attribute generator
3513
700ca40f
JK
35142015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3515 Jan Kratochvil <jan.kratochvil@redhat.com>
3516
3517 gdbserver build-id attribute generator.
3518 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3519 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3520 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3521 (find_phdr): New.
3522 (get_dynamic): Use find_pdhr to traverse program headers.
3523 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3524 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3525 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3526 (get_hex_build_id): New.
3527 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3528 to reply XML document.
3529
9904185c
JK
35302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3531 Jan Kratochvil <jan.kratochvil@redhat.com>
3532
3533 * target.c: Include target/target-utils.h and fcntl.h.
3534 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3535 (target_fileio_read_stralloc): New functions.
3536
6e5b4429
JK
35372015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3538
3539 * Makefile.in (OBS): Add gdb_regex.o.
3540 (gdb_regex.o): New.
3541 * config.in: Rebuilt.
3542 * configure: Rebuilt.
3543
ddc98fbf
JK
35442015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3545 Jan Kratochvil <jan.kratochvil@redhat.com>
3546
3547 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3548 * Makefile.in (OBS): Add target-utils.o.
3549 (linux-maps.o, target-utils.o): New.
3550 * configure.srv (srv_linux_obj): Add linux-maps.o.
3551
e57bb7a0
PL
35522015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3553
3554 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3555 function, return 1.
3556 (the_low_target): Install it.
3557
586b02a9
PA
35582015-07-14 Pedro Alves <palves@redhat.com>
3559
3560 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3561 Instead, ignore ECHILD, and throw an error for other errnos.
3562
58c1b36c
PA
35632015-07-10 Pedro Alves <palves@redhat.com>
3564
3565 * event-loop.c (struct callback_event) <data>: Change type to
3566 gdb_client_data instance instead of gdb_client_data pointer.
3567 (append_callback_event): Adjust.
3568
421530db
PL
35692015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3570
3571 * linux-aarch64-low.c: Add comments for each linux_target_ops
3572 method. Remove comments already covered in target_ops and
3573 linux_target_ops definitions.
3574 (the_low_target): Add comments for each unimplemented method.
3575
c2d65f38
YQ
35762015-07-09 Yao Qi <yao.qi@linaro.org>
3577
3578 * linux-aarch64-low.c (aarch64_regmap): Remove.
3579 (aarch64_usrregs_info): Remove.
3580 (regs_info): Set field usrregs to NULL.
3581
b20a6524
MM
35822015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3583
3584 * linux-low.c: Include "rsp-low.h"
3585 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3586 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3587 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3588 (handle_btrace_enable_pt): New.
3589 (handle_btrace_general_set): Support "pt".
3590 (handle_btrace_conf_general_set): Support "pt:size".
3591
96c97461
PL
35922015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3593
3594 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3595 Z_PACKET_SW_BP.
3596
37d66942
PL
35972015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3598
3599 * linux-aarch64-low.c: Remove comment about endianness.
3600 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3601 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3602 memcmp.
3603
dc06243f
GB
36042015-06-24 Gary Benson <gbenson@redhat.com>
3605
3606 * linux-i386-ipa.c (stdint.h): Do not include.
3607 * lynx-i386-low.c (stdint.h): Likewise.
3608 * lynx-ppc-low.c (stdint.h): Likewise.
3609 * mem-break.c (stdint.h): Likewise.
3610 * thread-db.c (stdint.h): Likewise.
3611 * tracepoint.c (stdint.h): Likewise.
3612 * win32-low.c (stdint.h): Likewise.
3613
124e13d9
SM
36142015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3615
3616 * server.c (write_qxfer_response): Update call to
3617 remote_escape_output.
3618
909c2cda
JK
36192015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3620 Jan Kratochvil <jan.kratochvil@redhat.com>
3621
3622 Merge multiple hex conversions.
3623 * gdbreplay.c (tohex): Rename to 'fromhex'.
3624 (logchar): Use fromhex.
3625
24c05f46
JK
36262015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3627
3628 * server.c (handle_qxfer_libraries): Set `version' attribute for
3629 <library-list>.
3630
14d2069a
GB
36312015-06-10 Gary Benson <gbenson@redhat.com>
3632
3633 * target.h (struct target_ops) <multifs_open>: New field.
3634 <multifs_unlink>: Likewise.
3635 <multifs_readlink>: Likewise.
3636 * linux-low.c (nat/linux-namespaces.h): New include.
3637 (linux_target_ops): Initialize the_target->multifs_open,
3638 the_target->multifs_unlink and the_target->multifs_readlink.
3639 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3640 * hostio.c (hostio_fs_pid): New static variable.
3641 (hostio_handle_new_gdb_connection): New function.
3642 (handle_setfs): Likewise.
3643 (handle_open): Use the_target->multifs_open as appropriate.
3644 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3645 (handle_readlink): Use the_target->multifs_readlink as
3646 appropriate.
3647 (handle_vFile): Handle vFile:setfs packets.
3648 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3649 after target_handle_new_gdb_connection.
3650
4b8b5e72
GB
36512015-06-10 Gary Benson <gbenson@redhat.com>
3652
3653 * configure.ac (AC_CHECK_FUNCS): Add setns.
3654 * config.in: Regenerate.
3655 * configure: Likewise.
3656 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3657 (linux-namespaces.o): New rule.
3658 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3659
3ac2e371
GB
36602015-06-09 Gary Benson <gbenson@redhat.com>
3661
3662 * hostio.c (handle_open): Process mode argument with
3663 fileio_to_host_mode.
3664
ca9b78ce
YQ
36652015-06-01 Yao Qi <yao.qi@linaro.org>
3666
3667 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3668 * linux-x86-low.c: Likewise.
3669
bfacd19d
DB
36702015-05-28 Don Breazeal <donb@codesourcery.com>
3671
3672 * linux-low.c (handle_extended_wait): Initialize
3673 thread_info.last_resume_kind for new fork children.
3674
452003ef
PA
36752015-05-15 Pedro Alves <palves@redhat.com>
3676
3677 * target.h (target_handle_new_gdb_connection): Rewrite using if
3678 wrapped in do/while.
3679
1041a03c
JB
36802015-05-14 Joel Brobecker <brobecker@adacore.com>
3681
3682 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3683 * configure, config.in: Regenerate.
3684 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3685 Declare typedef.
3686
c269dbdb
DB
36872015-05-12 Don Breazeal <donb@codesourcery.com>
3688
3689 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3690 PTRACE_EVENT_VFORK_DONE.
3691 (linux_low_ptrace_options, extended_event_reported): Add vfork
3692 events.
3693 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3694 and "vforkdone" for RSP 'T' Stop Reply Packet.
3695 * server.h (report_vfork_events): Declare
3696 global variable.
3697
3a8a0396
DB
36982015-05-12 Don Breazeal <donb@codesourcery.com>
3699
3700 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3701 (the_low_target) <new_fork>: Initialize new member.
3702 * linux-arm-low.c (arm_new_fork): New function.
3703 (the_low_target) <new_fork>: Initialize new member.
3704 * linux-low.c (handle_extended_wait): Call new target function
3705 new_fork.
3706 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3707 * linux-mips-low.c (mips_add_watchpoint): New function
3708 extracted from mips_insert_point.
3709 (the_low_target) <new_fork>: Initialize new member.
3710 (mips_linux_new_fork): New function.
3711 (mips_insert_point): Call mips_add_watchpoint.
3712 * linux-x86-low.c (x86_linux_new_fork): New function.
3713 (the_low_target) <new_fork>: Initialize new member.
3714
de0d863e
DB
37152015-05-12 Don Breazeal <donb@codesourcery.com>
3716
3717 * linux-low.c (handle_extended_wait): Implement return value,
3718 rename argument 'event_child' to 'event_lwp', handle
3719 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3720 (linux_low_ptrace_options): New function.
3721 (linux_low_filter_event): Call linux_low_ptrace_options,
3722 use different argument fo linux_enable_event_reporting,
3723 use return value from handle_extended_wait.
3724 (extended_event_reported): New function.
3725 (linux_wait_1): Call extended_event_reported and set
3726 status to report fork events.
3727 (linux_write_memory): Add pid to debug message.
3728 (reset_lwp_ptrace_options_callback): New function.
3729 (linux_handle_new_gdb_connection): New function.
3730 (linux_target_ops): Initialize new structure member.
3731 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3732 * lynx-low.c: Initialize new structure member.
3733 * remote-utils.c (prepare_resume_reply): Implement stop reason
3734 "fork" for "T" stop message.
3735 * server.c (handle_query): Call handle_new_gdb_connection.
3736 * server.h (report_fork_events): Declare global flag.
3737 * target.h (struct target_ops) <handle_new_gdb_connection>:
3738 New member.
3739 (target_handle_new_gdb_connection): New macro.
3740 * win32-low.c: Initialize new structure member.
3741
ddcbc397
DB
37422015-05-12 Don Breazeal <donb@codesourcery.com>
3743
3744 * mem-break.c (APPEND_TO_LIST): Define macro.
3745 (clone_agent_expr): New function.
3746 (clone_one_breakpoint): New function.
3747 (clone_all_breakpoints): New function.
3748 * mem-break.h: Declare new functions.
3749
89245bc0
DB
37502015-05-12 Don Breazeal <donb@codesourcery.com>
3751
3752 * linux-low.c (linux_supports_fork_events): New function.
3753 (linux_supports_vfork_events): New function.
3754 (linux_target_ops): Initialize new structure members.
3755 (initialize_low): Call linux_check_ptrace_features.
3756 * lynx-low.c (lynx_target_ops): Initialize new structure
3757 members.
3758 * server.c (report_fork_events, report_vfork_events):
3759 New global flags.
3760 (handle_query): Add new features to qSupported packet and
3761 response.
3762 (captured_main): Initialize new global variables.
3763 * target.h (struct target_ops) <supports_fork_events>:
3764 New member.
3765 <supports_vfork_events>: New member.
3766 (target_supports_fork_events): New macro.
3767 (target_supports_vfork_events): New macro.
3768 * win32-low.c (win32_target_ops): Initialize new structure
3769 members.
3770
835205d0
GB
37712015-05-12 Gary Benson <gbenson@redhat.com>
3772
3773 * server.c (handle_qxfer_exec_file): Use current process
3774 if annex is empty.
3775
21e94bd9
SL
37762015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3777
3778 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3779 Remove HAVE_PTRACE_GETREGS conditionals.
3780 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3781 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3782
45614f15
YQ
37832015-05-08 Yao Qi <yao.qi@linaro.org>
3784
3785 * linux-low.c (linux_supports_conditional_breakpoints): New
3786 function.
3787 (linux_target_ops): Install new target method.
3788 * lynx-low.c (lynx_target_ops): Install NULL hook for
3789 supports_conditional_breakpoints.
3790 * nto-low.c (nto_target_ops): Likewise.
3791 * spu-low.c (spu_target_ops): Likewise.
3792 * win32-low.c (win32_target_ops): Likewise.
3793 * server.c (handle_query): Check
3794 target_supports_conditional_breakpoints.
3795 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3796 New field.
3797 (target_supports_conditional_breakpoints): New macro.
3798
80ad801e
PA
37992015-05-06 Pedro Alves <palves@redhat.com>
3800
3801 PR server/18081
3802 * server.c (start_inferior): If the process exits, mourn it.
3803
819843c7
GB
38042015-04-21 Gary Benson <gbenson@redhat.com>
3805
3806 * hostio.c (fileio_open_flags_to_host): Factored out to
3807 fileio_to_host_openflags in common/fileio.c. Single use
3808 updated.
3809
a2d5a9d7
MF
38102015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3811
3812 * linux-xtensa-low.c (xtensa_fill_gregset)
3813 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3814 XCHAL_HAVE_LOOP.
3815
deb44829
MF
38162015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3817
3818 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3819 (regs_info): Replace usrregs pointer with NULL.
3820
e57f1de3
GB
38212015-04-17 Gary Benson <gbenson@redhat.com>
3822
3823 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3824 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3825 * server.c (handle_qxfer_exec_file): New function.
3826 (qxfer_packets): Add exec-file entry.
3827 (handle_query): Report qXfer:exec-file:read as supported packet.
3828
62828379
RN
38292015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3830
3831 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3832
b88bb450
GB
38332015-04-09 Gary Benson <gbenson@redhat.com>
3834
3835 * hostio-errno.c (errno_to_fileio_error): Remove function.
3836 Update caller to use remote_fileio_to_fio_error.
3837
c8f4bfdd
YQ
38382015-04-09 Yao Qi <yao.qi@linaro.org>
3839
3840 * linux-low.c (linux_insert_point): Call
3841 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3842 (linux_remove_point): Call remove_memory_breakpoint if type is
3843 raw_bkpt_type_sw.
3844 * linux-x86-low.c (x86_insert_point): Don't call
3845 insert_memory_breakpoint.
3846 (x86_remove_point): Don't call remove_memory_breakpoint.
3847
41f98f02
PA
38482015-04-01 Pedro Alves <palves@redhat.com>
3849 Cleber Rosa <crosa@redhat.com>
3850
3851 * server.c (gdbserver_usage): Reorganize and extend the usage
3852 message.
3853
2bf6fb9d
PA
38542015-03-24 Pedro Alves <palves@redhat.com>
3855
3856 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3857 output. Also dump TRAP_TRACE.
3858 (linux_low_filter_event): In debug output, distinguish a
3859 resume_stop SIGSTOP from a delayed SIGSTOP.
3860
369f6daa
GB
38612015-03-24 Gary Benson <gbenson@redhat.com>
3862
3863 * linux-x86-low.c (x86_linux_new_thread): Moved to
3864 nat/x86-linux.c.
3865 (x86_linux_prepare_to_resume): Likewise.
3866
8e5d4070
GB
38672015-03-24 Gary Benson <gbenson@redhat.com>
3868
3869 * Makefile.in (x86-linux-dregs.o): New rule.
3870 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3871 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3872 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3873 (x86_linux_dr_get): Likewise.
3874 (x86_linux_dr_set): Likewise.
3875 (update_debug_registers_callback): Likewise.
3876 (x86_linux_dr_set_addr): Likewise.
3877 (x86_linux_dr_get_addr): Likewise.
3878 (x86_linux_dr_set_control): Likewise.
3879 (x86_linux_dr_get_control): Likewise.
3880 (x86_linux_dr_get_status): Likewise.
3881 (x86_linux_update_debug_registers): Likewise.
3882
2b95d440
GB
38832015-03-24 Gary Benson <gbenson@redhat.com>
3884
3885 * linux-x86-low.c (x86_linux_update_debug_registers):
3886 New function, factored out from...
3887 (x86_linux_prepare_to_resume): ...this.
3888
14b0bc68
GB
38892015-03-24 Gary Benson <gbenson@redhat.com>
3890
3891 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3892 (x86_linux_dr_set): Likewise.
3893 (update_debug_registers_callback): Likewise.
3894 (x86_linux_dr_set_addr): Likewise.
3895 (x86_linux_dr_get_addr): Likewise.
3896 (x86_linux_dr_set_control): Likewise.
3897 (x86_linux_dr_get_control): Likewise.
3898 (x86_linux_dr_get_status): Likewise.
3899 (x86_linux_prepare_to_resume): Likewise.
3900
5dfe6ca8
GB
39012015-03-24 Gary Benson <gbenson@redhat.com>
3902
3903 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3904 Use perror_with_name. Pass string through gettext.
3905 (x86_linux_dr_set): Likewise.
3906
d33472ad
GB
39072015-03-24 Gary Benson <gbenson@redhat.com>
3908
3909 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3910 (x86_linux_dr_set_addr): ...this.
3911 (x86_dr_low_get_addr): Rename to...
3912 (x86_linux_dr_get_addr): ...this.
3913 (x86_dr_low_set_control): Rename to...
3914 (x86_linux_dr_set_control): ...this.
3915 (x86_dr_low_get_control): Rename to...
3916 (x86_linux_dr_get_control): ...this.
3917 (x86_dr_low_get_status): Rename to...
3918 (x86_linux_dr_get_status): ...this.
3919 (x86_dr_low): Update with new function names.
3920
4b134ca1
GB
39212015-03-24 Gary Benson <gbenson@redhat.com>
3922
3923 * Makefile.in (x86-linux.o): New rule.
3924 * configure.srv: Add x86-linux.o to relevant targets.
3925 * linux-low.c (lwp_set_arch_private_info): New function.
3926 (lwp_arch_private_info): Likewise.
3927 * linux-x86-low.c: Include nat/x86-linux.h.
3928 (arch_lwp_info): Removed structure.
3929 (update_debug_registers_callback):
3930 Use lwp_set_debug_registers_changed.
3931 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3932 and lwp_set_debug_registers_changed.
3933 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3934
34c703da
GB
39352015-03-24 Gary Benson <gbenson@redhat.com>
3936
3937 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3938 * linux-arm-low.c (arm_new_thread): Likewise.
3939 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3940 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3941 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3942 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3943
cff068da
GB
39442015-03-24 Gary Benson <gbenson@redhat.com>
3945
3946 * linux-low.c (ptid_of_lwp): New function.
3947 (lwp_is_stopped): Likewise.
3948 (lwp_stop_reason): Likewise.
3949 * linux-x86-low.c (update_debug_registers_callback):
3950 Use lwp_is_stopped.
3951 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3952 lwp_stop_reason.
3953
b2f7c7e8
GB
39542015-03-24 Gary Benson <gbenson@redhat.com>
3955
3956 * linux-low.h (linux_stop_lwp): Remove declaration.
3957
6d4ee8c6
GB
39582015-03-24 Gary Benson <gbenson@redhat.com>
3959
3960 * linux-low.h: Include nat/linux-nat.h.
3961 * linux-low.c (iterate_over_lwps_args): New structure.
3962 (iterate_over_lwps_filter): New function.
3963 (iterate_over_lwps): Likewise.
3964 * linux-x86-low.c (update_debug_registers_callback):
3965 Update signature to what iterate_over_lwps expects.
3966 Remove PID check that iterate_over_lwps now performs.
3967 (x86_dr_low_set_addr): Use iterate_over_lwps.
3968 (x86_dr_low_set_control): Likewise.
3969
70a0bb6b
GB
39702015-03-24 Gary Benson <gbenson@redhat.com>
3971
3972 * linux-x86-low.c (x86_debug_reg_state): New function.
3973 (x86_linux_prepare_to_resume): Use the above.
3974
7b669087
GB
39752015-03-24 Gary Benson <gbenson@redhat.com>
3976
3977 * linux-low.c (current_lwp_ptid): New function.
3978 * linux-x86-low.c: Include nat/linux-nat.h.
3979 (x86_dr_low_get_addr): Use current_lwp_ptid.
3980 (x86_dr_low_get_control): Likewise.
3981 (x86_dr_low_get_status): Likewise.
3982
eef49a3d
PA
39832015-03-20 Pedro Alves <palves@redhat.com>
3984
3985 * tracepoint.c (cmd_qtstatus): Make "str" const.
3986
b2333d22
PA
39872015-03-20 Pedro Alves <palves@redhat.com>
3988
3989 * server.c (handle_general_set): Make "req_str" const.
3990
23f238d3
PA
39912015-03-19 Pedro Alves <palves@redhat.com>
3992
3993 * linux-low.c (linux_resume_one_lwp): Rename to ...
3994 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3995 instead call perror_with_name.
3996 (check_ptrace_stopped_lwp_gone): New function.
3997 (linux_resume_one_lwp): Reimplement as wrapper around
3998 linux_resume_one_lwp_throw that swallows errors if the LWP is
3999 gone.
4000
91baf43f
PA
40012015-03-19 Pedro Alves <palves@redhat.com>
4002
4003 * linux-low.c (count_events_callback, select_event_lwp_callback):
4004 No longer check whether the thread has resume_stop as last resume
4005 kind.
4006
8bf3b159
PA
40072015-03-19 Pedro Alves <palves@redhat.com>
4008
4009 * linux-low.c (count_events_callback, select_event_lwp_callback):
4010 Use the lwp's status_pending_p field, not the thread's.
4011
b90fc188
PA
40122015-03-19 Pedro Alves <palves@redhat.com>
4013
4014 * linux-low.c (select_event_lwp_callback): Update comments to
4015 no longer mention SIGTRAP.
4016
464b0089
GB
40172015-03-18 Gary Benson <gbenson@redhat.com>
4018
4019 * server.c (handle_query): Do not report vFile:fstat as supported.
4020
aa9e327f
GB
40212015-03-11 Gary Benson <gbenson@redhat.com>
4022
4023 * hostio.c (sys/types.h): New include.
4024 (sys/stat.h): Likewise.
4025 (common-remote-fileio.h): Likewise.
4026 (handle_fstat): New function.
4027 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4028
791c0056
GB
40292015-03-11 Gary Benson <gbenson@redhat.com>
4030
4031 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4032 struct stat.st_blocks and struct stat.st_blksize.
4033 * configure: Regenerate.
4034 * config.in: Likewise.
4035 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4036 (OBS): Add common-remote-fileio.o.
4037 (common-remote-fileio.o): New rule.
4038
9a9df970
PA
40392015-03-09 Pedro Alves <palves@redhat.com>
4040
4041 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4042 'struct sockaddr' pointer in 'accept' call.
4043
9eb1356e
PA
40442015-03-09 Pedro Alves <palves@redhat.com>
4045
4046 Revert:
4047 2015-03-07 Pedro Alves <palves@redhat.com>
4048 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4049 or <winsock2.h> here. Instead include "gdb_socket.h".
4050 (remote_open): Use union gdb_sockaddr_u.
4051 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4052 or <winsock2.h> here. Instead include "gdb_socket.h".
4053 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4054 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4055 or <sys/un.h>.
4056 (init_named_socket, gdb_agent_helper_thread): Use union
4057 gdb_sockaddr_u.
4058
aac331e4
PA
40592015-03-07 Pedro Alves <palves@redhat.com>
4060
4061 * configure.ac (build_warnings): Move
4062 -Wdeclaration-after-statement to the C-specific set.
4063 * configure: Regenerate.
4064
366c75fc
PA
40652015-03-07 Pedro Alves <palves@redhat.com>
4066
4067 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4068 or <winsock2.h> here. Instead include "gdb_socket.h".
4069 (remote_open): Use union gdb_sockaddr_u.
4070 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4071 or <winsock2.h> here. Instead include "gdb_socket.h".
4072 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4073 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4074 or <sys/un.h>.
4075 (init_named_socket, gdb_agent_helper_thread): Use union
4076 gdb_sockaddr_u.
4077
492d29ea
PA
40782015-03-07 Pedro Alves <palves@redhat.com>
4079
4080 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4081 instead.
4082
60a191ed
YQ
40832015-03-06 Yao Qi <yao.qi@linaro.org>
4084
4085 * linux-aarch64-low.c (aarch64_insert_point): Use
4086 show_debug_regs as a boolean.
4087 (aarch64_remove_point): Likewise.
4088
f5771b1d
PA
40892015-03-05 Pedro Alves <palves@redhat.com>
4090
4091 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4092 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4093 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4094 * nto-low.c (nto_target_ops): Likewise.
4095 * spu-low.c (spu_target_ops): Likewise.
4096 * win32-low.c (win32_target_ops): Likewise.
4097
3e572f71
PA
40982015-03-04 Pedro Alves <palves@redhat.com>
4099
72f4393d 4100 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
4101 Decide whether a breakpoint triggered based on the SIGTRAP's
4102 siginfo.si_code.
72f4393d
L
4103 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4104 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
4105 (linux_low_filter_event): Check for breakpoints before checking
4106 watchpoints.
4107 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4108 siginfo.si_code.
72f4393d
L
4109 (linux_stopped_by_sw_breakpoint)
4110 (linux_supports_stopped_by_sw_breakpoint)
4111 (linux_stopped_by_hw_breakpoint)
4112 (linux_supports_stopped_by_hw_breakpoint): New functions.
4113 (linux_target_ops): Install new target methods.
3e572f71 4114
1ec68e26
PA
41152015-03-04 Pedro Alves <palves@redhat.com>
4116
4117 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4118 * server.c (swbreak_feature, hwbreak_feature): New globals.
4119 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4120 (captured_main): Clear swbreak_feature and hwbreak_feature.
4121 * server.h (swbreak_feature, hwbreak_feature): Declare.
4122 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4123 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4124 supports_stopped_by_hw_breakpoint>: New fields.
4125 (target_supports_stopped_by_sw_breakpoint)
4126 (target_stopped_by_sw_breakpoint)
4127 (target_supports_stopped_by_hw_breakpoint)
4128 (target_stopped_by_hw_breakpoint): Declare.
4129
15c66dd6
PA
41302015-03-04 Pedro Alves <palves@redhat.com>
4131
4132 enum lwp_stop_reason -> enum target_stop_reason
4133 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4134 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4135 (linux_wait_1, stuck_in_jump_pad_callback)
4136 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4137 (linux_stopped_by_watchpoint):
4138 * linux-low.h (enum lwp_stop_reason): Delete.
4139 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4140 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4141
98fc70d6
YQ
41422015-03-04 Yao Qi <yao.qi@linaro.org>
4143
4144 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4145
dd2ac174
GB
41462015-03-03 Gary Benson <gbenson@redhat.com>
4147
4148 * hostio.c (handle_vFile): Fix prefix lengths.
4149
d68e53f4
MM
41502015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4151
4152 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4153 ptr_bits.
4154
bf2d68ab
AA
41552015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4156
4157 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4158 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4159 (clean): Add "rm -f" for above C files.
4160 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4161 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4162 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4163 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4164 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4165 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4166 (init_registers_s390x_vx_linux64)
4167 (init_registers_s390x_tevx_linux64)
4168 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4169 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4170 declarations.
4171 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4172 (s390_store_vxrs_high): New functions.
4173 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4174 NT_S390_VXRS_HIGH.
4175 (s390_arch_setup): Add logic for selecting one of the new target
4176 descriptions. Activate the new vector regsets if applicable.
4177 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4178 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4179 and init_registers_s390x_tevx_linux64.
4180
c966a859
PA
41812015-03-01 Pedro Alves <palves@redhat.com>
4182
4183 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4184 parameter.
4185
4180215b
PA
41862015-02-27 Pedro Alves <palves@redhat.com>
4187
4188 * linux-x86-low.c (u_debugreg_offset): New function.
4189 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4190
749bab01
PA
41912015-02-27 Pedro Alves <palves@redhat.com>
4192
4193 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4194 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4195 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4196 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4197 (ps_lsetfpregs, ps_getpid)
4198 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4199 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4200 (ps_lsetxregs, ps_plog): Declare.
4201
3c14e5a3
PA
42022015-02-27 Pedro Alves <palves@redhat.com>
4203
4204 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4205 IP_AGENT_EXPORT_FUNC.
4206 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4207 IP_AGENT_EXPORT_FUNC.
4208 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4209 (IP_AGENT_EXPORT): Delete.
4210 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4211 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4212 (gdb_trampoline_buffer_error, collecting, gdb_collect)
4213 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4214 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4215 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4216 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4217 (traceframe_read_count, traceframe_write_count)
4218 (traceframes_created, trace_state_variables, get_raw_reg)
4219 (get_trace_state_variable_value, set_trace_state_variable_value)
4220 (ust_loaded, helper_thread_id, cmd_buf): Use
4221 IPA_SYM_EXPORTED_NAME.
4222 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4223 (tracepoints) Use IP_AGENT_EXPORT_VAR.
4224 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4225 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4226 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4227 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4228 EXTERN_C_PUSH/EXTERN_C_POP.
4229 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4230 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4231 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4232 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4233 (traceframe_write_count, traceframe_read_count)
4234 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4235 (about_to_request_buffer_space, get_trace_state_variable_value)
4236 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4237 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4238 EXTERN_C_PUSH/EXTERN_C_POP.
4239 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4240 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4241 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4242 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4243 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4244 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4245 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4246 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4247 Define.
4248 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4249 (IP_AGENT_EXPORT_VAR_DECL): Define.
4250 (tracing): Declare.
4251 (gdb_agent_get_raw_reg): Declare.
4252
fe978cb0
PA
42532015-02-27 Tom Tromey <tromey@redhat.com>
4254 Pedro Alves <palves@redhat.com>
4255
4256 Rename symbols whose names are reserved C++ keywords throughout.
4257
3bc3d82a
PA
42582015-02-27 Pedro Alves <palves@redhat.com>
4259
4260 * Makefile.in (COMPILER): New, get it from autoconf.
4261 (CXX): Get from autoconf instead.
4262 (COMPILE.pre): Use COMPILER.
4263 (CC-LD): Rename to ...
4264 (CC_LD): ... this. Use COMPILER.
4265 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4266 (CXX_FOR_TARGET): Default to g++ instead of gcc.
4267 * acinclude.m4: Include build-with-cxx.m4.
4268 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4269 Disable -Werror by default if building in C++ mode.
4270 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4271 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4272 the C++ compiler. Save/restore CXXFLAGS too.
4273 * configure: Regenerate.
4274
07697489
PA
42752015-02-27 Pedro Alves <palves@redhat.com>
4276
4277 * acinclude.m4: Include libiberty.m4.
4278 * configure.ac: Call libiberty_INIT.
4279 * config.in, configure: Regenerate.
4280
9beb7c4e
PA
42812015-02-26 Pedro Alves <palves@redhat.com>
4282
4283 * linux-low.c (linux_wait_1): When incrementing the PC past a
4284 program breakpoint always use the_low_target.breakpoint_len as
4285 increment, rather than the maximum between that and
4286 the_low_target.decr_pc_after_break.
4287
8090aef2
PA
42882015-02-23 Pedro Alves <palves@redhat.com>
4289
4290 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4291 thread was doing a step-over; always adjust the PC if
4292 we stepped over a permanent breakpoint.
4293 (linux_wait_1): If we stepped over breakpoint that was on top of a
4294 permanent breakpoint, manually advance the PC past it.
4295
bc9540e8
PA
42962015-02-23 Pedro Alves <palves@redhat.com>
4297
4298 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4299 modes.
4300 (x86_fill_gregset, x86_store_gregset): Use it when handling
4301 $orig_eax.
4302
2db9a427
PA
43032015-02-20 Pedro Alves <palves@redhat.com>
4304
4305 * thread-db.c: Include "nat/linux-procfs.h".
4306 (thread_db_init): Skip listing new threads if the kernel supports
4307 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4308
afa8d396
PA
43092015-02-20 Pedro Alves <palves@redhat.com>
4310
4311 * linux-low.c (status_pending_p_callback): Use ptid_match.
4312
c9587f88
AT
43132015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4314
4315 PR breakpoints/16812
4316 * linux-low.c (wstatus_maybe_breakpoint): Remove.
4317 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4318 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4319
b05ec7a5
AT
43202015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
4321
4322 PR breakpoints/15956
4323 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4324
d33501a5
MM
43252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4326
4327 * linux-low.c (linux_low_btrace_conf): Print size.
4328 * server.c (handle_btrace_conf_general_set): New.
4329 (hanle_general_set): Call handle_btrace_conf_general_set.
4330 (handle_query): Report Qbtrace-conf:bts:size as supported.
4331
f4abbc16
MM
43322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4333
4334 * linux-low.c (linux_low_enable_btrace): Update parameters.
4335 (linux_low_btrace_conf): New.
4336 (linux_target_ops)<to_btrace_conf>: Initialize.
4337 * server.c (current_btrace_conf): New.
4338 (handle_btrace_enable): Rename to ...
4339 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4340 to target_enable_btrace. Update comment. Update users.
4341 (handle_qxfer_btrace_conf): New.
4342 (qxfer_packets): Add btrace-conf entry.
4343 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4344 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4345 (target_ops)<read_btrace_conf>: New.
4346 (target_enable_btrace): Update parameters.
4347 (target_read_btrace_conf): New.
4348
043c3577
MM
43492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4350
4351 * server.c (handle_btrace_general_set): Remove call to
4352 target_supports_btrace.
4353 (supported_btrace_packets): New.
4354 (handle_query): Call supported_btrace_packets.
4355 * target.h: include btrace-common.h.
4356 (btrace_target_info): Removed.
4357 (supports_btrace, target_supports_btrace): Update parameters.
4358
734b0e4b
MM
43592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4360
4361 * Makefile.in (SFILES): Add common/btrace-common.c.
4362 (OBS): Add common/btrace-common.o.
4363 (btrace-common.o): Add build rules.
4364 * linux-low: Include btrace-common.h.
4365 (linux_low_read_btrace): Use struct btrace_data. Call
4366 btrace_data_init and btrace_data_fini.
4367
d6c146e9
PA
43682015-02-06 Pedro Alves <palves@redhat.com>
4369
4370 * thread-db.c (find_new_threads_callback): Add debug output.
4371
20ba1ce6
PA
43722015-02-04 Pedro Alves <palves@redhat.com>
4373
4374 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4375 (resume_stopped_resumed_lwps): New function.
4376 (linux_wait_for_event_filtered): Use it.
4377
8cc73a39
SDJ
43782015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4379
4380 * Makefile.in (SFILES): Add linux-personality.c.
4381 (linux-personality.o): New rule.
4382 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4383 list of objects to be built.
4384 * linux-low.c: Include nat/linux-personality.h.
4385 (linux_create_inferior): Remove code to disable address space
4386 randomization (moved to ../nat/linux-personality.c). Create
4387 cleanup to disable address space randomization.
4388
fb23d554
SDJ
43892015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4390
4391 * Makefile.in (posix-strerror.o): New rule.
4392 (mingw-strerror.o): Likewise.
4393 * configure: Regenerated.
4394 * configure.ac: Source file ../common/common.host. Initialize new
4395 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4396
cdf43629
YQ
43972015-01-14 Yao Qi <yao@codesourcery.com>
4398
4399 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4400 (ppc-linux.o): New rule.
4401 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4402 * configure.ac: AC_CHECK_FUNCS(getauxval).
4403 * config.in: Re-generated.
4404 * configure: Re-generated.
4405 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4406 ppc64_64bit_inferior_p
4407
514c5338
YQ
44082015-01-14 Yao Qi <yao@codesourcery.com>
4409
4410 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4411 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4412 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4413 (PT_ORIG_R3, PT_TRAP): Likewise.
4414 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4415 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4416 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4417
3368c1e5
JB
44182015-01-10 Joel Brobecker <brobecker@adacore.com>
4419
4420 * i387-fp.c (i387_cache_to_xsave): In look over
4421 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4422 zmmh_low_space field by use of zmmh_high_space.
4423
582511be
PA
44242015-01-09 Pedro Alves <palves@redhat.com>
4425
4426 * linux-low.c (step_over_bkpt): Move higher up in the file.
4427 (handle_extended_wait): Don't store the stop_pc here.
4428 (get_stop_pc): Adjust comments and rename to ...
4429 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4430 stopped for a software breakpoint or hardware breakpoint.
4431 (thread_still_has_status_pending_p): New function.
4432 (status_pending_p_callback): Use
4433 thread_still_has_status_pending_p. If the event is no longer
4434 interesting, resume the LWP.
4435 (handle_tracepoints): Add assert.
4436 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4437 (wstatus_maybe_breakpoint): New function.
4438 (cancel_breakpoint): Delete function.
4439 (check_stopped_by_watchpoint): New function, factored out from
4440 linux_low_filter_event.
4441 (lp_status_maybe_breakpoint): Delete function.
4442 (linux_low_filter_event): Remove filter_ptid argument.
4443 Leave thread group exits pending here. Store the LWP's stop PC.
4444 Always leave events pending.
4445 (linux_wait_for_event_filtered): Pull all events out of the
4446 kernel, and leave them all pending.
4447 (count_events_callback, select_event_lwp_callback): Consider all
4448 events.
4449 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4450 (select_event_lwp): Only give preference to the stepping LWP in
4451 all-stop mode. Adjust comments.
4452 (ignore_event): New function.
4453 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4454 references to cancel_breakpoints. Adjust to renames. Also give
4455 equal priority to all LWPs that have had events in non-stop mode.
4456 If reporting a software breakpoint event, unadjust the LWP's PC.
4457 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4458 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4459 Adjust.
4460 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4461 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4462 (linux_stopped_by_watchpoint): Adjust.
4463 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4464 * linux-low.h (enum lwp_stop_reason): New.
4465 (struct lwp_info) <stop_pc>: Adjust comment.
4466 <stopped_by_watchpoint>: Delete field.
4467 <stop_reason>: New field.
4468 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4469 * mem-break.c (software_breakpoint_inserted_here)
4470 (hardware_breakpoint_inserted_here): New function.
4471 * mem-break.h (software_breakpoint_inserted_here)
4472 (hardware_breakpoint_inserted_here): Declare.
4473 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4474 (cancel_breakpoints): Delete.
4475 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4476 (upload_fast_traceframes): Remove references to
4477 cancel_breakpoints.
4478
a33e3959
PA
44792015-01-09 Pedro Alves <palves@redhat.com>
4480
4481 * thread-db.c (find_new_threads_callback): Ignore thread if the
4482 kernel thread ID is -1.
4483
8784d563
PA
44842015-01-09 Pedro Alves <palves@redhat.com>
4485
4486 * linux-low.c (linux_attach_fail_reason_string): Move to
4487 nat/linux-ptrace.c, and rename.
4488 (linux_attach_lwp): Update comment.
4489 (attach_proc_task_lwp_callback): New function.
4490 (linux_attach): Adjust to rename and use
4491 linux_proc_attach_tgid_threads.
4492 (linux_attach_fail_reason_string): Delete declaration.
4493
76f2b779
JB
44942015-01-01 Joel Brobecker <brobecker@adacore.com>
4495
4496 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4497 * server.c (gdbserver_version): Likewise.
4498
fafcc06a
SDJ
44992014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4500
4501 * remote-utils.c: Include ctype.h.
4502 (input_interrupt): Explicitly handle the case when the char
4503 received is the NUL byte. Improve the printing of non-ASCII
4504 characters.
4505
beed38b8
JB
45062014-12-16 Joel Brobecker <brobecker@adacore.com>
4507
4508 * linux-low.c (linux_low_filter_event): Update call to
4509 linux_enable_event_reporting following the addition of
4510 a new parameter to that function.
4511
bf330350
CU
45122014-12-16 Catalin Udma <catalin.udma@freescale.com>
4513
4514 PR server/17457
4515 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4516 (AARCH64_FPCR_REGNO): Likewise.
4517 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4518 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4519 (aarch64_store_fpregset): Likewise.
4520
5227d625
JB
45212014-12-15 Joel Brobecker <brobecker@adacore.com>
4522
4523 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4524 Remove FIXME comment about assumption about N.
4525
f93b65a0
JB
45262014-12-13 Joel Brobecker <brobecker@adacore.com>
4527
4528 * configure.ac: If large-file support is disabled in GDBserver,
4529 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4530 * configure: Regenerate.
4531
e5a9158d
AA
45322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4533
4534 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4535 warning upon ENODATA from ptrace.
4536 * linux-s390-low.c (s390_store_tdb): New.
4537 (s390_regsets): Add regset for NT_S390_TDB.
4538
feea5f36
AA
45392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4540
4541 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4542 without a fill_function.
4543 * linux-s390-low.c (s390_fill_last_break): Remove.
4544 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4545 (s390_arch_setup): Use regset's size instead of fill_function for
4546 loop end condition.
4547
098dbe61
AA
45482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4549
4550 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4551 the regset's store function when ptrace returned an error.
4552 * regcache.c (get_thread_regcache): Invalidate register cache
4553 before fetching inferior's registers.
4554
28eef672
AA
45552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4556
4557 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4558 while-loop as for-loop.
4559 (regsets_store_inferior_registers): Likewise.
4560
bdca27a2
YQ
45612014-11-28 Yao Qi <yao@codesourcery.com>
4562
4563 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4564 * config.in, configure: Re-generate.
4565 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4566 is defined.
4567
9c232dda
YQ
45682014-11-21 Yao Qi <yao@codesourcery.com>
4569
4570 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4571 (AC_CHECK_HEADERS): Remove malloc.h.
4572 * configure: Re-generated.
4573 * config.in: Re-generated.
4574 * server.h: Don't include alloca.h and malloc.h.
4575 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4576 Don't include malloc.h.
4577
43968415
JB
45782014-11-17 Joel Brobecker <brobecker@adacore.com>
4579
4580 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4581 corresponding ERRNO check in same block.
4582
40e91bc7
PA
45832014-11-12 Pedro Alves <palves@redhat.com>
4584
4585 * server.c (cont_thread): Update comment.
4586 (start_inferior, attach_inferior): No longer clear cont_thread.
4587 (handle_v_cont): No longer set cont_thread.
4588 (captured_main): Clear cont_thread each time a GDB connects.
4589
c2c118cf
PA
45902014-11-12 Pedro Alves <palves@redhat.com>
4591
4592 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4593 thread, and don't resume all threads if the Hc thread has exited.
4594
78708b7c
PA
45952014-11-12 Pedro Alves <palves@redhat.com>
4596
4597 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4598 the process group instead of to a specific LWP.
4599
a2abc7de
PA
46002014-10-15 Pedro Alves <palves@redhat.com>
4601
4602 PR server/17487
4603 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4604 parameter.
4605 (arm_set_thread_context): Delete.
4606 (the_low_target): Adjust.
4607 * win32-i386-low.c (debug_registers_changed)
4608 (debug_registers_used): Delete.
4609 (update_debug_registers_callback): New function.
4610 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4611 needing to update their debug registers.
4612 (win32_get_current_dr): New function.
4613 (x86_dr_low_get_addr, x86_dr_low_get_control)
4614 (x86_dr_low_get_status): Fetch the debug register from the thread
4615 record's context.
4616 (i386_initial_stuff): Adjust.
4617 (i386_get_thread_context): Remove current_event parameter. Don't
4618 clear debug_registers_changed nor copy DR values to
4619 debug_reg_state.
4620 (i386_set_thread_context): Delete.
4621 (i386_prepare_to_resume): New function.
4622 (i386_thread_added): Mark the thread as needing to update irs
4623 debug registers.
4624 (the_low_target): Remove i386_set_thread_context and install
4625 i386_prepare_to_resume.
4626 * win32-low.c (win32_get_thread_context): Adjust.
4627 (win32_set_thread_context): Use SetThreadContext
4628 directly.
4629 (win32_prepare_to_resume): New function.
4630 (win32_require_context): New function, factored out from ...
4631 (thread_rec): ... this.
4632 (continue_one_thread): Call win32_prepare_to_resume on each thread
4633 we're about to continue.
4634 (win32_resume): Call win32_prepare_to_resume on the event thread.
4635 * win32-low.h (struct win32_thread_info)
4636 <debug_registers_changed>: New field.
4637 (struct win32_target_ops): Change prototype of set_thread_context,
4638 delete set_thread_context and add prepare_to_resume.
4639 (win32_require_context): New declaration.
4640
a442d071
GB
46412014-10-08 Gary Benson <gbenson@redhat.com>
4642
4643 * server.h: Do not include common-exceptions.h.
4644
6f1947e8
GB
46452014-10-08 Gary Benson <gbenson@redhat.com>
4646
4647 * server.h: Do not include cleanups.h.
4648
63b434a4
JH
46492014-09-30 James Hogan <james.hogan@imgtec.com>
4650
4651 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4652 mips64-dsp-linux.c.
4653
c4d9ceb6
YQ
46542014-09-23 Yao Qi <yao@codesourcery.com>
4655
4656 * linux-low.c (lp_status_maybe_breakpoint): New function.
4657 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4658 (count_events_callback): Likewise.
4659 (select_event_lwp_callback): Likewise.
4660 (cancel_breakpoints_callback): Likewise.
4661
89a5711c
DB
46622014-09-19 Don Breazeal <donb@codesourcery.com>
4663
4664 * linux-low.c (handle_extended_wait): Call
4665 linux_ptrace_get_extended_event.
4666 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4667 linux_is_extended_waitstatus.
4668
bffc0964
JB
46692014-09-16 Joel Brobecker <brobecker@adacore.com>
4670
4671 * Makefile.in (CPPFLAGS): Define.
4672 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4673 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4674
0bfdf32f
GB
46752014-09-16 Gary Benson <gbenson@redhat.com>
4676
4677 * inferiors.h (current_inferior): Renamed as...
4678 (current_thread): New variable. All uses updated.
4679 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4680 (maybe_move_out_of_jump_pad): Likewise.
4681 (cancel_breakpoint): Likewise.
4682 (linux_low_filter_event): Likewise.
4683 (wait_for_sigstop): Likewise.
4684 (linux_resume_one_lwp): Likewise.
4685 (need_step_over_p): Likewise.
4686 (start_step_over): Likewise.
4687 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4688 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4689 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4690 and save_inferior as saved_thread.
4691 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4692 saved_thread.
4693 (regcache_invalidate_thread): Likewise.
4694 * remote-utils.c (prepare_resume_reply): Likewise.
4695 * thread-db.c (thread_db_get_tls_address): Likewise.
4696 (disable_thread_event_reporting): Likewise.
4697 (remove_thread_event_breakpoints): Likewise.
4698 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4699 as saved_thread.
4700 * target.h (set_desired_inferior): Renamed as...
4701 (set_desired_thread): New declaration. All uses updated.
4702 * server.c (myresume): Updated comment to reference thread instead
4703 of inferior.
4704 (handle_serial_event): Likewise.
4705 (handle_target_event): Likewise.
4706
361c8ade
GB
47072014-09-12 Tom Tromey <tromey@redhat.com>
4708 Gary Benson <gbenson@redhat.com>
4709
4710 * regcache.h: Include common-regcache.h.
4711 (regcache_read_pc): Don't declare.
4712 * regcache.c (get_thread_regcache_for_ptid): New function.
4713
bd9269f7
GB
47142014-09-11 Tom Tromey <tromey@redhat.com>
4715 Gary Benson <gbenson@redhat.com>
4716
4717 * symbol.c: New file.
4718 * Makefile.in (SFILES): Add symbol.c.
4719 (OBS): Add symbol.o.
4720
f8c1d06b
GB
47212014-09-11 Gary Benson <gbenson@redhat.com>
4722
4723 * target.c (target_stop_ptid, target_continue_ptid): New
4724 functions.
4725
721ec300
GB
47262014-09-11 Tom Tromey <tromey@redhat.com>
4727 Gary Benson <gbenson@redhat.com>
4728
4729 * target.h: Include target/target.h.
4730 * target.c (target_read_memory, target_read_uint32)
4731 (target_write_memory): New functions.
4732
c5e92cca
GB
47332014-09-11 Gary Benson <gbenson@redhat.com>
4734
4735 * server.h (debug_hw_points): Don't declare.
4736 * server.c (debug_hw_points): Don't define. Replace all uses
4737 with show_debug_regs.
4738 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4739 all uses with show_debug_regs.
4740
2e4bb98a
EBM
47412014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4742
4743 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4744 endianness into account.
4745 (ppc_supply_ptrace_register): Likewise.
4746
ac740bc7
JH
47472014-09-03 James Hogan <james.hogan@imgtec.com>
4748
4749 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4750 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4751
97ea6506
GB
47522014-09-03 Gary Benson <gbenson@redhat.com>
4753
4754 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4755 ALL_DEBUG_ADDRESS_REGISTERS.
4756
df7e5265
GB
47572014-09-02 Gary Benson <gbenson@redhat.com>
4758
4759 * i386-low.h: Renamed as...
4760 * x86-low.h: New file. All type, function and variable name
4761 prefixes changed from "i386_" to "x86_". All references updated.
4762 * i386-low.c: Renamed as...
4763 * x86-low.c: New file. All type, function and variable name
4764 prefixes changed from "i386_" to "x86_". All references updated.
4765
ed859da7
GB
47662014-09-02 Gary Benson <gbenson@redhat.com>
4767
4768 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4769 (x86_linux_new_thread): Likewise.
4770
860789c7
GB
47712014-08-29 Gary Benson <gbenson@redhat.com>
4772
4773 * server.h (setjmp.h): Do not include.
4774 (toplevel): Do not declare.
4775 (common-exceptions.h): Include.
4776 (cleanups.h): Likewise.
4777 * server.c (toplevel): Do not define.
4778 (exit_code): New static global.
4779 (detach_or_kill_for_exit_cleanup): New function.
4780 (main): New function. Original main renamed to...
4781 (captured_main): New function.
4782 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4783
ff55e1b5
GB
47842014-08-29 Gary Benson <gbenson@redhat.com>
4785
4786 * Makefile.in (SFILES): Add common/common-exceptions.c.
4787 (OBS): Add common-exceptions.o.
4788 (common-exceptions.o): New rule.
4789 * utils.c (prepare_to_throw_exception): New function.
4790
e9bcb658
GB
47912014-08-29 Gary Benson <gbenson@redhat.com>
4792
4793 * config.in: Regenerate.
4794 * configure: Likewise.
4795
e3180625
GB
47962014-08-29 Gary Benson <gbenson@redhat.com>
4797
4798 * Makefile.in (SFILES): Add common/cleanups.c.
4799 (OBS): cleanups.o.
4800 (cleanups.o): New rule.
4801
e3d6ba5d
GB
48022014-08-29 Gary Benson <gbenson@redhat.com>
4803
4804 * utils.c (internal_vwarning): New function.
4805
7096e886
GB
48062014-08-28 Gary Benson <gbenson@redhat.com>
4807
4808 * utils.h (fatal): Remove declaration.
4809 * utils.c (fatal): Remove function.
4810
14ce3192
GB
48112014-08-28 Gary Benson <gbenson@redhat.com>
4812
4813 * tracepoint.c (gdb_agent_init): Replace fatal with
4814 perror_with_name.
4815 (initialize_tracepoint): Likewise.
4816
50278d59
GB
48172014-08-28 Gary Benson <gbenson@redhat.com>
4818
4819 * remote-utils.c (remote_prepare): Replace fatal with error.
4820
aa96c426
GB
48212014-08-28 Gary Benson <gbenson@redhat.com>
4822
4823 * linux-low.c (linux_async): Replace fatal with warning.
4824 Tidy up and return.
4825 (linux_start_non_stop): Return -1 if linux_async failed.
4826
f7160e97
GB
48272014-08-28 Gary Benson <gbenson@redhat.com>
4828
4829 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4830 gdb_assert.
4831 (i386_dr_low_get_addr): Remove vague comment.
4832 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4833 gdb_assert.
4834
38e08fca
GB
48352014-08-28 Gary Benson <gbenson@redhat.com>
4836
4837 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4838 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4839 internal_error.
4840 (linux_resume_one_lwp): Likewise.
4841 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4842 gdb_assert.
4843 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4844 with internal_error.
4845 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4846 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4847 (find_register_by_name): Replace fatal with internal_error.
4848 (find_regno): Likewise.
4849 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4850 * thread-db.c (thread_db_create_event): Likewise.
4851 (thread_db_load_search): Likewise.
4852 (try_thread_db_load_1): Likewise.
4853 * tracepoint.c (get_jump_space_head): Replace fatal with
4854 internal_error.
4855 (claim_trampoline_space): Likewise.
4856 (have_fast_tracepoint_trampoline_buffer): Likewise.
4857 (cmd_qtstart): Likewise.
4858 (stop_tracing): Likewise.
4859 (fast_tracepoint_collecting): Likewise.
4860 (target_malloc): Likewise.
4861 (download_tracepoint): Likewise.
4862 (download_trace_state_variables): Replace check with gdb_assert.
4863 (upload_fast_traceframes): Replace fatal with internal_error.
4864
34abf635
GB
48652014-08-19 Tom Tromey <tromey@redhat.com>
4866 Gary Benson <gbenson@redhat.com>
4867
4868 * Makefile.in (SFILES): Add common/common-debug.c.
4869 (OBS): Add common-debug.o.
4870 (common-debug.o): New rule.
4871 * debug.h (debug_printf): Don't declare.
4872 * debug.c (debug_printf): Renamed and rewritten as...
4873 (debug_vprintf): New function.
4874
f6e94d78
GB
48752014-08-19 Gary Benson <gbenson@redhat.com>
4876
4877 * utils.h: Do not include print-utils.h.
4878
9239eeab
GB
48792014-08-19 Tom Tromey <tromey@redhat.com>
4880 Gary Benson <gbenson@redhat.com>
4881
4882 * server.h: Add static assertion.
4883 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4884
ef87c8bb
GB
48852014-08-19 Tom Tromey <tromey@redhat.com>
4886 Gary Benson <gbenson@redhat.com>
4887
4888 * Makefile.in (SFILES): Add common/errors.c.
4889 (OBS): Add errors.o.
4890 (IPA_OBS): Add errors-ipa.o.
4891 (errors.o): New rule.
4892 (errors-ipa.o): Likewise.
4893 * utils.h (perror_with_name, error, warning): Don't declare.
4894 * utils.c (warning): Renamed and rewritten as...
4895 (vwarning): New function.
4896 (error): Renamed and rewritten as...
4897 (verror): New function.
4898 (internal_error): Renamed and rewritten as...
4899 (internal_verror): New function.
4900
bb974a24
GB
49012014-08-07 Gary Benson <gbenson@redhat.com>
4902
4903 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4904 * configure: Regenerate.
4905 * config.in: Likewise.
4906 * server.h: Do not include errno.h.
4907 * event-loop.c: Likewise.
4908 * hostio-errno.c: Likewise.
4909 * linux-low.c: Likewise.
4910 * remote-utils.c: Likewise.
4911 * spu-low.c: Likewise.
4912 * utils.c: Likewise.
4913 * gdbreplay.c: Unconditionally include errno.h.
4914
6d3d12eb
GB
49152014-08-07 Gary Benson <gbenson@redhat.com>
4916
4917 * server.h: Do not include string.h.
4918 * event-loop.c: Likewise.
4919 * linux-low.c: Likewise.
4920 * regcache.c: Likewise.
4921 * remote-utils.c: Likewise.
4922 * spu-low.c: Likewise.
4923 * utils.c: Likewise.
4924
dccbb609
GB
49252014-08-07 Gary Benson <gbenson@redhat.com>
4926
4927 * server.h: Do not include gdb_assert.h.
4928
e76df0d0
GB
49292014-08-07 Gary Benson <gbenson@redhat.com>
4930
4931 * server.h: Do not include common-utils.h.
4932
4cb9c816
GB
49332014-08-07 Gary Benson <gbenson@redhat.com>
4934
4935 * server.h: Do not include ptid.h.
4936 * notif.h: Likewise.
4937
3995eeee
GB
49382014-08-07 Gary Benson <gbenson@redhat.com>
4939
4940 * server.h: Do not include gdb_locale.h.
4941
cb9f1a9b
GB
49422014-08-07 Gary Benson <gbenson@redhat.com>
4943
4944 * server.h: Do not include gdb/signals.h.
4945 * win32-low.c: Likewise.
4946
a5fceff8
GB
49472014-08-07 Gary Benson <gbenson@redhat.com>
4948
4949 * server.h: Do not include pathmax.h.
4950
b9391142
GB
49512014-08-07 Gary Benson <gbenson@redhat.com>
4952
4953 * server.h: Do not include libiberty.h.
4954 * linux-bfin-low.c: Likewise.
4955
0e443c87
GB
49562014-08-07 Gary Benson <gbenson@redhat.com>
4957
4958 * server.h: Do not include ansidecl.h.
4959
8ebb3f56
GB
49602014-08-07 Gary Benson <gbenson@redhat.com>
4961
4962 * linux-x86-low.c: Do not include stddef.h.
4963 * lynx-ppc-low.c: Likewise.
4964 * tracepoint.c: Likewise.
4965
8980bdf6
GB
49662014-08-07 Gary Benson <gbenson@redhat.com>
4967
4968 * server.h: Do not include stdarg.h.
4969 * nto-low.c: Likewise.
4970
d7096f71
GB
49712014-08-07 Gary Benson <gbenson@redhat.com>
4972
4973 * server.h: Do not include stdlib.h.
4974 * inferiors.c: Likewise.
4975 * linux-low.c: Likewise.
4976 * regcache.c: Likewise.
4977 * spu-low.c: Likewise.
4978 * tracepoint.c: Likewise.
4979 * utils.c: Likewise.
4980
d02f550d
GB
49812014-08-07 Gary Benson <gbenson@redhat.com>
4982
4983 * server.h: Do not include stdio.h.
4984 * linux-low.c: Likewise.
4985 * remote-utils.c: Likewise.
4986 * spu-low.c: Likewise.
4987 * utils.c: Likewise.
4988 * wincecompat.c: Likewise.
4989
87f6c4e3
GB
49902014-08-06 Gary Benson <gbenson@redhat.com>
4991
4992 * regcache.c (init_register_cache): Move conditionals inside if.
4993
7089dca4
GB
49942014-08-06 Gary Benson <gbenson@redhat.com>
4995
4996 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4997
462f517e
GB
49982014-07-31 Gary Benson <gbenson@redhat.com>
4999
5000 * ax.h: Do not include server.h.
5001 * gdbthread.h: Likewise.
5002 * lynx-low.h: Likewise.
5003 * notif.h: Likewise.
5004
976411d6
GB
50052014-07-30 Gary Benson <gbenson@redhat.com>
5006
5007 * server.h: Include common-defs.h.
5008 Do not include config.h or build-gnulib-gdbserver/config.h.
5009
d41f6d8e
GB
50102014-07-30 Gary Benson <gbenson@redhat.com>
5011
5012 * hostio-errno.c: Move server.h to top of includes list.
5013 * inferiors.c: Likewise.
5014 * linux-x86-low.c: Likewise.
5015 * notif.c: Include server.h.
5016
314c6a35
TT
50172014-07-24 Tom Tromey <tromey@redhat.com>
5018 Gary Benson <gbenson@redhat.com>
5019
5020 * server.h (CORE_ADDR): Now unsigned.
5021
69ff6be5
PA
50222014-07-16 Pedro Alves <palves@redhat.com>
5023
5024 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5025
ce9e3fe7
PA
50262014-07-15 Pedro Alves <palves@redhat.com>
5027
5028 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5029 copy.
5030
e76126e8
PA
50312014-07-11 Pedro Alves <palves@redhat.com>
5032
5033 * linux-low.c (kill_wait_lwp): New function, based on
5034 kill_one_lwp_callback, but use my_waitpid directly.
5035 (kill_one_lwp_callback, linux_kill): Use it.
5036
8e9db26e
PA
50372014-06-23 Pedro Alves <palves@redhat.com>
5038
5039 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5040 before setting DR0..DR3.
5041
698b3e08
GB
50422014-06-20 Gary Benson <gbenson@redhat.com>
5043
5044 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5045 * configure: Regenerated.
5046 * config.in: Likewise.
5047
125f8a3d
GB
50482014-06-20 Gary Benson <gbenson@redhat.com>
5049
5050 * Makefile.in (SFILES): Update locations for files moved
5051 from common to nat.
5052 (object file files): Reordered.
5053
42995dbd
GB
50542014-06-20 Gary Benson <gbenson@redhat.com>
5055
5056 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5057 (i386_dr_low_set_addr): Likewise.
5058 (i386_dr_low_get_addr): Likewise.
5059 (i386_dr_low_can_set_control): Likewise.
5060 (i386_dr_low_set_control): Likewise.
5061 (i386_dr_low_get_control): Likewise.
5062 (i386_dr_low_get_status): Likewise.
5063 (i386_get_debug_register_length): Likewise.
5064 * linux-x86-low.c (i386_dr_low_set_addr):
5065 Changed signature. Made static.
5066 (i386_dr_low_get_addr): Likewise.
5067 (i386_dr_low_set_control): Likewise.
5068 (i386_dr_low_get_control): Likewise.
5069 (i386_dr_low_get_status): Likewise.
5070 (i386_dr_low): New global variable.
5071 * win32-i386-low.c (i386_dr_low_set_addr):
5072 Changed signature. Made static.
5073 (i386_dr_low_get_addr): Likewise.
5074 (i386_dr_low_set_control): Likewise.
5075 (i386_dr_low_get_control): Likewise.
5076 (i386_dr_low_get_status): Likewise.
5077 (i386_dr_low): New global variable.
5078
e1d2394b
MS
50792014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5080
5081 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5082 * Makefile.in (AR, AR_FLAGS): Define.
5083 * configure: Regenerate.
5084
3a8ee006
GB
50852014-06-19 Gary Benson <gbenson@redhat.com>
5086
5087 * Makefile.in (i386-dregs.o): New rule.
5088 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5089 * i386-low.c (target.h): Remove include.
5090 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5091 (DR_CONTROL_SHIFT): Likewise.
5092 (DR_CONTROL_SIZE): Likewise.
5093 (DR_RW_EXECUTE): Likewise.
5094 (DR_RW_WRITE): Likewise.
5095 (DR_RW_READ): Likewise.
5096 (DR_RW_IORW): Likewise.
5097 (DR_LEN_1): Likewise.
5098 (DR_LEN_2): Likewise.
5099 (DR_LEN_4): Likewise.
5100 (DR_LEN_8): Likewise.
5101 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5102 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5103 (DR_ENABLE_SIZE): Likewise.
5104 (DR_LOCAL_SLOWDOWN): Likewise.
5105 (DR_GLOBAL_SLOWDOWN): Likewise.
5106 (DR_CONTROL_RESERVED): Likewise.
5107 (I386_DR_CONTROL_MASK): Likewise.
5108 (I386_DR_VACANT): Likewise.
5109 (I386_DR_LOCAL_ENABLE): Likewise.
5110 (I386_DR_GLOBAL_ENABLE): Likewise.
5111 (I386_DR_DISABLE): Likewise.
5112 (I386_DR_SET_RW_LEN): Likewise.
5113 (I386_DR_GET_RW_LEN): Likewise.
5114 (I386_DR_WATCH_HIT): Likewise.
5115 (i386_wp_op_t): Likewise.
5116 (i386_show_dr): Likewise.
5117 (i386_length_and_rw_bits): Likewise.
5118 (i386_insert_aligned_watchpoint): Likewise.
5119 (i386_remove_aligned_watchpoint): Likewise.
5120 (i386_handle_nonaligned_watchpoint): Likewise.
5121 i386_update_inferior_debug_regs(): Likewise.
5122 (i386_dr_insert_watchpoint): Likewise.
5123 (i386_dr_remove_watchpoint): Likewise.
5124 (i386_dr_region_ok_for_watchpoint): Likewise.
5125 (i386_dr_stopped_data_address): Likewise.
5126 (i386_dr_stopped_by_watchpoint): Likewise.
5127
8f26655c
GB
51282014-06-19 Gary Benson <gbenson@redhat.com>
5129
5130 * i386-low.c (i386_dr_show): Renamed to
5131 i386_show_dr and made static. All uses updated.
5132 (i386_dr_length_and_rw_bits): Renamed to
5133 i386_length_and_rw_bits and made static.
5134 All uses updated.
5135 (i386_dr_insert_aligned_watchpoint): Renamed to
5136 i386_insert_aligned_watchpoint and made static.
5137 All uses updated.
5138 (i386_dr_remove_aligned_watchpoint): Renamed to
5139 i386_remove_aligned_watchpoint and made static.
5140 All uses updated.
5141 (i386_dr_update_inferior_debug_regs): Renamed to
5142 i386_update_inferior_debug_regs and made static.
5143 All uses updated.
5144
b9228891
GB
51452014-06-18 Gary Benson <gbenson@redhat.com>
5146
5171def3
GB
5147 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5148 (i386_dr_low_can_set_control): Likewise.
5149 (i386_get_debug_register_length): Likewise.
5150 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5151 (i386_dr_low_can_set_control): Likewise.
5152 (i386_get_debug_register_length): Likewise.
5153
51542014-06-17 Gary Benson <gbenson@redhat.com>
5155
b9228891
GB
5156 * i386-low.h (i386-dregs.h): New include.
5157 (DR_FIRSTADDR): Now in i386-dregs.h.
5158 (DR_LASTADDR): Likewise.
5159 (DR_NADDR): Likewise.
5160 (DR_STATUS): Likewise.
5161 (DR_CONTROL): Likewise.
5162 (i386_debug_reg_state): Likewise.
5163 (i386_dr_insert_watchpoint): Likewise.
5164 (i386_dr_remove_watchpoint): Likewise.
5165 (i386_dr_region_ok_for_watchpoint): Likewise.
5166 (i386_dr_stopped_data_address): Likewise.
5167 (i386_dr_stopped_by_watchpoint): Likewise.
5168 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5169
4be83cc2
GB
51702014-06-18 Gary Benson <gbenson@redhat.com>
5171
5172 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5173 i386_dr_insert_watchpoint.
5174 (i386_low_remove_watchpoint): Renamed to
5175 i386_dr_remove_watchpoint.
5176 (i386_low_region_ok_for_watchpoint): Renamed to
5177 i386_dr_region_ok_for_watchpoint.
5178 (i386_low_stopped_data_address): Renamed to
5179 i386_dr_stopped_data_address.
5180 (i386_low_stopped_by_watchpoint): Renamed to
5181 i386_dr_stopped_by_watchpoint.
5182 * i386-low.c (i386_show_dr): Renamed to
5183 i386_dr_show and made nonstatic. All uses updated.
5184 (i386_length_and_rw_bits): Renamed to
5185 i386_dr_length_and_rw_bits and made nonstatic.
5186 All uses updated.
5187 (i386_insert_aligned_watchpoint): Renamed to
5188 i386_dr_insert_aligned_watchpoint and made nonstatic.
5189 All uses updated.
5190 (i386_remove_aligned_watchpoint): Renamed to
5191 i386_dr_remove_aligned_watchpoint and made nonstatic.
5192 All uses updated.
5193 (i386_update_inferior_debug_regs): Renamed to
5194 i386_dr_update_inferior_debug_regs and made nonstatic.
5195 All uses updated.
5196 (i386_low_insert_watchpoint): Renamed to
5197 i386_dr_insert_watchpoint. All uses updated.
5198 (i386_low_remove_watchpoint): Renamed to
5199 i386_dr_remove_watchpoint. All uses updated.
5200 (i386_low_region_ok_for_watchpoint): Renamed to
5201 i386_dr_region_ok_for_watchpoint. All uses updated.
5202 (i386_low_stopped_data_address): Renamed to
5203 i386_dr_stopped_data_address. All uses updated.
5204 (i386_low_stopped_by_watchpoint): Renamed to
5205 i386_dr_stopped_by_watchpoint. All uses updated.
5206
131aa0d4
GB
52072014-06-18 Gary Benson <gbenson@redhat.com>
5208
5209 * i386-low.c (i386_dr_low_can_set_addr): New macro.
5210 (i386_dr_low_can_set_control): Likewise.
5211 (i386_insert_aligned_watchpoint): New check.
5212
d9305f7f
GB
52132014-06-18 Gary Benson <gbenson@redhat.com>
5214
5215 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5216 Renamed to state.
5217
e927c9fc
GB
52182014-06-18 Gary Benson <gbenson@redhat.com>
5219
5220 * i386-low.c (i386_length_and_rw_bits): Use internal_error
5221 instead of fatal and error.
5222 (i386_handle_nonaligned_watchpoint): Likewise.
5223
1b6d4134
GB
52242014-06-18 Gary Benson <gbenson@redhat.com>
5225
5226 * i386-low.c (i386_get_debug_register_length): New macro.
5227 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
5228 (i386_show_dr): Use debug_printf instead of fprintf. Use
5229 phex to format values.
5230
6e62758f
GB
52312014-06-18 Gary Benson <gbenson@redhat.com>
5232
5233 * i386-low.h: Comment changes.
5234 * i386-low.c: Likewise.
5235
fc6e2f03
GB
52362014-06-18 Gary Benson <gbenson@redhat.com>
5237
5238 * i386-low.c: Whitespace changes.
5239
f9d1eeed
TT
52402014-06-12 Tom Tromey <tromey@redhat.com>
5241
5242 * utils.c (freeargv): Remove.
5243
0b04e523
TT
52442014-06-12 Tom Tromey <tromey@redhat.com>
5245
5246 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5247 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5248 (parse_debug_format_options): Likewise.
5249 (gdbserver_usage): Likewise.
5250 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5251 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5252 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5253 against libiberty.
5254 ($(LIBGNU)): Depend on libiberty.
5255 (all-lib): Recurse into all subdirs.
5256 (install-only): Invoke "install" target in subdirs.
5257 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5258 targets.
5259 * configure: Rebuild.
5260 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
5261 for vasprintf, vsnprintf, or gettimeofday.
5262 * configure.srv: Don't add safe-ctype.o or lbasename.o to
5263 srv_tgtobj.
5264
270c9937
JB
52652014-06-05 Joel Brobecker <brobecker@adacore.com>
5266
5267 * development.sh: Delete.
5268 * Makefile.in (config.status): Adjust dependency on development.sh.
5269 * configure.ac: Adjust development.sh source call.
5270 * configure: Regenerate.
5271
0a261ed8
PA
52722014-06-02 Pedro Alves <palves@redhat.com>
5273
5274 * ax.c (gdb_free_agent_expr): New function.
5275 * ax.h (gdb_free_agent_expr): New declaration.
5276 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5277 list.
5278 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5279 static.
5280 (clear_breakpoint_conditions_and_commands): New function.
5281 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5282 (clear_breakpoint_conditions_and_commands): New declaration.
5283
e9dae05e
RR
52842014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5285
5286 * linux-aarch64-low.c (asm/ptrace.h): Include.
5287
5876f503
JK
52882014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5289
5290 Fix TLS access for -static -pthread.
5291 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5292 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5293 (thread_db_load_search, try_thread_db_load_1): Initialize it.
5294
802e8e6d
PA
52952014-05-20 Pedro Alves <palves@redhat.com>
5296
5297 * linux-aarch64-low.c (aarch64_insert_point)
5298 (aarch64_remove_point): No longer check whether the type is
5299 supported here. Adjust to new interface.
5300 (the_low_target): Install aarch64_supports_z_point_type as
5301 supports_z_point_type method.
5302 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5303 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5304 instead of a Z packet char. Adjust.
5305 (arm_supports_z_point_type): New function.
5306 (arm_insert_point, arm_remove_point): Adjust to new interface.
5307 (the_low_target): Install arm_supports_z_point_type.
5308 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5309 (cris_insert_point, cris_remove_point): Adjust to new interface.
5310 Don't check whether the type is supported here.
5311 (the_low_target): Install cris_supports_z_point_type.
5312 * linux-low.c (linux_supports_z_point_type): New function.
5313 (linux_insert_point, linux_remove_point): Adjust to new interface.
5314 * linux-low.h (struct linux_target_ops) <insert_point,
5315 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
5316 raw_breakpoint pointer parameter.
5317 <supports_z_point_type>: New method.
5318 * linux-mips-low.c (mips_supports_z_point_type): New function.
5319 (mips_insert_point, mips_remove_point): Adjust to new interface.
5320 Use mips_supports_z_point_type.
5321 (the_low_target): Install mips_supports_z_point_type.
5322 * linux-ppc-low.c (the_low_target): Install NULL as
5323 supports_z_point_type method.
5324 * linux-s390-low.c (the_low_target): Install NULL as
5325 supports_z_point_type method.
5326 * linux-sparc-low.c (the_low_target): Install NULL as
5327 supports_z_point_type method.
5328 * linux-x86-low.c (x86_supports_z_point_type): New function.
5329 (x86_insert_point): Adjust to new insert_point interface. Use
5330 insert_memory_breakpoint. Adjust to new
5331 i386_low_insert_watchpoint interface.
5332 (x86_remove_point): Adjust to remove_point interface. Use
5333 remove_memory_breakpoint. Adjust to new
5334 i386_low_remove_watchpoint interface.
5335 (the_low_target): Install x86_supports_z_point_type.
5336 * lynx-low.c (lynx_target_ops): Install NULL as
5337 supports_z_point_type callback.
5338 * nto-low.c (nto_supports_z_point_type): New.
5339 (nto_insert_point, nto_remove_point): Adjust to new interface.
5340 (nto_target_ops): Install nto_supports_z_point_type.
5341 * mem-break.c: Adjust intro comment.
5342 (struct raw_breakpoint) <raw_type, size>: New fields.
5343 <inserted>: Update comment.
5344 <shlib_disabled>: Delete field.
5345 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5346 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5347 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5348 (raw_bkpt_type_to_target_hw_bp_type): New function.
5349 (find_enabled_raw_code_breakpoint_at): New function.
5350 (find_raw_breakpoint_at): New type and size parameters. Use them.
5351 (insert_memory_breakpoint): New function, based off
5352 set_raw_breakpoint_at.
5353 (remove_memory_breakpoint): New function.
5354 (set_raw_breakpoint_at): Reimplement.
5355 (set_breakpoint): New, based on set_breakpoint_at.
5356 (set_breakpoint_at): Reimplement.
5357 (delete_raw_breakpoint): Go through the_target->remove_point
5358 instead of assuming memory breakpoints.
5359 (find_gdb_breakpoint_at): Delete.
5360 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5361 (find_gdb_breakpoint): New function.
5362 (set_gdb_breakpoint_at): Delete.
5363 (z_type_supported): New function.
5364 (set_gdb_breakpoint_1): New function, loosely based off
5365 set_gdb_breakpoint_at.
5366 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5367 (delete_gdb_breakpoint_at): Delete.
5368 (delete_gdb_breakpoint_1): New function, loosely based off
5369 delete_gdb_breakpoint_at.
5370 (delete_gdb_breakpoint): New function.
5371 (clear_gdb_breakpoint_conditions): Rename to ...
5372 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5373 breakpoint.
5374 (add_condition_to_breakpoint): Make static.
5375 (add_breakpoint_condition): Take a struct breakpoint pointer
5376 instead of an address. Adjust.
5377 (gdb_condition_true_at_breakpoint): Rename to ...
5378 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5379 z_type parameter.
5380 (gdb_condition_true_at_breakpoint): Reimplement.
5381 (add_breakpoint_commands): Take a struct breakpoint pointer
5382 instead of an address. Adjust.
5383 (gdb_no_commands_at_breakpoint): Rename to ...
5384 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5385 parameter. Return true if no breakpoint was found. Change debug
5386 output.
5387 (gdb_no_commands_at_breakpoint): Reimplement.
5388 (run_breakpoint_commands): Rename to ...
5389 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5390 and change return type to boolean.
5391 (run_breakpoint_commands): New function.
5392 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5393 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5394 breakpoint. Go through the_target->remove_point instead of
5395 assuming memory breakpoint.
5396 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5397 software and hardware breakpoints.
5398 (reinsert_raw_breakpoint): Go through the_target->insert_point
5399 instead of assuming memory breakpoint.
5400 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5401 software and hardware breakpoints.
5402 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5403 Check both software and hardware breakpoints.
5404 (validate_inserted_breakpoint): Assert the breakpoint is a
5405 software breakpoint. Set the inserted flag to -1 instead of
5406 setting shlib_disabled.
5407 (delete_disabled_breakpoints): Adjust.
5408 (validate_breakpoints): Only validate software breakpoints.
5409 Adjust to inserted flag change.
5410 (check_mem_read, check_mem_write): Skip breakpoint types other
5411 than software breakpoints. Adjust to inserted flag change.
5412 * mem-break.h (enum raw_bkpt_type): New enum.
5413 (raw_breakpoint, struct process_info): Forward declare.
5414 (Z_packet_to_target_hw_bp_type): Delete declaration.
5415 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5416 (set_gdb_breakpoint, delete_gdb_breakpoint)
5417 (clear_breakpoint_conditions): New declarations.
5418 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5419 (breakpoint_inserted_here): Update comment.
5420 (add_breakpoint_condition, add_breakpoint_commands): Replace
5421 address parameter with a breakpoint pointer parameter.
5422 (gdb_breakpoint_here): Update comment.
5423 (delete_gdb_breakpoint_at): Delete.
5424 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5425 * server.c (process_point_options): Take a struct breakpoint
5426 pointer instead of an address. Adjust.
5427 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5428 delete_gdb_breakpoint.
5429 * spu-low.c (spu_target_ops): Install NULL as
5430 supports_z_point_type method.
5431 * target.h: Include mem-break.h.
5432 (struct target_ops) <prepare_to_access_memory>: Update comment.
5433 <supports_z_point_type>: New field.
5434 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5435 instead of a char. Also take a raw breakpoint pointer.
5436 * win32-arm-low.c (the_low_target): Install NULL as
5437 supports_z_point_type.
5438 * win32-i386-low.c (i386_supports_z_point_type): New function.
5439 (i386_insert_point, i386_remove_point): Adjust to new interface.
5440 (the_low_target): Install i386_supports_z_point_type.
5441 * win32-low.c (win32_supports_z_point_type): New function.
5442 (win32_insert_point, win32_remove_point): Adjust to new interface.
5443 (win32_target_ops): Install win32_supports_z_point_type.
5444 * win32-low.h (struct win32_target_ops):
5445 <supports_z_point_type>: New method.
5446 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5447 instead of a char. Also take a raw breakpoint pointer.
5448
932539e3
PA
54492014-05-20 Pedro Alves <palves@redhat.com>
5450
5451 * mem-break.h: Include break-common.h.
5452 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5453 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5454 (Z_packet_to_target_hw_bp_type): New declaration.
5455 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5456 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5457 (Z_PACKET_ACCESS_WP): Delete macros.
5458 (Z_packet_to_hw_type): Delete function.
5459 * i386-low.h: Don't include break-common.h here.
5460 (Z_packet_to_hw_type): Delete declaration.
5461 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5462 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5463 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5464 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5465 * linux-aarch64-low.c: Don't include break-common.h here.
5466 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5467 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5468 (Z_packet_to_target_hw_bp_type): Delete function.
5469 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5470 function.
5471 (mips_insert_point, mips_remove_point): Use
5472 Z_packet_to_target_hw_bp_type.
5473
4ff0d3d8
PA
54742014-05-20 Pedro Alves <palves@redhat.com>
5475
5476 * linux-aarch64-low.c: Include break-common.h.
5477 (enum target_point_type): Delete.
5478 (Z_packet_to_point_type): Rename to ...
5479 (Z_packet_to_target_hw_bp_type): ... this, and return a
5480 target_hw_bp_type instead.
5481 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5482 instead of an enum target_point_type.
5483 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5484 breakpoint type.
5485 (aarch64_dr_state_insert_one_point)
5486 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5487 (aarch64_handle_aligned_watchpoint)
5488 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5489 Take an enum target_hw_bp_type instead of an enum
5490 target_point_type.
5491 (aarch64_supports_z_point_type): New function.
5492 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5493 use Z_packet_to_target_hw_bp_type.
5494
786dc519
JB
54952014-05-20 Joel Brobecker <brobecker@adacore.com>
5496
5497 * configure.ac: Only use -Werror by default when DEVELOPMENT
5498 is true.
5499 * configure: Regenerate.
5500
9e0aa64f
JK
55012014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5502
5503 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5504 * linux-x86-low.c (X86_64_USER_REGS): New.
5505 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5506
2b577b92
YQ
55072014-04-28 Yao Qi <yao@codesourcery.com>
5508
5509 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5510 name.
5511
94611da2
PA
55122014-04-25 Pedro Alves <palves@redhat.com>
5513
5514 PR server/16255
5515 * linux-low.c (linux_attach_fail_reason_string): New function.
5516 (linux_attach_lwp): Delete.
5517 (linux_attach_lwp_1): Rename to ...
5518 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5519 argument. Remove "initial" parameter. Return int instead of
5520 void. Don't error or warn here.
5521 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5522 failure to attach to the tgid. Call warning when failing to
5523 attach to an lwp.
5524 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5525 argument. Remove "initial" parameter. Return int instead of
5526 void. Don't error or warn here.
5527 (linux_attach_fail_reason_string): New declaration.
5528 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5529 interface change. Use linux_attach_fail_reason_string.
5530
01f9f808
MS
55312014-04-24 Michael Sturm <michael.sturm@mintel.com>
5532 Walfred Tedeschi <walfred.tedeschi@intel.com>
5533
5534 * Makefile.in: Added rules to handle new files
5535 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5536 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5537 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5538 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5539 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5540 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5541 x32-avx512-linux.o.
5542 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5543 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5544 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5545 i386/x32-avx512.xml.
5546 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5547 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5548 i386/x32-avx512-linux.xml.
5549 * i387-fp.c (num_avx512_k_registers): New constant for number
5550 of K registers.
5551 (num_avx512_zmmh_low_registers): New constant for number of
5552 lower ZMM registers (0-15).
5553 (num_avx512_zmmh_high_registers): New constant for number of
5554 higher ZMM registers (16-31).
5555 (num_avx512_ymmh_registers): New contant for number of higher
5556 YMM registers (ymm16-31 added by avx521 on x86_64).
5557 (num_avx512_xmm_registers): New constant for number of higher
5558 XMM registers (xmm16-31 added by AVX512 on x86_64).
5559 (struct i387_xsave): Add space for AVX512 registers.
5560 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5561 Add code to handle AVX512 registers.
5562 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5563 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5564 prototypei from generated file.
5565 (tdesc_amd64_avx512_linux): Likewise.
5566 (init_registers_x32_avx512_linux): Likewise.
5567 (tdesc_x32_avx512_linux): Likewise.
5568 (init_registers_i386_avx512_linux): Likewise.
5569 (tdesc_i386_avx512_linux): Likewise.
5570 (x86_64_regmap): Add AVX512 registers.
5571 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5572 mask.
5573 (initialize_low_arch): Add code to initialize AVX512 registers.
5574
51aa91f9
PA
55752014-04-23 Pedro Alves <palves@redhat.com>
5576
5577 * mem-break.c (find_gdb_breakpoint_at): Make static.
5578 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5579
a4165e94
PA
55802014-04-23 Pedro Alves <palves@redhat.com>
5581
5582 * i386-low.c: Don't include break-common.h here.
5583 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5584 prototype to take target_hw_bp_type as argument instead of a Z
5585 packet char.
5586 * i386-low.h: Include break-common.h here.
5587 (Z_packet_to_hw_type): Declare.
5588 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5589 prototypes.
5590 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5591 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5592 (x86_remove_point): Convert the packet number to a
5593 target_hw_bp_type before calling i386_low_remove_watchpoint.
5594 * win32-i386-low.c (i386_insert_point): Convert the packet number
5595 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5596 (i386_remove_point): Convert the packet number to a
5597 target_hw_bp_type before calling i386_low_remove_watchpoint.
5598
b8acf843
PA
55992014-04-23 Pedro Alves <palves@redhat.com>
5600
5601 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5602
d708bcd1
PA
56032014-04-10 Pedro Alves <palves@redhat.com>
5604
5605 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5606 Check if the condition or command is NULL before checking if the
5607 breakpoint is known. On success, return true.
5608 * mem-break.h (add_breakpoint_condition): Document return.
5609 (add_breakpoint_commands): Add describing comment.
5610 * server.c (skip_to_semicolon): New function.
5611 (process_point_options): Use it.
5612
2eec7d5b
PA
56132014-04-09 Pedro Alves <palves@redhat.com>
5614
5615 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5616 to lwpid_of.
5617
fa96cb38
PA
56182014-02-27 Pedro Alves <palves@redhat.com>
5619
5620 PR 12702
5621 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5622 macros.
5623 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5624 output.
5625 (last_thread_of_process_p): Take a PID argument instead of a
5626 thread pointer.
5627 (linux_wait_for_lwp): Delete.
5628 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5629 functions.
5630 (linux_low_filter_event): New function, party factored out from
5631 linux_wait_for_event.
5632 (linux_wait_for_event): Rename to ...
5633 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5634 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5635 sigsuspend. Check for zombie leaders.
5636 (linux_wait_for_event): Reimplement as wrapper around
5637 linux_wait_for_event_filtered.
5638 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5639 a normal or signal exit is seen, it's the whole process exiting.
5640 (wait_for_sigstop): No longer a for_each_inferior callback.
5641 Rewrite on top of linux_wait_for_event_filtered.
5642 (stop_all_lwps): Call wait_for_sigstop directly.
5643 * server.c (resume, handle_target_event): Handle
5644 TARGET_WAITKIND_NO_RESUMED.
5645
d763de10
JB
56462014-02-26 Joel Brobecker <brobecker@adacore.com>
5647
5648 * win32-low.c (psapi_get_dll_name,
5649 * win32_CreateToolhelp32Snapshot): Delete.
5650 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5651 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5652 Delete.
5653 (handle_load_dll): Add function description.
5654 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5655
850a0f76
JB
56562014-02-26 Joel Brobecker <brobecker@adacore.com>
5657
5658 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5659 Add comment.
5660 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5661 base address when calling win32_add_one_solib.
5662 (handle_load_dll): Delete local variable load_addr.
5663 Remove 0x1000 offset applied to DLL base address when calling
5664 win32_add_one_solib.
5665 (handle_unload_dll): Add comment.
5666
f25b3fc3
JB
56672014-02-26 Joel Brobecker <brobecker@adacore.com>
5668
5669 * win32-low.c (win32_add_all_dlls): Renames
5670 win32_ensure_ntdll_loaded. Rewrite function documentation.
5671 Adjust implementation to always load all DLLs.
5672 Add 0x1000 offset to DLL base address when calling
5673 win32_add_one_solib.
5674 (child_initialization_done): New static global.
5675 (do_initial_child_stuff): Set child_initialization_done to
5676 zero during child initialization, and 1 after. Replace call
5677 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5678 Add comment.
5679 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5680 (handle_unload_dll): Add function documentation.
5681 (get_child_debug_event): Ignore load and unload DLL events
5682 during child initialization.
5683
d86d4aaf
DE
56842014-02-20 Doug Evans <dje@google.com>
5685
3bc32da3 5686 Remove global all_lwps.
d86d4aaf
DE
5687 * inferiors.h (ptid_of): Move here from linux-low.h.
5688 (pid_of, lwpid_of): Ditto.
5689 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5690 parameter is a struct thread_info * now.
5691 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5692 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5693 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5694 directly.
5695 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5696 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5697 * linux-arm-low.c (update_registers_callback): Update, "entry"
5698 parameter is a struct thread_info * now.
5699 Fetch lwpid from current_inferior directly.
5700 (arm_insert_point): Pass &all_threads to find_inferior instead of
5701 &all_lwps.
5702 (arm_remove_point): Ditto.
5703 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5704 (arm_prepare_to_resume): Fetch pid from thread.
5705 (arm_read_description): Fetch lwpid from current_inferior directly.
5706 * linux-low.c (all_lwps): Delete.
5707 (delete_lwp): Delete call to remove_inferior.
5708 (handle_extended_wait): Fetch lwpid from thread.
5709 (add_lwp): Don't set lwp->entry.id. Remove call to
5710 add_inferior_to_list.
5711 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5712 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5713 (kill_one_lwp_callback): Ditto.
5714 (linux_kill): Don't dereference NULL pointer.
5715 Fetch ptid,lwpid from thread.
5716 (get_detach_signal): Fetch ptid from thread.
5717 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5718 Simplify call to regcache_invalidate_thread.
5719 (delete_lwp_callback): Update, "entry" parameter is a
5720 struct thread_info * now. Fetch pid from thread.
5721 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5722 (status_pending_p_callback): Update, "entry" parameter is a
5723 struct thread_info * now. Fetch ptid from thread.
5724 (find_lwp_pid): Update, "entry" parameter is a
5725 struct thread_info * now.
5726 (linux_wait_for_lwp): Fetch pid from thread.
5727 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5728 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5729 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5730 (dequeue_one_deferred_signal): Ditto.
5731 (cancel_breakpoint): Fetch ptid from current_inferior.
5732 (linux_wait_for_event): Pass &all_threads to find_inferior,
5733 not &all_lwps. Fetch ptid, lwpid from thread.
5734 (count_events_callback): Update, "entry" parameter is a
5735 struct thread_info * now.
5736 (select_singlestep_lwp_callback): Ditto.
5737 (select_event_lwp_callback): Ditto.
5738 (cancel_breakpoints_callback): Ditto.
5739 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5740 not &all_lwps.
5741 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5742 (unsuspend_one_lwp): Update, "entry" parameter is a
5743 struct thread_info * now.
5744 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5745 not &all_lwps.
5746 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5747 Fetch lwpid from thread, not lwp.
5748 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5749 Pass &all_threads to find_inferior, not &all_lwps.
5750 (send_sigstop): Fetch lwpid from thread, not lwp.
5751 (send_sigstop_callback): Update, "entry" parameter is a
5752 struct thread_info * now.
5753 (suspend_and_send_sigstop_callback): Ditto.
5754 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5755 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5756 struct thread_info * now.
5757 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5758 from thread, lwp.
5759 (lwp_running): Update, "entry" parameter is a
5760 struct thread_info * now.
5761 (stop_all_lwps): Fetch ptid from thread.
5762 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5763 (linux_resume_one_lwp): Fetch lwpid from thread.
5764 (linux_set_resume_request): Update, "entry" parameter is a
5765 struct thread_info * now. Fetch pid, lwpid from thread.
5766 (resume_status_pending_p): Update, "entry" parameter is a
5767 struct thread_info * now.
5768 (need_step_over_p): Ditto. Fetch lwpid from thread.
5769 (start_step_over): Fetch lwpid from thread.
5770 (linux_resume_one_thread): Update, "entry" parameter is a
5771 struct thread_info * now. Fetch lwpid from thread.
5772 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5773 (proceed_one_lwp): Update, "entry" parameter is a
5774 struct thread_info * now. Fetch lwpid from thread.
5775 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5776 struct thread_info * now.
5777 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5778 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5779 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5780 directly.
5781 (regsets_store_inferior_registers): Ditto.
5782 (fetch_register, store_register): Ditto.
5783 (linux_read_memory, linux_write_memory): Ditto.
5784 (linux_request_interrupt): Ditto.
5785 (linux_read_auxv): Ditto.
5786 (linux_xfer_siginfo): Ditto.
5787 (linux_qxfer_spu): Ditto.
5788 (linux_qxfer_libraries_svr4): Ditto.
5789 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5790 moved to inferiors.h.
5791 (get_lwp): Delete.
5792 (get_thread_lwp): Update.
5793 (struct lwp_info): Delete member "entry". Simplify comment for
5794 member "thread".
5795 (all_lwps): Delete.
5796 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5797 current_inferior directly.
5798 (update_watch_registers_callback): Update, "entry" parameter is a
5799 struct thread_info * now. Fetch pid from thread.
5800 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5801 (mips_insert_point): Fetch lwpid from current_inferior.
5802 Pass &all_threads to find_inferior, not &all_lwps.
5803 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5804 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5805 directly.
5806 (mips_stopped_data_address): Ditto.
5807 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5808 directly.
5809 * linux-tile-low.c (tile_arch_setup): Ditto.
5810 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5811 (update_debug_registers_callback): Update, "entry" parameter is a
5812 struct thread_info * now. Fetch pid from thread.
5813 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5814 Pass &all_threads to find_inferior, not &all_lwps.
5815 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5816 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5817 Pass &all_threads to find_inferior, not &all_lwps.
5818 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5819 (i386_dr_low_get_status): Ditto.
5820 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5821 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5822 (x86_linux_read_description): Ditto.
5823 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5824
3b8361aa
DE
58252014-02-20 Doug Evans <dje@google.com>
5826
5827 * inferiors.c (get_first_inferior): Fix buglet.
5828
f7667f0d
DE
58292014-02-19 Doug Evans <dje@google.com>
5830
5831 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5832 * inferiors.c (add_thread): Change result type to struct thread_info *.
5833 All callers updated.
5834 (add_lwp): Call add_thread here instead of in callers.
5835 All callers updated.
5836 * linux-low.h (get_lwp_thread): Rewrite.
5837 (struct lwp_info): New member "thread".
5838
b3312d80
DE
58392014-02-19 Doug Evans <dje@google.com>
5840
5841 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5842 All callers updated.
5843
ecc6f45c
DE
58442014-02-19 Doug Evans <dje@google.com>
5845
5846 * inferiors.c (add_thread): Fix whitespace.
5847
649ebbca
DE
58482014-02-19 Doug Evans <dje@google.com>
5849
5850 * dll.c (clear_dlls): Replace accessing list implemention details
5851 with API function.
5852 * gdbthread.h (get_first_thread): Declare.
5853 * inferiors.c (for_each_inferior_with_data): New function.
5854 (get_first_thread): New function.
5855 (find_thread_ptid): Simplify.
5856 (get_first_inferior): New function.
5857 (clear_list): Delete.
5858 (one_inferior_p): New function.
5859 (clear_inferior_list): New function.
5860 (clear_inferiors): Update.
5861 * inferiors.h (for_each_inferior_with_data): Declare.
5862 (clear_inferior_list): Declare.
5863 (one_inferior_p): Declare.
5864 (get_first_inferior): Declare.
5865 * linux-low.c (linux_wait_for_event): Replace accessing list
5866 implemention details with API function.
5867 * server.c (target_running): Ditto.
5868 (accumulate_file_name_length): New function.
5869 (emit_dll_description): New function.
5870 (handle_qxfer_libraries): Replace accessing list implemention
5871 details with API function.
5872 (handle_qxfer_threads_worker): New function.
5873 (handle_qxfer_threads_proper): Replace accessing list implemention
5874 details with API function.
5875 (handle_query): Ditto.
5876 (visit_actioned_threads_callback_ftype): New typedef.
5877 (visit_actioned_threads_data): New struct.
5878 (visit_actioned_threads): Rewrite to be find_inferior callback.
5879 (resume): Call find_inferior.
5880 (handle_status): Replace accessing list implemention
5881 details with API function.
5882 (process_serial_event): Replace accessing list implemention details
5883 with API function.
5884 * target.c (set_desired_inferior): Replace accessing list implemention
5885 details with API function.
5886 * tracepoint.c (same_process_p): New function.
5887 (gdb_agent_about_to_close): Replace accessing list implemention
5888 details with API function.
5889 * win32-low.c (child_delete_thread): Replace accessing list
5890 implemention details with API function.
5891 (match_dll_by_basename): New function.
5892 (dll_is_loaded_by_basename): New function.
5893 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5894 details call to dll_is_loaded_by_basename.
5895
80894984
DE
58962014-02-19 Doug Evans <dje@google.com>
5897
5898 * dll.h (struct dll_info): Add comment.
5899 * gdbthread.h (struct thread_info): Add comment.
5900 (current_ptid): Simplify.
5901 * inferiors.c (add_process): Update.
5902 (remove_process): Update.
5903 * inferiors.h (struct process_info): Rename member "head" to "entry".
5904 * linux-low.c (delete_lwp): Update.
5905 (add_lwp): Update.
5906 (last_thread_of_process_p): Update.
5907 (kill_one_lwp_callback, linux_kill): Update.
5908 (status_pending_p_callback): Update.
5909 (wait_for_sigstop): Update. Simplify read of ptid.
5910 (start_step_over): Update.
5911 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5912 (get_lwp_thread): Update.
5913 (struct lwp_info): Rename member "head" to "entry".
5914 * regcache.h (inferior_list_entry): Delete.
5915 * server.c (kill_inferior_callback): Update.
5916 (detach_or_kill_inferior_callback): Update.
5917 (print_started_pid): Update.
5918 (print_attached_pid): Update.
5919 (process_serial_event): Simplify read of ptid.
5920 * thread-db.c (thread_db_create_event): Update.
5921 (thread_db_get_tls_address): Update.
5922 * win32-low.c (current_inferior_ptid): Simplify.
5923
46917d26
TT
59242014-02-19 Tom Tromey <tromey@redhat.com>
5925
5926 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5927 argument.
5928 (target_supports_btrace): Update.
5929
0759a81e
YQ
59302014-02-14 Yao Qi <yao@codesourcery.com>
5931
5932 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5933 (rsp-low-ipa.o): New target.
5934
a7191e8b
TT
59352014-02-12 Tom Tromey <tromey@redhat.com>
5936
5937 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5938 convert_ascii_to_int.
5939 * regcache.c (registers_to_string): Likewise.
5940 * remote-utils.c (decode_M_packet): Likewise.
5941 * server.c (process_serial_event): Likewise.
5942
ff0e980e
TT
59432014-02-12 Tom Tromey <tromey@redhat.com>
5944
5945 * server.c (handle_query, handle_v_run): Use hex2bin, not
5946 unhexify.
5947 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5948
e9371aff
TT
59492014-02-12 Tom Tromey <tromey@redhat.com>
5950
5951 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5952 convert_int_to_ascii.
5953 * regcache.c (registers_to_string, collect_register_as_string):
5954 Likewise.
5955 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5956 Likewise.
5957 * server.c (process_serial_event): Likewise.
5958 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5959 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5960
971dc0b8
TT
59612014-02-12 Tom Tromey <tromey@redhat.com>
5962
5963 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5964 bin2hex, not hexify.
5965 * tracepoint.c (cmd_qtstatus): Likewise.
5966
0a822afb
TT
59672014-02-12 Tom Tromey <tromey@redhat.com>
5968
5969 * remote-utils.c (monitor_output): Pass explicit length to
5970 hexify.
5971
9c3d6531
TT
59722014-02-12 Tom Tromey <tromey@redhat.com>
5973
5974 * tracepoint.c: Include rsp-low.h.
5975 * server.c: Include rsp-low.h.
5976 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5977 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5978 declare.
5979 * remote-utils.c: Include rsp-low.h.
5980 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5981 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5982 (convert_int_to_ascii, convert_ascii_to_int): Move to
5983 common/rsp-low.c.
5984 * regcache.c: Include rsp-low.h.
5985 * ax.c: Include rsp-low.h.
5986 * Makefile.in (SFILES): Add common/rsp-low.c.
5987 (OBS): Add rsp-low.o.
5988 (rsp-low.o): New target.
5989
01fd3ea5
TT
59902014-02-12 Tom Tromey <tromey@redhat.com>
5991
5992 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5993 Include print-utils.h.
5994 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5995 (plongest, thirty_two, phex_nz): Remove.
5996 * Makefile.in (SFILES): Add common/print-utils.c.
5997 (OBS): Add print-utils.o.
5998 (print-utils-ipa.o): New target.
5999 (print-utils.o): New target.
6000 (IPA_OBJS): Add print-utils-ipa.o.
6001
e99dc820
TT
60022014-02-06 Tom Tromey <tromey@redhat.com>
6003
6004 * Makefile.in (SFILES): Fix indentation.
6005
ee1e2d4f
DE
60062014-02-05 Doug Evans <dje@google.com>
6007
6008 * linux-low.c (linux_wait_for_event): Improve comment.
6009 (linux_wait_1): Keep current_inferior in sync with event_child.
6010
f5a02773
DE
60112014-01-22 Doug Evans <dje@google.com>
6012
6013 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6014
87ce2a04
DE
60152014-01-22 Doug Evans <dje@google.com>
6016
6017 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6018 * configure: Regenerate.
6019 * config.in: Regenerate.
6020 * Makefile.in (SFILES): Add debug.c.
6021 (OBS): Add debug.o.
6022 * debug.c: New file.
6023 * debug.h: New file.
6024 * linux-aarch64-low.c (*): Update all debugging printfs to use
6025 debug_printf instead of fprintf.
6026 * linux-arm-low.c (*): Ditto.
6027 * linux-cris-low.c (*): Ditto.
6028 * linux-crisv32-low.c (*): Ditto.
6029 * linux-m32r-low.c (*): Ditto.
6030 * linux-sparc-low.c (*): Ditto.
6031 * linux-x86.c (*): Ditto.
6032 * linux-low.c (*): Ditto.
6033 (linux_wait_1): Add calls to debug_enter, debug_exit.
6034 (linux_wait): Remove redundant debugging printf.
6035 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6036 (linux_resume, unstop_all_lwps): Ditto.
6037 * mem-break.c (*): Update all debugging printfs to use
6038 debug_printf instead of fprintf.
6039 * remote-utils.c (*): Ditto.
6040 * thread-db.c (*): Ditto.
6041 * server.c #include <ctype.h>, "gdb_vecs.h".
6042 (debug_threads): Moved to debug.c.
6043 (*): Update all debugging printfs to use debug_printf instead of
6044 fprintf.
6045 (start_inferior): Replace call to fflush with call to debug_flush.
6046 (monitor_show_help): Mention set debug-format.
6047 (parse_debug_format_options): New function.
6048 (handle_monitor_command): Handle "monitor set debug-format".
6049 (gdbserver_usage): Mention --debug-format.
6050 (main): Parse --debug-format.
6051 * server.h (debug_threads): Declaration moved to debug.h.
6052 #include "debug.h".
6053 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6054 trace_debug_1 that uses debug_printf.
6055 (tracepoint_look_up_symbols): Update all debugging printfs to use
6056 debug_printf instead of fprintf.
6057
e671835b
BS
60582014-01-20 Baruch Siach <baruch@tkos.co.il>
6059
6060 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6061 sys/ptrace.h.
6062
b5737fa9
PA
60632014-01-17 Pedro Alves <palves@redhat.com>
6064
ea38d2a9 6065 PR build/16445
c7faa97a
PA
6066 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6067 defined after including gdb_proc_service.h.
b5737fa9 6068
40ed484e
DE
60692014-01-16 Doug Evans <dje@google.com>
6070
6071 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6072 (match_dll): Use it.
6073
969c39fb
MM
60742014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6075
6076 * target.h (target_ops) <read_btrace>: Change parameters and
6077 return type to allow error reporting.
6078 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6079 trace reading errors on.
6080 * linux-low.c (linux_low_read_btrace): Pass trace reading
6081 errors on.
6082 (linux_low_disable_btrace): New.
6083
ab7f45ba
DE
60842014-01-15 Doug Evans <dje@google.com>
6085
6086 * inferiors.c (thread_id_to_gdb_id): Delete.
6087 * inferiors.h (thread_id_to_gdb_id): Delete.
6088
66af0f44
EZ
60892014-01-13 Eli Zaretskii <eliz@gnu.org>
6090
6091 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6092 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6093 versions.
6094
9939e131
PA
60952014-01-08 Pedro Alves <palves@redhat.com>
6096
6097 * server.c (handle_status): Don't discard previous queued stop
6098 replies or thread's pending status here.
6099 (main) <disconnection>: Do it here instead.
6100
b7ea362b
PA
61012014-01-08 Pedro Alves <palves@redhat.com>
6102
6103 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6104 * server.c (visit_actioned_threads, handle_pending_status): New
6105 function.
6106 (handle_v_cont): Factor out parts to ...
6107 (resume): ... this new function. If in all-stop, and a thread
6108 being resumed has a pending status, report it without actually
6109 resuming.
6110 (myresume): Adjust to use the new 'resume' function.
6111 (clear_pending_status_callback, set_pending_status_callback)
6112 (find_status_pending_thread_callback): New functions.
6113 (handle_status): Handle the case of multiple threads having
6114 interesting statuses to report. Report threads' real last signal
6115 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6116 with an interesting thread to report the status for, instead of
6117 always reporting the status of the first thread.
6118
28498c42
JB
61192014-01-01 Joel Brobecker <brobecker@adacore.com>
6120
6121 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6122 * gdbreplay.c (gdbreplay_version): Likewise.
6123
f45c82da
YZ
61242013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6125
6126 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6127 iov.iov_len with the real length in use.
6128
379a5e2d
JB
61292013-12-13 Joel Brobecker <brobecker@adacore.com>
6130
6131 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6132 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6133 for all targets that use win32-low.c.
6134 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6135 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6136
4210d83e
PA
61372013-12-13 Pedro Alves <palves@redhat.com>
6138
6139 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6140 if equal to TARGET_WAITKIND_LOADED.
6141 * win32-low.c (cached_status): New static global.
6142 (win32_wait): Add declaration.
6143 (do_initial_child_stuff): Flush all initial pending debug events
6144 up to the initial breakpoint.
6145 (win32_wait): If CACHED_STATUS was set, return that instead
6146 of doing a real wait. Remove the code resuming the execution
6147 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6148 during the initial phase. Also remove the code changing
6149 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6150 TARGET_WAITKIND_STOPPED.
6151
e7f0d979
YQ
61522013-12-11 Yao Qi <yao@codesourcery.com>
6153
6154 * notif.c (handle_notif_ack): Return 0 if no notification
6155 matches.
6156
ebcf782c
DE
61572013-11-20 Doug Evans <dje@google.com>
6158
6159 * linux-low.c (linux_set_resume_request): Fix comment.
6160
20ad9378
DE
61612013-11-20 Doug Evans <dje@google.com>
6162
6163 * linux-low.c (resume_status_pending_p): Tweak comment.
6164
a196ebeb
WT
61652013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6166
6167 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6168 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6169 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6170 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6171 (srv_amd64_regobj): Add amd64-mpx.o.
6172 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6173 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6174 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6175 * i387-fp.c (num_pl_bnd_register) Added constant.
6176 (num_pl_bnd_cfg_registers) Added constant.
6177 (struct i387_xsave) Added reserved area and MPX fields.
6178 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6179 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6180 function.
6181 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6182 (init_registers_amd64_mpx_linux): Declare new function.
6183 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6184 (x86_64_regmap): Add MPX registers.
6185 (x86_linux_read_description): Add MPX case.
6186 (initialize_low_arch): Initialize MPX targets.
6187
0080a2f6
TT
61882013-11-18 Tom Tromey <tromey@redhat.com>
6189
6190 * configure: Rebuild.
6191 * configure.ac: Don't check for stdlib.h.
6192 * gdbreplay.c: Unconditionally include stdlib.h.
6193
2978b111
TT
61942013-11-18 Tom Tromey <tromey@redhat.com>
6195
6196 * config.in: Rebuild.
6197 * configure: Rebuild.
6198 * configure.ac: Don't use AC_HEADER_DIRENT.
6199
a3d08894
TT
62002013-11-18 Tom Tromey <tromey@redhat.com>
6201
6202 * server.h: Don't check HAVE_STRING_H.
6203 * gdbreplay.c: Don't check HAVE_STRING_H.
6204 * configure: Rebuild.
6205
0a5dd17d
TT
62062013-11-18 Tom Tromey <tromey@redhat.com>
6207
6208 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6209 LIBGNU.
6210
1bd2f0ba
TT
62112013-11-08 Tom Tromey <tromey@redhat.com>
6212
6213 * configure, config.in: Rebuild.
6214 * configure.ac: Remove unused configury.
6215
3266f10b
TT
62162013-11-08 Tom Tromey <tromey@redhat.com>
6217
6218 * acinclude.m4: Include common.m4, codeset.m4.
6219 * configure, config.in: Rebuild.
6220 * configure.ac: Use GDB_AC_COMMON.
6221
6682d959
AA
62222013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
6223
6224 * linux-s390-low.c (HWCAP_S390_TE): New define.
6225 (s390_arch_setup): Consider the TE field in the HWCAP for
6226 determining 'have_regset_tdb'.
6227
fd0a4d76
SDJ
62282013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
6229
6230 PR gdb/16014
6231 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6232 call to sizeof.
6233
1a3d890b
PA
62342013-10-02 Pedro Alves <palves@redhat.com>
6235
6236 * server.c (process_serial_event): Don't output "GDBserver
6237 exiting" if GDB is connected through stdio.
6238 * target.c (mywait): Likewise, be silent if GDB is connected
6239 through stdio.
6240
97ad4581
JB
62412013-10-01 Joel Brobecker <brobecker@adacore.com>
6242
6243 * lynx-low.c (lynx_add_threads_after_attach): New function.
6244 (lynx_attach): Remove call to add_thread. Add call to
6245 lynx_add_threads_after_attach instead.
6246
5b4e221c
MF
62472013-09-28 Mike Frysinger <vapier@gentoo.org>
6248
6249 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6250 * config.in, configure: Regenerated.
6251
ee47b2f8
YQ
62522013-09-18 Yao Qi <yao@codesourcery.com>
6253
6254 PR server/15959
6255 * server.c (start_inferior): Clear 'resume_info'.
6256
d6707650 62572013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6258
d6707650
JW
6259 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6260 for each register.
6261
9243dd0e 62622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 6263
9243dd0e
JW
6264 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6265 linux-tile-low.o to srv_tgtobj.
6266
c623a6ef
WN
62672013-09-16 Will Newton <will.newton@linaro.org>
6268
6269 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6270 out regs.
6271
fb71d39e
PA
62722013-09-06 Pedro Alves <palves@redhat.com>
6273
6274 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6275 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6276 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6277 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6278 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6279 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6280
8e7e9910
PA
62812013-09-06 Pedro Alves <palves@redhat.com>
6282
6283 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6284 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6285
7c3a12ca
PA
62862013-09-06 Pedro Alves <palves@redhat.com>
6287
6288 * linux-amd64-ipa.c: Include tracepoint.h.
6289 * linux-i386-ipa.c: Include tracepoint.h.
6290
8eb3d7b6
RW
62912013-09-06 Ricard Wanderlof <ricardw@axis.com>
6292
6293 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6294 (ps_get_thread_area): New function.
6295
eddddb9d
RW
62962013-09-06 Ricard Wanderlof <ricardw@axis.com>
6297
6298 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6299 (initialize_low_arch): Call init_registers_crisv32 rather than
6300 init_register_crisv32.
6301
533b0600
PA
63022013-09-05 Pedro Alves <palves@redhat.com>
6303
6304 * server.h (handle_vFile, hostio_last_error_from_errno): Move
6305 to ...
6306 * hostio.h: ... this new file.
6307 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6308 win32-low.c: Include hostio.h.
6309
0ce3d3b5
PA
63102013-09-05 Pedro Alves <palves@redhat.com>
6311
6312 * server.h (gdb_client_data, handler_func, callback_handler_func)
6313 (delete_file_handler, add_file_handler, append_callback_event)
6314 (delete_callback_event, start_event_loop, initialize_event_loop):
6315 Move to event-loop.h and include it.
6316 * event-loop.h: New file.
6317
799cdc37
PA
63182013-09-05 Pedro Alves <palves@redhat.com>
6319
6320 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6321 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6322 (loaded_dll, unloaded_dll): Move to ...
6323 * dll.h: ... this new file.
6324 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6325
6a6bbd9d
PA
63262013-09-05 Pedro Alves <palves@redhat.com>
6327
6328 * server.h (current_process, get_thread_process, all_processes)
6329 (add_inferior_to_list, for_each_inferior, current_inferior)
6330 (remove_inferior, add_process, remove_process, find_process_pid)
6331 (have_started_inferiors_p, have_attached_inferiors_p)
6332 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6333 (clear_inferiors, find_inferior, find_inferior_id)
6334 (inferior_target_data, set_inferior_target_data)
6335 (inferior_regcache_data, set_inferior_regcache_data): Move to
6336 inferiors.h, and include it.
6337 * inferiors.h: New file.
6338
f699aaba
PA
63392013-09-05 Pedro Alves <palves@redhat.com>
6340
6341 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6342 Move ...
72f4393d 6343 * ax.h: ... here.
f699aaba 6344
c144c7a0
PA
63452013-09-05 Pedro Alves <palves@redhat.com>
6346
6347 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6348 tracepoint.h.
6349 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6350 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6351 (handle_tracepoint_general_set, handle_tracepoint_query)
6352 (tracepoint_finished_step, tracepoint_was_hit)
6353 (release_while_stepping_state_list, current_traceframe)
6354 (in_readonly_region, traceframe_read_mem)
6355 (fetch_traceframe_registers, traceframe_read_sdata)
6356 (traceframe_read_info, struct fast_tpoint_collect_status)
6357 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6358 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6359 (supply_fast_tracepoint_registers)
6360 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6361 (ipa_tdesc, claim_trampoline_space)
6362 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6363 (agent_mem_read, agent_get_trace_state_variable_value)
6364 (agent_set_trace_state_variable_value, agent_tsv_read)
6365 (agent_mem_read_string, get_raw_reg_func_addr)
6366 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6367 * tracepoint.h: ... this new file.
6368
ff42e6ab
PA
63692013-09-05 Pedro Alves <palves@redhat.com>
6370
6371 * server.h (perror_with_name, error, fatal, warning, paddress)
6372 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6373 include it.
6374 * utils.h: New file.
6375
541af0f4
PA
63762013-09-05 Pedro Alves <palves@redhat.com>
6377
6378 * server.h (remote_debug, noack_mode, transport_is_reliable)
6379 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6380 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6381 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6382 (write_enn, initialize_async_io, enable_async_io)
6383 (disable_async_io, check_remote_input_interrupt_request)
6384 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6385 (dead_thread_notify, prepare_resume_reply)
6386 (decode_address_to_semicolon, decode_address, decode_m_packet)
6387 (decode_M_packet, decode_X_packet, decode_xfer_write)
6388 (decode_search_memory_packet, unhexify, hexify)
6389 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6390 (look_up_one_symbol, relocate_instruction)
6391 (monitor_output): Move to remote-utils.h, and include it.
6392 * remote-utils.h: New file.
6393
eebdf26b
PA
63942013-09-05 Pedro Alves <palves@redhat.com>
6395
6396 * server.h (_): Delete.
6397
3aafd2ff
PA
63982013-09-02 Pedro Alves <palves@redhat.com>
6399
6400 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6401 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6402 allocated.
6403 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6404
cee83bcb
PM
64052013-09-02 Pierre Muller <muller@sourceware.org>
6406
6407 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6408 or WriteProcessMemory complete successfully and handle
6409 ERROR_PARTIAL_COPY error.
6410
9a13b2fa
PA
64112013-09-02 Pedro Alves <palves@redhat.com>
6412
6413 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6414 error instead of EIO.
6415
602e3198
JK
64162013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6417
6418 PR server/15604
6419 * linux-low.c: Include filestuff.h.
6420 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6421 * lynx-low.c: Include filestuff.h.
6422 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6423 * server.c: Include filestuff.h.
6424 (main): Call notice_open_fds.
6425 * spu-low.c: Include filestuff.h.
6426 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6427
96d7229d
LM
64282013-08-22 Luis Machado <lgustavo@codesourcery.com>
6429
6430 * Makefile.in: Explain why ../target and ../nat are not
6431 listed as include file search paths.
6432 (linux-waitpid.o): New object file rule.
6433 * configure.srv (srv_native_linux_obj): New variable.
6434 Replace all occurrences of linux native object files with
6435 $srv_native_linux_obj.
6436 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6437 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6438 (linux_enable_event_reporting): Remove declaration.
6439 (my_waitpid): Moved to common/linux-waitpid.c.
6440 (linux_wait_for_event): Pass ptid when calling
6441 linux_enable_event_reporting.
6442 (linux_supports_tracefork_flag): Remove.
6443 (linux_enable_event_reporting): Likewise.
6444 (linux_tracefork_grandchild): Remove.
6445 (STACK_SIZE): Moved to common/linux-ptrace.c.
6446 (linux_tracefork_child): Remove.
6447 (linux_test_for_tracefork): Remove.
6448 (linux_look_up_symbols): Call linux_supports_traceclone.
6449 (initialize_low): Remove call to linux_test_for_tracefork.
6450 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6451 common/linux-ptrace.h.
6452 (PTRACE_TYPE_ARG4): Likewise.
6453 Include linux-ptrace.h.
6454
32940073
PA
64552013-08-21 Pedro Alves <palves@redhat.com>
6456
6457 * config.in: Renegerate.
6458
33b60d58 64592013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6460
33b60d58
LM
6461 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6462 (SFILES): Remove $(srcdir)/common/target-common.c and
6463 add $(srcdir)/target/waitstatus.c.
6464 (OBS): Remove target-common.o and add waitstatus.o.
6465 (server_h): Remove $(srcdir)/../common/target-common.h and
6466 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6467 and $(srcdir)/../target/waitstatus.h.
6468 (target-common.o): Remove.
6469 (waitstatus.o): New target object file.
6470 * target.h: Do not include target-common.h and
6471 include target/resume.h, target/wait.h and
6472 target/waitstatus.h.
6473
b8e1b30e
LM
64742013-08-13 Luis Machado <lgustavo@codesourcery.com>
6475
6476 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6477 to PTRACE_TYPE_ARG3.
6478 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6479 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6480 PTRACE_TYPE_ARG4.
6481 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6482 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6483
7a60ad40
YQ
64842013-07-27 Jie Zhang <jie@codesourcery.com>
6485 Daniel Jacobowitz <dan@codesourcery.com>
6486 Yao Qi <yao@codesourcery.com>
6487
6488 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6489 (mips-linux-watch.o): New rule.
6490 (mips_linux_watch_h): New variable.
6491 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6492 srv_tgtobj.
6493 * linux-mips-low.c: Include mips-linux-watch.h.
6494 (struct arch_process_info, struct arch_lwp_info): New.
6495 (update_watch_registers_callback): New function.
6496 (mips_linux_new_process, mips_linux_new_thread) New functions.
6497 (mips_linux_prepare_to_resume, mips_insert_point): New
6498 functions.
6499 (mips_remove_point, mips_stopped_by_watchpoint): New
6500 functions.
6501 (rsp_bp_type_to_target_hw_bp_type): New function.
6502 (mips_stopped_data_address): New function.
6503 (the_low_target): Add watchpoint support functions.
6504
de6f69ad
YQ
65052013-07-27 Yao Qi <yao@codesourcery.com>
6506
6507 * i386-low.c: Include break-common.h.
6508 (enum target_hw_bp_type): Remove.
6509
3360c0bf
LM
65102013-07-24 Luis Machado <lgustavo@codesourcery.com>
6511
6512 * Makefile.in (SFILES): /common/target-common.c.
6513 (OBS): Add target-common.o.
6514 (server_h): Add $(srcdir)/../common/target-common.h.
6515 (target-common.o): New target.
6516 * server.c (queue_stop_reply_callback): Free
6517 status string after use.
6518 * target.c (target_waitstatus_to_string): Remove.
6519 * target.h: Include target-common.h.
6520 (resume_kind): Likewise.
6521 (target_waitkind): Likewise.
6522 (target_waitstatus): Likewise.
6523 (TARGET_WNOHANG): Likewise.
6524
bd885420
YQ
65252013-07-04 Yao Qi <yao@codesourcery.com>
6526
6527 * Makefile.in (host_alias): Use @host_noncanonical@.
6528 (target_alias): Use @target_noncanonical@.
6529 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6530 ACX_NONCANONICAL_HOST.
6531 * configure: Regenerated.
6532
6533 Revert:
6534 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6535
6536 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6537 * configure: Rebuild.
6538 * Makefile.in (version_host, version_target): Get from configure.
6539 (version.c): Use $(version_host) and $(version_target).
6540
17ef446e
PA
65412013-07-03 Pedro Alves <palves@redhat.com>
6542
6543 * Makefile.in (config.status): Depend on development.sh.
6544 * acinclude.m4: Include libmcheck.m4.
6545 * configure: Regenerate.
6546
7a9a7487
MG
65472013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6548
6549 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6550 attribute inside the parentheses.
6551 (winapi_DebugSetProcessKillOnExit): Ditto.
6552 (winapi_DebugBreakProcess): Ditto.
6553 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6554
49b64de6
MG
65552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6556
6557 * notif.h (notif_event): Add a dummy member to avoid compiler
6558 errors.
6559
d5749ee7
PA
65602013-07-01 Pedro Alves <palves@redhat.com>
6561
6562 * hostio.c (HOSTIO_PATH_MAX): Define.
6563 (require_filename, handle_open, handle_unlink, handle_readlink):
6564 Use it.
6565
d8d2a3ee
PA
65662013-07-01 Pedro Alves <palves@redhat.com>
6567
6568 * server.h: Include "pathmax.h".
6569 * linux-low.c: Don't include sys/param.h.
6570 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6571 MAXPATHLEN.
6572 * win32-low.c: Don't include sys/param.h.
6573 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6574
bc7dea8d
PA
65752013-07-01 Pedro Alves <palves@redhat.com>
6576
6577 * event-loop.c: Don't check HAVE_UNISTD_H before including
6578 <unistd.h>.
6579 * gdbreplay.c: Likewise.
6580 * remote-utils.c: Likewise.
6581 * server.c: Likewise.
6582 * configure.ac: Don't check for unistd.h.
6583 * configure: Regenerate.
6584
d6c2da54
TT
65852013-06-28 Tom Tromey <tromey@redhat.com>
6586
6587 * Makefile.in (version.c): Use version.in, not
6588 common/version.in.
6589
257b6bec
MG
65902013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6591
6592 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6593 * configure: Rebuild.
6594 * Makefile.in (version_host, version_target): Get from configure.
6595 (version.c): Use $(version_host) and $(version_target).
6596
86ebe149
DK
65972013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6598
6599 Fix trace-status to output user name without trailing colon.
6600 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6601
f30aa5af
DK
66022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6603
6604 Fix trace-status to output proper start-time and stop-time.
6605 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6606 output start time and stop time in hex as gdb expects.
6607
28a93511
YQ
66082013-06-26 Pedro Alves <pedro@codesourcery.com>
6609
6610 * tracepoint.c (build_traceframe_info_xml): Output trace state
6611 variables present in the trace buffer.
6612
01208463
TT
66132013-06-24 Tom Tromey <tromey@redhat.com>
6614
6615 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6616 create-version.sh.
6617 (version.o): Remove.
6618 * gdbreplay.c: Include version.h.
6619 (version, host_name): Don't declare.
6620 * server.h: Include version.h.
6621 (version, host_name): Don't declare.
6622
760256f9
PA
66232013-06-12 Pedro Alves <palves@redhat.com>
6624
6625 * linux-x86-low.c (linux_is_elf64): Delete global.
6626 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6627 with local linux_pid_exe_is_elf_64_file use.
6628
030031ee
PA
66292013-06-11 Pedro Alves <palves@redhat.com>
6630
6631 * linux-low.c (regset_disabled, disable_regset): New functions.
6632 (regsets_fetch_inferior_registers)
6633 (regsets_store_inferior_registers): Use them.
6634 (initialize_regsets_info); Don't allocate the disabled_regsets
6635 array here.
6636 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6637 comment.
6638
5da6eb0a
PA
66392013-06-11 Pedro Alves <palves@redhat.com>
6640
6641 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6642 xmalloc.
6643
7e5aaa09
PA
66442013-06-11 Pedro Alves <palves@redhat.com>
6645
6646 * linux-x86-low.c (initialize_low_arch): Call
6647 init_registers_x32_avx_linux.
6648
d878444c
JK
66492013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6650
6651 Fix compatibility with Android Bionic.
6652 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6653 it is not empty.
6654
3aee8918
PA
66552013-06-07 Pedro Alves <palves@redhat.com>
6656
5f2b57b5 6657 PR server/14823
3aee8918
PA
6658 * Makefile.in (OBS): Add tdesc.o.
6659 (IPA_OBJS): Add tdesc-ipa.o.
6660 (tdesc-ipa.o): New rule.
6661 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6662 interface.
6663 * linux-low.c (new_inferior): Delete.
6664 (disabled_regsets, num_regsets): Delete.
6665 (linux_add_process): Adjust to set the new per-process
6666 new_inferior flag.
6667 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6668 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6669 was a stop. When calling arch_setup, switch the current inferior
6670 to the thread that got an event.
6671 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6672 (regsets_fetch_inferior_registers)
6673 (regsets_store_inferior_registers): New regsets_info parameter.
6674 Adjust to use it.
6675 (linux_register_in_regsets): New regs_info parameter. Adjust to
6676 use it.
6677 (register_addr, fetch_register, store_register): New usrregs_info
6678 parameter. Adjust to use it.
6679 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6680 parameter regs_info. Adjust to use it.
6681 (linux_fetch_registers): Get the current inferior's regs_info, and
6682 adjust to use it.
6683 (linux_store_registers): Ditto.
6684 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6685 (initialize_low): Don't initialize the target_regsets here. Call
6686 initialize_low_arch.
6687 * linux-low.h (target_regsets): Delete declaration.
6688 (struct regsets_info): New.
6689 (struct usrregs_info): New.
6690 (struct regs_info): New.
6691 (struct process_info_private) <new_inferior>: New field.
6692 (struct linux_target_ops): Delete the num_regs, regmap, and
6693 regset_bitmap fields. New field regs_info.
6694 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6695 * i387-fp.c (num_xmm_registers): Delete.
6696 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6697 calls to new interface.
6698 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6699 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6700 Infer the number of xmm registers from the regcache's target
6701 description.
6702 * i387-fp.h (num_xmm_registers): Delete.
6703 * inferiors.c (add_thread): Don't install the thread's regcache
6704 here.
6705 * proc-service.c (gregset_info): Fetch the current inferior's
6706 regs_info. Adjust to use it.
6707 * regcache.c: Include tdesc.h.
6708 (register_bytes, reg_defs, num_registers)
6709 (gdbserver_expedite_regs): Delete.
6710 (get_thread_regcache): If the thread doesn't have a regcache yet,
6711 create one, instead of aborting gdbserver.
6712 (regcache_invalidate_one): Rename to ...
6713 (regcache_invalidate_thread): ... this.
6714 (regcache_invalidate_one): New.
6715 (regcache_invalidate): Only invalidate registers of the current
6716 process.
6717 (init_register_cache): Add target_desc parameter, and use it.
6718 (new_register_cache): Ditto. Assert the target description has a
6719 non zero registers_size.
6720 (regcache_cpy): Add assertions. Adjust.
6721 (realloc_register_cache, set_register_cache): Delete.
6722 (registers_to_string, registers_from_string): Adjust.
6723 (find_register_by_name, find_regno, find_register_by_number)
6724 (register_cache_size): Add target_desc parameter, and use it.
6725 (free_register_cache_thread, free_register_cache_thread_one)
6726 (regcache_release, register_cache_size): New.
6727 (register_size): Add target_desc parameter, and use it.
6728 (register_data, supply_register, supply_register_zeroed)
6729 (supply_regblock, supply_register_by_name, collect_register)
6730 (collect_register_as_string, collect_register_by_name): Adjust.
6731 * regcache.h (struct target_desc): Forward declare.
6732 (struct regcache) <tdesc>: New field.
6733 (init_register_cache, new_register_cache): Add target_desc
6734 parameter.
6735 (regcache_invalidate_thread): Declare.
6736 (regcache_invalidate_one): Delete declaration.
6737 (regcache_release): Declare.
6738 (find_register_by_number, register_cache_size, register_size)
6739 (find_regno): Add target_desc parameter.
6740 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6741 declarations.
6742 * remote-utils.c: Include tdesc.h.
6743 (outreg, prepare_resume_reply): Adjust.
6744 * server.c: Include tdesc.h.
6745 (gdbserver_xmltarget): Delete declaration.
6746 (get_features_xml, process_serial_event): Adjust.
6747 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6748 declare.
6749 (struct process_info) <tdesc>: New field.
6750 (ipa_tdesc): Declare.
6751 * tdesc.c: New file.
6752 * tdesc.h: New file.
6753 * tracepoint.c: Include tdesc.h.
6754 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6755 (get_context_regcache): Adjust to pass ipa_tdesc down.
6756 (do_action_at_tracepoint): Adjust to get the register cache size
6757 from the context regcache's description.
6758 (traceframe_walk_blocks): Adjust to get the register cache size
6759 from the current trace frame's description.
6760 (traceframe_get_pc): Adjust to get current trace frame's
6761 description and pass it down.
6762 (gdb_collect): Adjust to get the register cache size from the
6763 IPA's description.
6764 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6765 (gdbserver_xmltarget): Delete.
6766 (initialize_low_tracepoint): Set the ipa's target description.
6767 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6768 (initialize_low_tracepoint): Set the ipa's target description.
6769 * linux-x86-low.c: Include tdesc.h.
6770 [__x86_64__] (is_64bit_tdesc): New.
6771 (ps_get_thread_area, x86_get_thread_area): Use it.
6772 (i386_cannot_store_register): Rename to ...
6773 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6774 (i386_cannot_fetch_register): Rename to ...
6775 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6776 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6777 to new interface.
6778 (target_regsets): Rename to ...
6779 (x86_regsets): ... this.
6780 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6781 interface.
6782 (x86_siginfo_fixup): Use is_64bit_tdesc.
6783 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6784 (tdesc_x32_avx_linux, tdesc_x32_linux)
6785 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6786 Declare.
6787 (x86_linux_update_xmltarget): Delete.
6788 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6789 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6790 (AMD64_LINUX_USER64_CS): New.
6791 (x86_linux_read_description): New, based on
6792 x86_linux_update_xmltarget.
6793 (same_process_callback): New.
6794 (x86_arch_setup_process_callback): New.
6795 (x86_linux_update_xmltarget): New.
6796 (x86_regsets_info): New.
6797 (amd64_linux_regs_info): New.
6798 (i386_linux_usrregs_info): New.
6799 (i386_linux_regs_info): New.
6800 (x86_linux_regs_info): New.
6801 (x86_arch_setup): Reimplement.
6802 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6803 (x86_emit_ops): Ditto.
6804 (the_low_target): Adjust. Install x86_linux_regs_info,
6805 x86_cannot_fetch_register, and x86_cannot_store_register.
6806 (initialize_low_arch): New.
6807 * linux-ia64-low.c (tdesc_ia64): Declare.
6808 (ia64_fetch_register): Adjust.
6809 (ia64_usrregs_info, regs_info): New globals.
6810 (ia64_regs_info): New function.
6811 (the_low_target): Adjust.
6812 (initialize_low_arch): New function.
6813 * linux-sparc-low.c (tdesc_sparc64): Declare.
6814 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6815 Adjust.
6816 (sparc_arch_setup): New function.
6817 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6818 (the_low_target): Adjust.
6819 (initialize_low_arch): New function.
6820 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6821 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6822 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6823 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6824 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6825 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6826 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6827 (tdesc_powerpc_isa205_vsx64l): Declare.
6828 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6829 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6830 (ppc_set_pc, ppc_get_hwcap): Adjust.
6831 (ppc_usrregs_info): Forward declare.
6832 (!__powerpc64__) ppc_regmap_adjusted: New global.
6833 (ppc_arch_setup): Adjust to the current process'es target
6834 description.
6835 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6836 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6837 (ppc_store_evrregset): Adjust.
6838 (target_regsets): Rename to ...
6839 (ppc_regsets): ... this, and make static.
6840 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6841 (ppc_regs_info): New function.
6842 (the_low_target): Adjust.
6843 (initialize_low_arch): New function.
6844 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6845 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6846 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6847 (tdesc_s390x_linux64v2): Declare.
6848 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6849 (s390_fill_gregset, s390_store_last_break): Adjust.
6850 (target_regsets): Rename to ...
6851 (s390_regsets): ... this, and make static.
6852 (s390_get_pc, s390_set_pc): Adjust.
6853 (s390_get_hwcap): New target_desc parameter, and use it.
6854 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6855 (s390_arch_setup): Adjust to set the current process'es target
6856 description. Don't adjust the regmap.
6857 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6858 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6859 (regs_info_3264): New globals.
6860 (s390_regs_info): New function.
6861 (the_low_target): Adjust.
6862 (initialize_low_arch): New function.
6863 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6864 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6865 [__mips64] (init_registers_mips_linux)
6866 (init_registers_mips_dsp_linux): Delete defines.
6867 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6868 (have_dsp): New global.
6869 (mips_read_description): New, based on mips_arch_setup.
6870 (mips_arch_setup): Reimplement.
6871 (get_usrregs_info): New function.
6872 (mips_cannot_fetch_register, mips_cannot_store_register)
6873 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6874 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6875 (target_regsets): Rename to ...
6876 (mips_regsets): ... this, and make static.
6877 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6878 (dsp_regs_info, regs_info): New globals.
6879 (mips_regs_info): New function.
6880 (the_low_target): Adjust.
6881 (initialize_low_arch): New function.
6882 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6883 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6884 Declare.
6885 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6886 (arm_read_description): New, with bits factored from
6887 arm_arch_setup.
6888 (arm_arch_setup): Reimplement.
6889 (target_regsets): Rename to ...
6890 (arm_regsets): ... this, and make static.
6891 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6892 (arm_regs_info): New function.
6893 (the_low_target): Adjust.
6894 (initialize_low_arch): New function.
6895 * linux-m68k-low.c (tdesc_m68k): Declare.
6896 (target_regsets): Rename to ...
6897 (m68k_regsets): ... this, and make static.
6898 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6899 (m68k_regs_info): New function.
6900 (m68k_arch_setup): New function.
6901 (the_low_target): Adjust.
6902 (initialize_low_arch): New function.
6903 * linux-sh-low.c (tdesc_sharch): Declare.
6904 (target_regsets): Rename to ...
6905 (sh_regsets): ... this, and make static.
6906 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6907 (sh_regs_info, sh_arch_setup): New functions.
6908 (the_low_target): Adjust.
6909 (initialize_low_arch): New function.
6910 * linux-bfin-low.c (tdesc_bfin): Declare.
6911 (bfin_arch_setup): New function.
6912 (bfin_usrregs_info, regs_info): New globals.
6913 (bfin_regs_info): New function.
6914 (the_low_target): Adjust.
6915 (initialize_low_arch): New function.
6916 * linux-cris-low.c (tdesc_cris): Declare.
6917 (cris_arch_setup): New function.
6918 (cris_usrregs_info, regs_info): New globals.
6919 (cris_regs_info): New function.
6920 (the_low_target): Adjust.
6921 (initialize_low_arch): New function.
6922 * linux-cris-low.c (tdesc_crisv32): Declare.
6923 (cris_arch_setup): New function.
6924 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6925 (cris_regs_info): New function.
6926 (the_low_target): Adjust.
6927 (initialize_low_arch): New function.
6928 * linux-m32r-low.c (tdesc_m32r): Declare.
6929 (m32r_arch_setup): New function.
6930 (m32r_usrregs_info, regs_info): New globals.
6931 (m32r_regs_info): Adjust.
6932 (initialize_low_arch): New function.
6933 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6934 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6935 (tic6x_usrregs_info): Forward declare.
6936 (tic6x_read_description): New function, based on ...
6937 (tic6x_arch_setup): ... this. Reimplement.
6938 (target_regsets): Rename to ...
6939 (tic6x_regsets): ... this, and make static.
6940 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6941 (tic6x_regs_info): New function.
6942 (the_low_target): Adjust.
6943 (initialize_low_arch): New function.
6944 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6945 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6946 (target_regsets): Rename to ...
6947 (xtensa_regsets): ... this, and make static.
6948 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6949 globals.
6950 (xtensa_arch_setup, xtensa_regs_info): New functions.
6951 (the_low_target): Adjust.
6952 (initialize_low_arch): New function.
6953 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6954 (nios2_arch_setup): Set the current process'es tdesc.
6955 (target_regsets): Rename to ...
6956 (nios2_regsets): ... this.
6957 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6958 (nios2_regs_info): New function.
6959 (the_low_target): Adjust.
6960 (initialize_low_arch): New function.
a261b8f5
PA
6961 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6962 (aarch64_arch_setup): Set the current process'es tdesc.
6963 (target_regsets): Rename to ...
6964 (aarch64_regsets): ... this.
6965 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6966 (aarch64_regs_info): New function.
6967 (the_low_target): Adjust.
6968 (initialize_low_arch): New function.
3aee8918
PA
6969 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6970 globals.
6971 (target_regsets): Rename to ...
6972 (tile_regsets): ... this.
6973 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6974 (tile_regs_info): New function.
6975 (tile_arch_setup): Set the current process'es tdesc.
6976 (the_low_target): Adjust.
6977 (initialize_low_arch): New function.
6978 * spu-low.c (tdesc_spu): Declare.
6979 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6980 * win32-arm-low.c (tdesc_arm): Declare.
6981 (arm_arch_setup): New function.
6982 (the_low_target): Install arm_arch_setup instead of
6983 init_registers_arm.
6984 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6985 (init_windows_x86): Rename to ...
6986 (i386_arch_setup): ... this. Set `win32_tdesc'.
6987 (the_low_target): Adjust.
6988 * win32-low.c (win32_tdesc): New global.
6989 (child_add_thread): Don't create the thread cache here.
6990 (do_initial_child_stuff): Set the new process'es tdesc.
6991 * win32-low.h (struct target_desc): Forward declare.
6992 (win32_tdesc): Declare.
6993 * lynx-i386-low.c (tdesc_i386): Declare global.
6994 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6995 * lynx-low.c (lynx_tdesc): New global.
6996 (lynx_add_process): Set the new process'es tdesc.
6997 * lynx-low.h (struct target_desc): Forward declare.
6998 (lynx_tdesc): Declare global.
6999 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7000 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7001 * nto-low.c (nto_tdesc): New global.
7002 (do_attach): Set the new process'es tdesc.
7003 * nto-low.h (struct target_desc): Forward declare.
7004 (nto_tdesc): Declare.
7005 * nto-x86-low.c (tdesc_i386): Declare.
7006 (nto_x86_arch_setup): Set `nto_tdesc'.
7007
b1fbec62
GB
70082013-06-04 Gary Benson <gbenson@redhat.com>
7009
7010 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7011 to qSupported response when appropriate.
7012 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7013 with nonzero-length annex.
7014 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7015 arguments supplied in annex.
7016
d1ec4ce7
DE
70172013-05-31 Doug Evans <dje@google.com>
7018
ac44adcb 7019 PR server/15594
d1ec4ce7
DE
7020 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7021 64 bits in 64-cross-32 environment.
7022
9b25f2d3
PA
70232013-05-28 Pedro Alves <palves@redhat.com>
7024
7025 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7026 (aarch64-without-fpu.c): Delete rule.
7027 * configure.srv (aarch64*-*-linux*): Remove references to
7028 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7029 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7030 declaration.
7031
6740dc9c
PA
70322013-05-24 Pedro Alves <palves@redhat.com>
7033
7034 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7035 instead of strchr/decode_address. Error if the range isn't split
7036 with a ','. Don't assume there's be a ':' in the action.
7037
c2d6af84
PA
70382013-05-23 Yao Qi <yao@codesourcery.com>
7039 Pedro Alves <palves@redhat.com>
7040
7041 * linux-low.c (lwp_in_step_range): New function.
7042 (linux_wait_1): If the thread was range stepping and stopped
7043 outside the stepping range, report the stop to GDB. Otherwise,
7044 continue stepping. Add range stepping debug output.
7045 (linux_set_resume_request): Copy the step range from the resume
7046 request to the lwp.
7047 (linux_supports_range_stepping): New.
7048 (linux_target_ops) <supports_range_stepping>: Set to
7049 linux_supports_range_stepping.
7050 * linux-low.h (struct linux_target_ops)
7051 <supports_range_stepping>: New field.
7052 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7053 * linux-x86-low.c (x86_supports_range_stepping): New.
7054 (the_low_target) <supports_range_stepping>: Set to
7055 x86_supports_range_stepping.
7056 * server.c (handle_v_cont): Handle 'r' action.
7057 (handle_v_requests): Append ";r" if the target supports range
7058 stepping.
7059 * target.h (struct thread_resume) <step_range_start,
7060 step_range_end>: New fields.
7061 (struct target_ops) <supports_range_stepping>:
7062 New field.
7063 (target_supports_range_stepping): New macro.
7064
58794e1a
JB
70652013-05-17 Joel Brobecker <brobecker@adacore.com>
7066
7067 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7068 confusion in comment.
7069
d631c5a7
JB
70702013-05-17 Joel Brobecker <brobecker@adacore.com>
7071
7072 * lynx-low.c (struct process_info_private): New type.
7073 (lynx_add_process): New function.
7074 (lynx_create_inferior, lynx_attach): Replace calls to
7075 add_process by calls to lynx_add_process.
7076 (lynx_resume): If PTID is null, then try using
7077 current_process()->private->last_wait_event_ptid.
7078 Add comments.
7079 (lynx_clear_inferiors): Delete. The contents of that function
7080 has been inlined in lynx_mourn;
7081 (lynx_wait_1): Save the ptid in the process's private data.
7082 (lynx_mourn): Free the process' private data. Replace call
7083 to lynx_clear_inferiors by call to clear_inferiors.
7084
96f7a20f
YQ
70852013-05-17 Yao Qi <yao@codesourcery.com>
7086
7087 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7088 the right place.
7089
db0dfaa0
LM
70902013-05-16 Luis Machado <lgustavo@codesourcery.com>
7091
7092 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7093 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7094 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7095 PT_TEXT_END_ADDR guards. Update comments.
7096 (linux_target_op) <read_offsets>: Conditionally define to
7097 linux_read_offsets if the target is UCLIBC and if it defines
7098 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7099
68f5f838
SL
71002013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7101 Andrew Jenner <andrew@codesourcery.com>
7102
7103 * Makefile.in (SFILES): Add linux-nios2-low.c.
7104 (clean): Add action to delete nios2-linux.c.
7105 (nios2-linux.c): New rule.
7106 * configure.srv: Add nios2*-*-linux*.
7107 * linux-nios2-low.c: New.
7108
1ebff1fd
HAQ
71092013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7110
7111 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7112
f6150862
HZ
71132013-04-25 Hui Zhu <hui@codesourcery.com>
7114
7115 PR gdb/15186
f6150862
HZ
7116 * ax.c (ax_printf): Add fflush.
7117
614c279d
TT
71182013-04-22 Tom Tromey <tromey@redhat.com>
7119
7120 * Makefile.in (SFILES): Add filestuff.c.
7121 (OBS): Add filestuff.o.
7122 (filestuff.o): New target.
7123 * config.in, configure: Rebuild.
7124 * configure.ac: Check for fdwalk, pipe2.
7125
7d4e5717
PA
71262013-04-17 Pedro Alves <palves@redhat.com>
7127
7128 * configure.ac (USE_THREAD_DB): Delete variable.
7129 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7130 Don't AC_SUBST USE_THREAD_DB.
7131 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7132 * config.in, configure: Regenerate.
7133
d5c93e41
PA
71342013-04-16 Pedro Alves <palves@redhat.com>
7135
7136 * linux-low.h (struct lwp_info) <thread_known>: Move under
7137 the USE_THREAD_DB #ifdef.
7138
04f5fe89
PA
71392013-04-16 Pedro Alves <palves@redhat.com>
7140
7141 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7142 (linux-low.o): Delete rule.
7143 * linux-low.h: Always include "gdb_thread_db.h" instead of
7144 conditionally including thread_db.h.
7145 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7146 HAVE_THREAD_DB_H.
7147
480b27bf
JK
71482013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7149
7150 * Makefile.in (install-only): Fix make install regression.
7151
43662968
JK
71522013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7153
7154 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7155 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7156 installation.
7157 * gdbserver.1: Remove.
7158
3e74e146
PA
71592013-03-22 Pedro Alves <palves@redhat.com>
7160
7161 * linux-low.c (handle_extended_wait): Don't call
7162 linux_enable_event_reporting.
7163
a8347a2a
TT
71642013-03-15 Tony Theodore <tonyt@logyst.com>
7165
7166 PR build/9098:
7167 * Makefile.in (SHELL): Use @SHELL@.
7168
eeb56fa7
SDJ
71692013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7170
7171 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7172 compiler warning.
7173
4fa7e2ff
JB
71742013-03-13 Joel Brobecker <brobecker@adacore.com>
7175
7176 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7177 Remove extraneous NULL element.
7178
8ddb1965
YQ
71792013-03-13 Yao Qi <yao@codesourcery.com>
7180
7181 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7182 'V' block in trace frame.
7183
9accd112
MM
71842013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7185
7186 * target.h (struct target_ops): Add btrace ops.
7187 (target_supports_btrace): New macro.
7188 (target_enable_btrace): New macro.
7189 (target_disable_btrace): New macro.
7190 (target_read_btrace): New macro.
7191 * gdbthread.h (struct thread_info): Add btrace field.
7192 * server.c: Include btrace-common.h.
7193 (handle_btrace_general_set): New function.
7194 (handle_btrace_enable): New function.
7195 (handle_btrace_disable): New function.
7196 (handle_general_set): Call handle_btrace_general_set.
7197 (handle_qxfer_btrace): New function.
7198 (struct qxfer qxfer_packets[]): Add btrace entry.
7199 * inferiors.c (remove_thread): Disable btrace.
7200 * linux-low: Include linux-btrace.h.
7201 (linux_low_enable_btrace): New function.
7202 (linux_low_read_btrace): New function.
7203 (linux_target_ops): Add btrace ops.
7204 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7205 Add srv_linux_btrace=yes.
7206 (x86_64-*-linux*): Add linux-btrace.o.
7207 Add srv_linux_btrace=yes.
7208 * configure.ac: Define HAVE_LINUX_BTRACE.
7209 * config.in: Regenerated.
7210 * configure: Regenerated.
7211
5cc22e4c
MM
72122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7213
7214 * server.c (handle_qxfer): Preserve error message if -3 is
7215 returned.
7216 (qxfer): Document the -3 return value.
7217
7c97f91e
MM
72182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7219
7220 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7221 (linux_btrace_h): New variable.
7222 (linux-btrace.o): New rule.
7223
be9a119c 72242013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
7225 Hafiz Abid Qadeer <abidh@codesourcery.com>
7226
7227 * tracepoint.c (trace_buffer_size): New global.
7228 (DEFAULT_TRACE_BUFFER_SIZE): New define.
7229 (init_trace_buffer): Change to one-argument function. Allocate
7230 trace buffer memory.
7231 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7232 handle QTBuffer:size packet.
7233 (cmd_bigqtbuffer_size): New function.
7234 (initialize_tracepoint): Call init_trace_buffer with
7235 DEFAULT_TRACE_BUFFER_SIZE.
7236 * server.c (handle_query): Add QTBuffer:size in the
7237 supported packets.
7238
e64f7499
YQ
72392013-03-07 Yao Qi <yao@codesourcery.com>
7240
7241 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7242 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7243 of -1.
7244 (cmd_qtsp): Adjust condition. Do post increment.
7245 Set cur_action and cur_step_action back to 0.
7246
f0ae6fc3
PA
72472013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
7248
7249 PR server/15236
7250 * linux-low.c (linux_write_memory): Return early success if LEN is
7251 zero.
7252
b5b0b0af
CV
72532013-03-05 Corinna Vinschen <vinschen@redhat.de>
7254
334ad4a8 7255 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 7256
589bc927
TT
72572013-02-28 Tom Tromey <tromey@redhat.com>
7258
7259 * configure.ac: Invoke AC_SYS_LARGEFILE.
7260 * configure, config.in: Rebuild.
7261
dfe07582
CV
72622013-02-28 Corinna Vinschen <vinschen@redhat.com>
7263
7264 * win32-low.c: Throughout, fix format strings and casts of
7265 printf-like functions to avoid type related warnings on all
7266 platforms.
7267 (get_child_debug_event): Print dwDebugEventCode as hex since
7268 that's how it's usually documented.
7269
736cd585
YQ
72702013-02-28 Yao Qi <yao@codesourcery.com>
7271
7272 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7273 pulongest.
7274
e1f58301
JW
72752013-02-27 Jiong Wang <jiwang@tilera.com>
7276
7277 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7278 (reg-tilegx32.c): New rule.
7279 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7280 * linux-tile-low.c (tile_arch_setup): New function. Invoke
7281 different register info initializer according to elf class.
7282 (init_registers_tilgx32): New function. The tilegx32 register info
7283 initializer.
7284 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7285 (tile_store_gregset): Likewise.
7286
d171ca78
YQ
72872013-02-27 Yao Qi <yao@codesourcery.com>
7288
7289 * server.c (process_point_options): Print debug message when
7290 debug_threads is true.
7291
282bbdf3
YQ
72922013-02-26 Yao Qi <yao@codesourcery.com>
7293
7294 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7295
aca22551
PA
72962013-02-19 Pedro Alves <palves@redhat.com>
7297 Kai Tietz <ktietz@redhat.com>
7298
7299 PR gdb/15161
7300
7301 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7302 instead of strtoul to extract address from packet.
7303 (process_serial_event) <'z'>: Likewise.
7304
4f3cee1c
YQ
73052013-02-18 Yao Qi <yao@codesourcery.com>
7306
7307 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7308
8e1d55a3
PA
73092013-02-14 Pedro Alves <palves@redhat.com>
7310
7311 Plug memory leak.
7312
7313 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7314 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7315
458820da
PA
73162013-02-14 Pedro Alves <palves@redhat.com>
7317
7318 * tracepoint.c (cmd_qtdpsrc): Use savestring.
7319
baea0dae
PA
73202013-02-14 Pedro Alves <palves@redhat.com>
7321
7322 * tracepoint.c (save_string): Delete.
7323 (add_tracepoint_action): Use savestring instead of save_string.
7324
0b1afbb3
PA
73252013-02-12 Pedro Alves <palves@redhat.com>
7326
7327 * linux-xtensa-low.c: Ditto.
7328 * xtensa-xtregs.c: Ditto.
7329
8a4ac37e
PA
73302013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7331
7332 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7333 thread_db.
7334
148de6bb
MS
73352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7336
7337 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7338 aarch64_num_wp_regs and aarch64_num_bp_regs to
7339 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7340
55fac6e0
MS
73412013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7342
7343 * linux-aarch64-low.c (ps_get_thread_area): Replace
7344 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7345
176eb98c
MS
73462013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7347 Marcus Shawcroft <marcus.shawcroft@arm.com>
7348 Nigel Stephens <nigel.stephens@arm.com>
7349 Yufeng Zhang <yufeng.zhang@arm.com>
7350
7351 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7352 (aarch64.c, aarch64-without-fpu.c): New targets.
7353 * configure.srv (aarch64*-*-linux*): New.
7354 * linux-aarch64-low.c: New file.
7355
56f7af9c
MS
73562013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7357
43aaf8b6 7358 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7359 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7360 (dequeue_one_deferred_signal, linux_resume_one_thread)
7361 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7362 (linux_tracefork_grandchild, linux_test_for_tracefork)
7363 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7364 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7365 where the argument is 0.
7366
60f662b0
YQ
73672013-01-25 Yao Qi <yao@codesourcery.com>
7368
7369 * event-loop.c: Include "queue.h".
7370 (gdb_event_p): New typedef.
7371 (struct gdb_event) <next_event>: Remove.
7372 (event_queue): Change to QUEUE(gdb_event_p).
7373 (async_queue_event): Remove.
7374 (gdb_event_xfree): New.
7375 (initialize_event_loop): New.
7376 (process_event): Use API from QUEUE.
7377 (wait_for_event): Likewise.
7378 * server.c (main): Call initialize_event_loop.
7379 * server.h (initialize_event_loop): Declare.
7380
5ae4861a
YQ
73812013-01-18 Yao Qi <yao@codesourcery.com>
7382
7383 * ax.h (struct eval_agent_expr_context): New.
7384 (gdb_eval_agent_expr): Update declaration.
7385 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7386 TFRAME. Add new argument CTX.
7387 * server.h (struct eval_agent_expr_context): Declare.
7388 (agent_mem_read, agent_tsv_read): Update declaration.
7389 (agent_mem_read_string): Likewise.
7390 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7391 (add_traceframe_block): Add new argument TPOINT.
7392 Increase TPOINT->traceframe_usage.
7393 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7394 eval_tracepoint_agent_expr.
7395 (condition_true_at_tracepoint): Likewise.
7396 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7397 (agent_mem_read_string, agent_tsv_read): Likewise.
7398
85e00e85
YQ
73992013-01-16 Yao Qi <yao@codesourcery.com>
7400
7401 * linux-low.c (linux_resume_one_lwp): Don't check
7402 'lwp->bp_reinsert != 0'.
7403
4039cf45
JB
74042013-01-07 Joel Brobecker <brobecker@adacore.com>
7405 Pedro Alves <palves@redhat.com>
7406
7407 * lynx-low.c (ptrace_request_to_str): Define a temporary
7408 macro and use it to simplify this function's implementation.
7409
9044dee2
JB
74102013-01-07 Joel Brobecker <brobecker@adacore.com>
7411
7412 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7413 sets errno.
7414
e6352c8f
JB
74152013-01-07 Joel Brobecker <brobecker@adacore.com>
7416
7417 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7418
50681a27
JB
74192013-01-07 Joel Brobecker <brobecker@adacore.com>
7420
7421 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7422
3f6e77ef
JB
74232013-01-07 Joel Brobecker <brobecker@adacore.com>
7424
7425 * lynx-low.c (lynx_resume): Use the resume_info parameter
7426 to determine the ptid for the lynx_ptrace call, unless
7427 it is equal to minus_one_ptid, in which case we use the
7428 ptid of the current_inferior.
7429 (lynx_wait_1): After having received a thread create/exit
7430 event, resume the inferior's execution using the signaling
7431 thread's ptid, rather than the old ptid.
7432
7fda33ae
JB
74332013-01-07 Joel Brobecker <brobecker@adacore.com>
7434
7435 * lynx-low.c (lynx_resume): Delete variable ret.
7436
b9786c74
JB
74372013-01-01 Joel Brobecker <brobecker@adacore.com>
7438
7439 * gdbreplay.c (gdbreplay_version): Update copyright year.
7440 * server.c (gdbserver_version): Likewise.
7441
8b93d60f
JB
74422012-12-17 Joel Brobecker <brobecker@adacore.com>
7443
7444 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7445 new thread.
7446
037335a7
JB
74472012-12-17 Joel Brobecker <brobecker@adacore.com>
7448
7449 * lynx-low.c (ptrace_request_to_str): Add handling for
7450 PTRACE_GETTRACESIG.
7451
52d4cbd8
JB
74522012-12-17 Joel Brobecker <brobecker@adacore.com>
7453
7454 * lynx-low.c (lynx_attach): Delete variable new_process.
7455
ab8f6ca9
JB
74562012-12-17 Joel Brobecker <brobecker@adacore.com>
7457
7458 * lynx-low.c (lynx_create_inferior): Delete variable
7459 new_process.
7460
78cbc024
JB
74612012-12-17 Joel Brobecker <brobecker@adacore.com>
7462
7463 * lynx-low.c (ptrace_request_to_str): Do not handle
7464 PTRACE_GETTHREADLIST if this macro does not exist.
7465
14a00470
YQ
74662012-12-15 Yao Qi <yao@codesourcery.com>
7467
7468 * Makefile.in (OBS): Add notif.o.
7469 * notif.c, notif.h: New.
7470 * server.c: Include "notif.h".
7471 (struct vstop_notif) <next>: Remove.
7472 <base>: New field.
7473 (queue_stop_reply): Update.
7474 (push_event, send_next_stop_reply): Remove.
7475 (discard_queued_stop_replies): Update.
7476 (notif_stop): New variable.
7477 (handle_v_stopped): Remove.
7478 (handle_v_requests): Don't call handle_v_stopped. Call
7479 handle_ack_notif instead.
7480 (queue_stop_reply_callback): Call notif_event_enque instead
7481 of queue_stop_reply.
7482 (handle_status): Don't call send_next_stop_reply, call
7483 notif_write_event instead.
7484 (kill_inferior_callback): Likewise.
7485 (detach_or_kill_inferior_callback): Likewise.
7486 (main): Call initialize_notif.
7487 (process_serial_event): Call QUEUE_is_empty.
7488 (handle_target_event): Call notif_push instead of push event.
7489 * server.h (push_event): Remove declaration.
7490
61c125b9
TT
74912012-12-10 Tom Tromey <tromey@redhat.com>
7492
7493 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7494 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7495 macros.
7496 (.c.o): Rewrite.
7497 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7498 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7499 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7500 (amd64-linux-ipa.o, ax.o): Rewrite.
7501 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7502 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7503 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7504 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7505 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7506 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7507 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7508 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7509 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7510 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7511 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7512 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7513 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7514 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7515 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7516 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7517 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7518 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7519 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7520 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7521 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7522 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7523 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7524 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7525 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7526 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7527 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7528 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7529 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7530 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7531 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7532 (reg-tilegx.o): Remove.
7533 (all_object_files): New macro.
7534 Include .deps files.
7535 * aclocal.m4, configure: Rebuild.
7536 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7537 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7538 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7539
e90e9ad9
TT
75402012-12-05 Tom Tromey <tromey@redhat.com>
7541
7542 PR gdb/14917:
7543 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7544
02d403bf 75452012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7546
7547 * configure.ac: Check for linux/perf_event.h.
7548 * config.in: Regenerated.
7549 * configure: Regenerated.
7550
0270a750
PA
75512012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7552
7553 * hostio.c (handle_readlink): Decrease buffer size
7554 parameter passed to readlink by one byte.
7555
8c29b58e
YQ
75562012-11-26 Yao Qi <yao@codesourcery.com>
7557
7558 * configure.ac (build_warnings): Append '-Wempty-body'.
7559 * configure: Regenerated.
7560 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7561 body.
7562
8bdce1ff
PM
75632012-11-15 Pierre Muller <muller@sourceware.org>
7564
7565 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7566 * config.in: Regenerate.
7567 * configure: Regenerate.
7568 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7569 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7570 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7571 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7572 header.
7573 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7574 instead of <sys/wait.h> header.
7575 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7576
02d403bf 75772012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7578
7579 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7580 (various make rules): Remove -DGDBSERVER
7581
fbd5db48
YQ
75822012-11-09 Yao Qi <yao@codesourcery.com>
7583
7584 * spu-low.c (current_ptid): Move it to ..
7585 * gdbthread.h: ... here. New.
7586 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7587 * server.c (myresume, process_serial_event): Likewise.
7588 * thread-db.c (thread_db_find_new_threads): Likewise.
7589 * tracepoint.c (run_inferior_command): Likewise.
7590
b3dc46ff
AB
75912012-10-01 Andrew Burgess <aburgess@broadcom.com>
7592
7593 * server.c (handle_search_memory_1): Include access length in
7594 warning message.
7595
07c04788
HPN
75962012-09-05 Michael Brandt <michael.brandt@axis.com>
7597
7598 * linux-crisv32-low.c: Fix compile errors.
7599
918d227b
YQ
76002012-09-04 Yao Qi <yao@codesourcery.com>
7601
7602 * tracepoint.c (cmd_qtsv): Adjust debug message.
7603 Don't check CUR_TPOINT.
7604
18c1b81a
YQ
76052012-08-28 Yao Qi <yao@codesourcery.com>
7606
7607 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7608 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7609 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7610 Remove declarations of xmalloc, xreallloc, xstrdup and
7611 freeargv.
7612 * Makefile.in (libiberty_h): New.
7613 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7614 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7615
dc82f37b
YQ
76162012-08-23 Yao Qi <yao@codesourcery.com>
7617
7618 * server.h: Remove declaration of 'xsnprintf'.
7619
406b1477
KS
76202012-08-22 Keith Seitz <keiths@redhat.com>
7621
7622 * server.h: Include build-gnulib-gbserver/config.h.
7623 * gdbreplay.c: Likewise.
7624
e6712ff1
DE
76252012-08-08 Doug Evans <dje@google.com>
7626
7627 * Makefile.in (SFILES): Add gdb_vecs.c.
7628 (OBS): Add gdb_vecs.o.
7629 (gdb_vecs_h, host_defs_h): New variables.
7630 (thread-db.o): Add $(gdb_vecs_h) dependency.
7631 (gdb_vecs.o): New rule.
7632 * thread-db.c: #include "gdb_vecs.h".
7633 (thread_db_load_search): Use a vector to iterate over path elements.
7634 Handle text appearing after "$pdir".
7635
7636 * configure.ac: Add check for strstr.
7637 * config.in: Regenerate.
7638 * configure: Regenerate.
7639
7c3270ae
UW
76402012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7641
7642 * hostio.c (handle_pread): If pread fails, fall back to attempting
7643 lseek/read.
7644 (handle_pwrite): Likewise for pwrite.
7645
b62e2b27
UW
76462012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7647
7648 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7649 between unsupported TYPE and unimplementable ADDR/LEN combination.
7650 (arm_insert_point): Act on new return value.
7651
78a99e91
PA
76522012-07-31 Pedro Alves <palves@redhat.com>
7653
7654 * server.c (process_point_options): Only skip tokens if we find
7655 one that is unrecognized. Don't treat 'X' specially while
7656 skipping unrecognized tokens.
7657
fcf303ab
UW
76582012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7659
7660 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7661 to 4-byte-align HW breakpoint addresses for Thumb.
7662
7255706c
YQ
76632012-07-27 Yao Qi <yao@codesourcery.com>
7664
7665 PR remote/14161.
7666
7667 * server.h: Declare gdb_agent_about_to_close.
7668 * target.c (kill_inferior): Include "agent.h".
7669 New. Send command 'kill'.
7670 * target.h (kill_inferior): Removed macro.
7671 * tracepoint.c (gdb_agent_about_to_close): New.
7672 (gdb_agent_helper_thread): Handle command 'close'.
7673 Wait endlessly until the inferior stops.
7674 Install gdb_agent_remove_socket to atexit hook.
7675 (agent_socket_name): New static variable.
7676 (gdb_agent_socket_init): Replace local variable 'name' with
7677 'agent_socket_name'.
7678 (gdb_agent_remove_socket): New.
7679
5a3f286f
YQ
76802012-07-27 Yao Qi <yao@codesourcery.com>
7681
7682 * server.c (process_point_options): Stop at 'X' when parsing.
7683
961bd387
ME
76842012-07-19 Michael Eager <eager@eagercon.com>
7685
a261b8f5 7686 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7687 to hw_execute.
7688 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7689 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7690 hardware breakpoint.
7691
aa7c7447
JK
76922012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7693
7694 * gdbserver/linux-low.c (initialize_low): Call
7695 linux_ptrace_init_warnings.
7696
7f216e7c
DE
76972012-07-02 Doug Evans <dje@google.com>
7698
7699 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7700 pointer to int.
7701
d3ce09f5
SS
77022012-07-02 Stan Shebs <stan@codesourcery.com>
7703
7704 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7705 (ax.o): Add it to build rule.
7706 (ax-ipa.o): Ditto.
7707 (OBS): Add format.o.
7708 (IPA_OBS): Add format.o.
7709 * server.c (handle_query): Claim support for breakpoint commands.
7710 (process_point_options): Add command case.
7711 (process_serial_event): Leave running if there are printfs in
7712 effect.
7713 * mem-break.h (any_persistent_commands): Declare.
7714 (add_breakpoint_commands): Declare.
7715 (gdb_no_commands_at_breakpoint): Declare.
7716 (run_breakpoint_commands): Declare.
7717 * mem-break.c (struct point_command_list): New struct.
7718 (struct breakpoint): New field command_list.
7719 (any_persistent_commands): New function.
7720 (add_commands_to_breakpoint): New function.
7721 (add_breakpoint_commands): New function.
7722 (gdb_no_commands_at_breakpoint): New function.
7723 (run_breakpoint_commands): New function.
7724 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7725 locally.
7726 * ax.c: Include format.h.
7727 (ax_printf): New function.
7728 (gdb_eval_agent_expr): Add printf opcode.
7729
2f8f6aed
YQ
77302012-06-13 Yao Qi <yao@codesourcery.com>
7731
7732 * server.c (start_inferior): Remove duplicated writes to fields
7733 'last_resume_kind' and 'last_status' of 'current_inferior'.
7734
0c9070b3
YQ
77352012-06-12 Yao Qi <yao@codesourcery.com>
7736 Pedro Alves <palves@redhat.com>
7737
7738 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7739 comment.
7740 * server.c (handle_v_cont): Extend comment.
7741
c52daf70
YQ
77422012-06-11 Yao Qi <yao@codesourcery.com>
7743
7744 * linux-low.c (linux_attach): Add 'static'.
7745
d38bbb0a
YQ
77462012-06-06 Yao Qi <yao@codesourcery.com>
7747
7748 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7749
89dc0afd
JK
77502012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7751
7752 Fix gcc -flto compilation warning.
7753 * server.c (main): Make variable multi_mode and attach volatile.
7754
75f62ce7
TJB
77552012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7756
7757 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7758 if the platform doesn't know about it.
7759
65f479b6
PA
77602012-05-30 Jeff Kenton <jkenton@tilera.com>
7761
7762 * Makefile.in (SFILES): Add linux-tile-low.c.
7763 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7764 * configure.srv: Handle tilegx-*-linux*.
7765 * linux-tile-low.c: New file.
7766
0c5bf5a9
JK
77672012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7768
7769 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7770
a493e3e2
PA
77712012-05-24 Pedro Alves <palves@redhat.com>
7772
7773 PR gdb/7205
7774
43aaf8b6 7775 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7776
2ea28649
PA
77772012-05-24 Pedro Alves <palves@redhat.com>
7778
7779 PR gdb/7205
7780
7781 Replace target_signal with gdb_signal throughout.
7782
8d409d16
MR
77832012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7784
7785 * linux-low.c (linux_store_registers): Avoid the copying sequence
7786 when no data has been retrieved by ptrace.
7787
23512c01
MGD
77882012-05-22 Will Deacon <will.deacon@arm.com>
7789
7790 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7791 Include asm/ptrace.h.
7792 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7793 already defined.
7794
4934b29e
MR
77952012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7796
7797 * linux-low.c (linux_store_registers): Don't re-retrieve data
7798 with ptrace that has already been obtained from /proc. Always
7799 copy any data retrieved with ptrace to the buffer supplied.
7800
bde24c0a
PA
78012012-05-11 Yao Qi <yao@codesourcery.com>
7802 Pedro Alves <palves@redhat.com>
7803
7804 * linux-low.c (enum stopping_threads_kind): New.
7805 (stopping_threads): Change type to `enum stopping_threads_kind'.
7806 (handle_extended_wait): If stopping and suspending threads, leave
7807 the new_lwp suspended too.
7808 (linux_wait_for_event): Adjust.
7809 (stop_all_lwps): Set `stopping_threads' to
7810 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7811 whether we're suspending threads or just stopping them. Assert no
7812 recursion happens.
7813
623b6bdf
YQ
78142012-04-29 Yao Qi <yao@codesourcery.com>
7815
7816 * server.h: Move some code to ...
7817 * gdbthread.h: ... here. New.
7818 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7819 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7820 (nto-low.o, win32-low.o): Likewise.
7821 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7822 * regcache.c, remote-utils.c, server.c: Likewise.
7823 * target.c, tracepoint.c, win32-low.c: Likewise.
7824
f15f9948
TJB
78252012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7826
7827 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7828 (PTRACE_ARG4_TYPE): Likewise.
7829 (PTRACE_XFER_TYPE): Likewise.
7830 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7831 ptrace to PTRACE_ARG3_TYPE.
7832 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7833 (PTRACE_ARG4_TYPE): Likewise.
7834 (PTRACE_XFER_TYPE): Likewise.
7835 (linux_detach_one_lwp): Cast fourth argument of
7836 ptrace to long then PTRACE_ARG4_TYPE.
7837 (regsets_fetch_inferior_registers): Cast third argument of
7838 ptrace to long then PTRACE_ARG3_TYPE.
7839 (regsets_store_inferior_registers): Likewise.
7840
38ea300a
PA
78412012-04-20 Pedro Alves <palves@redhat.com>
7842
7843 * configure: Regenerate.
7844
c971b7fa
PA
78452012-04-19 Pedro Alves <palves@redhat.com>
7846
43aaf8b6 7847 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7848 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7849 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7850 (all, install-only, uninstall, clean-info, all-lib, clean): No
7851 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7852 (maintainer-clean realclean distclean): Use subdir_do.
7853 (subdir_do): New.
7854 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7855 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7856 * acinclude.m4: Include acx_configure_dir.m4.
7857 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7858 calls. Call AC_PROG_RANLIB. Configure gnulib using
7859 ACX_CONFIGURE_DIR.
7860 (GNULIB): New.
7861 (GNULIB_STDINT_H): Adjust.
7862 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7863 * gdbreplay.c: Include build-gnulib/config.h.
7864 * server.h: Likewise.
7865 * aclocal.m4: Regenerate.
7866 * config.in: Regenerate.
7867 * configure: Regenerate.
c971b7fa 7868
809277f8
PA
78692012-04-19 Pedro Alves <palves@redhat.com>
7870
7871 * Makefile.in (LIBGNU, INCGNU): Adjust.
7872 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7873 (all, install-only, uninstall, clean-info, all-lib, clean)
7874 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7875 * configure.ac: Adjust AC_OUTPUT output.
7876 * aclocal.m4: Regenerate.
7877 * configure: Regenerate.
7878
fd9bb8b8
PA
78792012-04-19 Pedro Alves <palves@redhat.com>
7880
7881 * Makefile.in (generated_files): New.
7882 (server_h): Remove the explicit dependency on config.h, and depend
7883 on $generated_files.
7884
1c298c66
PA
78852012-04-19 Pedro Alves <palves@redhat.com>
7886
7887 * Makefile.in (INCGNU): Add -Ignulib.
7888
57c4b50b
PA
78892012-04-19 Pedro Alves <palves@redhat.com>
7890
7891 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7892 (INCGNU): ... this, and spell out -I here.
7893 (GNULIB_LIB): Rename to ...
7894 (LIBGNU): ... this.
7895 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7896
1030e047
PA
78972012-04-19 Pedro Alves <palves@redhat.com>
7898
7899 * config.in: Regenerate.
7900
447d4319
PA
79012012-04-19 Pedro Alves <palves@redhat.com>
7902
7903 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7904 * server.h (memmem): Remove declaration.
7905 * config.in: Regenerate.
7906 * configure: Regenerate.
7907
aad9eab9
YQ
79082012-04-19 Yao Qi <yao@codesourcery.com>
7909
7910 * Makefile.in (SFILES): Add common/vec.c.
7911 (OBS): Add vec.o.
7912 (vec.o): New rule.
7913
3e10640f
YQ
79142012-04-19 Yao Qi <yao@codesourcery.com>
7915
7916 * remote-utils.c (prepare_resume_reply): Replace with macro
7917 target_core_of_thread.
7918 * server.c (handle_qxfer_threads_proper): Likewise.
7919 * target.h (traget_core_of_thread): New macro.
7920
71622373
PA
79212012-04-18 Pedro Alves <palves@redhat.com>
7922
7923 * aclocal.m4: Regenerate.
7924 * configure: Regenerate.
7925
80d26939
YQ
79262012-04-16 Yao Qi <yao@codesourcery.com>
7927
7928 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7929 duplicated on address.
7930
42476b70
YQ
79312012-04-16 Yao Qi <yao@codesourcery.com>
7932
7933 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7934 (struct tracepoint_action_ops) <send>: New field.
7935 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7936 (agent_expr_send, x_tracepoint_action_send): New.
7937 (l_tracepoint_action_send): New.
7938 (cmd_qtdp): Download and install tracepoint
7939 according to `use_agent'.
7940 (run_inferior_command): Add one more parameter `len'.
7941 Update callers.
7942 (tracepoint_send_agent): New.
7943 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7944
7bc83639
YQ
79452012-04-16 Yao Qi <yao@codesourcery.com>
7946
7947 * tracepoint.c (download_tracepoints): Moved to ...
7948 (cmd_qtstart): ... here.
7949
5f18041e
YQ
79502012-04-14 Yao Qi <yao@codesourcery.com>
7951
7952 * tracepoint.c: Include inttypes.h.
7953 (struct collect_memory_action): Use sized types.
7954 (struct tracepoint): Likewise.
7955 (cmd_qtdp, stop_tracing): Update print specifiers.
7956 (cmd_qtp, response_tracepoint): Likewise.
7957 (collect_data_at_tracepoint): Likewise.
7958 (collect_data_at_step): Likewise.
7959
55a8c076
YQ
79602012-04-14 Yao Qi <yao@codesourcery.com>
7961
7962 Import gnulib module inttypes.
7963 * aclocal.m4, config.in, configure: Regenerated.
7964
dc750257
YQ
79652012-04-14 Yao Qi <yao@codesourcery.com>
7966
7967 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7968 Makefile and config.status at last.
7969
0ab5faf9
YQ
79702012-04-13 Yao Qi <yao@codesourcery.com>
7971
7972 * tracepoint.c: Include stdint.h unconditionally.
7973
18f5fd81
TJB
79742012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7975
7976 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7977 on BFD_HAVE_SYS_PROCFS_TYPE.
7978 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7979 * configure: Regenerate.
7980 * config.in: Likewise.
7981
4d47af5c
L
79822012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7983
7984 * Makefile.in (clean): Also remove x32.c x32-linux.c
7985 x32-avx.c x32-avx-linux.c.
7986 (x32.o): New target.
7987 (x32.c): Likewise.
7988 (x32-linux.o): Likewise.
7989 (x32-linux.c): Likewise.
7990 (x32-avx.o): Likewise.
7991 (x32-avx.c): Likewise.
7992 (x32-avx-linux.o): Likewise.
7993 (x32-avx-linux.c): Likewise.
7994
7995 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7996 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7997 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7998 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7999 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8000 i386/x32-avx-linux.xml.
8001
8002 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8003 (init_registers_x32_avx_linux): Likwise.
8004 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8005 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8006
ecedbe58
PA
80072012-04-13 Pedro Alves <palves@redhat.com>
8008
8009 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8010 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8011 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8012 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8013 the sub-make.
8014
c92b5177
L
80152012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8016
8017 * linux-x86-low.c (compat_x32_clock_t): New.
8018 (compat_x32_siginfo_t): Likewise.
8019 (compat_x32_siginfo_from_siginfo): Likewise.
8020 (siginfo_from_compat_x32_siginfo): Likewise.
8021 (linux_is_elf64): Likewise.
8022 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8023 and siginfo_from_compat_x32_siginfo for x32.
8024 (x86_arch_setup): Set linux_is_elf64.
8025
214d508e
L
80262012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8027
8028 PR gdb/13969
8029 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8030 e_machine field.
8031 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8032 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8033 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8034 compatible with process.
8035
c9a1864a
YQ
80362012-04-12 Yao Qi <yao@codesourcery.com>
8037
8038 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8039 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8040 (install-only, install-info, clean): Handle sub dir gnulib.
8041 (all-lib, am--refresh): New targets.
8042 (memmem.o): Remove target.
8043 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8044 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8045 (AC_REPLACE_FUNCS): Remove memmem.
8046 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8047 (AC_OUTPUT): Generate Makefile in gnulib/.
8048 * aclocal.m4, config.in, configure: Regenerated.
8049
367ba2c2
MR
80502012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8051
8052 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8053
9d236627
PA
80542012-04-05 Pedro Alves <palves@redhat.com>
8055
8056 -Werror=strict-aliasing
8057
8058 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8059 pointer.
8060
111217b3
PA
80612012-04-04 Pedro Alves <palves@redhat.com>
8062
8063 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8064 (sparc_store_gregset_from_stack, sparc_store_gregset)
8065 (sparc_breakpoint_at): Fix formatting.
8066
8365dcf5
TJB
80672012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8068
8069 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8070 are available.
8071 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8072 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8073 * config.in: Regenerate.
8074 * configure: Likewise.
8075
689cc2ae
PA
80762012-03-29 Pedro Alves <palves@redhat.com>
8077
8078 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8079 Correct ptrace arguments.
8080
c14dfd32
PA
80812012-03-28 Pedro Alves <palves@redhat.com>
8082
8083 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8084 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8085 (IA64_FR1_REGNUM): New defines.
8086 (ia64_fetch_register): New.
8087 (the_low_target): Install it.
8088 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8089 field.
8090 * linux-low.c (linux_fetch_registers): Try the
8091 the_low_target.fetch_register hook first.
8092
8093 * linux-arm-low.c (the_low_target): Adjust.
8094 * linux-bfin-low.c (the_low_target): Adjust.
8095 * linux-cris-low.c (the_low_target): Adjust.
8096 * linux-crisv32-low.c (the_low_target): Adjust.
8097 * linux-m32r-low.c (the_low_target): Adjust.
8098 * linux-m68k-low.c (the_low_target): Adjust.
8099 * linux-mips-low.c (the_low_target): Adjust.
8100 * linux-ppc-low.c (the_low_target): Adjust.
8101 * linux-s390-low.c (the_low_target): Adjust.
8102 * linux-sh-low.c (the_low_target): Adjust.
8103 * linux-sparc-low.c (the_low_target): Adjust.
8104 * linux-tic6x-low.c (the_low_target): Adjust.
8105 * linux-x86-low.c (the_low_target): Adjust.
8106 * linux-xtensa-low.c (the_low_target): Adjust.
8107
63c88e13
PA
81082012-03-26 Pedro Alves <palves@redhat.com>
8109
8110 * server.c (handle_qxfer_libraries): Don't bail early if
8111 the_target->qxfer_libraries_svr4 is not NULL.
8112
fb723180
PA
81132012-03-26 Pedro Alves <palves@redhat.com>
8114
8115 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8116
0afae3cf
PA
81172012-03-23 Pedro Alves <palves@redhat.com>
8118
8119 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8120 "library-list-svr4" element's start tag when the the DSO list is
8121 empty.
8122
485f1ee4
PA
81232012-03-23 Pedro Alves <palves@redhat.com>
8124
8125 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8126 a variable whose type size is the same as the inferior's pointer
8127 size.
8128
a5362b9a
TS
81292012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8130
8131 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8132 struct siginfo.
8133 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8134 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8135 * linux-low.h: Include <signal.h>.
8136 (struct siginfo): Remove forward declaration.
8137 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8138 struct siginfo.
8139
d226c142
MF
81402012-03-21 Mike Frysinger <vapier@gentoo.org>
8141
8142 * .gitignore: Ignore more files.
8143
122f36ef
PA
81442012-03-19 Pedro Alves <palves@redhat.com>
8145 Jan Kratochvil <jan.kratochvil@redhat.com>
8146
8147 * server.c (cont_thread, general_thread): Add describing comments.
8148 (start_inferior): Clear `cont_thread'.
8149 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8150 of a process.
8151
fc3e5175
YQ
81522012-03-15 Yao Qi <yao@codesourcery.com>
8153
8154 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8155 handling to ...
8156 (cmd_qtdp): ... here.
8157
8d0d92cd
YQ
81582012-03-15 Yao Qi <yao@codesourcery.com>
8159
8160 * tracepoint.c (struct tracepoint_action_ops): New.
8161 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8162 (m_tracepoint_action_download): New.
8163 (r_tracepoint_action_download): New.
8164 (x_tracepoint_action_download): New.
8165 (l_tracepoint_action_download): New.
8166 (add_tracepoint_action): Install `action->ops' according type.
8167 (download_tracepoint_1): Move code `download' function pointer
8168 of various tracepoint_action_ops.
8169
87b0bb13
JK
81702012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8171
8172 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8173 linux_ptrace_attach_warnings.
8174
5f572dec
JK
81752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8176
8177 * Makefile.in (linux-ptrace.o): New.
8178 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8179 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8180 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8181 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8182 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8183 of these targets.
8184 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8185
f4647387
YQ
81862012-03-08 Yao Qi <yao@codesourcery.com>
8187 Pedro Alves <palves@redhat.com>
8188
8189 Fix PR server/13392.
8190 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8191 offset of JMP insn.
8192 * tracepoint.c (remove_tracepoint): New.
8193 (cmd_qtdp): Call remove_tracepoint when failed to install.
8194
9b224c5e
PA
81952012-03-07 Pedro Alves <palves@redhat.com>
8196
8197 * linux-low.c (get_detach_signal): New.
8198 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8199 Pass on pending signals to PTRACE_DETACH. Check the result of the
8200 ptrace call.
8201 * server.c (program_signals, program_signals_p): New.
8202 (handle_general_set): Handle QProgramSignals.
8203 * server.h (program_signals, program_signals_p): Declare.
8204
e237a7e2
JK
82052012-03-05 Pedro Alves <palves@redhat.com>
8206 Jan Kratochvil <jan.kratochvil@redhat.com>
8207
8208 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8209 New comment why.
8210
5808517f
YQ
82112012-03-03 Yao Qi <yao@codesourcery.com>
8212
8213 * tracepoint.c (tracepoint_look_up_symbols): Update call to
8214 agent_look_up_symbols.
8215
58b4daa5
YQ
82162012-03-03 Yao Qi <yao@codesourcery.com>
8217
8218 * Makefile.in (linux-low.o): Keep dependence on agent.h.
8219 (linux-x86-low.o): Likewise.
8220 * server.h: Remove in_process_agent_loaded.
8221 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
8222 common/agent.c.
8223 Update callers.
8224
8ffcbaaf
YQ
82252012-03-03 Yao Qi <yao@codesourcery.com>
8226
8227 * tracepoint.c (gdb_agent_capability): New global.
8228 (in_process_agent_loaded_ust): Renamed to
8229 `in_process_agent_supports_ust'.
8230 Update callers.
8231 (in_process_agent_supports_ust): Call agent_capability_check.
8232 (clear_installed_tracepoints): Assert that agent supports
8233 agent.
8234
d1feda86
YQ
82352012-03-03 Yao Qi <yao@codesourcery.com>
8236
8237 * linux-low.c (linux_supports_agent): New.
8238 (linux_target_ops): Initialize field `supports_agent' with
8239 linux_supports_agent.
8240 * target.h (struct target_ops) <supports_agent>: New.
8241 (target_supports_agent): New macro.
8242 * server.c (handle_general_set): Handle packet 'QAgent'.
8243 (handle_query): Send `QAgent+'.
8244 * Makefile.in (server.o): Depends on agent.h.
8245
2fa291ac
YQ
82462012-03-03 Yao Qi <yao@codesourcery.com>
8247
8248 * Makefile.in (OBS): Add agent.o.
8249 Add new rule for agent.o.
8250 Track dependence of tracepoint.c on agent.h.
8251 * tracepoint.c (run_inferior_command_1):
8252 (run_inferior_command): Call agent_run_command.
8253 (gdb_ust_connect_sync_socket): Deleted. Move it to
8254 common/agent.c.
8255 (resume_thread, stop_thread): Likewise.
8256 (gdb_ust_socket_init): Renamed to ...
8257 (gdb_agent_socket_init): ... New.
8258 (gdb_ust_thread): Renamed to ...
8259 (gdb_agent_helper_thread): ... New.
8260 (gdb_ust_init): Move some code to ...
8261 (gdb_agent_init): ... here. New.
8262 [HAVE_UST]: Call gdb_ust_init.
8263 (initialize_tracepoint_ftlib): Call gdb_agent_init.
8264 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8265 * config.in, configure: Regenerated.
8266
05044653
PA
82672012-03-02 Pedro Alves <palves@redhat.com>
8268
8269 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8270 * linux-low.c (struct simple_pid_list): New.
8271 (stopped_pids): New a struct simple_pid_list pointer.
8272 (add_to_pid_list, pull_pid_from_list): New.
8273 (handle_extended_wait): Don't assume the first signal new children
8274 report is SIGSTOP. Adjust call to pull_pid_from_list.
8275 (linux_wait_for_lwp): Adjust.
8276
8d00225b
YQ
82772012-03-02 Yao Qi <yao@codesourcery.com>
8278
8279 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8280 debug log.
8281
19560ba5
YQ
82822012-03-02 Yao Qi <yao@codesourcery.com>
8283
8284 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8285 `stop_pc' and `tpoint'. Update caller.
8286
1faeff08
MR
82872012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
8288
8289 * linux-low.h (linux_target_ops): Add regset_bitmap member.
8290 * linux-low.c (use_linux_regsets): New macro.
8291 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8292 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8293 (linux_register_in_regsets): New function.
8294 (usr_fetch_inferior_registers): Skip registers covered by
8295 regsets.
8296 (usr_store_inferior_registers): Likewise.
8297 (usr_fetch_inferior_registers): New macro.
8298 (usr_store_inferior_registers): Likewise.
8299 (linux_fetch_registers): Handle mixed regset/non-regset targets.
8300 (linux_store_registers): Likewise.
8301 * linux-mips-low.c (init_registers_mips_dsp_linux): New
8302 prototype.
8303 (init_registers_mips64_dsp_linux): Likewise.
8304 (init_registers_mips_linux): New macro.
8305 (init_registers_mips_dsp_linux): Likewise.
8306 (mips_dsp_num_regs): Likewise.
8307 (DSP_BASE, DSP_CONTROL): New fallback macros.
8308 (mips_base_regs): New macro.
8309 (mips_regmap): Use it. Fix the size.
8310 (mips_dsp_regmap): New variable.
8311 (mips_dsp_regset_bitmap): Likewise.
8312 (mips_arch_setup): New function.
8313 (mips_cannot_fetch_register): Use the_low_target.regmap rather
8314 than mips_regmap.
8315 (mips_cannot_store_register): Likewise.
8316 (the_low_target): Update .arch_setup, .num_regs and .regmap
8317 initializers. Add .regset_bitmap initializer.
8318 * linux-arm-low.c (the_low_target): Add .regset_bitmap
8319 initializer.
8320 * linux-bfin-low.c (the_low_target): Likewise.
8321 * linux-cris-low.c (the_low_target): Likewise.
8322 * linux-crisv32-low.c (the_low_target): Likewise.
8323 * linux-ia64-low.c (the_low_target): Likewise.
8324 * linux-m32r-low.c (the_low_target): Likewise.
8325 * linux-m68k-low.c (the_low_target): Likewise.
8326 * linux-ppc-low.c (the_low_target): Likewise.
8327 * linux-s390-low.c (the_low_target): Likewise.
8328 * linux-sh-low.c (the_low_target): Likewise.
8329 * linux-sparc-low.c (the_low_target): Likewise.
8330 * linux-tic6x-low.c (the_low_target): Likewise.
8331 * linux-x86-low.c (the_low_target): Likewise.
8332 * linux-xtensa-low.c (the_low_target): Likewise.
8333 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8334 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8335 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8336 srv_xmlfiles.
8337 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8338 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8339
c03e6ccc
YQ
83402012-02-29 Yao Qi <yao@codesourcery.com>
8341 Pedro Alves <palves@redhat.com>
8342
8343 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8344 `step_over_finished' is true.
8345
644cebc9
PA
83462012-02-27 Pedro Alves <palves@redhat.com>
8347
8348 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8349 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8350
c14d7ab2
PA
83512012-02-27 Pedro Alves <palves@redhat.com>
8352
8353 PR server/9684
8354 * linux-low.c (pid_is_stopped): New.
8355 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8356
412c89dd
LM
83572012-02-25 Luis Machado <lgustavo@codesourcery.com>
8358
8359 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8360 of conditions.
8361
b745defe
MR
83622012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8363
8364 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8365
9f3a5c85
LM
83662012-02-24 Luis Machado <lgustavo@codesourcery>
8367
8368 * server.c (handle_query): Advertise support for target-side
8369 breakpoint condition evaluation.
8370 (process_point_options): New function.
8371 (process_serial_event): When inserting a breakpoint, check for
8372 a target-side condition that should be evaluated.
8373
8374 * mem-break.c: Include regcache.h and ax.h.
8375 (point_cond_list_t): New data structure.
8376 (breakpoint) <cond_list>: New field.
8377 (find_gdb_breakpoint_at): Make non-static.
8378 (delete_gdb_breakpoint_at): Clear any target-side
8379 conditions.
8380 (clear_gdb_breakpoint_conditions): New function.
8381 (add_condition_to_breakpoint): Likewise.
8382 (add_breakpoint_condition): Likewise.
8383 (gdb_condition_true_at_breakpoint): Likewise.
8384 (gdb_breakpoint_here): Return result directly instead
8385 of going through a local variable.
8386
8387 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8388 (clear_gdb_breakpoint_conditions): Likewise.
8389 (add_breakpoint_condition): Likewise.
8390 (gdb_condition_true_at_breakpoint): Likewise.
8391
8392 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8393 (need_step_over_p): Take target-side breakpoint condition into
8394 consideration.
8395
5e1dc496
LM
83962012-02-24 Luis Machado <lgustavo@codesourcery>
8397
8398 * server.h: Include tracepoint.h.
8399 (agent_mem_read, agent_get_trace_state_variable_value,
8400 agent_set_trace_state_variable_value,
8401 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8402 get_set_tsv_func_addr): New prototypes.
8403
8404 * ax.h: New include file.
8405 * ax.c: New source file.
8406
8407 * tracepoint.c: Include ax.h.
8408 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8409 agent_expr, eval_result_type): Move to ax.h.
8410 (parse_agent_expr): Rename to ...
8411 (gdb_parse_agent_expr): ... this, make it non-static and move
8412 to ax.h.
8413 (unparse_agent_expr) Rename to ...
8414 (gdb_unparse_agent_expr): ... this, make it non-static and move
8415 to ax.h.
8416 (eval_agent_expr): Rename to ...
8417 (eval_tracepoint_agent_expr): ... this.
8418 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8419 forward declarations.
8420 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8421 (agent_get_trace_state_variable_value): New function.
8422 (agent_set_trace_state_variable_value): New function.
8423 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8424 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8425 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8426 (condition_true_at_tracepoint): Likewise.
8427 (parse_agent_expr): Rename to ...
8428 (gdb_parse_agent_expr): ... this and move to ax.c.
8429 (unparse_agent_expr): Rename to ...
8430 (gdb_unparse_agent_expr): ... this and move to ax.c.
8431 (gdb_agent_op_name): Move to ax.c.
8432 (eval_agent_expr): Rename to ...
8433 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8434 and move to ax.c.
8435 (eval_tracepoint_agent_expr): New function.
8436 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8437 non-static.
5e1dc496
LM
8438 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8439 ax.c.
8440 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8441 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8442 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8443 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8444 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8445 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8446 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8447 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8448 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8449 (compile_bytecodes): Remove forward declaration.
8450 (is_goto_target): Move to ax.c.
8451 (compile_bytecodes): Move to ax.c and call
8452 agent_get_trace_state_variable_value (...) and
8453 agent_set_trace_state_variable_value (...).
8454
8455 * Makefile.in: Update ax.c and IPA dependencies.
8456
277e4e52
PA
84572012-02-24 Pedro Alves <palves@redhat.com>
8458
8459 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8460 (cmd_bigqtbuffer_circular): ... this. Only handle
8461 'QTBuffer:circular:'.
8462 (handle_tracepoint_general_set): Adjust.
8463
bf4c19f7
YQ
84642012-02-16 Yao Qi <yao@codesourcery.com>
8465
8466 * inferiors.c: Move code to ...
8467 * dll.c: .... here. New.
8468 * server.h: Declare clear_dlls.
8469 * Makefile.in (SFILES): Add dll.c.
8470 (OBS): Add dll.o
8471 (dll.o): New rule.
8472
d73f2619
YQ
84732012-02-11 Yao Qi <yao@codesourcery.com>
8474
8475 * server.c: (handle_monitor_command): Add a new parameter
8476 `own_buf'.
8477 (handle_query): Update caller.
8478
f8255c2a
JB
84792012-02-09 Joel Brobecker <brobecker@adacore.com>
8480
8481 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8482 * configure, config.in: Regenerate.
8483 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8484 is not defined.
8485
da84f473
PA
84862012-02-02 Pedro Alves <palves@redhat.com>
8487
8488 Try SIGKILL first, then PTRACE_KILL.
8489 * linux-low.c (linux_kill_one_lwp): New.
8490 (linux_kill_one_lwp): Rename to ...
8491 (kill_one_lwp_callback): ... this. Use the new
8492 linux_kill_one_lwp.
8493
e886a173
PA
84942012-02-02 Pedro Alves <palves@redhat.com>
8495
8496 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8497 inferior.
8498
be07f1a2
PA
84992012-01-27 Pedro Alves <palves@redhat.com>
8500
8501 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8502 (elf_64_file_p): Make static.
8503 (linux_pid_exe_is_elf_64_file): New.
8504 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8505 Delete declarations.
8506 (linux_pid_exe_is_elf_64_file): Declare.
8507 * linux-x86-low.c (x86_arch_setup): Use
8508 linux_pid_exe_is_elf_64_file.
8509
d8301ad1
JK
85102012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8511
8512 * linux-low.c (linux_wait_for_event_1): Rename to ...
8513 (linux_wait_for_event): ... here and merge it with former
8514 linux_wait_for_event - new variable wait_ptid, use it.
8515 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8516
01b17894
PA
85172012-01-23 Pedro Alves <palves@redhat.com>
8518
8519 * server.c (main): Avoid yet another case of infinite loop while
8520 detaching/killing after a longjmp.
8521
e825046f
JK
85222012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8523
8524 Code cleanup.
8525 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8526
b9e7b9c3
UW
85272012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8528
8529 * hostio.c (handle_readlink): New function.
8530 (handle_vFile): Call it to handle "vFile:readlink" packets.
8531
901f9912
UW
85322012-01-20 Pedro Alves <palves@redhat.com>
8533 Ulrich Weigand <ulrich.weigand@linaro.org>
8534
8535 * server.c (handle_v_requests): Only support vAttach and vRun to
8536 start multiple processes when in extended protocol mode.
8537
fc1ab1a0
PA
85382012-01-17 Pedro Alves <palves@redhat.com>
8539
8540 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8541 memalign plus mprotect to allocate the scratch buffer.
8542
7d5d4e98
PA
85432012-01-13 Pedro Alves <palves@redhat.com>
8544
8545 * server.c (attach_inferior): Clear `cont_thread'.
8546
f128d5e9
PA
85472012-01-13 Pedro Alves <palves@redhat.com>
8548
8549 * server.c (main): Avoid infinite loop while detaching/killing
8550 after a longjmp.
8551
06db92f0
DE
85522012-01-09 Doug Evans <dje@google.com>
8553
8554 * server.c (start_inferior): Set last_ptid in --wrapper case.
8555
32d92999
YQ
85562012-01-06 Yao Qi <yao@codesourcery.com>
8557
8558 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8559 defined.
8560 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8561
5e0a92a9
YQ
85622012-01-04 Yao Qi <yao@codesourcery.com>
8563
8564 * tracepoint.c (cmd_qtdp): Print debug message
8565 for static tracepoint.
8566
ae639e8c
YQ
85672012-01-04 Yao Qi <yao@codesourcery.com>
8568
8569 * tracepoint.c (trace_vdebug): Differentiate debug message
8570 between gdbserver and IPA.
8571
f72429c5
YQ
85722012-01-03 Yao Qi <yao@codesourcery.com>
8573
8574 * tracepoint.c (tracepoint_was_hit): Don't collect for
8575 static tracepoint.
8576
12c3e59c
JB
85772012-01-02 Joel Brobecker <brobecker@adacore.com>
8578
8579 * terminal.h: Reformat copyright header.
8580
67827812
JB
85812012-01-02 Joel Brobecker <brobecker@adacore.com>
8582
8583 * server.c (gdbserver_version): Update copyright year.
8584 * gdbreplay.c (gdbreplay_version): Likewise.
8585
3e52c33d
JK
85862011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8587
8588 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8589
8590 Revert:
8591 2011-12-18 Hui Zhu <teawater@gmail.com>
8592 * linux-low.c (linux_create_inferior): Save return value to ret.
8593
66f1260e
HZ
85942011-12-18 Hui Zhu <teawater@gmail.com>
8595
8596 * linux-low.c (linux_create_inferior): Save return value to ret.
8597
e77616d7
DE
85982011-12-16 Doug Evans <dje@google.com>
8599
e7b06c57
DE
8600 * linux-low.c (linux_create_inferior): If stdio connection,
8601 redirect stdin from /dev/null, stdout to stderr.
8602 * remote-utils.c (remote_is_stdio): New static global.
8603 (remote_connection_is_stdio): New function.
8604 (remote_prepare): Handle stdio connection.
8605 (remote_open): Ditto.
8606 (remote_close): Don't close stdin for stdio connections.
8607 (read_prim,write_prim): New functions. Replace all calls to
8608 read/write to these.
8609 * server.c (main): Watch for "-" argument. Move call to
8610 remote_prepare before start_inferior.
8611 * server.h (STDIO_CONNECTION_NAME): New macro.
8612 (remote_connection_is_stdio): Declare.
8613
e77616d7
DE
8614 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8615 in debugging output.
8616
82067193
YQ
86172011-12-15 Yao Qi <yao@codesourcery.com>
8618
8619 * tracepoint.c: Include sys/syscall.h.
8620 (gdb_ust_thread): Remove preprocessor conditional.
8621
82bfbe7e
PA
86222011-12-14 Pedro Alves <pedro@codesourcery.com>
8623
8624 * linux-low.c (linux_detach_one_lwp): Call
8625 the_low_target.prepare_to_resume before detaching.
8626
712c6575
YQ
86272011-12-14 Yao Qi <yao@codesourcery.com>
8628
8629 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8630 of write.
8631
d54d1edf
YQ
86322011-12-14 Yao Qi <yao@codesourcery.com>
8633
8634 * i386-low.c (i386_low_stopped_data_address): Initialize local
8635 variable `control'.
8636
6210a125
PA
86372011-12-13 Pedro Alves <pedro@codesourcery.com>
8638
8639 PR remote/13492
8640
8641 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8642 DR_CONTROL unless necessary. Extend comments.
8643 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8644 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8645
2ece8244
YQ
86462011-12-13 Yao Qi <yao@codesourcery.com>
8647
8648 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8649 macros.
8650 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8651
784867a5
JK
86522011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8653
8654 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8655 Print new debug message for such case.
8656
6bf36717
JK
86572011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8658
8659 Fix overlapping memcpy.
8660 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8661 the read_inferior_memory transfer.
8662 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8663 write_inferior_memory transfer.
8664 (set_fast_tracepoint_jump): New variable buf. Use it for the
8665 read_inferior_memory and write_inferior_memory transfers.
8666 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8667 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8668 Use it for the write_inferior_memory transfer.
8669 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8670 buffers.
8671
50275556
MR
86722011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8673
8674 * linux-low.c (fetch_register, store_register): Make code
8675 consistent, fix formatting.
8676
7325beb4
MR
86772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8678
8679 * linux-low.c (usr_store_inferior_registers): Factor out code
8680 to handle individual registers into...
8681 (store_register): ... this new function.
8682
c642a434
UW
86832011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8684
8685 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8686 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8687 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8688 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8689 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8690 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8691 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8692 (srv_xmlfiles): Add new XML files.
8693
8694 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8695 and <sys/uio.h>.
8696 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8697 (init_registers_s390_linux32v1): Add prototype.
8698 (init_registers_s390_linux32v2): Likewise.
8699 (init_registers_s390_linux64v1): Likewise.
8700 (init_registers_s390_linux64v2): Likewise.
8701 (init_registers_s390x_linux64v1): Likewise.
8702 (init_registers_s390x_linux64v2): Likewise.
8703 (s390_num_regs): Increment to 52.
8704 (s390_regmap): Add orig_r2 register.
8705 (s390_num_regs_3264): Increment to 68.
8706 (s390_regmap_3264): Add orig_r2 register.
8707 (s390_collect_ptrace_register): Handle orig_r2 register.
8708 (s390_supply_ptrace_register): Likewise.
8709 (s390_fill_last_break): New function.
8710 (s390_store_last_break): Likewise.
8711 (s390_fill_system_call): New function.
8712 (s390_store_system_call): Likewise.
8713 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8714 register sets.
8715 (s390_check_regset): New function.
8716 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8717 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8718 Update target_regsets for available register sets.
8719
2268b414
JK
87202011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8721 Jan Kratochvil <jan.kratochvil@redhat.com>
8722
8723 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8724 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8725 New.
8726 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8727 * linux-low.h (struct process_info_private): New member r_debug.
8728 * server.c (handle_qxfer_libraries): Call
8729 the_target->qxfer_libraries_svr4.
8730 (handle_qxfer_libraries_svr4): New function.
8731 (qxfer_packets): New entry "libraries-svr4".
8732 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8733 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8734 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8735 PACKET_qXfer_libraries_svr4.
8736
d6db1fab
UW
87372011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8738
8739 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8740 PSW address/mask between 8-byte and 16-byte formats.
8741 (s390_supply_ptrace_register): Likewise.
8742 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8743 basic addressing mode bit.
8744
242f5f1c
SS
87452011-11-24 Stan Shebs <stan@codesourcery.com>
8746
8747 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8748
f196051f
SS
87492011-11-17 Stan Shebs <stan@codesourcery.com>
8750
8751 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8752 (tracing_start_time): New global.
8753 (tracing_stop_time): New global.
8754 (tracing_user_name): New global.
8755 (tracing_notes): New global.
8756 (tracing_stop_note): New global.
8757 (cmd_qtstart): Set traceframe_usage, start_time.
8758 (stop_tracing): Set stop_time.
8759 (cmd_qtstatus): Report additional status.
8760 (cmd_qtp): New function.
8761 (handle_tracepoint_query): Call it.
8762 (cmd_qtnotes): New function.
8763 (handle_tracepoint_general_set): Call it.
8764 (get_timestamp): Rename from tsv_get_timestamp.
8765
405f8e94
SS
87662011-11-14 Stan Shebs <stan@codesourcery.com>
8767 Kwok Cheung Yeung <kcy@codesourcery.com>
8768
8769 * linux-x86-low.c (small_jump_insn): New.
8770 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8771 trampoline and error message, build a trampoline and issue a small
8772 jump instruction to it.
8773 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8774 trampoline and error message.
8775 (x86_get_min_fast_tracepoint_insn_len): New.
8776 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8777 * linux-low.h (struct linux_target_ops): Add arguments to
8778 install_fast_tracepoint_jump_pad operation, add new operation.
8779 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8780 arguments.
8781 (linux_get_min_fast_tracepoint_insn_len): New function.
8782 (linux_target_op): Add new operation.
8783 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8784 (gdb_trampoline_buffer_end): Ditto.
8785 (gdb_trampoline_buffer_error): Ditto.
8786 (struct ipa_sym_addresses): Add fields for new IPA variables.
8787 (symbol_list): Add entries for new IPA variables.
8788 (struct tracepoint): Add fields to hold the address range of the
8789 trampoline used by the tracepoint.
8790 (trampoline_buffer_head): New static variable.
8791 (trampoline_buffer_tail): Ditto.
8792 (claim_trampoline_space): New function.
8793 (have_fast_tracepoint_trampoline_buffer): New function.
8794 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8795 structure.
8796 (install_fast_tracepoint): Ditto, also add error buffer argument.
8797 (cmd_qtminftpilen): New function.
8798 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8799 (fast_tracepoint_from_trampoline_address): New function.
8800 (fast_tracepoint_collecting): Handle trampoline as part of jump
8801 pad space.
8802 (set_trampoline_buffer_space): New function.
8803 (initialize_tracepoint): Initialize new IPA variables.
8804 * target.h (struct target_ops): Add arguments to
8805 install_fast_tracepoint_jump_pad operation, add new
8806 get_min_fast_tracepoint_insn_len operation.
8807 (target_get_min_fast_tracepoint_insn_len): New.
8808 (install_fast_tracepoint_jump_pad): Add arguments.
8809 * server.h (IPA_BUFSIZ): Define.
8810 * linux-i386-ipa.c: Include extra header files.
8811 (initialize_fast_tracepoint_trampoline_buffer): New function.
8812 (initialize_low_tracepoint): Call it.
8813 * server.h (set_trampoline_buffer_space): Declare.
8814 (claim_trampoline_space): Ditto.
8815 (have_fast_tracepoint_trampoline_buffer): Ditto.
8816
1e4d1764
YQ
88172011-11-14 Yao Qi <yao@codesourcery.com>
8818
8819 * server.c (handle_query): Handle InstallInTrace for qSupported.
8820 * tracepoint.c (add_tracepoint): Sort list.
8821 (install_tracepoint, download_tracepoint): New.
8822 (cmd_qtdp): Call them to install and download tracepoints.
8823 (sort_tracepoints): Removed.
8824 (cmd_qtstart): Update.
8825
5c73ff4e
YQ
88262011-11-14 Yao Qi <yao@codesourcery.com>
8827
8828 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8829 * mem-break.h: Declare.
8830 * tracepoint.c (cmd_qtstart): Move some code to ...
8831 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8832 New.
8833 (download_tracepoints): Move some code to ...
8834 (download_tracepoint_1): ... here. New.
8835
86a30030
YQ
88362011-11-08 Yao Qi <yao@codesourcery.com>
8837
8838 * remote-utils.c (relocate_instruction): A comment fix.
8839
8d26e50c
JB
88402011-11-07 Joel Brobecker <brobecker@adacore.com>
8841
8842 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8843 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8844 dr_status_mirror and dr_control_mirror from debug_reg_state.
8845 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8846 (i386_initial_stuff): Remove use of deleted globals.
8847 (i386_get_thread_context, i386_set_thread_context,
8848 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8849 from debug_reg_state.
8850
a59306a3
YQ
88512011-11-05 Yao Qi <yao@codesourcery.com>
8852
8853 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8854 address as TPOINT's.
8855
3065dfb6
SS
88562011-11-02 Stan Shebs <stan@codesourcery.com>
8857
8858 * tracepoint.c (agent_mem_read_string): New function.
8859 (eval_agent_expr): Call it for tracenz.
8860 * server.c (handle_query): Report support for tracenz.
8861
fd0d8c7c
YQ
88622011-11-02 Yao Qi <yao@codesourcery.com>
8863
8864 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8865
609086b1
YQ
88662011-11-02 Yao Qi <yao@codesourcery.com>
8867
8868 * target.h: Fix a typo in comment.
8869
b9fd1791
PA
88702011-10-31 Pedro Alves <pedro@codesourcery.com>
8871
8872 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8873 clobber the breakpoints' shadows with fast tracepoint jumps.
8874 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8875 * target.c (write_inferior_memory): Also pass MYADDR down to
8876 check_mem_write.
8877
03583c20
UW
88782011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8879
8880 * configure.ac: Check support for personality routine.
8881 * configure: Regenerate.
8882 * config.in: Likewise.
8883 * linux-low.c: Include <sys/personality.h>.
8884 Define ADDR_NO_RANDOMIZE if necessary.
8885 (linux_create_inferior): Disable address space randomization when
8886 forking inferior, if requested.
8887 (linux_supports_disable_randomization): New function.
8888 (linux_target_ops): Install it.
8889 * server.h (disable_randomization): Declare.
8890 * server.c (disable_randomization): New global variable.
8891 (handle_general_set): Handle QDisableRandomization.
8892 (handle_query): Likewise for qSupported.
8893 (main): Support --disable-randomization and --no-disable-randomization
8894 command line arguments.
8895 * target.h (struct target_ops): Add supports_disable_randomization.
8896 (target_supports_disable_randomization): New macro.
8897
723b724b
MF
88982011-09-29 Mike Frysinger <vapier@gentoo.org>
8899
8900 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8901 ifdef check.
8902 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8903 [!PT_GETDSBT] (target_loadmap): New definition.
8904 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8905 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8906 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8907 and PT_GETDSBT to LINUX_LOADMAP.
8908 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8909 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8910
55329a5c 89112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8912
8913 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8914 (arm_linux_hwbp_cap): New static variable.
8915 (arm_linux_get_hwbp_cap): Replace by ...
8916 (arm_linux_init_hwbp_cap): ... this new function.
8917 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8918 (arm_linux_get_hw_watchpoint_count): Likewise.
8919 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8920 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8921 (arm_prepare_to_resume): Use perror_with_name instead of error.
8922
55329a5c 89232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8924
8925 * linux-arm-low.c: Include <signal.h>.
8926 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8927 (struct arm_linux_hwbp_cap): New data type.
8928 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8929 (struct arm_linux_hw_breakpoint): New data type.
8930 (MAX_BPTS, MAX_WPTS): Define.
8931 (struct arch_process_info, struct arch_lwp_info): New data types.
8932 (arm_linux_get_hwbp_cap): New function.
8933 (arm_linux_get_hw_breakpoint_count): Likewise.
8934 (arm_linux_get_hw_watchpoint_count): Likewise.
8935 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8936 (arm_hwbp_control_initialize): Likewise.
8937 (arm_hwbp_control_is_enabled): Likewise.
8938 (arm_hwbp_control_is_initialized): Likewise.
8939 (arm_hwbp_control_disable): Likewise.
8940 (arm_linux_hw_breakpoint_equal): Likewise.
8941 (arm_linux_hw_point_initialize): Likewise.
8942 (struct update_registers_data): New data structure.
8943 (update_registers_callback: New function.
8944 (arm_insert_point): Likewise.
8945 (arm_remove_point): Likewise.
8946 (arm_stopped_by_watchpoint): Likewise.
8947 (arm_stopped_data_address): Likewise.
8948 (arm_new_process): Likewise.
8949 (arm_new_thread): Likewise.
8950 (arm_prepare_to_resume): Likewise.
8951 (the_low_target): Register arm_insert_point, arm_remove_point,
8952 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8953 arm_new_thread, and arm_prepare_to_resume.
8954
6b9801d4
SS
89552011-09-15 Stan Shebs <stan@codesourcery.com>
8956
8957 * server.h (struct emit_ops): Add compare-goto fields.
8958 * tracepoint.c (gdb_agent_op_sizes): New table.
8959 (emit_eq_goto): New function.
8960 (emit_ne_goto): New function.
8961 (emit_lt_goto): New function.
8962 (emit_le_goto): New function.
8963 (emit_gt_goto): New function.
8964 (emit_ge_goto): New function.
8965 (is_goto_target): New function.
8966 (compile_bytecodes): Recognize special cases of compare-goto
8967 combinations and call specialized emitters for them.
8968 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8969 (amd64_emit_ne_goto): New function.
8970 (amd64_emit_lt_goto): New function.
8971 (amd64_emit_le_goto): New function.
8972 (amd64_emit_gt_goto): New function.
8973 (amd64_emit_ge_goto): New function.
8974 (amd64_emit_ops): Add the new functions.
8975 (i386_emit_eq_goto): New function.
8976 (i386_emit_ne_goto): New function.
8977 (i386_emit_lt_goto): New function.
8978 (i386_emit_le_goto): New function.
8979 (i386_emit_gt_goto): New function.
8980 (i386_emit_ge_goto): New function.
8981 (i386_emit_ops): Add the new functions.
8982
bf15cbda
SS
89832011-09-08 Stan Shebs <stan@codesourcery.com>
8984
8985 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8986 (i386_emit_epilogue): Restore %ebx.
8987
943ca1dd
JZ
89882011-08-31 Jie Zhang <jzhang918@gmail.com>
8989
8990 * server.c (step_thread): Remove definition.
8991 (process_serial_event): Don't handle Hs.
8992 * server.h (step_thread): Remove declaration.
8993 * target.c (set_desired_inferior): Remove use of step_thread.
8994
e3deef73
LM
89952011-08-24 Luis Machado <lgustavo@codesourcery.com>
8996
8997 * linux-low.c: Include linux-procfs.h.
8998 (linux_attach_lwp_1): Update comments.
8999 (linux_attach): Scan for existing threads when attaching to a
9000 process that is the tgid.
9001 * Makefile.in: Update dependencies.
9002
13da1c97
LM
90032011-08-24 Luis Machado <lgustavo@codesourcery.com>
9004
9005 * configure.srv: Add linux-procfs.o dependencies.
9006
881127c9
YQ
90072011-08-14 Yao Qi <yao@codesourcery.com>
9008
9009 * target.h (struct target_ops): Fix indent.
9010 * win32-low.c (win32_target_ops): Fix comment.
9011
58dbd541
YQ
90122011-08-14 Andrew Jenner <andrew@codesourcery.com>
9013 Yao Qi <yao@codesourcery.com>
9014
9015 * Makefile.in (clean): Remove tic6x-*.c files.
9016 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9017 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9018 (tic6x-c64xp-linux.c): Likewise.
9019 * configure.srv: Add support for tic6x-*-uclinux.
9020 * linux-tic6x-low.c: New.
9021 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9022
78d85199
YQ
90232011-08-14 Andrew Stubbs <ams@codesourcery.com>
9024 Yao Qi <yao@codesourcery.com>
9025
9026 * target.h (struct target_ops): Add read_loadmap.
9027 * linux-low.c (struct target_loadseg): New type.
9028 (struct target_loadmap): New type.
9029 (linux_read_loadmap): New function.
9030 (linux_target_ops): Add linux_read_loadmap.
9031 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9032 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9033 to NULL.
78d85199 9034
a959a88d
EZ
90352011-08-05 Eli Zaretskii <eliz@gnu.org>
9036
9037 * win32-low.c: Include <stdint.h>.
9038
1ced966e
PA
90392011-07-22 Pedro Alves <pedro@codesourcery.com>
9040
9041 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9042 to the inferior here.
9043 (i386_remove_aligned_watchpoint): Ditto.
9044 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9045 fit part of the watchpoint in the debug registers.
9046 (i386_update_inferior_debug_regs): New.
9047 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9048 registers, and only update the inferior on success.
9049 (i386_low_remove_watchpoint): Ditto.
9050
d26e3629
KY
90512011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9052
9053 * linux-low.c (compare_ints, unique, list_threads, show_process,
9054 linux_core_of_thread): Delete.
9055 (linux_target_ops): Change linux_core_of_thread to
9056 linux_common_core_of_thread.
9057 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9058 * utils.c (malloc_failure): Change type of argument.
9059 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9060 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9061 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9062 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9063 (IPA_OBJS): Add common-utils-ipa.o.
9064 (ptid_h, linux_osdata_h): New macros.
9065 (server_h): Add common/common-utils.h, common/xml-utils.h,
9066 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9067 common/ptid.h.
9068 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9069 ptid.o, buffer.o): New rules.
9070 (linux-low.o): Add common/linux-osdata.h as a dependency.
9071 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9072 * configure.ac: Add AC_HEADER_DIRENT check.
9073 * config.in: Regenerate.
9074 * configure: Regenerate.
9075 * remote-utils.c (xml_escape_text): Delete.
9076 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9077 buffer_xml_printf): Move to common/buffer.c.
9078 * server.c (main): Remove call to initialize_inferiors.
9079 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9080 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9081 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9082 internal_error, gdb_assert, gdb_assert_fail): Delete.
9083 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9084 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9085 common/buffer.h.
9086 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9087 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9088 initialize_inferiors): Delete.
9089
2275a1a7
PA
90902011-07-20 Pedro Alves <pedro@codesourcery.com>
9091
9092 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9093 symbol error.
9094
0a5b1e09
PA
90952011-05-31 Pedro Alves <pedro@codesourcery.com>
9096
9097 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9098 assertion.
9099 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9100
6938fd34
YQ
91012011-05-26 Yao Qi <yao@codesourcery.com>
9102
9103 * Makefile.in (thread-db.o): Track dependence to
9104 common/gdb_thread_db.h.
9105 * thread-db.c: include gdb_thread_db.h from right place.
9106
b481f9e0
TT
91072011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9108
9109 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9110 __FILE__ and __LINE__ to internal_error.
9111
98a5dd13
DE
91122011-05-13 Doug Evans <dje@google.com>
9113
9114 * thread-db.c (try_thread_db_load_from_sdir): New function.
9115 (try_thread_db_load_from_dir): New function.
9116 (thread_db_load_search): Handle $sdir, ignore $pdir.
9117 Remove trying of system directories if search of
9118 libthread-db-search-path fails, that is now done via $sdir.
9119
d248b706
KY
91202011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9121
9122 * server.c (handle_query): Add EnableDisableTracepoints to the list
9123 of supported features.
43aaf8b6 9124 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 9125 tracepoints.
43aaf8b6
PA
9126 (cmd_qtenable_disable): New.
9127 (cmd_qtstart): Install tracepoints even if disabled.
9128 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9129 receiving a QTEnable or QTDisable packet.
9130 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9131 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9132 tracepoints.
9133 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 9134
84e578fb
DE
91352011-05-10 Doug Evans <dje@google.com>
9136
9137 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9138
71f55dd8
DE
91392011-05-04 Doug Evans <dje@google.com>
9140
9141 * linux-low.c (linux_join): Skip process lookup.
9142 * spu-low.c (spu_join): Ditto.
9143 * server.c (join_inferiors_callback): Delete.
9144 (process_serial_event): For 'D' packet (detach) call join_inferior
9145 directly.
9146
4d393d60
JM
91472011-05-04 Joseph Myers <joseph@codesourcery.com>
9148
9149 * README: Don't mention xscale*-*-linux*.
9150 * configure.srv (xscale*-*-linux*): Don't handle target.
9151
b00ad6ff
NF
91522011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9153
9154 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9155 casting pointers.
9156 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9157 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9158 (i386_emit_void_call_2): Likewise.
9159
af96c192
YQ
91602011-04-26 Yao Qi <yao@codesourcery.com>
9161
43aaf8b6
PA
9162 * linux-low.c: Move common macros to linux-ptrace.h.
9163 Include linux-ptrace.h.
af96c192
YQ
9164 * Makefile.in (linux_ptrace_h): New.
9165 (linux-low.o): Depends on linux-ptrace.h.
9166
03f2bd59
JK
91672011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9168
9169 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9170 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9171 (remote_prepare): New function with most of the TCP code from ...
9172 (remote_open): ... here. Detect PORT here unconditionally. Move also
9173 setting transport_is_reliable.
9174 * server.c (run_once): New variable.
9175 (gdbserver_usage): Document it.
9176 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9177 the first run if RUN_ONCE.
9178 * server.h (run_once, remote_prepare): New declarations.
9179
7a9dd1b2
TT
91802011-04-19 Tom Tromey <tromey@redhat.com>
9181
9182 * win32-low.c (handle_load_dll): Remove duplicate "the".
9183
81239425
PM
91842011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9185
9186 Remove support for old Cygwin 1.5 versions.
9187 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9188 function to avoid warning.
9189 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9190 warning.
9191
9e0627f1
PM
91922011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9193
9194 * gdbserver/server.h (Macro _): Define it if not available.
9195
588eebee
MS
91962011-03-14 Michael Snyder <msnyder@vmware.com>
9197
348af9f7 9198 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 9199
43f70d4c
JB
92002011-03-10 Joel Brobecker <brobecker@adacore.com>
9201
9202 * Makefile.in (maintainer-clean realclean distclean): Remove
9203 "make ... subdir_do" command.
9204
348af9f7
MS
92052011-03-10 Michael Snyder <msnyder@vmware.com>
9206
9207 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9208
9209 * server.c (handle_v_run): Free alloced buffer on early return.
9210
e637a4f5
YQ
92112011-03-09 Yao Qi <yao@codesourcery.com>
9212
9213 Revert:
9214 2011-03-04 Yao Qi <yao@codesourcery.com>
9215
9216 * Makefile.in: Remove GNU make feature --directory.
9217
9218 2011-03-05 Yao Qi <yao@codesourcery.com>
9219
9220 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9221 (subdir_do): New make target. Copied from gdb/Makefile.
9222 (maintainer-clean, realclean, distclean, clean): Call corresponding
9223 make targets in common/Makefile.
9224
9225 2011-02-11 Yao Qi <yao@codesourcery.com>
9226
9227 * configure.ac: Call AC_PROG_RANLIB.
9228 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9229 * configure: Regenerate.
9230
e6edda56
JK
92312011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9232
9233 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9234
e5141119
JB
92352011-03-06 Yao Qi <yao@codesourcery.com>
9236
9237 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9238
64794aa4
JB
92392011-03-05 Yao Qi <yao@codesourcery.com>
9240
9241 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9242 (subdir_do): New make target. Copied from gdb/Makefile.
9243 (maintainer-clean, realclean, distclean, clean): Call corresponding
9244 make targets in common/Makefile.
9245
7a762829
YQ
92462011-03-04 Yao Qi <yao@codesourcery.com>
9247
9248 * Makefile.in: Remove GNU make feature --directory.
9249
348af9f7
MS
92502011-03-04 Michael Snyder <msnyder@vmware.com>
9251
9252 * server.c (queue_stop_reply): Call xmalloc not malloc.
9253
92542011-03-02 Michael Snyder <msnyder@vmware.com>
9255
9256 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9257
9f72fee2
MS
92582011-02-28 Michael Snyder <msnyder@vmware.com>
9259
588eebee
MS
9260 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9261 (cmd_qtframe): Ditto.
9262 (cmd_qtbuffer): Ditto.
9263 (cmd_bigqtbuffer): Ditto.
9264
9f72fee2
MS
9265 * utils.c (decimal2str): Initialize 'width' to nine, then
9266 don't mess with it.
9267
8040bd49
UW
92682011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9269
9270 * hostio.c (require_data): Free *data, not data.
9271
7e52cbd0
JK
92722011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9273
9274 * hostio.c (require_data): Use free, not xfree.
9275
9130f83e
MS
92762011-02-27 Michael Snyder <msnyder@vmware.com>
9277
4b812f4e
MS
9278 * server.c (handle_query): Discard unused value.
9279
9130f83e
MS
9280 * hostio.c (require_data): Free malloc memory before returning
9281 error.
9282
69d37113
MS
92832011-02-26 Michael Snyder <msnyder@vmware.com>
9284
9285 * linux-low.c (list_threads): Call closedir for dirent.
9286
35f5825a
MS
92872011-02-27 Michael Snyder <msnyder@vmware.com>
9288
2a589cef
MS
9289 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9290 a case statement falls through.
9291
0adea5f7
MS
9292 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9293
35f5825a
MS
9294 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9295 in comparison.
9296
238f1c74
MS
92972011-02-26 Michael Snyder <msnyder@vmware.com>
9298
9299 * utils.c (decimal2str): Eliminate dead code and dead param.
9300 (pulongest): Drop dead param from call to decimal2str.
9301 (plongest): Ditto.
9302
633ff500
JB
93032011-02-24 Joel Brobecker <brobecker@adacore.com>
9304
9305 Revert the following patch (not approved yet):
9306 2011-02-21 Hui Zhu <teawater@gmail.com>
9307 * tracepoint.c (tp_printf): New function.
9308 (eval_agent_expr): Handle gdb_agent_op_printf.
9309
f9c6ff72
HZ
93102011-02-21 Hui Zhu <teawater@gmail.com>
9311
9312 * tracepoint.c (tp_printf): New function.
9313 (eval_agent_expr): Handle gdb_agent_op_printf.
9314
94d5e490
TT
93152011-02-18 Tom Tromey <tromey@redhat.com>
9316
9317 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9318 (tracepoint.o): Likewise.
9319 * tracepoint.c (enum gdb_agent_op): Use ax.def.
9320 (gdb_agent_op_names): Likewise.
9321
c7f96d2b
TT
93222011-02-18 Tom Tromey <tromey@redhat.com>
9323
9324 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9325 gdb_agent_op_rot>: New constants.
9326 (gdb_agent_op_names): Add pick and roll.
9327 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9328 cases.
9329
0feedb2c
JK
93302011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9331
9332 * aclocal.m4: Regenerated with aclocal-1.11.1.
9333
b3b9301e
PA
93342011-02-14 Pedro Alves <pedro@codesourcery.com>
9335
9336 * server.c (handle_qxfer_traceframe_info): New.
9337 (qxfer_packets): Register "traceframe-info".
9338 (handle_query): Report support for qXfer:traceframe-info:read+.
9339 * tracepoint.c (match_blocktype): New.
9340 (traceframe_find_block_type): Rename to ...
9341 (traceframe_walk_blocks): ... this. Add callback filter argument,
9342 and use it.
9343 (traceframe_find_block_type): New, reimplemented on top of
9344 traceframe_walk_blocks.
9345 (build_traceframe_info_xml): New.
9346 (traceframe_read_info): New.
9347 * server.h (traceframe_read_info): Declare.
9348
4f3e6fb7
YQ
93492011-02-11 Yao Qi <yao@codesourcery.com>
9350
9351 * configure.ac: Call AC_PROG_RANLIB.
9352 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9353 * configure: Regenerate.
9354
764880b7
PA
93552011-02-07 Pedro Alves <pedro@codesourcery.com>
9356
9357 * server.c (gdb_read_memory): Change return semantics to allow
9358 partial transfers.
9359 (handle_search_memory_1): Adjust.
9360 (process_serial_event) <'m' packet>: Handle partial transfers.
9361 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9362
1c79eb8a
PA
93632011-01-28 Pedro Alves <pedro@codesourcery.com>
9364
9365 * regcache.c (init_register_cache): Initialize
9366 regcache->register_status.
9367 (free_register_cache): Release regcache->register_status.
9368 (regcache_cpy): Copy register_status.
9369 (registers_to_string): Print 'x's for unavailable registers.
9370 (supply_register): Mark the register's status valid or
9371 unavailable, depending on whether a buffer was passed in or not.
9372 (supply_register_zeroed): New.
9373 (supply_regblock): Mark the registers' status valid or
9374 unavailable, depending on whether a buffer was passed in or not.
9375 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9376 (struct regcache): New `register_status' field.
9377 (supply_register_zeroed): Declare.
9378 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9379 supply_register_zeroed, rather than passing a NULL buffer to
9380 supply_register.
9381 * tracepoint.c (fetch_traceframe_registers): Update comment.
9382
85724a0e
PA
93832011-01-28 Pedro Alves <pedro@codesourcery.com>
9384
9385 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9386 buffer explicit.
9387
d08aafef
PA
93882011-01-25 Pedro Alves <pedro@codesourcery.com>
9389
9390 * server.h (decode_xfer_write): Change prototype.
9391 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9392 and don't extract the annex here.
9393 * server.c (decode_xfer_read): Remove `annex' parameter,
9394 and don't extract the annex here.
9395 (decode_xfer): New.
9396 (struct qxfer): New.
9397 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9398 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9399 (handle_qxfer_statictrace): New functions, abstracted out from
9400 handle_query, and made to use the struct qxfer interface.
9401 (handle_threads_qxfer_proper): Rename to ...
9402 (handle_qxfer_threads_proper): ... this.
9403 (handle_threads_qxfer): Rename to ...
9404 (handle_qxfer_threads): ... this. Adjust.
9405 (qxfer_packets): New array.
9406 (handle_qxfer): New function.
9407 (handle_query): Use handle_qxfer.
9408
493e2a69
MS
94092011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9410
9411 * gdbreplay.c: Shorten lines of >= 80 columns.
9412 * linux-low.c: Ditto.
9413 * linux-ppc-low.c: Ditto.
9414 * linux-s390-low.c: Ditto.
9415 * linux-sparc-low.c: Ditto.
9416 * linux-x86-low.c: Ditto.
9417 * linux-xtensa-low.c: Ditto.
9418 * mem-break.c: Ditto.
9419 * nto-low.c: Ditto.
9420 * regcache.h: Ditto.
9421 * remote-utils.c: Ditto.
9422 * server.c: Ditto.
9423 * server.h: Ditto.
9424 * thread-db.c: Ditto.
9425 * tracepoint.c: Ditto.
9426 * utils.c: Ditto.
9427 * win32-low.h: Ditto.
9428
44944448
JB
94292011-01-05 Joel Brobecker <brobecker@adacore.com>
9430
9431 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9432 update.
9433
71ce852c
JB
94342011-01-01 Joel Brobecker <brobecker@adacore.com>
9435
9436 * server.c (gdbserver_version): Update copyright year in version
9437 output.
9438 * gdbreplay.c (gdbreplay_version): Ditto.
9439
eb826dc6
MF
94402010-12-29 Jie Zhang <jie.zhang@analog.com>
9441
9442 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9443 * linux-bfin-low.c: New file.
9444 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9445 PT_DATA_ADDR for BFIN targets.
9446 * Makefile.in (SFILES): Add linux-bfin-low.c.
9447 (clean): Remove reg-bfin.c.
9448 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9449 * README: Mention supported Blackfin targets.
9450
39ab222a
MF
94512010-12-23 Mike Frysinger <vapier@gentoo.org>
9452
9453 * .gitignore: New file.
9454
a1f2ce7d
MF
94552010-11-16 Mike Frysinger <vapier@gentoo.org>
9456
9457 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9458
f474844c
JZ
94592010-10-22 Jie Zhang <jie@codesourcery.com>
9460
9461 * Makefile.in: Add FLAGS_TO_PASS variable.
9462 (install): Remove dependency of install-only and recursively
9463 invoke make for install-only.
9464
f1048712
DE
94652010-10-04 Doug Evans <dje@google.com>
9466
9467 * Makefile.in (uninstall): Use $(DESTDIR).
9468
b53a1623
PA
94692010-09-24 Pedro Alves <pedro@codesourcery.com>
9470
e6ee044d
PA
9471 PR gdb/11842
9472
b53a1623
PA
9473 * linux-x86-low.c (compat_siginfo_from_siginfo)
9474 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9475 si_code is < 0. Check for si_code == SI_TIMER before checking for
9476 si_code < 0.
9477
fa1bd1e4
JB
94782010-09-13 Joel Brobecker <brobecker@adacore.com>
9479
9480 * lynx-i386-low.c: New file.
9481 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9482
47fac8f8
JB
94832010-09-13 Joel Brobecker <brobecker@adacore.com>
9484
9485 * lynx-low.c (ptrace_request_to_str): Remove handling for
9486 request values that have been removed in LynxOS 5.x.
9487
1adfc54d
JB
94882010-09-13 Joel Brobecker <brobecker@adacore.com>
9489
9490 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9491 <ptrace.h>
9492
c2a66c29
NS
94932010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9494
9495 * configure.ac: Add --enable-inprocess-agent option.
9496 * configure: Rebuilt.
9497
32fcada3
YQ
94982010-09-06 Yao Qi <yao@codesourcery.com>
9499
9500 * linux-low.c (linux_kill): Remove unused variable.
9501 (linux_stabilize_threads): Likewise.
9502 * server.c (start_inferior): Likewise.
9503 (queue_stop_reply_callback): Likewise.
9504 * tracepoint.c (do_action_at_tracepoint): Likewise.
9505
0cccb683
YQ
95062010-09-06 Yao Qi <yao@codesourcery.com>
9507
9508 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9509 on return.
9510
423ec54c
JK
95112010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9512
9513 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9514
12ac6819
PA
95152010-09-06 Pedro Alves <pedro@codesourcery.com>
9516
9517 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9518 "$(IPA_DEPFILES)".
9519
8ed54b31
JB
95202010-09-01 Joel Brobecker <brobecker@adacore.com>
9521
9522 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9523 gdbserver/lynx-ppc-low.c: New files.
9524 * Makefile.in (lynx_low_h): New variable.
9525 (lynx-low.o, lynx-ppc-low.o): New rules.
9526 * configure.ac: On LynxOS, link with -lnetinet.
9527 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9528 * configure: regenerate.
9529
bb0116a4
JB
95302010-09-01 Joel Brobecker <brobecker@adacore.com>
9531
9532 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9533 * configure.ac: Add check for vasprintf and vsnprintf.
9534 * configure, config.in: Regenerate.
9535 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9536
a778ab81 95372010-09-01 Joel Brobecker <brobecker@adacore.com>
9538
9539 * gdbreplay.c: Move include of alloca.h up, next to include of
9540 malloc.h.
9541 * server.h: Add include of malloc.h.
9542 * mem-break.c: Remove include of malloc.h.
9543 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9544
8b034a19 95452010-09-01 Joel Brobecker <brobecker@adacore.com>
9546
9547 * Makefile.in (memmem.o): Build with -Wno-error.
9548
95492010-09-01 Joel Brobecker <brobecker@adacore.com>
9550
9551 * utils.c (xsnprintf): Make non-static.
9552 * server.h: Add xsnprintf declaration.
9553 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9554 replace calls to snprintf by calls to xsnprintf throughout.
9555
95562010-09-01 Joel Brobecker <brobecker@adacore.com>
9557
9558 * configure.ac: Add configure check for alloca.
9559 * configure, config.in: Regenerate.
9560 * server.h: Include alloca.h if it exists.
9561 * gdbreplay.c: Include alloca.h if it exists.
9562
1a981360
PA
95632010-08-28 Pedro Alves <pedro@codesourcery.com>
9564
9565 * linux-low.c (__SIGRTMIN): Define if not already defined.
9566 (linux_create_inferior): Check for __ANDROID__ rather than
9567 __SIGRTMIN.
9568 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9569 are already deferred.
9570 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9571 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9572 stopped and already has a pending signal to report.
9573 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9574 a pending signal to report or is moving out of a jump pad.
9575 (linux_init_signals): Check for __ANDROID__ rather than
9576 __SIGRTMIN.
9577
b4d51a55
PA
95782010-08-28 Pedro Alves <pedro@codesourcery.com>
9579
9580 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9581 debug_threads check. Avoid a linear search when not doing debug
9582 output.
9583
ec48365d
PA
95842010-08-27 Pedro Alves <pedro@codesourcery.com>
9585
9586 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9587 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9588 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9589 (process_event): Change local fd's type to gdb_fildes_t.
9590 (create_file_handler): Adjust prototype.
9591 (delete_file_handler): Adjust prototype.
9592 (handle_file_event): Adjust prototype. Use pfildes.
9593 (create_file_event): Adjsut prototype.
9594 * remote-utils.c (remote_desc, listen_desc): Change type to
9595 gdb_fildes_t.
9596 * server.h: New gdb_fildes_t typedef.
9597 [USE_WIN32API]: Include winsock2.h.
9598 (delete_file_handler, add_file_handler): Adjust prototypes.
9599 (pfildes): Declare.
9600 * utils.c (pfildes): New.
9601
854d88f0
PA
96022010-08-27 Pedro Alves <pedro@codesourcery.com>
9603
9604 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9605 * configure: Regenerate.
9606
0146f85b
PA
96072010-08-27 Pedro Alves <pedro@codesourcery.com>
9608
9609 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9610 (linux_done_accessing_memory): ... this.
9611 (linux_target_ops): Adjust.
9612 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9613 * nto-low.c (nto_target_ops): Adjust comment.
9614 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9615 * spu-low.c (spu_target_ops): Adjust comment.
9616 * target.h (target_ops): Rename unprepare_to_access_memory field
9617 to done_accessing_memory.
9618 (unprepare_to_access_memory): Rename to ...
9619 (done_accessing_memory): ... this.
9620
90d74c30
PA
96212010-08-26 Pedro Alves <pedro@codesourcery.com>
9622
9623 * linux-low.c (linux_prepare_to_access_memory): New.
9624 (linux_unprepare_to_access_memory): New.
9625 (linux_target_ops): Install them.
9626 * server.c (read_memory): Rename to ...
9627 (gdb_read_memory): ... this. Use
9628 prepare_to_access_memory/prepare_to_access_memory.
9629 (write_memory): Rename to ...
9630 (gdb_write_memory): ... this. Use
9631 prepare_to_access_memory/prepare_to_access_memory.
9632 (handle_search_memory_1): Adjust.
9633 (process_serial_event): Adjust.
9634 * target.h (struct target_ops): New fields
9635 prepare_to_access_memory and unprepare_to_access_memory.
9636 (prepare_to_access_memory, unprepare_to_access_memory): New.
9637 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9638 prepare_to_access_memory/prepare_to_access_memory.
9639 * nto-low.c (nto_target_ops): Adjust.
9640 * spu-low.c (spu_target_ops): Adjust.
9641 * win32-low.c (win32_target_ops): Adjust.
9642
fd467969
PA
96432010-08-26 Pedro Alves <pedro@codesourcery.com>
9644
9645 * Makefile.in (WARN_CFLAGS): Get it from configure.
9646 (WERROR_CFLAGS): New.
9647 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9648 * configure.ac: Introduce --enable-werror, which adds -Werror to
9649 the compiler command line. Enabled by default. Disable with
9650 --disable-werror. Add -Wdeclaration-after-statement
9651 Wpointer-arith and -Wformat-nonliteral to warning flags.
9652 * configure: Regenerate.
9653
331e2f5f
PA
96542010-08-26 Pedro Alves <pedro@codesourcery.com>
9655
9656 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9657
e581f2b4
PA
96582010-08-26 Pedro Alves <pedro@codesourcery.com>
9659
9660 * gdbreplay.c (remote_error): New.
9661 (gdbchar): New.
9662 (expect): Use gdbchar. Check for error reading from GDB.
9663 Clarify sync error output.
9664 (play): Check for errors writing to GDB.
9665 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9666 * remote-utils.c (getpkt): Check for errors writing to the remote
9667 descriptor.
9668
3c11dd79
PA
96692010-08-25 Pedro Alves <pedro@codesourcery.com>
9670
9671 * linux-low.c (linux_wait_1): Move non-debugging code out of
9672 `debug_threads' control.
9673
d20a8ad9
PA
96742010-08-25 Pedro Alves <pedro@codesourcery.com>
9675
9676 * linux-low.c (linux_wait_1): Don't set last_status here.
9677 * server.c (push_event, queue_stop_reply_callback): Assert we're
9678 not pushing a TARGET_WAITKIND_IGNORE event.
9679 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9680 (myresume, handle_target_event): Set the thread's last_resume_kind
9681 and last_status from the target returned status.
9682
964e4306
PA
96832010-08-25 Pedro Alves <pedro@codesourcery.com>
9684
9685 PR threads/10729
9686
9687 * linux-x86-low.c (update_debug_registers_callback): New.
9688 (i386_dr_low_set_addr): Use it.
9689 (i386_dr_low_get_addr): New.
9690 (i386_dr_low_set_control): Use update_debug_registers_callback.
9691 (i386_dr_low_get_control): New.
9692 (i386_dr_low_get_status): Adjust.
9693 * linux-low.c (linux_stop_lwp): New.
9694 * linux-low.h (linux_stop_lwp): Declare.
9695
9696 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9697 argument instead of a i386_debug_reg_state.
9698 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9699 a i386_debug_reg_state.
9700 (i386_insert_aligned_watchpoint): Adjust.
9701 (i386_remove_aligned_watchpoint): Adjust.
9702 (i386_low_stopped_data_address): Read the debug registers from the
9703 inferior instead of from the mirrors.
9704 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9705 (i386_dr_low_get_addr): Declare.
9706 (i386_dr_low_get_control): Declare.
9707 (i386_dr_low_get_status): Change prototype.
9708
9709 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9710 (i386_dr_low_get_addr): New.
9711 (i386_dr_low_get_control): New.
9712 (i386_dr_low_get_status): Adjust prototype. Return
9713 dr_status_mirror.
9714 (i386_initial_stuff): Clear dr_status_mirror and
9715 dr_control_mirror.
9716 (i386_get_thread_context): Adjust.
9717 (i386_set_thread_context): Adjust.
9718 (i386_thread_added): Adjust.
9719
5f21a75b
PA
97202010-08-24 Pedro Alves <pedro@codesourcery.com>
9721
9722 * linux-low.h (linux_thread_area): Delete declaration.
9723
3e4c1235
TS
97242010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9725
9726 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9727 after its termination.
9728
1971b033
PA
97292010-08-09 Pedro Alves <pedro@codesourcery.com>
9730
9731 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9732 (gdb_wants_all_stopped): Delete.
9733 (linux_wait_1): Don't call them.
9734 * server.c (handle_v_cont): Tag all threads as want-stopped.
9735 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9736 stopped as "client-wants-stopped".
9737
310444ac
PA
97382010-07-31 Pedro Alves <pedro@codesourcery.com>
9739
9740 * Makefile.in (signals_h): New.
9741 (server_h): Depend on it.
9742 (server.o): Don't depend on $(signals_def).
9743 (signals.o): Depend on $(signals_def).
9744
a19cae16
JK
97452010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9746
9747 * Makefile.in (signals_def): New.
9748 (server_h): Append include/gdb/signals.h and signals_def.
9749 (server.o): Append signals_def.
9750
30d50328
JK
97512010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9752
9753 * server.c (handle_target_event): Use target_signal_to_host for
9754 resume_info.sig initialization.
9755 * target.h (struct thread_resume) <sig>: New comment.
9756
5c3216e2
OS
97572010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9758
c6f46ca0
OS
9759 * server.c (handle_query): strcpy() the returned string from paddress()
9760 instead of sprintf().
5c3216e2
OS
9761 * utils.c (paddress): Return phex_nz().
9762
6bd31874
JB
97632010-07-07 Joel Brobecker <brobecker@adacore.com>
9764
9765 * server.c (handle_v_cont): Call mourn_inferior if process
9766 just exited.
9767 (myresume): Likewise.
9768
0fb4aa4b
PA
97692010-07-01 Pedro Alves <pedro@codesourcery.com>
9770
9771 Static tracepoints, and integration with UST.
9772
9773 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9774 * mem-break.c (uninsert_all_breakpoints)
9775 (reinsert_all_breakpoints): New.
9776 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9777 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9778 (gdb_agent_ust_loaded, helper_thread_id)
9779 (gdb_agent_helper_thread_id): New macros.
9780 (struct ipa_sym_addresses): Add addr_ust_loaded,
9781 addr_helper_thread_id, addr_cmd_buf.
9782 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9783 (in_process_agent_loaded_ust): New.
9784 (write_e_ust_not_loaded): New.
9785 (maybe_write_ipa_ust_not_loaded): New.
9786 (struct collect_static_trace_data_action): New.
9787 (enum tracepoint_type) <static_tracepoint>: New.
9788 (struct tracepoint) <handle>: Mention static tracepoints.
9789 (struct static_tracepoint_ctx): New.
9790 (CMD_BUF_SIZE): New.
9791 (add_tracepoint_action): Handle static tracepoint actions.
9792 (unprobe_marker_at): New.
9793 (clear_installed_tracepoints): Handle static tracepoints.
9794 (cmd_qtdp): Handle static tracepoints.
9795 (probe_marker_at): New.
9796 (cmd_qtstart): Handle static tracepoints.
9797 (response_tracepoint): Handle static tracepoints.
9798 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9799 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9800 (get_context_regcache): Handle static tracepoints.
9801 (do_action_at_tracepoint): Handle static tracepoint actions.
9802 (traceframe_find_block_type): Handle static trace data blocks.
9803 (traceframe_read_sdata): New.
9804 (download_tracepoints): Download static tracepoint actions.
9805 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9806 (GDB_PROBE_NAME): New.
9807 (ust_ops): New.
9808 (GET_UST_SYM): New.
9809 (USTF): New.
9810 (dlsym_ust): New.
9811 (ust_marker_to_static_tracepoint): New.
9812 (gdb_probe): New.
9813 (collect_ust_data_at_tracepoint): New.
9814 (gdb_ust_probe): New.
9815 (UNIX_PATH_MAX, SOCK_DIR): New.
9816 (gdb_ust_connect_sync_socket): New.
9817 (resume_thread, stop_thread): New.
9818 (run_inferior_command): New.
9819 (init_named_socket): New.
9820 (gdb_ust_socket_init): New.
9821 (cstr_to_hexstr): New.
9822 (next_st): New.
9823 (first_marker, next_marker): New.
9824 (response_ust_marker): New.
9825 (cmd_qtfstm, cmd_qtsstm): New.
9826 (unprobe_marker_at, probe_marker_at): New.
9827 (cmd_qtstmat, gdb_ust_thread): New.
9828 (gdb_ust_init): New.
9829 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9830 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9831 (ST_REGENTRY): New.
9832 (x86_64_st_collect_regmap): New.
9833 (X86_64_NUM_ST_COLLECT_GREGS): New.
9834 (AMD64_RIP_REGNUM): New.
9835 (supply_static_tracepoint_registers): New.
9836 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9837 (ST_REGENTRY): New.
9838 (i386_st_collect_regmap): New.
9839 (i386_NUM_ST_COLLECT_GREGS): New.
9840 (supply_static_tracepoint_registers): New.
9841 * server.c (handle_query): Handle qXfer:statictrace:read.
9842 <qSupported>: Report support for StaticTracepoints, and
9843 qXfer:statictrace:read features.
9844 * server.h (traceframe_read_sdata)
9845 (supply_static_tracepoint_registers): Declare.
9846 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9847 (unpack_varlen_hex): Include in IPA build.
9848 * Makefile.in (ustlibs, ustinc): New.
9849 (IPA_OBJS): Add remote-utils-ipa.o.
9850 ($(IPA_LIB)): Link -ldl and -lpthread.
9851 (UST_CFLAGS): New.
9852 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9853 * config.in, configure: Regenerate.
9854
9e4344e5
PA
98552010-06-20 Ian Lance Taylor <iant@google.com>
9856 Pedro Alves <pedro@codesourcery.com>
9857
9858 * linux-x86-low.c (always_true): Delete.
9859 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9860 trying to fool the compiler with always_true.
9861
c6beb2cb
PA
98622010-06-20 Pedro Alves <pedro@codesourcery.com>
9863
9864 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9865 conditions in gdbserver.
9866
d2ed6730
UW
98672010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9868
9869 * spu-low.c (spu_read_memory): Wrap around local store limit.
9870 (spu_write_memory): Likewise.
9871
4e29fb54
PA
98722010-06-15 Pedro Alves <pedro@codesourcery.com>
9873
9874 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9875 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9876 LONGEST uses.
9877 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9878 uses.
9879 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9880 uses with LONGEST uses.
9881
6a271cae
PA
98822010-06-14 Stan Shebs <stan@codesourcery.com>
9883 Pedro Alves <pedro@codesourcery.com>
9884
9885 Bytecode compiler.
9886
9887 * linux-x86-low.c: Include limits.h.
9888 (add_insns): New.
9889 (always_true): New.
9890 (EMIT_ASM): New.
9891 (EMIT_ASM32): New.
9892 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9893 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9894 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9895 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9896 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9897 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9898 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9899 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9900 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9901 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9902 (amd64_emit_void_call_2): New.
9903 (amd64_emit_ops): New.
9904 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9905 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9906 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9907 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9908 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9909 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9910 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9911 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9912 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9913 (i386_emit_stack_adjust, i386_emit_int_call_1)
9914 (i386_emit_void_call_2): New.
9915 (i386_emit_ops): New.
9916 (x86_emit_ops): New.
9917 (the_low_target): Install x86_emit_ops.
9918 * server.h (struct emit_ops): New.
9919 (get_raw_reg_func_addr): Declare.
9920 (current_insn_ptr, emit_error): Declare.
9921 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9922 (set_trace_state_variable_value): New defines.
9923 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9924 addr_get_trace_state_variable_value and
9925 addr_set_trace_state_variable_value.
9926 (symbol_list): New fields for get_raw_reg,
9927 get_trace_state_variable_value and set_trace_state_variable_value.
9928 (condfn): New typedef.
9929 (struct tracepoint): New field `compiled_cond'.
9930 (do_action_at_tracepoint): Clear compiled_cond.
9931 (get_trace_state_variable_value, set_trace_state_variable_value):
9932 Export in the IPA.
9933 (condition_true_at_tracepoint): If there's a compiled condition,
9934 run that.
9935 (current_insn_ptr, emit_error): New globals.
9936 (struct bytecode_address): New.
9937 (get_raw_reg_func_addr): New.
9938 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9939 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9940 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9941 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9942 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9943 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9944 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9945 (compile_tracepoint_condition, compile_bytecodes): New.
9946 * target.h (emit_ops): Forward declare.
9947 (struct target_ops): New field emit_ops.
9948 (target_emit_ops): New.
9949 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9950 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9951 * linux-low.c (linux_emit_ops): New.
9952 (linux_target_ops): Install it.
9953 * linux-low.h (struct linux_target_ops): New field emit_ops.
9954
92b72907
UW
99552010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9956
9957 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9958 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9959
fa593d66
PA
99602010-06-01 Pedro Alves <pedro@codesourcery.com>
9961 Stan Shebs <stan@codesourcery.com>
9962
9963 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9964 (all): Depend on $(extra_libraries).
9965 (install-only): Install the IPA.
9966 (IPA_OBJS, IPA_LIB): New.
9967 (clean): Remove the IPA lib.
9968 (IPAGENT_CFLAGS): New.
9969 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9970 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9971 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9972 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9973 * configure.ac: Check for atomic builtins support in the compiler.
9974 (IPA_DEPFILES, extra_libraries): Define.
9975 * configure.srv (ipa_obj): Add description.
9976 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9977 (i[34567]86-*-linux*): Set ipa_obj.
9978 (x86_64-*-linux*): Set ipa_obj.
9979 * linux-low.c (stabilizing_threads): New.
9980 (supports_fast_tracepoints): New.
9981 (linux_detach): Stabilize threads before detaching.
9982 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9983 the lwp is either not stabilizing, or is moving out of a jump pad.
9984 (linux_fast_tracepoint_collecting): New.
9985 (maybe_move_out_of_jump_pad): New.
9986 (enqueue_one_deferred_signal): New.
9987 (dequeue_one_deferred_signal): New.
9988 (linux_wait_for_event_1): If moving out of a jump pad, defer
9989 pending signals to later.
9990 (linux_stabilize_threads): New.
9991 (linux_wait_1): Check if threads need moving out of jump pads, and
9992 do it if so.
9993 (stuck_in_jump_pad_callback): New.
9994 (move_out_of_jump_pad_callback): New.
9995 (lwp_running): New.
9996 (linux_resume_one_lwp): Handle moving out of jump pads.
9997 (linux_set_resume_request): Dequeue deferred signals.
9998 (need_step_over_p): Also step over fast tracepoint jumps.
9999 (start_step_over): Also uninsert fast tracepoint jumps.
10000 (finish_step_over): Also reinsert fast tracepoint jumps.
10001 (linux_install_fast_tracepoint_jump): New.
10002 (linux_target_ops): Install linux_stabilize_threads and
10003 linux_install_fast_tracepoint_jump_pad.
10004 * linux-low.h (linux_target_ops) <get_thread_area,
10005 install_fast_tracepoint_jump_pad>: New fields.
10006 (struct lwp_info) <collecting_fast_tracepoint,
10007 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10008 (linux_get_thread_area): Declare.
10009 * linux-x86-low.c (jump_insn): New.
10010 (x86_get_thread_area): New.
10011 (append_insns): New.
10012 (push_opcode): New.
10013 (amd64_install_fast_tracepoint_jump_pad): New.
10014 (i386_install_fast_tracepoint_jump_pad): New.
10015 (x86_install_fast_tracepoint_jump_pad): New.
10016 (the_low_target): Install x86_get_thread_area and
10017 x86_install_fast_tracepoint_jump_pad.
10018 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10019 (struct fast_tracepoint_jump): New.
10020 (fast_tracepoint_jump_insn): New.
10021 (fast_tracepoint_jump_shadow): New.
10022 (find_fast_tracepoint_jump_at): New.
10023 (fast_tracepoint_jump_here): New.
10024 (delete_fast_tracepoint_jump): New.
10025 (set_fast_tracepoint_jump): New.
10026 (uninsert_fast_tracepoint_jumps_at): New.
10027 (reinsert_fast_tracepoint_jumps_at): New.
10028 (set_breakpoint_at): Use write_inferior_memory.
10029 (uninsert_raw_breakpoint): Use write_inferior_memory.
10030 (check_mem_read): Mask out fast tracepoint jumps.
10031 (check_mem_write): Mask out fast tracepoint jumps.
10032 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10033 (set_fast_tracepoint_jump): Declare.
10034 (delete_fast_tracepoint_jump)
10035 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10036 (reinsert_fast_tracepoint_jumps_at): Declare.
10037 * regcache.c: Don't compile many functions when building the
10038 in-process agent library.
10039 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10040 the register buffer in the heap.
10041 (free_register_cache): If the register buffer isn't owned by the
10042 regcache, don't free it.
10043 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10044 pre-existing register caches.
10045 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10046 type.
10047 (convert_ascii_to_int): : Constify `from' parameter type.
10048 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10049 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10050 the needed buffer in-place.
10051 (relocate_instruction): New.
10052 * server.c (handle_query) <qSymbols>: If the target supports
10053 tracepoints, give it a chance of looking up symbols. Report
10054 support for fast tracepoints.
10055 (handle_status): Stabilize threads.
10056 (process_serial_event): Adjust.
10057 * server.h (struct fast_tracepoint_jump): Forward declare.
10058 (struct process_info) <fast_tracepoint_jumps>: New field.
10059 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10060 (decode_X_packet, decode_M_packet): Adjust.
10061 (relocate_instruction): Declare.
10062 (in_process_agent_loaded): Declare.
10063 (tracepoint_look_up_symbols): Declare.
10064 (struct fast_tpoint_collect_status): Declare.
10065 (fast_tracepoint_collecting): Declare.
10066 (force_unlock_trace_buffer): Declare.
10067 (handle_tracepoint_bkpts): Declare.
10068 (initialize_low_tracepoint)
10069 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10070 * target.h (struct target_ops) <stabilize_threads,
10071 install_fast_tracepoint_jump_pad>: New fields.
10072 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10073 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10074 [HAVE_STDINT_H]: Include stdint.h.
10075 (trace_debug_1): Rename to ...
10076 (trace_vdebug): ... this.
10077 (trace_debug): Rename to ...
10078 (trace_debug_1): ... this. Add `level' parameter.
10079 (trace_debug): New.
10080 (ATTR_USED, ATTR_NOINLINE): New.
10081 (IP_AGENT_EXPORT): New.
10082 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10083 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10084 (about_to_request_buffer_space, trace_buffer_is_full)
10085 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10086 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10087 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10088 (traceframe_write_count, traceframes_created)
10089 (trace_state_variables)
10090 New renaming defines.
10091 (struct ipa_sym_addresses): New.
10092 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10093 (symbol_list): New.
10094 (ipa_sym_addrs): New.
10095 (all_tracepoint_symbols_looked_up): New.
10096 (in_process_agent_loaded): New.
10097 (write_e_ipa_not_loaded): New.
10098 (maybe_write_ipa_not_loaded): New.
10099 (tracepoint_look_up_symbols): New.
10100 (debug_threads) [IN_PROCESS_AGENT]: New.
10101 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10102 (UNKNOWN_SIDE_EFFECTS): New.
10103 (stop_tracing): New.
10104 (flush_trace_buffer): New.
10105 (stop_tracing_bkpt): New.
10106 (flush_trace_buffer_bkpt): New.
10107 (read_inferior_integer): New.
10108 (read_inferior_uinteger): New.
10109 (read_inferior_data_pointer): New.
10110 (write_inferior_data_pointer): New.
10111 (write_inferior_integer): New.
10112 (write_inferior_uinteger): New.
10113 (struct collect_static_trace_data_action): Delete.
10114 (enum tracepoint_type): New.
10115 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
10116 <actions_str, step_actions, step_actions_str>: Only include in
10117 GDBserver.
fa593d66
PA
10118 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10119 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10120 (tracepoints): Use IP_AGENT_EXPORT.
10121 (last_tracepoint): Don't include in the IPA.
10122 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10123 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10124 (alloced_trace_state_variables): New.
10125 (trace_state_variables): Use IP_AGENT_EXPORT.
10126 (traceframe_t): Delete unused variable.
10127 (circular_trace_buffer): Don't include in the IPA.
10128 (trace_buffer_start): Delete.
10129 (struct trace_buffer_control): New.
10130 (trace_buffer_free): Delete.
10131 (struct ipa_trace_buffer_control): New.
10132 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10133 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10134 New.
10135 (trace_buffer_ctrl): New.
10136 (TRACE_BUFFER_CTRL_CURR): New.
10137 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10138 Reimplement as macros.
10139 (trace_buffer_wrap): Delete.
10140 (traceframe_write_count, traceframe_read_count)
10141 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10142 (struct tracepoint_hit_ctx) <type>: New field.
10143 (struct fast_tracepoint_ctx): New.
10144 (memory_barrier): New.
10145 (cmpxchg): New.
10146 (record_tracepoint_error): Update atomically in the IPA.
10147 (clear_inferior_trace_buffer): New.
10148 (about_to_request_buffer_space): New.
10149 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10150 updating the same buffer.
10151 (add_tracepoint): Default the tracepoint's type to trap
10152 tracepoint, and orig_size to -1.
10153 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10154 internal variables.
10155 (create_trace_state_variable): New parameter `gdb'. Handle it.
10156 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10157 (cmd_qtdp): Handle fast tracepoints.
10158 (cmd_qtdv): Adjust.
10159 (max_jump_pad_size): New.
10160 (gdb_jump_pad_head): New.
10161 (get_jump_space_head): New.
10162 (claim_jump_space): New.
10163 (sort_tracepoints): New.
10164 (MAX_JUMP_SIZE): New.
10165 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10166 IPA.
10167 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10168 support. Upload fast traceframes, and delete internal IPA
10169 breakpoints.
10170 (stop_tracing_handler): New.
10171 (flush_trace_buffer_handler): New.
10172 (cmd_qtstop): Upload fast tracepoints.
10173 (response_tracepoint): Handle fast tracepoints.
10174 (tracepoint_finished_step): Upload fast traceframes. Set the
10175 tracepoint hit context's tracepoint type.
10176 (handle_tracepoint_bkpts): New.
10177 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10178 type. Add comment about fast tracepoints.
10179 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10180 non-existing action_str field.
10181 (get_context_regcache): Handle fast tracepoints.
10182 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10183 to the regcache.
10184 (fast_tracepoint_from_jump_pad_address): New.
10185 (fast_tracepoint_from_ipa_tpoint_address): New.
10186 (collecting_t): New.
10187 (force_unlock_trace_buffer): New.
10188 (fast_tracepoint_collecting): New.
10189 (collecting): New.
10190 (gdb_collect): New.
10191 (write_inferior_data_ptr): New.
10192 (target_tp_heap): New.
10193 (target_malloc): New.
10194 (download_agent_expr): New.
10195 (UALIGN): New.
10196 (download_tracepoints): New.
10197 (download_trace_state_variables): New.
10198 (upload_fast_traceframes): New.
10199 (IPA_FIRST_TRACEFRAME): New.
10200 (IPA_NEXT_TRACEFRAME_1): New.
10201 (IPA_NEXT_TRACEFRAME): New.
10202 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10203 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10204 (gdb_jump_pad_buffer_end): New.
10205 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10206 (initialize_tracepoint): Adjust.
10207 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10208 buffer. Initialize the low module.
10209 * utils.c (PREFIX, TOOLNAME): New.
10210 (malloc_failure): Use PREFIX.
10211 (error): In the IPA, an error causes an exit.
10212 (fatal, warning): Use PREFIX.
10213 (internal_error): Use TOOLNAME.
10214 (NUMCELLS): Increase to 10.
10215 * configure, config.in: Regenerate.
10216
d149dd1d
PA
102172010-06-01 Pedro Alves <pedro@codesourcery.com>
10218
10219 * server.c (handle_query) <qSupported>: Do two passes over the
10220 qSupported string to avoid nesting strtok.
10221
f6528abd
JK
102222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10223
10224 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10225 (CDEPS): New.
10226 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
10227 -Wl,--dynamic-list.
10228 * configure: Regenerate.
10229 * proc-service.list: New.
10230
ca2a87a0
JK
102312010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10232
10233 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10234 New comment.
10235
363a6e9f
OS
102362010-05-26 Ozkan Sezer <sezeroz@gmail.com>
10237
10238 * gdbreplay.c (remote_open): Check error return from socket() call by
10239 its equality to -1 not by it being negative.
10240 * remote-utils.c (remote_open): Likewise.
10241
d23b6cb1
PA
102422010-05-23 Pedro Alves <pedro@codesourcery.com>
10243
10244 * config.h: Regenerate.
10245
28d3cf85
MK
102462010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10247
10248 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10249 doesn't provide PTRACE_GET_THREAD_AREA.
10250
fea36a59
MK
102512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
10252
10253 * linux-m68k-low.c: Include <asm/ptrace.h>
10254 (ps_get_thread_area): Implement.
10255
24b066ba
DE
102562010-05-03 Doug Evans <dje@google.com>
10257
10258 * event-loop.c (struct callback_event): New struct.
10259 (callback_list): New global.
10260 (append_callback_event, delete_callback_event): New functions.
10261 (process_callback): New function.
10262 (start_event_loop): Call it.
10263 * remote-utils.c (NOT_SCHEDULED): Define.
10264 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10265 moved out of readchar.
10266 (readchar): Rewrite. Call reschedule before returning.
10267 (reset_readchar): New function.
10268 (remote_close): Call it.
10269 (process_remaining, reschedule): New functions.
10270 * server.h (callback_handler_func): New typedef.
10271 (append_callback_event, delete_callback_event): Declare.
10272
9836d6ea
PA
102732010-05-03 Pedro Alves <pedro@codesourcery.com>
10274
10275 * proc-service.c (ps_pglobal_lookup): Use
10276 thread_db_look_up_one_symbol.
10277 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10278 parameter. Use it instead of all_symbols_looked_up.
10279 * server.h (struct process_info) <all_symbols_looked_up>: Delete
10280 field.
10281 (all_symbols_looked_up): Don't declare.
10282 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10283 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10284 field.
10285 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10286 Set all_symbols_looked_up here.
10287 (thread_db_look_up_one_symbol): New.
10288 (thread_db_get_tls_address): Adjust.
10289 (thread_db_load_search, try_thread_db_load_1): Always allocate the
10290 thread_db object on the heap, and tentatively set it in the
10291 process structure.
10292 (thread_db_init): Don't set all_symbols_looked_up here.
10293 * linux-low.h (thread_db_look_up_one_symbol): Declare.
10294
7984d532
PA
102952010-05-03 Pedro Alves <pedro@codesourcery.com>
10296
10297 * linux-low.c (linux_kill, linux_detach): Adjust.
10298 (status_pending_p_callback): Remove redundant statement. Check
10299 for !TARGET_WAITIKIND_IGNORE, instead of
10300 TARGET_WAITKIND_STOPPED.
10301 (handle_tracepoints): Make sure LWP is locked. Adjust.
10302 (linux_wait_for_event_1): Adjust.
10303 (linux_cancel_breakpoints): New.
10304 (unsuspend_one_lwp): New.
10305 (unsuspend_all_lwps): New.
10306 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10307 (send_sigstop_callback): Change return type to int, add new
10308 `except' parameter and handle it.
10309 (suspend_and_send_sigstop_callback): New.
10310 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10311 pass them down. If SUSPEND, also increment the lwp's suspend
10312 count.
10313 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10314 (need_step_over_p): Don't consider suspended LWPs.
10315 (start_step_over): Adjust.
10316 (proceed_one_lwp): Change return type to int, add new `except'
10317 parameter and handle it.
10318 (unsuspend_and_proceed_one_lwp): New.
10319 (proceed_all_lwps): Use find_inferior instead of
10320 for_each_inferior.
10321 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
10322 also decrement the suspend count of LWPs. Pass `except' down,
10323 instead of hacking its suspend count.
10324 (linux_pause_all): Add `freeze' parameter. Adjust.
10325 (linux_unpause_all): New.
10326 (linux_target_ops): Install linux_unpause_all.
10327 * server.c (handle_status): Adjust.
10328 * target.h (struct target_ops): New fields `unpause_all' and
10329 `cancel_breakpoints'. Add new parameter to `pause_all'.
10330 (pause_all): Add new `freeze' parameter.
10331 (unpause_all): New.
10332 (cancel_breakpoints): New.
10333 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10334 cancel breakpoints.
10335 (cmd_qtstart): Pause threads.
10336 (stop_tracing): Pause threads, and cancel breakpoints.
10337 * win32-low.c (win32_target_ops): Adjust.
10338
e471f25b
PA
103392010-05-03 Pedro Alves <pedro@codesourcery.com>
10340
10341 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10342 the inferior right away from here...
10343 (linux_wait_1): ... to here, and adjust to check the thread's
10344 last_resume_kind instead of the lwp's step or stop_expected flags.
10345
1915ef4f
PA
103462010-05-02 Pedro Alves <pedro@codesourcery.com>
10347
10348 * README: Use consistent `GDB' and `GDBserver' spellings.
10349
f9e39928
PA
103502010-05-02 Pedro Alves <pedro@codesourcery.com>
10351
10352 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10353 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10354 (linux_detach_one_lwp): Assume the lwp is stopped.
10355 (any_thread_of): Delete.
10356 (linux_detach): Stop all lwps here. Don't blindly delete all
10357 breakpoints.
10358 (delete_lwp_callback): New.
10359 (linux_mourn): Delete all lwps of the process that is gone.
10360 (linux_wait_1): Don't delete the last lwp of the process here.
10361 * mem-break.h (mark_breakpoints_out): Declare.
10362 * mem-break.c (mark_breakpoints_out): New.
10363 (free_all_breakpoints): Use it.
10364 * server.c (handle_target_event): If the process is gone, mark
10365 breakpoints out.
10366 * thread-db.c (struct thread_db) <create_bp>: New field.
10367 (thread_db_enable_reporting): Fix prototype. Store a thread event
10368 breakpoint reference in the thread_db struct.
10369 (thread_db_load_search): Clear the thread_db object.
10370 (try_thread_db_load_1): Ditto.
10371 (switch_to_process): New.
10372 (disable_thread_event_reporting): Use it.
10373 (remove_thread_event_breakpoints): New.
10374 (thread_db_detach, thread_db_mourn): Use it.
10375
1e7fc18c
PA
103762010-05-01 Pedro Alves <pedro@codesourcery.com>
10377
10378 * linux-low.c (linux_enable_event_reporting): New.
10379 (linux_wait_for_event_1, handle_extended_wait): Use it.
10380
02fc4de7
PA
103812010-04-30 Pedro Alves <pedro@codesourcery.com>
10382
10383 * linux-low.c (linux_kill_one_lwp, linux_kill)
10384 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10385 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10386 SIGSTOP even if the LWP is stopped.
10387 (send_sigstop_callback): New.
10388 (stop_all_lwps): Use send_sigstop_callback instead.
10389 (linux_resume_one_thread): Adjust.
10390 (proceed_one_lwp): Still proceed an LWP that the client has
10391 requested to stop, if we haven't reported it as stopped yet. Make
10392 sure that LWPs the client want stopped, have a pending SIGSTOP.
10393
bc3b5632
DE
103942010-04-26 Doug Evans <dje@google.com>
10395
ae1ada35
DE
10396 * server.c (handle_general_set): Make static.
10397
bc3b5632
DE
10398 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10399 Print received char after testing for error/eof instead of before.
10400 (input_interrupt): Tweak comment.
10401
65730243
DE
104022010-04-23 Doug Evans <dje@google.com>
10403
10404 * server.c (start_inferior): Print inferior argv if --debug.
10405
a8ae7dc0
AR
104062010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10407
10408 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10409 * nto-x86-low.c: Include server.h
10410
1c07cc19
PM
104112010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10412
10413 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10414 be consistent with other sources of this directory.
10415 (init_registers_amd64): Correct name of source file of this function
10416 in the comment.
10417
e0a61e09
PM
104182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10419
10420 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10421 64-bit executables.
10422
54709339
PM
104232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10424
10425 * win32-i386-low.c: Add 64-bit support.
10426 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10427 (init_registers_amd64): Declare.
10428 (mappings): Add 64-bit version of array.
10429 (init_windows_x86): New function.
10430 (the_low_target): Change init_arch field to init_windows_x86.
10431
e8f0053d
PM
104322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10433
10434 * win32-low.c: Adapt to support also 64-bit architecture.
10435 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10436 (get_image_name): Use SIZE_T type for local variable `done'.
10437 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10438 (toolhelp_get_dll_name): Idem.
10439 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10440 Use uintptr_t typecast to avoid warning.
10441 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10442 (handle_exception): Use phex_nz to avoid warning.
10443 (win32_wait): Remove unused local variable `process'.
10444
c481e77e
PM
104452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10446
10447 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10448 `amd64-avx.o'.
10449
12ea4b69
PM
104502010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10451
10452 * configure.ac: Use `ws2_32' library for srv_mingw.
10453 * configure: Regenerate.
10454 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10455 * remote-utils.c: Likewise.
10456
f6d1620c
L
104572010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10458
10459 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10460 if __x86_64__ is defined.
10461
8e642873
PM
104622010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10463
10464 * configure: Regenerate.
10465
711e434b
PM
104662010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10467
10468 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10469 * target.h (target_ops): New get_tib_address field.
10470 * win32-low.h (win32_thread_info): Add thread_local_base field.
10471 * win32-low.c (child_add_thread): Add tlb argument.
10472 Set thread_local_base field to TLB.
10473 (get_child_debug_event): Adapt to child_add_thread change.
10474 (win32_get_tib_address): New function.
10475 (win32_target_ops): Set get_tib_address field to
10476 win32_get_tib_address.
10477 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10478
505106cd
PA
104792010-04-12 Pedro Alves <pedro@codesourcery.com>
10480
505106cd
PA
10481 * linux-low.c (linux_mourn): Also remove the process.
10482 * server.c (handle_target_event): Don't remove the process here.
10483 * nto-low.c (nto_mourn): New.
10484 (nto_target_ops): Install it.
10485 * spu-low.c (spu_mourn): New.
10486 (spu_target_ops): Install it.
10487 * win32-low.c (win32_mourn): New.
10488 (win32_target_ops): Install it.
10489
e8470a06
PA
104902010-04-12 Pedro Alves <pedro@codesourcery.com>
10491
10492 * server.h (buffer_xml_printf): Remove redundant `;'.
10493
45ba0d02
PA
104942010-04-12 Pedro Alves <pedro@codesourcery.com>
10495
10496 * regcache.c (set_register_cache): Invalidate regcaches before
10497 changing the register cache layout.
10498 (regcache_invalidate_one): Allow a NULL regcache.
10499 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10500 regcaches before changing the register cache layout or the target
10501 regsets.
10502
59e04013
L
105032010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10504
10505 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10506 variable warning on Linux/x86-64.
10507
8336d594
PA
105082010-04-11 Pedro Alves <pedro@codesourcery.com>
10509
10510 GDBserver disconnected tracing support.
10511
10512 * linux-low.c (linux_remove_process): Delete.
10513 (add_lwp): Don't set last_resume_kind here.
10514 (linux_kill): Use `mourn'.
10515 (linux_detach): Use `thread_db_detach', and `mourn'.
10516 (linux_mourn): New.
10517 (linux_attach_lwp_1): Adjust comment.
10518 (linux_attach): last_resume_kind moved the thread_info; adjust.
10519 (status_pending_p_callback): Adjust.
10520 (linux_wait_for_event_1): Adjust.
10521 (count_events_callback, select_singlestep_lwp_callback)
10522 (select_event_lwp_callback, cancel_breakpoints_callback)
10523 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10524 (proceed_one_lwp): Adjust.
10525 (linux_async): Add debug output.
10526 (linux_thread_stopped): New.
10527 (linux_pause_all): New.
10528 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10529 linux_pause_all.
10530 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10531 (thread_db_free): Delete declaration.
10532 (thread_db_detach, thread_db_mourn): Declare.
10533 * thread-db.c (thread_db_init): Use thread_db_mourn.
10534 (thread_db_free): Delete, split in two.
10535 (disable_thread_event_reporting): New.
10536 (thread_db_detach): New.
10537 (thread_db_mourn): New.
10538
10539 * server.h (struct thread_info) <last_resume_kind>: New field.
10540 <attached>: Add comment.
10541 <gdb_detached>: New field.
10542 (handler_func): Change return type to int.
10543 (handle_serial_event, handle_target_event): Ditto.
10544 (gdb_connected): Declare.
10545 (tracing): Delete.
10546 (disconnected_tracing): Declare.
10547 (stop_tracing): Declare.
10548
10549 * server.c (handle_query) <qSupported>: Report support for
10550 disconnected tracing.
10551 (queue_stop_reply_callback): Account for running threads.
10552 (gdb_wants_thread_stopped): New.
10553 (gdb_wants_all_threads_stopped): New.
10554 (gdb_reattached_process): New.
10555 (handle_status): Clear the `gdb_detached' flag of all processes.
10556 In all-stop, stop all threads.
10557 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10558 (process_serial_event): If the remote connection breaks, or if an
10559 exit was forced with "monitor exit", force an event loop exit.
10560 Handle disconnected tracing on detach.
10561 (handle_serial_event): Adjust.
10562 (handle_target_event): If GDB isn't connected, forward events back
10563 to the inferior, unless the last process exited, in which case,
10564 exit gdbserver. Adjust interface.
10565
10566 * remote-utils.c (remote_open): Don't block in accept. Instead
10567 register an event loop source on the listen socket file
10568 descriptor. Refactor bits into ...
10569 (listen_desc): ... this new global.
10570 (gdb_connected): ... this new function.
10571 (enable_async_notification): ... this new function.
10572 (handle_accept_event): ... this new function.
10573 (remote_close): Clear remote_desc.
10574
10575 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10576
10577 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10578 New fields.
10579 (mourn_inferior): Define.
10580 (target_process_qsupported): Avoid the dangling else problem.
10581 (thread_stopped): Define.
10582 (pause_all): Define.
10583 (target_waitstatus_to_string): Declare.
10584 * target.c (target_waitstatus_to_string): New.
10585
10586 * tracepoint.c (tracing): Make extern.
10587 (disconnected_tracing): New.
10588 (stop_tracing): Make extern. Handle tracing stops due to GDB
10589 disconnecting.
10590 (cmd_qtdisconnected): New.
10591 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10592 (handle_tracepoint_general_set): Handle QTDisconnected.
10593
10594 * event-loop.c (event_handler_func): Change return type to int.
10595 (process_event): Bail out if the event handler wants the event
10596 loop to stop.
10597 (handle_file_event): Ditto.
10598 (start_event_loop): Bail out if the event handler wants the event
10599 loop to stop.
10600
10601 * nto-low.c (nto_target_ops): Adjust.
10602 * spu-low.c (spu_wait): Don't remove the process here.
10603 (spu_target_ops): Adjust.
10604 * win32-low.c (win32_wait): Don't remove the process here.
10605 (win32_target_ops): Adjust.
10606
5d267c4c
PA
106072010-04-11 Pedro Alves <pedro@codesourcery.com>
10608
10609 * regcache.c (realloc_register_cache): Invalidate inferior's
10610 regcache before recreating it.
10611
623ccd72
PA
106122010-04-09 Pedro Alves <pedro@codesourcery.com>
10613
10614 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10615
219f2f23
PA
106162010-04-09 Stan Shebs <stan@codesourcery.com>
10617 Pedro Alves <pedro@codesourcery.com>
10618
10619 * server.h (LONGEST): New.
10620 (struct thread_info) <while_stepping>: New field.
10621 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10622 Declare.
10623 (initialize_tracepoint, handle_tracepoint_general_set)
10624 (handle_tracepoint_query, tracepoint_finished_step)
10625 (tracepoint_was_hit, release_while_stepping_state_list):
10626 (current_traceframe): Declare.
10627 * server.c (handle_general_set): Handle tracepoint packets.
10628 (read_memory): New.
10629 (write_memory): New.
10630 (handle_search_memory_1): Use read_memory.
10631 (handle_query): Report support for conditional tracepoints, trace
10632 state variables, and tracepoint sources. Handle tracepoint
10633 queries.
10634 (main): Initialize the tracepoints module.
10635 (process_serial_event): Handle traceframe reads/writes.
10636
10637 * linux-low.c (handle_tracepoints): New.
10638 (linux_wait_1): Call it.
10639 (linux_resume_one_lwp): Handle while-stepping.
10640 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10641 (linux_target_ops): Install them.
10642 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10643 New field.
10644 * linux-x86-low.c (x86_supports_tracepoints): New.
10645 (the_low_target). Install it.
10646
10647 * mem-break.h (delete_breakpoint): Declare.
10648 * mem-break.c (delete_breakpoint): Make external.
10649
10650 * target.h (struct target_ops): Add `supports_tracepoints',
10651 `read_pc', and `write_pc' fields.
10652 (target_supports_tracepoints): Define.
10653 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10654 (phex_nz): New.
10655
10656 * regcache.h (struct regcache) <registers_owned>: New field.
10657 (init_register_cache, regcache_cpy): Declare.
10658 (regcache_read_pc, regcache_write_pc): Declare.
10659 (register_cache_size): Declare.
10660 (supply_regblock): Declare.
10661 * regcache.c (init_register_cache): New.
10662 (new_register_cache): Use it.
10663 (regcache_cpy): New.
10664 (register_cache_size): New.
10665 (supply_regblock): New.
10666 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10667
219f2f23
PA
10668 * tracepoint.c: New.
10669
10670 * Makefile.in (OBS): Add tracepoint.o.
10671 (tracepoint.o): New rule.
10672
3a13a53b
L
106732010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10674
10675 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10676 (i386-mmx.o): New.
10677 (i386-mmx.c): Likewise.
10678 (i386-mmx-linux.o): Likewise.
10679 (i386-mmx-linux.c): Likewise.
10680
10681 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10682 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10683 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10684 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10685
10686 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10687 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10688 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10689
1570b33e
L
106902010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10691
10692 * Makefile.in (clean): Updated.
10693 (i386-avx.o): New.
10694 (i386-avx.c): Likewise.
10695 (i386-avx-linux.o): Likewise.
10696 (i386-avx-linux.c): Likewise.
10697 (amd64-avx.o): Likewise.
10698 (amd64-avx.c): Likewise.
10699 (amd64-avx-linux.o): Likewise.
10700 (amd64-avx-linux.c): Likewise.
10701
10702 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10703 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10704 (srv_amd64_regobj): Add amd64-avx.o.
10705 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10706 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10707 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10708 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10709 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10710 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10711 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10712
10713 * i387-fp.c: Include "i386-xstate.h".
10714 (i387_xsave): New.
10715 (i387_cache_to_xsave): Likewise.
10716 (i387_xsave_to_cache): Likewise.
10717 (x86_xcr0): Likewise.
10718
10719 * i387-fp.h (i387_cache_to_xsave): Likewise.
10720 (i387_xsave_to_cache): Likewise.
10721 (x86_xcr0): Likewise.
10722
10723 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10724 * linux-crisv32-low.c (target_regsets): Likewise.
10725 * linux-m68k-low.c (target_regsets): Likewise.
10726 * linux-mips-low.c (target_regsets): Likewise.
10727 * linux-ppc-low.c (target_regsets): Likewise.
10728 * linux-s390-low.c (target_regsets): Likewise.
10729 * linux-sh-low.c (target_regsets): Likewise.
10730 * linux-sparc-low.c (target_regsets): Likewise.
10731 * linux-xtensa-low.c (target_regsets): Likewise.
10732
10733 * linux-low.c: Include <sys/uio.h>.
10734 (regsets_fetch_inferior_registers): Support nt_type.
10735 (regsets_store_inferior_registers): Likewise.
10736 (linux_process_qsupported): New.
10737 (linux_target_ops): Add linux_process_qsupported.
10738
10739 * linux-low.h (regset_info): Add nt_type.
10740 (linux_target_ops): Add process_qsupported.
10741
10742 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10743 and <sys/uio.h>.
10744 (init_registers_i386_avx_linux): New.
10745 (init_registers_amd64_avx_linux): Likewise.
10746 (xmltarget_i386_linux_no_xml): Likewise.
10747 (xmltarget_amd64_linux_no_xml): Likewise.
10748 (PTRACE_GETREGSET): Likewise.
10749 (PTRACE_SETREGSET): Likewise.
10750 (x86_fill_xstateregset): Likewise.
10751 (x86_store_xstateregset): Likewise.
10752 (use_xml): Likewise.
10753 (x86_linux_update_xmltarget): Likewise.
10754 (x86_linux_process_qsupported): Likewise.
10755 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10756 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10757 init_registers_i386_linux here. Call
10758 x86_linux_update_xmltarget.
10759 (the_low_target): Add x86_linux_process_qsupported.
10760
10761 * server.c (handle_query): Call target_process_qsupported.
10762
10763 * target.h (target_ops): Add process_qsupported.
10764 (target_process_qsupported): New.
10765
fc7238bb
PA
107662010-04-03 Pedro Alves <pedro@codesourcery.com>
10767
10768 * inferiors.c (add_thread): Set last_status kind to
10769 TARGET_WAITKIND_IGNORE.
10770 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10771 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10772 (linux_wait_1): Move `thread' local definition to block that uses
10773 it. Don't NULL initialize `event_child'.
10774 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10775 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10776 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10777
bdabb078
PA
107782010-04-01 Pedro Alves <pedro@codesourcery.com>
10779
10780 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10781 an extended waitstatus, or by a watchpoint.
10782 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10783 thread was stepping or has been stopped by a watchpoint.
10784
d3bbe7a0
PA
107852010-04-01 Pedro Alves <pedro@codesourcery.com>
10786
10787 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10788 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10789 of another, then delete the previous, and validate all
10790 breakpoints.
10791 (validate_inserted_breakpoint): New.
10792 (delete_disabled_breakpoints): New.
10793 (validate_breakpoints): New.
10794 (check_mem_read): Validate breakpoints before trusting their
10795 shadow. Delete disabled breakpoints.
10796 (check_mem_write): Validate breakpoints before trusting they
10797 should be inserted. Delete disabled breakpoints.
10798 * mem-break.h (validate_breakpoints):
10799 * server.c (handle_query): Validate breakpoints when we see a
10800 qSymbol query.
10801
8b07ae33
PA
108022010-04-01 Pedro Alves <pedro@codesourcery.com>
10803
10804 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10805 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10806 if we could tell there's a GDB breakpoint at stop_pc.
10807 (need_step_over_p): Don't do a step over if we find a GDB
10808 breakpoint at the resume PC.
10809
10810 * mem-break.c (struct raw_breakpoint): New.
10811 (enum bkpt_type): New type `gdb_breakpoint'.
10812 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10813 fields. New field `raw'.
10814 (find_raw_breakpoint_at): New.
10815 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10816 breakpoint instead.
10817 (set_breakpoint_at): Adjust.
10818 (delete_raw_breakpoint): New.
10819 (release_breakpoint): New.
10820 (delete_breakpoint): Rename to...
10821 (delete_breakpoint_1): ... this. Add proc parameter. Use
10822 release_breakpoint. Return ENOENT.
10823 (delete_breakpoint): Reimplement.
10824 (find_breakpoint_at): Delete.
10825 (find_gdb_breakpoint_at): New.
10826 (delete_breakpoint_at): Delete.
10827 (set_gdb_breakpoint_at): New.
10828 (delete_gdb_breakpoint_at): New.
10829 (gdb_breakpoint_here): New.
10830 (set_reinsert_breakpoint): Use release_breakpoint.
10831 (uninsert_breakpoint): Rename to ...
10832 (uninsert_raw_breakpoint): ... this.
10833 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10834 (reinsert_raw_breakpoint): Change parameter type to
10835 raw_breakpoint.
10836 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10837 instead.
10838 (check_breakpoints): Adjust. Use release_breakpoint.
10839 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10840 (breakpoint_inserted_here): Ditto.
10841 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10842 Don't trust the breakpoint's shadow if it is not inserted.
10843 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10844 (delete_all_breakpoints): Adjust.
10845 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10846 use delete_breakpoint_1.
10847
10848 * mem-break.h (breakpoints_supported): Delete declaration.
10849 (set_gdb_breakpoint_at): Declare.
10850 (gdb_breakpoint_here): Declare.
10851 (delete_breakpoint_at): Delete.
10852 (delete_gdb_breakpoint_at): Declare.
10853
10854 * server.h (struct raw_breakpoint): Forward declare.
10855 (struct process_info): New field `raw_breakpoints'.
10856
10857 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10858 breakpoints.
10859
6bf5e0ba
PA
108602010-03-24 Pedro Alves <pedro@codesourcery.com>
10861
10862 * linux-low.c (status_pending_p_callback): Fix comment.
10863 (linux_wait_for_event_1): Move most of the internal breakpoint
10864 handling from here...
10865 (linux_wait_1): ... to here.
10866 (count_events_callback): New.
10867 (select_singlestep_lwp_callback): New.
10868 (select_event_lwp_callback): New.
10869 (cancel_breakpoints_callback): New.
10870 (select_event_lwp): New.
10871 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10872 priority to all LWPs that have had events that should be reported
10873 to the client. Cancel breakpoints when about to reporting the
10874 event to the client, not while stopping lwps. No longer cancel
10875 finished single-steps here.
10876 (cancel_finished_single_step): Delete.
10877 (cancel_finished_single_steps): Delete.
10878
414a389f
PA
108792010-03-24 Pedro Alves <pedro@codesourcery.com>
10880
10881 * mem-break.c (enum bkpt_type): New.
10882 (struct breakpoint): New field `type'.
10883 (set_breakpoint_at): Change return type to struct breakpoint
10884 pointer. Set type to `other_breakpoint' by default.
10885 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10886 in the breakpoint list.
10887 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10888 (reinsert_breakpoint): Rename to ...
10889 (reinsert_raw_breakpoint): ... this.
10890 (reinsert_breakpoints_at): Adjust.
10891 * mem-break.h (struct breakpoint): Declare.
10892 (set_breakpoint_at): Change return type to struct breakpoint
10893 pointer.
10894
2280c721
PA
108952010-03-24 Pedro Alves <pedro@codesourcery.com>
10896
10897 * server.c (handle_query): Assign, not compare.
10898
d50171e4
PA
108992010-03-24 Pedro Alves <pedro@codesourcery.com>
10900
10901 Teach linux gdbserver to step-over-breakpoints.
10902
10903 * linux-low.c (can_hardware_single_step): New.
10904 (supports_breakpoints): New.
10905 (handle_extended_wait): If stopping threads, read the stop pc of
10906 the new cloned LWP.
10907 (get_pc): New.
10908 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10909 low target doesn't support retrieving the PC.
10910 (add_lwp): Set last_resume_kind to resume_continue.
10911 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10912 (linux_attach): Don't clear stop_expected. Set the lwp's
10913 last_resume_kind to resume_stop.
10914 (linux_detach_one_lwp): Don't check for removed breakpoints.
10915 (check_removed_breakpoint): Delete.
10916 (status_pending_p): Rename to ...
10917 (status_pending_p_callback): ... this. Don't check for removed
10918 breakpoints. Don't consider threads that are stopped from GDB's
10919 perspective.
10920 (linux_wait_for_lwp): Always read the stop_pc here.
10921 (cancel_breakpoint): New.
10922 (step_over_bkpt): New global.
10923 (linux_wait_for_event_1): Implement stepping over breakpoints.
10924 (gdb_wants_lwp_stopped): New.
10925 (gdb_wants_all_stopped): New.
10926 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10927 single-step traps here. Store the thread's last reported target
10928 wait status.
10929 (send_sigstop): Don't clear stop_expected. Always set it,
10930 instead.
10931 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10932 (cancel_finished_single_step): New.
10933 (cancel_finished_single_steps): New.
10934 (wait_for_sigstop): Don't cancel finished single-step traps here.
10935 (linux_resume_one_lwp): Don't check for removed breakpoints.
10936 Don't set `step' on non-hardware step archs.
10937 (linux_set_resume_request): Ignore resume_stop requests if already
10938 stopping or stopped. Set the lwp's last_resume_kind.
10939 (resume_status_pending_p): Don't check for removed breakpoints.
10940 (need_step_over_p): New.
10941 (start_step_over): New.
10942 (finish_step_over): New.
10943 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10944 requests. Clear the thread's last reported target waitstatus.
10945 Don't use the `suspended' flag. Don't consider pending breakpoints.
10946 (linux_resume): Start a step-over if necessary.
10947 (proceed_one_lwp): New.
10948 (proceed_all_lwps): New.
10949 (unstop_all_lwps): New.
10950 * linux-low.h (struct lwp_info): Rewrite comment for the
10951 `suspended' flag. Add the `stop_pc' field. Delete the
10952 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10953 Add `'last_resume_kind' and `need_step_over' fields.
10954 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10955 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10956 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10957 (set_raw_breakpoint_at): New.
10958 (set_breakpoint_at): Rewrite to use it.
10959 (reinsert_breakpoint_handler): Delete.
10960 (set_reinsert_breakpoint): New.
10961 (reinsert_breakpoint_by_bp): Delete.
10962 (delete_reinsert_breakpoints): New.
10963 (uninsert_breakpoint): Rewrite.
10964 (uninsert_breakpoints_at): New.
10965 (reinsert_breakpoint): Rewrite.
10966 (reinsert_breakpoints_at): New.
10967 (check_breakpoints): Rewrite.
10968 (breakpoint_here): New.
10969 (breakpoint_inserted_here): New.
10970 (check_mem_read): Adjust.
10971 * mem-break.h (breakpoints_supported, breakpoint_here)
10972 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10973 (reinsert_breakpoint_by_bp): Delete declaration.
10974 (delete_reinsert_breakpoints): Declare.
10975 (reinsert_breakpoint): Delete declaration.
10976 (reinsert_breakpoints_at): Declare.
10977 (uninsert_breakpoint): Delete declaration.
10978 (uninsert_breakpoints_at): Declare.
10979 (check_breakpoints): Adjust prototype.
10980 * server.h: Adjust include order.
10981 (struct thread_info): Declare here. Add a `last_status' field.
10982
30ba68cb
MS
109832010-03-23 Michael Snyder <msnyder@vmware.com>
10984
10985 * server.c (crc32): New function.
10986 (handle_query): Add handling for 'qCRC:' request.
10987
b9a881c2
PA
109882010-03-23 Pedro Alves <pedro@codesourcery.com>
10989
10990 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10991 lwp had been stopped by a watchpoint.
10992
e92d13d5
PA
109932010-03-16 Pedro Alves <pedro@codesourcery.com>
10994
10995 * server.h (internal_error): Declare.
10996 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10997 * utils.c (internal_error): New function.
10998
64daa791
AS
109992010-03-15 Andreas Schwab <schwab@redhat.com>
11000
11001 * configure.srv: Fix typo setting srv_regobj.
11002
f52cd8cd
PA
110032010-03-15 Pedro Alves <pedro@codesourcery.com>
11004
11005 * linux-low.c (fetch_register): Avoid passing a non string literal
11006 format to `error'.
11007 (usr_store_inferior_registers): Ditto.
11008
93ae6fdc
PA
110092010-03-14 Pedro Alves <pedro@codesourcery.com>
11010
11011 * linux-low.c (linux_write_memory): Bail out early if peeking
11012 memory failed.
11013
c3adc08c
PA
110142010-03-14 Pedro Alves <pedro@codesourcery.com>
11015
11016 * linux-low.h (struct lwp_info): New fields
11017 `stopped_by_watchpoint' and `stopped_data_address'.
11018 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11019 here, and cache them in the lwp object.
11020 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11021 directly.
11022 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11023 field.
11024 (linux_stopped_by_watchpoint): Rewrite.
11025 (linux_stopped_data_address): Rewrite.
11026
bce522a2
PA
110272010-03-06 Simo Melenius <simo.melenius@iki.fi>
11028
11029 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11030 switching the current inferior, not before.
11031
90884b2b
L
110322010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11033
11034 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11035 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11036 i386-linux.c and amd64-linux.c.
11037 (reg-i386.o): Removed.
11038 (reg-i386.c): Likewise.
11039 (reg-i386-linux.o): Likewise.
11040 (reg-i386-linux.c): Likewise.
11041 (reg-x86-64.o): Likewise.
11042 (reg-x86-64.c): Likewise.
11043 (reg-x86-64-linux.o): Likewise.
11044 (reg-x86-64-linux.c): Likewise.
11045 (i386.o): New.
11046 (i386.c): Likewise.
11047 (i386-linux.o): Likewise.
11048 (i386-linux.c): Likewise.
11049 (amd64.o): Likewise.
11050 (amd64.c): Likewise.
11051 (amd64-linux.o): Likewise.
11052 (amd64-linux.c): Likewise.
11053
11054 * configure.srv (srv_i386_regobj): New.
11055 (srv_i386_linux_regobj): Likewise.
11056 (srv_amd64_regobj): Likewise.
11057 (srv_amd64_linux_regobj): Likewise.
11058 (srv_i386_32bit_xmlfiles): Likewise.
11059 (srv_i386_64bit_xmlfiles): Likewise.
11060 (srv_i386_xmlfiles): Likewise.
11061 (srv_amd64_xmlfiles): Likewise.
11062 (srv_i386_linux_xmlfiles): Likewise.
11063 (srv_amd64_linux_xmlfiles): Likewise.
11064 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11065 srv_xmlfiles to $srv_i386_xmlfiles.
11066 (i[34567]86-*-mingw32ce*): Likewise.
11067 (i[34567]86-*-mingw*): Likewise.
11068 (i[34567]86-*-nto*): Likewise.
11069 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11070 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11071 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11072 (x86_64-*-linux*): Likewise.
11073
11074 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11075 (init_registers_amd64_linux): New.
11076 (x86_arch_setup): Replace init_registers_x86_64_linux with
11077 init_registers_amd64_linux.
11078
193f13e6
MK
110792010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11080
11081 * configure.ac: Check for libdl. If it is not available link against
11082 static libthread_db.
11083 * configure: Regenerate.
11084
85d721b8
PA
110852010-02-22 Pedro Alves <pedro@codesourcery.com>
11086
11087 PR9605
11088
11089 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11090 handing a read watchpoint.
11091 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11092
6076632b
DE
110932010-02-12 Doug Evans <dje@google.com>
11094
11095 * linux-low.c (linux_supports_tracefork_flag): Document.
11096 (linux_look_up_symbols): Add comment.
11097
3327ccf7
L
110982010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11099
11100 * regcache.c (supply_register): Clear regcache if buf is NULL.
11101
0718675c 111022010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 11103 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
11104
11105 * inferiors.c (find_inferior): Add function documentation.
11106 (unloaded_dll): Handle the case where the unloaded dll has not
11107 been previously registered in the dll list.
11108
177321bd
DJ
111092010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11110
11111 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11112 (thumb2_breakpoint): New.
11113 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11114
2b009048
DJ
111152010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11116
11117 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11118 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11119 breakpoints.
11120
3be029c7
PA
111212010-01-21 Pedro Alves <pedro@codesourcery.com>
11122
11123 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11124
18f5de3b
JK
111252010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11126
11127 * linux-s390-low.c (s390_collect_ptrace_register)
11128 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11129
3743bb4f
DE
111302010-01-21 Doug Evans <dje@google.com>
11131
14ce3065
DE
11132 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11133 (PTRACE_ARG4_TYPE): New macro.
11134 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11135 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11136 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11137 (usr_store_inferior_registers): Ditto.
11138 (linux_read_memory, linux_write_memory): Ditto.
11139 (linux_test_for_tracefork): Ditto.
11140
3743bb4f
DE
11141 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11142 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11143
8b315be5
PA
111442010-01-21 Pedro Alves <pedro@codesourcery.com>
11145
11146 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11147 target.
11148
85492558
PA
111492010-01-21 Pedro Alves <pedro@codesourcery.com>
11150
11151 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11152 prototype to take a regcache. Adjust.
11153
442ea881
PA
111542010-01-20 Pedro Alves <pedro@codesourcery.com>
11155
11156 * regcache.h (struct thread_info): Forward declare.
11157 (struct regcache): New.
11158 (new_register_cache): Adjust prototype.
11159 (get_thread_regcache): Declare.
11160 (free_register_cache): Adjust prototype.
11161 (registers_to_string, registers_from_string): Ditto.
11162 (supply_register, supply_register_by_name, collect_register)
11163 (collect_register_as_string, collect_register_by_name): Ditto.
11164 * regcache.c (struct inferior_regcache_data): Delete.
11165 (get_regcache): Rename to ...
11166 (get_thread_regcache): ... this. Adjust. Switch inferior before
11167 fetching registers.
11168 (regcache_invalidate_one): Adjust.
11169 (regcache_invalidate): Fix prototype.
11170 (new_register_cache): Return the new register cache.
11171 (free_register_cache): Change prototype.
11172 (realloc_register_cache): Adjust.
11173 (registers_to_string): Change prototype to take a regcache. Adjust.
11174 (registers_from_string): Ditto.
11175 (register_data): Ditto.
11176 (supply_register): Ditto.
11177 (supply_register_by_name): Ditto.
11178 (collect_register): Ditto.
11179 (collect_register_as_string): Ditto.
11180 (collect_register_by_name): Ditto.
11181 * server.c (process_serial_event): Adjust.
11182 * linux-low.h (regset_fill_func, regset_store_func): Change
11183 prototype.
11184 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11185 Change prototype.
11186 * linux-low.c (get_stop_pc): Adjust.
11187 (check_removed_breakpoint): Adjust.
11188 (linux_wait_for_event): Adjust.
11189 (linux_resume_one_lwp): Adjust.
11190 (fetch_register): Add regcache parameter. Adjust.
11191 (usr_store_inferior_registers): Ditto.
11192 (regsets_fetch_inferior_registers): Ditto.
11193 (regsets_store_inferior_registers): Ditto.
11194 (linux_fetch_registers, linux_store_registers): Ditto.
11195 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11196 regcache. Adjust.
43aaf8b6
PA
11197 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11198 Ditto.
442ea881
PA
11199 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11200 prototype to take a regcache.
11201 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11202 * remote-utils.c (convert_ascii_to_int, outreg)
11203 (prepare_resume_reply): Change prototype to take a regcache.
11204 Adjust.
11205 * target.h (struct target_ops) <fetch_registers, store_registers>:
11206 Change prototype to take a regcache.
11207 (fetch_inferior_registers, store_inferior_registers): Change
11208 prototype to take a regcache. Adjust.
11209 * proc-service.c (ps_lgetregs): Adjust.
11210 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11211 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11212 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11213 take a regcache. Adjust.
11214 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11215 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11216 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11217 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
11218 * linux-cris-low.c (cris_get_pc, cris_set_pc)
11219 (cris_cannot_fetch_register):
11220 (cris_breakpoint_at): Change prototype to take a regcache.
11221 Adjust.
11222 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11223 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11224 to take a regcache. Adjust.
11225 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11226 Adjust.
11227 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11228 take a regcache. Adjust.
11229 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11230 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11231 (m68k_set_pc): Change prototype to take a regcache. Adjust.
11232 * linux-mips-low.c (mips_get_pc):
11233 (mips_set_pc): Change prototype to take a regcache. Adjust.
11234 (mips_reinsert_addr): Adjust.
11235 (mips_collect_register): Change prototype to take a regcache.
11236 Adjust.
11237 (mips_supply_register):
11238 (mips_collect_register_32bit, mips_supply_register_32bit)
11239 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11240 (mips_store_fpregset): Ditto.
43aaf8b6
PA
11241 * linux-ppc-low.c (ppc_supply_ptrace_register)
11242 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
11243 (parse_spufs_run): Adjust.
11244 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11245 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11246 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11247 take a regcache. Adjust.
11248 * linux-s390-low.c (s390_collect_ptrace_register)
11249 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11250 (s390_set_pc): Change prototype to take a regcache. Adjust.
11251 (s390_arch_setup): Adjust.
11252 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11253 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
11254 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11255 (sparc_fill_gregset, sparc_store_gregset_from_stack)
11256 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11257 regcache. Adjust.
11258 (sparc_breakpoint_at): Adjust.
11259 * linux-xtensa-low.c (xtensa_fill_gregset):
11260 (xtensa_store_gregset):
11261 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11262 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
11263 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11264 prototype to take a regcache. Adjust.
11265 * win32-arm-low.c (arm_fetch_inferior_register)
11266 (arm_store_inferior_register): Change prototype to take a
11267 regcache. Adjust.
11268 * win32-i386-low.c (i386_fetch_inferior_register)
11269 (i386_store_inferior_register): Change prototype to take a
11270 regcache. Adjust.
11271 * win32-low.c (child_fetch_inferior_registers)
11272 (child_store_inferior_registers): Change prototype to take a
11273 regcache. Adjust.
11274 (win32_wait): Adjust.
11275 (win32_fetch_inferior_registers): Change prototype to take a
11276 regcache. Adjust.
11277 (win32_store_inferior_registers): Adjust.
11278 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11279 store_inferior_register>: Change prototype to take a regcache.
11280
60c3d7b0
DE
112812010-01-20 Doug Evans <dje@google.com>
11282
11283 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11284 #ifdef.
11285 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 11286 (W_STOPCODE): Provide definition if missing.
60c3d7b0 11287
dc146f7c
VP
112882010-01-13 Vladimir Prus <vladimir@codesourcery.com>
11289
11290 * linux-low.c (linux_core_of_thread): New.
11291 (compare_ints, show_process, list_threads): New.
11292 (linux_qxfer_osdata): Report threads and cores.
11293 (linux_target_op): Register linux_core_of_thread.
11294 * remote-utils.c (prepare_resume_reply): Report the core.
11295 (buffer_xml_printf): Support %d specifier.
11296 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11297 New.
11298 (handle_query): Handle qXfer:threads. Announce availability
11299 thereof.
11300 * target.h (struct target_ops): New field core_of_thread.
11301
7803799a
UW
113022010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
11303
11304 * Makefile.in (clean): Remove new generated files.
11305 (reg-s390.o, reg-s390.c): Remove rules.
11306 (reg-s390x.o, reg-s390x.c): Likewise.
11307 (s390-linux32.o, s390-linux32.c): Add rules.
11308 (s390-linux64.o, s390-linux64.c): Likewise.
11309 (s390x-linux64.o, s390x-linux64.c): Likewise.
11310 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11311 * linux-s390-low.c: Include <elf.h>.
11312 (HWCAP_S390_HIGH_GPRS): Define if undefined.
11313 (init_registers_s390): Remove prototype.
11314 (init_registers_s390x): Likewise.
11315 (init_registers_s390_linux32): Add prototype.
11316 (init_registers_s390_linux64): Likewise.
11317 (init_registers_s390x_linux64): Likewise.
11318 (s390_num_regs_3264): New define.
11319 (s390_regmap_3264): New global variable.
11320 (s390_cannot_fetch_register): Remove obsolete check.
11321 (s390_cannot_store_register): Likewise.
11322 (s390_collect_ptrace_register): Handle upper/lower register halves.
11323 (s390_supply_ptrace_register): Likewise.
11324 (s390_fill_gregset): Update to register number changes.
11325 (s390_get_hwcap): New routine.
11326 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11327 Install appropriate regmap and register set.
11328
6e7ffa39
JB
113292010-01-01 Joel Brobecker <brobecker@adacore.com>
11330
11331 * server.c (gdbserver_version): Update copyright year to 2010.
11332 * gdbreplay.c (gdbreplay_version): Likewise.
11333
957f3f49
DE
113342009-12-28 Doug Evans <dje@google.com>
11335
11336 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11337 elf/external.h. Include <elf.h> instead but only if necessary.
11338
ca5c370d
PA
113392009-12-28 Pedro Alves <pedro@codesourcery.com>
11340
11341 * linux-low.c (linux_remove_process): Remove `detaching'
11342 parameter. Don't release/detach from thread_db here.
11343 (linux_kill): Release/detach from thread_db here, ...
11344 (linux_detach): ... and here, before actually detaching.
11345 (linux_wait_1): ... and here, when a process exits.
11346 * thread-db.c (any_thread_of): New.
11347 (thread_db_free): Switch the current inferior to a thread of the
11348 passed in process.
11349
4ee62156
DE
113502009-12-21 Doug Evans <dje@google.com>
11351
d90e6a88
DE
11352 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11353
c5f62d5f
DE
11354 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11355 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11356 warning ifndef __NR_tkill. Move setting of errno there too.
11357 Delete unnecessary resetting of errno after syscall.
11358 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11359
10e86dd7
DE
11360 * configure.ac: Check for dladdr.
11361 * config.in: Regenerate.
11362 * configure: Regenerate.
11363 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11364 (try_thread_db_load): Update.
11365
4ee62156
DE
11366 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11367
00f515da
DE
113682009-12-18 Doug Evans <dje@google.com>
11369
e9464885
DE
11370 * event-loop.c: Include unistd.h if it exists.
11371
07d4f67e
DE
11372 * linux-low.c (my_waitpid): Move definition away from being in
11373 between linux_tracefork_child/linux_test_for_tracefork.
11374
00f515da
DE
11375 * gdb_proc_service.h (psaddr_t): Fix type.
11376 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11377 signature to match glibc.
11378
1de1badb
DE
113792009-12-16 Doug Evans <dje@google.com>
11380
11381 * linux-low.c (linux_read_memory): Fix argument to read.
11382
aeeb81d1
PA
113832009-11-26 Pedro Alves <pedro@codesourcery.com>
11384
11385 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11386 events, don't leave current_inferior pointing at null.
11387
10357975
PA
113882009-11-26 Pedro Alves <pedro@codesourcery.com>
11389
11390 * win32-low.c (LOG): Delete.
11391 (OUTMSG): Output to stderr.
11392 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11393 on compile time LOG macro.
11394 (win32_wait): Fix debug output.
11395
cf6e3471
PA
113962009-11-26 Pedro Alves <pedro@codesourcery.com>
11397
11398 * win32-low.c (win32_add_one_solib): If the dll name is
11399 "ntdll.dll", prepend the system directory to the dll path.
11400
0c85e18e
MK
114012009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11402
11403 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11404
9ac544ce 114052009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11406 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11407
11408 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11409 * configure.ac: Check for __mcoldfire__ and set
11410 gdb_cv_m68k_is_coldfire.
11411 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11412 reg-cf.o and reg-m68k.o.
11413 * configure: Regenerated.
11414
fd7dd3e6
PA
114152009-11-16 Pedro Alves <pedro@codesourcery.com>
11416
11417 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11418 Pass it to thread_db_free.
11419 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11420 proper `detaching' argument to linux_remove_process.
11421 * linux-low.h (thread_db_free): Add `detaching' parameter.
11422 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11423 to thread_db_free.
11424 (thread_db_free): Add `detaching' parameter. Only
11425 call td_ta_clear_event if detaching from process.
11426
75aa492e
MK
114272009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11428
11429 * thread-db.c (thread_db_free): Fix typo.
11430
21e1bee4
PP
114312009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11432
11433 PR gdb/10838
11434 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11435
8838b45e
NS
114362009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11437
11438 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11439 with an i686 compiler.
11440 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11441 needed.
11442 * configure: Rebuilt.
11443
8a35fb51
SL
114442009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11445
11446 PR gdb/10783
11447
11448 * server.c (handle_search_memory_1): Correct read_addr initialization
11449 in loop for searching subsequent chunks.
11450
96f15937
PP
114512009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11452
11453 * configure.ac: New --with-libthread-db option.
11454 * thread-db.c: Allow direct dependence on libthread_db.
11455 (thread_db_free): Adjust.
11456 * config.in: Regenerate.
11457 * configure: Likewise.
889bf7c5 11458
5f7d1694
PP
114592009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11460
11461 PR gdb/10757
11462 * thread-db.c (attach_thread): New function.
11463 (maybe_attach_thread): Return success/failure.
11464 (find_new_threads_callback): Adjust.
889bf7c5
PA
11465 (thread_db_find_new_threads): Loop until no new threads.
11466
88e3b899
PA
114672009-10-13 Pedro Alves <pedro@codesourcery.com>
11468
11469 * proc-service.c (ps_lgetregs): Formatting.
11470
cdbfd419
PP
114712009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11472
11473 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11474 * configure.ac: Adjust.
11475 * linux-low.h (struct process_info_private): Move members to struct
11476 thread_db.
11477 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11478 * linux-low.c (linux_remove_process): Adjust.
11479 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11480 * server.c (handle_query): Move code ...
11481 (handle_monitor_command): ... here. New function.
11482 * target.h (struct target_ops): New member.
11483 * thread-db.c (struct thread_db): New.
11484 (libthread_db_search_path): New variable.
11485 (thread_db_create_event, thread_db_enable_reporting)
11486 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11487 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11488 (try_thread_db_load_1, dladdr_to_soname): New functions.
11489 (try_thread_db_load, thread_db_load_search): New functions.
11490 (thread_db_init): Search for libthread_db.
11491 (thread_db_free): New function.
11492 (thread_db_handle_monitor_command): Likewise.
11493 * config.in: Regenerate.
11494 * configure: Regenerate.
889bf7c5 11495
4168d2d6
UW
114962009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11497
11498 * spu-low.c (spu_kill): Wait for inferior to terminate.
11499 Call clear_inferiors.
11500 (spu_detach): Call clear_inferiors.
11501
81ecdfbb
RW
115022009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11503
11504 * aclocal.m4: Regenerate.
11505 * config.in: Likewise.
11506 * configure: Likewise.
11507
0b9ff2c0
UW
115082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11509
11510 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11511 (parse_spufs_run): New function.
11512 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11513 (ppc_breakpoint_at): Handle SPU breakpoints.
11514
efcbbd14
UW
115152009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11516
11517 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11518 (SPUFS_MAGIC): Define.
11519 (spu_enumerate_spu_ids): New function.
11520 (linux_qxfer_spu): New function.
11521 (linux_target_ops): Install linux_qxfer_spu.
11522
f4d9bade
UW
115232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11524
11525 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11526 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11527 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11528 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11529 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11530 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11531 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11532 (init_registers_powerpc_cell32l): Add prototype.
11533 (init_registers_powerpc_cell64l): Likewise.
11534 (ppc_arch_setup): Detect Cell/B.E. architecture.
11535
96e946ca
RW
115362009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11537
11538 * Makefile.in (datarootdir): New variable.
11539
58d6951d
DJ
115402009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11541
11542 * linux-low.c (linux_write_memory): Update debugging output.
11543 * Makefile.in (clean): Add new descriptions.
11544 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11545 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11546 * configure.srv: Add new files for arm*-*-linux*.
11547 * linux-arm-low.c: Add new declarations.
11548 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11549 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11550 (HWCAP_VFPv3D16): New.
11551 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11552 instead of __IWMMXT__.
11553 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11554 (arm_arch_setup): New.
11555 (target_regsets): Remove #ifdef. Add VFP regset.
11556 (the_low_target): Use arm_arch_setup.
11557
12b42a12
DJ
115582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11559
11560 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11561 the main thread again.
11562
ac8c974e
AR
115632009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11564
11565 Adding Neutrino gdbserver.
11566 * configure: Regenerated.
11567 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11568 * configure.srv (i[34567]86-*-nto*): New target.
11569 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11570 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11571 (nto_comctrl) [__QNX__]: New function.
11572 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11573
4424e0c3 115742009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11575
11576 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11577 srv_tgtobj.
11578
912cf4ba
PA
115792009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11580 Pedro Alves <pedro@codesourcery.com>
11581
11582 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11583 don't support CONTEXT_EXTENDED_REGISTERS.
11584 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11585 (the_low_target): Install them.
11586 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11587 failing with ERROR_PIPE_NOT_CONNECTED.
11588
aa5ca48f
DE
115892009-06-30 Doug Evans <dje@google.com>
11590 Pierre Muller <muller@ics.u-strasbg.fr>
11591
11592 Add h/w watchpoint support to x86-linux, win32-i386.
11593 * Makefile.in (SFILES): Add i386-low.c
11594 (i386_low_h): Define.
11595 (i386-low.o): Add dependencies.
11596 (linux-x86-low.o): Add i386-low.h dependency.
11597 (win32-i386-low.o): Ditto.
11598 * i386-low.c: New file.
11599 * i386-low.h: New file.
11600 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11601 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11602 * linux-low.c (linux_add_process): Initialize arch_private.
11603 (linux_remove_process): Free arch_private.
11604 (add_lwp): Initialize arch_private.
11605 (delete_lwp): Free arch_private.
11606 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11607 provided.
11608 * linux-low.h (process_info_private): New member arch_private.
11609 (lwp_info): New member arch_private.
11610 (linux_target_ops): New members new_process, new_thread,
11611 prepare_to_resume.
11612 (ptid_of): New macro.
11613 * linux-x86-low.c: Include stddef.h, i386-low.h.
11614 (arch_process_info): New struct.
11615 (arch_lwp_info): New struct.
11616 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11617 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11618 (i386_dr_low_get_status): New function.
11619 (x86_insert_point, x86_remove_point): New functions.
11620 (x86_stopped_by_watchpoint): New function.
11621 (x86_stopped_data_address): New function.
11622 (x86_linux_new_process, x86_linux_new_thread): New functions.
11623 (x86_linux_prepare_to_resume): New function.
11624 (the_low_target): Add entries for insert_point, remove_point,
11625 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11626 prepare_to_resume.
11627 * server.c (debug_hw_points): New global.
11628 (monitor_show_help): Document set debug-hw-points.
11629 (handle_query): Process "set debug-hw-points".
11630 * server.h (debug_hw_points): Declare.
11631 (paddress): Declare.
11632 * utils.c (NUMCELLS, CELLSIZE): New macros.
11633 (get_sell, xsnprintf, paddress): New functions.
11634 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11635 remove_point, stopped_by_watchpoint, stopped_data_address.
11636 * win32-i386-low.c: Include i386-low.h.
11637 (debug_reg_state): Replaces dr.
11638 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11639 (i386_dr_low_get_status): New function.
11640 (i386_insert_point, i386_remove_point): New functions.
11641 (i386_stopped_by_watchpoint): New function.
11642 (i386_stopped_data_address): New function.
11643 (i386_initial_stuff): Update.
11644 (get_thread_context,set_thread_context,i386_thread_added): Update.
11645 (the_low_target): Add entries for insert_point,
11646 remove_point, stopped_by_watchpoint, stopped_data_address.
11647 * win32-low.c (win32_insert_watchpoint): New function.
11648 (win32_remove_watchpoint): New function.
11649 (win32_stopped_by_watchpoint): New function.
11650 (win32_stopped_data_address): New function.
11651 (win32_target_ops): Add entries for insert_watchpoint,
11652 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11653 * win32-low.h (win32_target_ops): New members insert_point,
11654 remove_point, stopped_by_watchpoint, stopped_data_address.
11655
d993e290
PA
116562009-06-25 Pedro Alves <pedro@codesourcery.com>
11657
11658 * server.c (process_serial_event): Re-return unsupported, not
11659 error, if the type isn't recognized. Re-allow supporting only
11660 insert or remove packets. Also call require_running for
11661 breakpoints. Add missing break statement to default case. Tidy.
11662 * target.h (struct target_ops): Rename insert_watchpoint to
11663 insert_point, and remove_watchpoint to remove_point.
11664
11665 * linux-low.h (struct linux_target_ops): Likewise.
11666 * linux-low.c (linux_insert_watchpoint): Rename to ...
11667 (linux_insert_point): ... this. Adjust.
11668 (linux_remove_watchpoint): Rename to ...
11669 (linux_remove_point): ... this. Adjust.
11670 (linux_target_ops): Adjust.
11671 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11672 (cris_insert_point): ... this.
11673 (cris_remove_watchpoint): Rename to ...
11674 (cris_remove_point): ... this.
11675 (the_low_target): Adjust.
11676
0f54c268
PM
116772009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11678
11679 * server.c (handle_v_kill): Pass signal_pid to
11680 kill_inferior if multi_process is zero.
11681
c6314022
AR
116822009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11683
11684 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11685 * target.h (target_ops): Comment for *_watchpoint to make it clear
11686 the functions can get types '0' and '1'.
11687
4463ce24
AR
116882009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11689
11690 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11691 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11692 * regcache.c (get_regcache): Likewise.
11693 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11694 * win32-low.c (child_fetch_inferior_registers): Remove check for
11695 regno 0.
11696
cf8fd78b
PA
116972009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11698 Pedro Alves <pedro@codesourcery.com>
11699
11700 * target.h (struct target_ops) <supports_multi_process>: New
11701 callback.
11702 (target_supports_multi_process): New.
11703 * server.c (handle_query): Even if GDB reports support, only
11704 enable multi-process if the target also supports it. Report
11705 multi-process support only if the target backend supports it.
11706 * linux-low.c (linux_supports_multi_process): New function.
11707 (linux_target_ops): Install it as target_supports_multi_process
11708 callback.
11709
47c0c975
DE
117102009-05-24 Doug Evans <dje@google.com>
11711
e09875d4
DE
11712 Global renaming of find_thread_pid to find_thread_ptid.
11713 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11714 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11715 All callers updated.
11716
e27d73f6
DE
11717 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11718 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11719 directly.
11720
47c0c975
DE
11721 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11722 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11723 (linux_resume_one_lwp): Ditto.
11724
2acc282a
DE
117252009-05-23 Doug Evans <dje@google.com>
11726
11727 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11728 from struct inferior_list_entry * to struct lwp_info *.
11729 All callers updated.
11730
9f1036c1
DE
117312009-05-13 Doug Evans <dje@google.com>
11732
11733 * linux-x86-low.c: Don't include assert.h.
11734 (x86_siginfo_fixup): Use fatal, not assert.
11735 (x86_arch_setup): Fix comment.
11736
d0722149
DE
117372009-05-12 Doug Evans <dje@google.com>
11738
11739 Biarch support for i386/amd64 gdbserver.
11740 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11741 Add linux-x86-low.c.
11742 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11743 (linux-x86-low.o): Add.
11744 * linux-x86-64-low.c: Delete.
11745 * linux-i386-low.c: Delete.
11746 * linux-x86-low.c: New file.
11747 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11748 linux-x86-low.o.
11749 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11750 linux-x86-low.o.
11751 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11752 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11753 (linux_child_pid_to_exec_file): New function.
11754 (elf_64_header_p, elf_64_file_p): New functions.
11755 (siginfo_fixup): New function.
11756 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11757 give target a chance to convert layout.
11758 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11759 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11760
fdeb2a12
DE
117612009-05-07 Doug Evans <dje@google.com>
11762
11763 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11764 (regsets_store_inferior_registers): Ditto.
11765
a6dbe5df
PA
117662009-05-06 Pedro Alves <pedro@codesourcery.com>
11767
11768 PR server/10048
11769
11770 * linux-low.c (must_set_ptrace_flags): Delete.
11771 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11772 of the global.
11773 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11774 `lwp->must_set_ptrace_flags' instead.
ba42693b 11775 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11776 (linux_wait_1): ... not here.
11777
5091eb23
DE
117782009-04-30 Doug Evans <dje@google.com>
11779
9f767825
DE
11780 * inferiors.c (started_inferior_callback): New function.
11781 (attached_inferior_callback): New function.
11782 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11783 * server.c (print_started_pid, print_attached_pid): New functions.
11784 (detach_or_kill_for_exit): New function.
11785 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11786 * server.h (have_started_inferiors_p): Declare.
11787 (have_attached_inferiors_p): Declare.
11788
5091eb23
DE
11789 * inferiors.c (remove_process): Fix memory leak, free process.
11790 * linux-low.c (linux_remove_process): New function.
11791 (linux_kill): Call it instead of remove_process.
11792 (linux_detach, linux_wait_1): Ditto.
11793
155c8968
PA
117942009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11795
11796 * configure.srv: Add x86 Windows CE target.
11797
7fe519cb
UW
117982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11799
11800 * inferiors.c (get_thread_process): Make global.
11801 * server.h (get_thread_process): Add prototype.
11802 * thread-db.c (find_one_thread): Use get_thread_process
11803 instead of current_process.
11804 (thread_db_get_tls_address): Do not crash if called when
11805 thread layer is not yet initialized.
11806
5472f405
UW
118072009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11808
11809 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11810 * spu-low.c (current_tid): Rename to ...
11811 (current_ptid): ... this.
11812 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11813 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11814 ptid_get_lwp (current_ptid) instead of current_tid.
11815 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11816 instead of current_tid. Use find_process_pid to verify pid
11817 argument is valid. Pass proper argument to remove_process.
11818 (spu_thread_alive): Compare current_ptid instead of current_tid.
11819 (spu_resume): Likewise.
11820
55ac2b99
PA
118212009-04-02 Pedro Alves <pedro@codesourcery.com>
11822
11823 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11824 variable.
11825
95954743
PA
118262009-04-01 Pedro Alves <pedro@codesourcery.com>
11827
11828 Implement the multiprocess extensions, and add linux multiprocess
11829 support.
11830
11831 * server.h (ULONGEST): Declare.
11832 (struct ptid, ptid_t): New.
11833 (minus_one_ptid, null_ptid): Declare.
11834 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11835 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11836 (struct inferior_list_entry): Change `id' type from unsigned from
11837 to ptid_t.
11838 (struct sym_cache, struct breakpoint, struct
11839 process_info_private): Forward declare.
11840 (struct process_info): Declare.
11841 (current_process): Declare.
11842 (all_processes): Declare.
11843 (initialize_inferiors): Declare.
11844 (add_thread): Adjust to use ptid_t.
11845 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11846 (add_process, remove_process, find_thread_pid): Declare.
11847 (find_inferior_id): Adjust to use ptid_t.
11848 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11849 (multi_process): Declare.
11850 (push_event): Adjust to use ptid_t.
11851 (read_ptid, write_ptid): Declare.
11852 (prepare_resume_reply): Adjust to use ptid_t.
11853 (clear_symbol_cache): Declare.
11854 * inferiors.c (all_processes): New.
11855 (null_ptid, minus_one_ptid): New.
11856 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11857 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11858 (add_thread): Change unsigned long to ptid. Remove gdb_id
11859 parameter. Adjust.
11860 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11861 (gdb_id_to_thread): Rename to ...
11862 (find_thread_pid): ... this. Change unsigned long to ptid.
11863 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11864 (loaded_dll, pull_pid_from_list): Adjust.
11865 (add_process, remove_process, find_process_pid)
11866 (get_thread_process, current_process, initialize_inferiors): New.
11867 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11868 (struct target_waitstatus) <related_pid>: Ditto.
11869 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11870 return type to int.
11871 (struct target_ops) <join>: Add `pid' argument.
11872 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11873 (struct target_ops) <wait>: Add `ptid' field. Change return type
11874 to ptid.
11875 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11876 (mywait): Add `ptid' argument. Change return type to ptid_t.
11877 (target_pid_to_str): Declare.
11878 * target.c (set_desired_inferior): Adjust to use ptids.
11879 (mywait): Add new `ptid' argument. Adjust.
11880 (target_pid_to_str): New.
11881 * mem-break.h (free_all_breakpoints): Declare.
11882 * mem-break.c (breakpoints): Delelete.
11883 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11884 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11885 to use per-process breakpoint list.
11886 (free_all_breakpoints): New.
11887 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11888 (symbol_cache, all_symbols_looked_up): Delete.
11889 (hexchars): New.
11890 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11891 read_ptid): New.
11892 (prepare_resume_reply): Change ptid argument's type from unsigned
11893 long to ptid_t. Adjust. Implement W;process and X;process.
11894 (free_sym_cache, clear_symbol_cache): New.
11895 (look_up_one_symbol): Adjust to per-process symbol cache. *
11896 * server.c (cont_thread, general_thread, step_thread): Change type
11897 to ptid_t.
11898 (attached): Delete.
11899 (multi_process): New.
11900 (last_ptid): Change type to ptid_t.
11901 (struct vstop_notif) <ptid>: Change type to ptid_t.
11902 (queue_stop_reply, push_event): Change `ptid' argument's type to
11903 ptid_t.
11904 (discard_queued_stop_replies): Add `pid' argument.
11905 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11906 changes. Don't reference the `attached' global.
11907 (attach_inferior): Adjust to mywait interface changes.
11908 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11909 features. Handle and report "multiprocess+". Handle
11910 "qAttached:PID".
11911 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11912 changes.
11913 (handle_v_kill): New.
11914 (handle_v_stopped): Adjust to use target_pid_to_str.
11915 (handle_v_requests): Allow multiple attaches and runs when
11916 multiprocess extensions are in effect. Handle "vKill".
11917 (myresume): Adjust to use ptids.
11918 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11919 (handle_status): Adjust to discard_queued_stop_replies interface
11920 change.
11921 (first_thread_of, kill_inferior_callback)
11922 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11923 (main): Call initialize_inferiors. Adjust to use ptids, killing
11924 and detaching from all inferiors. Handle multiprocess packet
11925 variants.
11926 * linux-low.h: Include gdb_proc_service.h.
11927 (struct process_info_private): New.
11928 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11929 <lwpid_of>: Use ptid_get_lwp.
11930 (get_lwp_thread): Adjust.
11931 (struct lwp_info): Add `dead' member.
11932 (find_lwp_pid): Declare.
11933 * linux-low.c (thread_db_active): Delete.
11934 (new_inferior): Adjust comment.
11935 (inferior_pid): Delete.
11936 (linux_add_process): New.
11937 (handle_extended_wait): Adjust.
11938 (add_lwp): Change unsigned long to ptid.
11939 (linux_create_inferior): Add process to processes table. Adjust
11940 to use ptids. Don't set new_inferior here.
11941 (linux_attach_lwp): Rename to ...
11942 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11943 it. Adjust to use ptids.
11944 (linux_attach_lwp): New.
11945 (linux_attach): Add process to processes table. Don't set
11946 new_inferior here.
11947 (struct counter): New.
11948 (second_thread_of_pid_p, last_thread_of_process_p): New.
11949 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11950 multiple processes.
11951 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11952 processes. Remove process from process table.
11953 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11954 to multiple processes.
11955 (any_thread_of): New.
11956 (linux_detach): Add `pid' argument, and handle it. Remove process
11957 from processes table.
11958 (linux_join): Add `pid' argument. Handle it.
11959 (linux_thread_alive): Change unsighed long argument to ptid_t.
11960 Consider dead lwps as not being alive.
11961 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11962 threads we're not interested in.
11963 (same_lwp, find_lwp_pid): New.
11964 (linux_wait_for_lwp): Change `pid' argument's type from int to
11965 ptid_t. Adjust.
11966 (linux_wait_for_event): Rename to ...
11967 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11968 from int to ptid_t. Adjust.
11969 (linux_wait_for_event): New.
11970 (linux_wait_1): Add `ptid' argument. Change return type to
11971 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11972 that exit from the process table.
11973 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11974 Adjust.
11975 (mark_lwp_dead): New.
11976 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11977 stopping all threads, mark its main lwp as dead.
11978 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11979 ptids.
11980 (fetch_register, usr_store_inferior_registers)
11981 (regsets_fetch_inferior_registers)
11982 (regsets_store_inferior_registers, linux_read_memory)
11983 (linux_write_memory): Inline `inferior_pid'.
11984 (linux_look_up_symbols): Adjust to use per-process
11985 `thread_db_active'.
11986 (linux_request_interrupt): Adjust to use ptids.
11987 (linux_read_auxv): Inline `inferior_pid'.
11988 (initialize_low): Don't reference thread_db_active.
11989 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11990 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11991 (ps_getpid): Return the pid of the current inferior.
11992 * thread-db.c (proc_handle, thread_agent): Delete.
11993 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11994 per-process data.
11995 (find_one_thread): Change argument type to ptid_t. Adjust to
11996 per-process data.
11997 (maybe_attach_thread): Adjust to per-process data and ptids.
11998 (thread_db_find_new_threads): Ditto.
11999 (thread_db_init): Ditto.
12000 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12001 processes table. Adjust to use ptids.
12002 (spu_kill, spu_detach): Adjust interface. Remove process from
12003 processes table.
12004 (spu_join, spu_thread_alive): Adjust interface.
12005 (spu_wait): Adjust interface. Remove process from processes
12006 table. Adjust to use ptids.
12007 * win32-low.c (current_inferior_tid): Delete.
12008 (current_inferior_ptid): New.
12009 (debug_event_ptid): New.
12010 (thread_rec): Take a ptid. Adjust.
12011 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12012 (child_delete_thread): Ditto.
12013 (do_initial_child_stuff): Add `attached' argument. Add process to
12014 processes table.
12015 (child_fetch_inferior_registers, child_store_inferior_registers):
12016 Adjust.
12017 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12018 (win32_attach): Pass 1 to do_initial_child_stuff.
12019 (win32_kill): Adjust interface. Remove process from processes
12020 table.
12021 (win32_detach): Ditto.
12022 (win32_join): Adjust interface.
12023 (win32_thread_alive): Take a ptid.
12024 (win32_resume): Adjust to use ptids.
12025 (get_child_debug_event): Ditto.
12026 (win32_wait): Adjust interface. Remove exiting process from
12027 processes table.
12028
bd99dc85
PA
120292009-04-01 Pedro Alves <pedro@codesourcery.com>
12030
12031 Non-stop mode support.
12032
12033 * server.h (non_stop): Declare.
12034 (gdb_client_data, handler_func): Declare.
12035 (delete_file_handler, add_file_handler, start_event_loop):
12036 Declare.
12037 (handle_serial_event, handle_target_event, push_event)
12038 (putpkt_notif): Declare.
12039 * target.h (enum resume_kind): New.
12040 (struct thread_resume): Replace `step' field by `kind' field.
12041 (TARGET_WNOHANG): Define.
12042 (struct target_ops) <wait>: Add `options' argument.
12043 <supports_non_stop, async, start_non_stop>: New fields.
12044 (target_supports_non_stop, target_async): New.
12045 (start_non_stop): Declare.
12046 (mywait): Add `options' argument.
12047 * target.c (mywait): Add `options' argument. Print child exit
12048 notifications here.
12049 (start_non_stop): New.
12050 * server.c (non_stop, own_buf, mem_buf): New globals.
12051 (struct vstop_notif): New.
12052 (notif_queue): New global.
12053 (queue_stop_reply, push_event, discard_queued_stop_replies)
12054 (send_next_stop_reply): New.
12055 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12056 interface changes.
12057 (attach_inferior): In non-stop mode, don't wait for the target
12058 here.
12059 (handle_general_set): Handle QNonStop.
12060 (handle_query): When handling qC, return the current general
12061 thread, instead of the first thread of the list.
12062 (handle_query): If the backend supports non-stop mode, include
12063 QNonStop+ in the qSupported query response.
12064 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12065 and non-stop mode.
12066 (handle_v_attach, handle_v_run): Handle non-stop mode.
12067 (handle_v_stopped): New.
12068 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12069 (myresume): Adjust to use resume_kind. Handle non-stop.
12070 (queue_stop_reply_callback): New.
12071 (handle_status): Handle non-stop mode.
12072 (main): Clear non_stop flag on reconnection. Use the event-loop.
12073 Refactor serial protocol handling from here ...
12074 (process_serial_event): ... to this new function. When GDB
12075 selects any thread, select one here. In non-stop mode, wait until
12076 GDB acks all pending events before exiting.
12077 (handle_serial_event, handle_target_event): New.
12078 * remote-utils.c (remote_open): Install remote_desc in the event
12079 loop.
12080 (remote_close): Remove remote_desc from the event loop.
12081 (putpkt_binary): Rename to...
12082 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12083 (putpkt_binary): New as wrapper around putpkt_binary_1.
12084 (putpkt_notif): New.
12085 (prepare_resume_reply): In non-stop mode, don't change the
12086 general_thread.
12087 * event-loop.c: New.
12088 * Makefile.in (OBJ): Add event-loop.o.
12089 (event-loop.o): New rule.
12090
12091 * linux-low.h (pid_of): Moved here.
12092 (lwpid_of): New.
12093 (get_lwp_thread): Use lwpid_of.
12094 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12095 * linux-low.c (pid_of): Delete.
12096 (inferior_pid): Use lwpid_of.
12097 (linux_event_pipe): New.
12098 (target_is_async_p): New.
12099 (delete_lwp): New.
12100 (handle_extended_wait): Use lwpid_of.
12101 (add_lwp): Don't set lwpid field.
12102 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12103 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12104 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12105 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12106 first. Adjust to linux_wait_for_event interface changes. Use
12107 lwpid_of.
12108 (linux_detach): Don't delete the main lwp here.
12109 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12110 (status_pending_p): Don't consider explicitly suspended lwps.
12111 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12112 pointer. Add OPTIONS argument. Change return type to int. Use
12113 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12114 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12115 pointer. Add status pointer argument. Return a pid instead of a
12116 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12117 changes. In non-stop mode, don't switch to a random thread.
12118 (linux_wait): Rename to...
12119 (linux_wait_1): ... this. Add target_options argument, and handle
12120 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12121 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12122 clean exit and signal exit code. Don't stop all threads in
12123 non-stop mode. In all-stop mode, only stop all threads when
12124 reporting a stop to GDB. Handle explicit thread stop requests.
12125 (async_file_flush, async_file_mark): New.
12126 (linux_wait): New.
12127 (send_sigstop): Use lwpid_of.
12128 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12129 interface changes. In non-stop mode, don't switch to a random
12130 thread.
12131 (linux_resume_one_lwp): Use lwpid_of.
12132 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12133 (linux_resume_one_thread): ... this. Handle resume_stop. In
12134 non-stop mode, don't look for pending flag in all threads.
12135 (resume_status_pending_p): Don't consider explicitly suspended
12136 threads.
12137 (my_waitpid): Reimplement. Emulate __WALL.
12138 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12139 Use lwpid_of.
12140 (sigchld_handler, linux_supports_non_stop, linux_async)
12141 (linux_start_non_stop): New.
12142 (linux_target_ops): Register linux_supports_non_stop, linux_async
12143 and linux_start_non_stop.
12144 (initialize_low): Install SIGCHLD handler.
12145 * thread-db.c (thread_db_create_event, find_one_thread)
12146 (thread_db_get_tls_address): Use lwpid_of.
12147 * win32-low.c (win32_detach): Adjust to use resume_kind.
12148 (win32_wait): Add `options' argument.
12149 * spu-low.c (spu_resume): Adjust to use resume_kind.
12150 (spu_wait): Add `options' argument.
12151
5b1c542e
PA
121522009-04-01 Pedro Alves <pedro@codesourcery.com>
12153
12154 Decouple target code from remote protocol.
12155
12156 * target.h (enum target_waitkind): New.
12157 (struct target_waitstatus): New.
12158 (struct target_ops) <wait>: Return an unsigned long. Take a
12159 target_waitstatus pointer instead of a char pointer.
12160 (mywait): Likewise.
12161 * target.c (mywait): Change prototype to return an unsigned long.
12162 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12163 * server.h (thread_from_wait, old_thread_from_wait): Delete
12164 declarations.
12165 (prepare_resume_reply): Change prototype to take a
12166 target_waitstatus.
12167 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12168 (last_status, last_ptid): New.
12169 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12170 pid instead of a signal.
12171 (attach_inferior): Remove "status" and "signal" parameters.
12172 Adjust.
12173 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12174 not as an address.
12175 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12176 (handle_v_requests, myresume): Remove "status" and "signal"
12177 parameters. Adjust.
12178 (handle_status): New.
12179 (main): Delete local `status'. Adjust.
12180 * remote-utils.c: Include target.h.
12181 (prepare_resume_reply): Change prototype to take a
12182 target_waitstatus. Adjust.
12183
12184 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12185 interface.
12186 * spu-low.c (spu_wait): Adjust.
12187 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12188 Delete.
12189 (win32_wait): Adjust.
12190
2bd7c093
PA
121912009-04-01 Pedro Alves <pedro@codesourcery.com>
12192
12193 * target.h (struct thread_resume): Delete leave_stopped member.
12194 (struct target_ops): Add a `n' argument to the `resume' callback.
12195 * server.c (start_inferior): Adjust.
12196 (handle_v_cont, myresume): Adjust.
12197 * linux-low.c (check_removed_breakpoint): Adjust to resume
12198 interface change, and to removed leave_stopped field.
12199 (resume_ptr): Delete.
12200 (struct thread_resume_array): New.
12201 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12202 resume interface change.
12203 (linux_continue_one_thread, linux_queue_one_thread)
12204 (resume_status_pending_p): Check if the resume field is NULL
12205 instead of checking the leave_stopped member.
12206 (linux_resume): Adjust to the target resume interface change.
12207 * spu-low.c (spu_resume): Adjust to the target resume interface
12208 change.
12209 * win32-low.c (win32_detach, win32_resume): Ditto.
12210
c35fafde
PA
122112009-04-01 Pedro Alves <pedro@codesourcery.com>
12212
12213 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12214 flag.
12215 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12216 pending.
12217 (linux_continue_one_thread): Only preserve the stepping flag if
12218 there's a pending breakpoint.
12219
0a59d50b
PA
122202009-03-31 Pedro Alves <pedro@codesourcery.com>
12221
12222 * server.c (main): After the inferior having exited, call
12223 remote_close before exiting gdbserver.
12224
f04c6d38
TJB
122252009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
12226
12227 Fix size of FPSCR in Power 7 processors.
12228 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12229 (PPC_FEATURE_HAS_DFP): New #define.
12230 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12231 size of the FPSCR.
12232
78e5cee6
PA
122332009-03-23 Pedro Alves <pedro@codesourcery.com>
12234
12235 * server.c (handle_query) Whitespace and formatting.
12236
1b3f6016
PA
122372009-03-22 Pedro Alves <pedro@codesourcery.com>
12238
12239 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12240 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12241 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12242 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12243 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12244 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12245 Makefile.in, configure.ac: Fix whitespace throughout.
12246 * configure: Regenerate.
12247
a07b2135
PA
122482009-03-22 Pedro Alves <pedro@codesourcery.com>
12249
12250 * inferiors.c (find_inferior): Make it safe for the callback
12251 function to delete the currently iterated inferior.
12252
67cc2626
PA
122532009-03-22 Pedro Alves <pedro@codesourcery.com>
12254
12255 * Makefile.in (linuw_low_h): Move higher.
12256 (thread-db.o): Depend on $(linux_low_h).
12257
54a0b537
PA
122582009-03-17 Pedro Alves <pedro@codesourcery.com>
12259
12260 Rename "process" to "lwp" throughout.
12261
12262 * linux-low.c (all_processes): Rename to...
12263 (all_lwps): ... this.
12264 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12265 (add_process): Rename to ...
12266 (add_lwp): ... this. Adjust.
12267 (linux_create_inferior): Adjust.
12268 (linux_attach_lwp): Adjust.
12269 (linux_attach): Adjust.
12270 (linux_kill_one_process): Rename to ...
12271 (linux_kill_one_lwp): ... this. Adjust.
12272 (linux_kill): Adjust.
12273 (linux_detach_one_process): Rename to ...
12274 (linux_detach_one_lwp): ... this. Adjust.
12275 (linux_detach): Adjust.
12276 (check_removed_breakpoint): Adjust.
12277 (status_pending_p): Adjust.
12278 (linux_wait_for_process): Rename to ...
12279 (linux_wait_for_lwp): ... this. Adjust.
12280 (linux_wait_for_event): Adjust.
12281 (send_sigstop): Adjust.
12282 (wait_for_sigstop): Adjust.
12283 (stop_all_processes): Rename to ...
12284 (stop_all_lwps): ... this.
12285 (linux_resume_one_process): Rename to ...
12286 (linux_resume_one_lwp): ... this. Adjust.
12287 (linux_set_resume_request, linux_continue_one_thread)
12288 (linux_queue_one_thread, resume_status_pending_p)
12289 (usr_store_inferior_registers, regsets_store_inferior_registers)
12290 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12291 Adjust.
12292 * linux-low.h (get_process): Rename to ...
12293 (get_lwp): ... this. Adjust.
12294 (get_thread_process): Rename to ...
12295 (get_thread_lwp): ... this. Adjust.
12296 (get_process_thread): Rename to ...
12297 (get_lwp_thread): ... this. Adjust.
12298 (struct process_info): Rename to ...
12299 (struct lwp_info): ... this.
12300 (all_processes): Rename to ...
12301 (all_lwps): ... this.
12302 * proc-service.c (ps_lgetregs): Adjust.
12303 * thread-db.c (thread_db_create_event, find_one_thread)
12304 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12305
0b16c5cf
PA
123062009-03-14 Pedro Alves <pedro@codesourcery.com>
12307
12308 * server.c (handle_query): Handle "qAttached".
12309
32de4b9d
NS
123102009-03-13 Nathan Sidwell <nathan@codesourcery.com>
12311
12312 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12313 GPLv3, update license URL.
12314
2aecd87f
DE
123152009-03-01 Doug Evans <dje@google.com>
12316
93efd302 12317 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
12318 (server_h): Add gdb_signals.h.
12319 (signals.o): Update.
12320 * server.h (target_signal_from_host,target_signal_to_host_p)
12321 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12322
86b1f9c5
PM
123232009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12324
12325 * remote-utils.c (getpkt): Also generate remote-debug
12326 information if noack_mode is set.
12327
4aa995e1
PA
123282009-02-06 Pedro Alves <pedro@codesourcery.com>
12329
12330 * server.c (handle_query): Report qXfer:siginfo:read and
12331 qXfer:siginfo:write as supported and handle them.
12332 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12333 * linux-low.c (linux_xfer_siginfo): New.
12334 (linux_target_ops): Set it.
12335
62709adf
PA
123362009-01-26 Pedro Alves <pedro@codesourcery.com>
12337
12338 * server.c (gdbserver_usage): Mention --remote-debug.
12339 (main): Accept '--remote-debug' switch.
12340
aef93bd7
DE
123412009-01-18 Doug Evans <dje@google.com>
12342
12343 * regcache.c (new_register_cache): No need to check result of xcalloc.
12344 * server.c (handle_search_memory): Back out calls to xmalloc,
12345 result is checked and error is returned to user upon failure.
12346 (handle_query): Ditto. Add more checks for result of malloc.
12347 (handle_v_cont): Check result of malloc, report error back to
12348 user upon failure.
12349 (handle_v_run): Ditto. Call freeargv.
12350 * server.h (freeargv): Declare.
12351 * utils.c (freeargv): New fn.
12352
54363045
DE
123532009-01-15 Doug Evans <dje@google.com>
12354
f626972c
DE
12355 * gdbreplay.c (perror_with_name): Make arg const char *.
12356 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12357 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12358 * utils.c (perror_with_name): Make arg const char *.
54363045 12359
18aae699
PA
123602009-01-14 Pedro Alves <pedro@codesourcery.com>
12361
12362 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12363 when handling a EXIT_PROCESS_DEBUG_EVENT.
12364
ff703abe
JB
123652009-01-06 Joel Brobecker <brobecker@adacore.com>
12366
12367 * gdbreplay.c (gdbreplay_version): Update copyright year.
12368 * server.c (gdbserver_version): Likewise.
12369
f21cc1a2 123702009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12371
12372 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12373 (handle_extended_wait): Improve comment.
0e21c1ec 12374
bca929d3
DE
123752008-12-13 Doug Evans <dje@google.com>
12376
12377 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12378 * server.h (ATTR_MALLOC): New macro.
12379 (xmalloc,xcalloc,xstrdup): Declare.
12380 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12381 * inferiors.c: Ditto.
12382 * linux-low.c: Ditto.
12383 * mem-break.c: Ditto.
12384 * regcache.c: Ditto.
12385 * remote-utils.c: Ditto.
12386 * server.c: Ditto.
12387 * target.c: Ditto.
12388 * win32-low.c: Ditto.
12389
97438e3f
DE
123902008-12-12 Doug Evans <dje@google.com>
12391
896c7fbb
DE
12392 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12393 in debugging printf.
12394
97438e3f
DE
12395 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12396
e3b886f8
DE
123972008-12-09 Doug Evans <dje@google.com>
12398
12399 * linux-low.h (struct process_info): Delete member tid, unused.
12400 * thread-db.c (find_one_thread): Update.
12401 (maybe_attach_thread): Update.
12402
07e059b5
VP
124032008-12-02 Pedro Alves <pedro@codesourcery.com>
12404
889bf7c5
PA
12405 * target.h (struct target_ops): Add qxfer_osdata member.
12406 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12407 and dirent.h.
12408 (linux_qxfer_osdata): New functions.
12409 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12410 callback.
12411 * server.c (handle_query): Handle "qXfer:osdata:read:".
12412 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12413 (buffer_xml_printf): New functions.
12414 * server.h (struct buffer): New.
12415 (buffer_grow_str, buffer_grow_str0): New macros.
12416 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12417 (buffer_xml_printf): Declare.
07e059b5 12418
4cab47ab
DE
124192008-11-24 Doug Evans <dje@google.com>
12420
12421 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12422
f142445f
DJ
124232008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12424
12425 * server.c (handle_v_run): Always use the supplied argument list.
12426
d0107bb6 124272008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12428
d0107bb6
BW
12429 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12430 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12431
2c4ad781
TJB
124322008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12433
12434 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12435 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12436 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12437 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12438 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12439 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12440 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12441 XML target descriptions.
12442 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12443 when inferior is running on an ISA 2.05 or later processor. Add
12444 special case to return offset for full 64-bit slot of FPSCR when
12445 in 32-bits.
12446
dfb64f85
DJ
124472008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12448
12449 * Makefile.in (SFILES, clean): Added sparc64 files.
12450 (reg-sparc64.o, reg-sparc64.c): New.
12451 * configure.srv (sparc*-*-linux*): New configuration.
12452 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12453 syscall arguments for SPARC.
12454 (regsets_store_inferior_registers): Likewise.
12455 * linux-sparc-low.c: New file.
12456
66b6e1dd
DE
124572008-10-21 Doug Evans <dje@google.com>
12458
12459 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12460 (READLINE_DIR,READLINE_DEP): Delete.
12461 (INTERNAL_CFLAGS): Update.
12462 (LINTFLAGS): Update.
12463
9b710a42
PA
124642008-10-10 Pedro Alves <pedro@codesourcery.com>
12465
12466 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12467 whole argv from the last run, not just argv[0].
12468
5822d809
PA
124692008-09-08 Pedro Alves <pedro@codesourcery.com>
12470
12471 * regcache.c (new_register_cache): Return NULL if the register
12472 cache size isn't known yet.
12473 (free_register_cache): Avoid dereferencing a NULL regcache.
12474
74aac56f
DJ
124752008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12476
12477 * configure.srv: Merge MIPS and MIPS64.
12478
400b20f5
MR
124792008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12480
12481 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12482
677c5bb1
LM
124832008-08-18 Luis Machado <luisgpm@br.ibm.com>
12484
12485 * Makefile.in: Add required vsx dependencies.
12486
12487 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12488 Declare init_registers_powerpc_vsx32l.
12489 Declare init_registers_powerpc_vsx64l.
12490 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12491 (ppc_arch_setup): Check for VSX in hwcap.
12492 (ppc_fill_vsxregset): New function.
12493 (ppc_store_vsxregset): New function.
12494 Add new VSX entry in regset_info target_regsets.
12495
12496 * configure.srv: Add new VSX dependencies.
12497
a6f3e723
SL
124982008-08-12 Pedro Alves <pedro@codesourcery.com>
12499
12500 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12501 (remote_open): Set or clear transport_is_reliable.
12502 (putpkt_binary): Don't expect acks in noack mode.
12503 (getpkt): Don't send ack/nac in noack mode.
12504 * server.c (handle_general_set): Handle QStartNoAckMode.
12505 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12506 qSupported.
12507 (main): Reset noack_mode on every connection.
12508 * server.h (noack_mode): Declare.
12509
a417dc56
RW
125102008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12511
12512 * Makefile.in (GDBREPLAY_OBS): New variable.
12513 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12514
3221518c
UW
125152008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12516 Daniel Jacobowitz <dan@codesourcery.com>
12517
12518 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12519 (usr_store_inferior_registers): Likewise.
12520 (regsets_store_inferior_registers): Likewise.
12521
ec56be1b
PA
125222008-07-31 Rolf Jansen <rj@surtec.com>
12523 Pedro Alves <pedro@codesourcery.com>
12524
12525 * configure.ac: Check for memmem declaration.
12526 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12527 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12528 (disable_packet_qfThreadInfo): Unconditionally compile.
12529 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12530 * configure, config.in: Regenerate.
12531
2fe5e3ff
DE
125322008-07-28 Doug Kwan <dougkwan@google.com>
12533
12534 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12535 (linux_write_memory): Remove declaration of errno.
12536
836acd6d
UW
125372008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12538
12539 * linux-low.c (handle_extended_wait): Do not use "status"
12540 variable uninitialized.
12541
aeba519e
PA
125422008-07-07 Pedro Alves <pedro@codesourcery.com>
12543
12544 * server.c (handle_v_attach): Inhibit reporting dll changes.
12545
db42f210
PA
125462008-06-27 Pedro Alves <pedro@codesourcery.com>
12547
12548 * remote-utils.c (prepare_resume_reply): If requested, don't
12549 output "thread:TID" in the T stop reply.
12550
12551 * server.c (disable_packet_vCont, disable_packet_Tthread)
12552 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12553 (handle_query): If requested, disable support for qC, qfThreadInfo
12554 and qsThreadInfo.
12555 (handle_v_requests): If requested, disable support for vCont.
12556 (gdbserver_show_disableable): New.
12557 (main): Handle --disable-packet and --disable-packet=LIST.
12558
12559 * server.h (disable_packet_vCont, disable_packet_Tthread)
12560 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12561
8e4c5421
CD
125622008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12563
12564 * server.c (gdbserver_usage): Mention --version.
12565
6e23a804
DJ
125662008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12567
12568 * Makefile.in (gdbreplay.o): New rule.
12569
90aa6a40
JM
125702008-06-06 Joseph Myers <joseph@codesourcery.com>
12571
12572 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12573 message, not gdbserver.
12574
c16158bc 125752008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12576 Nathan Sidwell <nathan@codesourcery.com>
12577 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12578
12579 * acinclude.m4: Include ../../config/acx.m4.
12580 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12581 * configure, config.in: Regenerate.
12582 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12583 * server.c (gdbserver_version): Print PKGVERSION.
12584 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12585 (main): Adjust gdbserver_usage calls.
12586 * gdbreplay.c (version, host_name): Add declarations.
12587 (gdbreplay_version, gdbreplay_usage): New.
12588 (main): Accept --version and --help options.
12589
aeb75bf5
DJ
125902008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12591
12592 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12593 (arm_breakpoint_at): Handle Thumb.
12594 (the_low_target): Add comment.
12595
76b233dd
UW
125962008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12597
12598 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12599
08388c79
DE
126002008-05-09 Doug Evans <dje@google.com>
12601
a3c83fae
DE
12602 * server.h (decode_search_memory_packet): Declare.
12603 * remote-utils.c (decode_search_memory_packet): New fn.
12604 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12605 (handle_search_memory): New fn.
12606 (handle_query): Process qSearch:memory packets.
12607
bb9c3d36
UW
126082008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12609
12610 * regcache.c (registers_length): Remove.
12611 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12612 full register packet.
12613 * regcache.h (registers_length): Remove prototype.
12614 * server.h (PBUFSIZ): Define to 16384.
12615
7284e1be
UW
126162008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12617
12618 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12619 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12620 powerpc-64l.o, and powerpc-altivec64l.o.
12621 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12622 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12623 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12624 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12625 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12626 to srv_xmlfiles.
12627
12628 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12629 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12630 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12631 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12632 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12633 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12634 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12635 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12636 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12637 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12638 (clean): Update.
12639
12640 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12641 (init_registers_powerpc_32l): ... this new prototype.
12642 (init_registers_powerpc_32): Remove, replace by ...
12643 (init_registers_powerpc_altivec32l): ... this new prototype.
12644 (init_registers_powerpc_e500): Remove, replace by ...
12645 (init_registers_powerpc_e500l): ... this new prototype.
12646 (init_registers_ppc64): Remove, replace by ...
12647 (init_registers_powerpc_64l): ... this new prototype.
12648 (init_registers_powerpc_64): Remove, replace by ...
12649 (init_registers_powerpc_altivec64l): ... this new prototype.
12650 (ppc_num_regs): Set to 73.
12651 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12652 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12653 (ppc_cannot_store_register): Handle orig_r3 and trap.
12654 (ppc_arch_setup): Update init_registers_... calls.
12655 (ppc_fill_gregset): Handle orig_r3 and trap.
12656
12657 * inferiors.c (clear_inferiors): Reset current_inferior.
12658
fdc59709
PB
126592008-04-23 Paolo Bonzini <bonzini@gnu.org>
12660
889bf7c5
PA
12661 * acinclude.m4: Add override.m4.
12662 * configure: Regenerate.
fdc59709 12663
c9b2f845
UW
126642008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12665
12666 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12667 initial call to init_register_ppc64.
12668
550512b8
UW
126692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12670
43aaf8b6
PA
12671 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12672 single powerpc*-*-linux* case.
550512b8
UW
12673 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12674
b6430ec3
UW
126752008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12676
12677 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12678 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12679 from reg_xmlfiles.
12680 * linux-ppc-low.c: Include <elf.h>.
12681 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12682 (ppc_hwcap): New global variable.
12683 (ppc_regmap): Remove __SPE__ #ifdef sections.
12684 (ppc_regmap_e500): New global variable.
12685 (ppc_cannot_store_register): Update __SPE__ special case.
12686 (ppc_get_hwcap): New function.
12687 (ppc_arch_setup): Use it to determine whether inferior supports
12688 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12689 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12690 Do not access registers if target does not support AltiVec.
12691 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12692 Do not access registers if target does not support SPE.
12693 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12694
52fa2412
UW
126952008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12696
12697 * linux-low.c (disabled_regsets, num_regsets): New.
12698 (use_regsets_p): Delete.
12699 (linux_wait_for_process): Clear disabled_regsets.
12700 (regsets_fetch_inferior_registers): Check and set it.
12701 (regsets_store_inferior_registers): Likewise.
12702 (linux_fetch_registers, linux_store_registers): Do not use
12703 use_regsets_p.
12704 (initialize_low): Allocate disabled_regsets.
12705
e28b3332
DJ
127062008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12707
12708 * Makefile.in (LIBOBJS): New.
12709 (OBS): Use LIBOBJS.
12710 (memmem.o): New rule.
12711 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12712 * configure: Regenerated.
12713
4536995d
UW
127142008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12715
12716 * server.c (handle_query): Never return "unsupported" for
12717 qXfer:features:read queries.
12718
221c031f
UW
127192008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12720
12721 * server.c (get_features_xml): Fix inverted condition.
12722 (handle_query): Always support qXfer:feature:read.
12723
ccd213ac
DJ
127242008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12725
12726 * server.c (wrapper_argv): New.
12727 (start_inferior): Handle wrapper_argv. If set, expect an extra
12728 trap.
12729 (gdbserver_usage): Document --wrapper.
12730 (main): Parse --wrapper.
12731
6fe305f7
UW
127322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12733
12734 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12735 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12736 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12737 (ppc_set_pc): Likewise.
12738 (ppc_arch_setup): New function.
12739 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12740 of collect_register.
889bf7c5 12741 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12742
5b0a002e
UW
127432008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12744
12745 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12746 instead of linux-ppc64-low.o.
12747 * linux-ppc64-low.c: Remove file.
12748 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12749 (linux-ppc64-low.o): Remove rule.
12750
12751 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12752 (init_registers_powerpc_64): Likewise.
12753 (ppc_regmap): Conditionally define depending on __powerpc64__.
12754 (ppc_cannot_store_register): Do not special-case "fpscr" when
12755 compiled on __powerpc64__.
12756 (ppc_collect_ptrace_register): New function.
12757 (ppc_supply_ptrace_register): New function.
12758 (ppc_breakpoint): Change type to "unsigned int".
12759 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12760 (the_low_target): Conditionally provide initializers for the
889bf7c5 12761 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12762 collect_ptrace_register and supply_ptrace_register members.
12763
9b4b61c8
UW
127642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12765
12766 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12767 * server.c (gdbserver_xmltarget): Define.
12768 (get_features_xml): Use it to replace "target.xml" and arch_string.
12769
12770 * configure.srv: Remove srv_xmltarget. Add XML files that were
12771 mentioned there to srv_xmlfiles instead. Remove conditional tests
12772 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12773 srv_xmlfiles and srv_regobj to include all possible choices.
12774 * configure.ac (srv_xmltarget): Remove.
12775 (srv_xmlfiles): Do not add "target.xml".
12776 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12777 checks for supplementary target information.
12778 * configure: Regenerate.
12779 * Makefile.in (XML_TARGET): Remove.
12780 (target.xml): Remove rule.
12781 (clean): Do not clean up target.xml.
12782 (.PRECIOUS): Do not mention target.xml.
12783
12784 * target.h (struct target_ops): Remove arch_string member.
12785 * linux-low.c (linux_arch_string): Remove.
12786 (linux_target_ops): Remove arch_string initializer.
12787 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12788 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12789 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12790 * spu-low.c (spu_arch_string): Remove.
12791 (spu_target_ops): Remove arch_string initializer.
12792 * win32-low.c (win32_arch_string): Remove.
12793 (win32_target_ops): Remove arch_string initializer.
12794 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12795 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12796 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12797
ee1a7ae4
UW
127982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12799
12800 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12801 by collect_ptrace_register and supply_ptrace_register hooks.
12802 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12803 instead of checking for the_low_target.left_pad_xfer.
12804 (usr_store_inferior_registers): Use collect_ptrace_register callback
12805 instead of checking for the_low_target.left_pad_xfer.
12806
12807 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12808 (s390_supply_ptrace_register): Likewise.
12809 (s390_fill_gregset): Call s390_collect_ptrace_register.
12810 (the_low_target): Update.
12811
12812 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12813 (ppc_supply_ptrace_register): Likewise.
12814 (the_low_target): Update.
12815
12816 * linux-i386-low.c (the_low_target): Update.
12817 * linux-x86-64-low.c (the_low_target): Update.
12818
d61ddec4
UW
128192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12820
12821 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12822 reg-s390.o and reg-s390x.o.
12823
12824 * linux-low.c (new_inferior): New global variable.
12825 (linux_create_inferior, linux_attach): Set it.
12826 (linux_wait_for_process): Call the_low_target.arch_setup after the
12827 target has stopped for the first time.
12828 (initialize_low): Do not call the_low_target.arch_setup.
12829
12830 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12831 (s390_set_pc): Likewise.
12832 (s390_arch_setup): New function.
12833 (the_low_target): Use s390_arch_setup as arch_setup routine.
12834
12835 * regcache.c (realloc_register_cache): New function.
12836 (set_register_cache): Call it for each existing regcache.
12837
d05b4ac3
UW
128382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12839
12840 * server.h (init_registers): Remove prototype.
12841
12842 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12843 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12844 instead of init_registers ().
12845 * linux-arm-low.c (init_registers_arm): Add prototype.
12846 (init_registers_arm_with_iwmmxt): Likewise.
12847 (the_low_target): Add initializer for arch_setup field.
12848 * linux-cris-low.c (init_registers_cris): Add prototype.
12849 (the_low_target): Add initializer for arch_setup field.
12850 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12851 (the_low_target): Add initializer for arch_setup field.
12852 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12853 (the_low_target): Add initializer for arch_setup field.
12854 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12855 (the_low_target): Add initializer for arch_setup field.
12856 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12857 (the_low_target): Add initializer for arch_setup field.
12858 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12859 (the_low_target): Add initializer for arch_setup field.
12860 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12861 (init_registers_mips64_linux): Likewise.
12862 (the_low_target): Add initializer for arch_setup field.
12863 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12864 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12865 (the_low_target): Add initializer for arch_setup field.
12866 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12867 (init_registers_powerpc_64): Likewise.
12868 (the_low_target): Add initializer for arch_setup field.
12869 * linux-s390-low.c (init_registers_s390): Add prototype.
12870 (init_registers_s390x): Likewise.
12871 (the_low_target): Add initializer for arch_setup field.
12872 * linux-sh-low.c (init_registers_sh): Add prototype.
12873 (the_low_target): Add initializer for arch_setup field.
12874 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12875 (the_low_target): Add initializer for arch_setup field.
12876 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12877 (the_low_target): Add initializer for arch_setup field.
12878
12879 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12880 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12881 instead of init_registers ().
12882 * win32-arm-low.c (init_registers_arm): Add prototype.
12883 (the_low_target): Add initializer for arch_setup field.
12884 * win32-i386-low.c (init_registers_i386): Add prototype.
12885 (the_low_target): Add initializer for arch_setup field.
12886
12887 * spu-low.c (init_registers_spu): Add prototype.
12888 (initialize_low): Call initialie_registers_spu () instead of
12889 initialize_registers ().
12890
fd96d250
PA
128912008-02-19 Pedro Alves <pedro@codesourcery.com>
12892
12893 * server.c (handle_v_requests): When handling the vRun and vAttach
12894 packets, if already debugging a process, don't kill it. Return an
12895 error instead.
12896
d41b6bb4
DJ
128972008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12898
12899 * server.c (handle_query): Correct length check.
12900
5ac588cf
PA
129012008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12902
12903 * win32-low.c (do_initial_child_stuff): Add process handle
12904 parameter. Set current_process_handle and current_process_id from the
12905 parameters. Clear globals.
12906 (win32_create_inferior): Don't set current_process_handle and
12907 current_process_id here. Instead pass them on the call to
12908 do_initial_child_stuff.
12909 (win32_attach): Likewise.
12910 (win32_clear_inferiors): New.
12911 (win32_kill): Don't close the current process handle or the
12912 current thread handle here. Instead call win32_clear_inferiors.
12913 (win32_detach): Don't open a new handle to the process. Call
12914 win32_clear_inferiors.
12915 (win32_join): Don't rely on current_process_handle; open a new
12916 handle using the process id.
12917 (win32_wait): Call win32_clear_inferiors when the inferior process
12918 has exited.
12919
ecd7ecbc
DJ
129202008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12921
12922 * server.c (monitor_show_help): Add "exit".
12923
1525d545
MG
129242008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12925
ecd7ecbc 12926 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12927 (clean): Add reg-xtensa.c.
12928 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12929 * configure.srv (xtensa*-*-linux*) New target.
12930 * linux-xtensa-low.c: New.
12931 * xtensa-xtregs.c: New.
1525d545 12932
59a016f0
PA
129332008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12934
12935 * hostio.c: Don't include errno.h.
12936 (errno_to_fileio_errno): Move to hostio-errno.
12937 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12938 error number outputting to the target->hostio_last_error callback.
12939 (hostio_packet_error): Use FILEIO_EINVAL directly.
12940 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12941 calls to hostio_error.
12942 * hostio-errno.c: New.
12943 * server.h (hostio_last_error_from_errno): Declare.
12944 * target.h (target_ops): Add hostio_last_error member.
12945 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12946 as hostio_last_error handler.
889bf7c5 12947 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12948 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12949 (wince_hostio_last_error): New functions.
12950 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12951 as hostio_last_error handler.
12952 (win32_target_ops) [!_WIN32_WCE]: Register
12953 hostio_last_error_from_errno as hostio_last_error handler.
12954 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12955 (hostio-errno.o): New rule.
12956 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12957 * configure.srv (srv_hostio_err_objs): New variable. Default to
12958 hostio-errno.o.
12959 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12960 * configure: Regenerate.
12961
2d717e4f
DJ
129622008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12963
12964 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12965 (linux_kill, linux_detach): Clean up the process list.
12966 * remote-utils.c (remote_open): Improve port number parsing.
12967 (putpkt_binary, input_interrupt): Only send interrupts if the target
12968 is running.
12969 * server.c (extended_protocol): Make static.
12970 (attached): Define earlier.
12971 (exit_requested, response_needed, program_argv): New variables.
12972 (target_running): New.
12973 (start_inferior): Clear attached here.
12974 (attach_inferior): Set attached here.
12975 (require_running): Define.
12976 (handle_query): Use require_running and target_running. Implement
12977 "monitor exit".
12978 (handle_v_attach, handle_v_run): New.
12979 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12980 (gdbserver_usage): Update.
12981 (main): Redo argument parsing. Handle --debug and --multi. Handle
12982 --attach along with other options or after the port. Save
12983 program_argv. Support no initial program. Resynchronize
12984 communication with GDB after an error. Handle "monitor exit".
12985 Use require_running and target_running. Always allow the extended
12986 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12987 restart in extended mode.
12988 * README: Refer to the GDB manual. Update --attach usage.
12989
7407e2de
AS
129902007-12-20 Andreas Schwab <schwab@suse.de>
12991
12992 * linux-low.c (STACK_SIZE): Define.
12993 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12994 (linux_test_for_tracefork): Likewise.
12995
b65d95c5
DJ
129962007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12997
12998 * linux-low.c (linux_wait_for_event): Update messages. Do not
12999 reinsert auto-delete breakpoints.
13000 * mem-break.c (struct breakpoint): Change return type of handler to
13001 int.
13002 (set_breakpoint_at): Update handler type.
13003 (reinsert_breakpoint_handler): Return 1 instead of calling
13004 delete_breakpoint.
13005 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13006 setting a new one.
13007 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13008 * mem-break.h (set_breakpoint_at): Update handler type.
13009 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13010 * win32-low.c (auto_delete_breakpoint): New.
13011 (get_child_debug_event): Use it.
13012
4e799345
DJ
130132007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13014
13015 * configure.ac: Check for pread and pwrite.
13016 * hostio.c (handle_pread): Fall back to lseek and read.
13017 (handle_pwrite): Fall back to lseek and write.
13018 * config.in, configure: Regenerated.
13019
27524b67
DJ
130202007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13021
13022 * server.c (myresume): Add own_buf argument.
13023 (main): Update calls.
13024
a20d5e98
DJ
130252007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13026
13027 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13028 * remote-utils.c (remote_open): Do not call disable_async_io.
13029 (block_async_io): Delete.
13030 (unblock_async_io): Make static.
13031 (initialize_async_io): New.
13032 * server.c (handle_v_cont): Handle async I/O here.
13033 (myresume): Likewise. Move other common resume tasks here...
13034 (main): ... from here. Call initialize_async_io. Disable async
13035 I/O before the main loop.
13036 * server.h (initialize_async_io): Declare.
13037 (block_async_io, unblock_async_io): Delete prototypes.
13038 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13039
b79d787e
DJ
130402007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13041
13042 * remote-utils.c (readchar): Allow binary data in received messages.
13043
d97903b2
PA
130442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13045
13046 * win32-low.c (attaching): New global.
13047 (win32_create_inferior): Clear the `attaching' global.
13048 (win32_attach): Set the `attaching' global.
13049 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13050 attaching. Only set a breakpoint at the entry point if not
13051 attaching.
13052
311de423
PA
130532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13054
13055 * server.c (main): Don't report dll events on the initial
13056 connection on attaches.
13057
6c2d16d2
PA
130582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13059
13060 * server.c (main): Relax numerical bases supported for the pid of
13061 the --attach command line argument.
13062
5ca906e6
PA
130632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13064
13065 * win32-low.c (win32_attach): Call OpenProcess before
13066 DebugActiveProcess, not after. Add last error output to error
13067 call.
13068
9c6c8194
PA
130692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13070
13071 * win32-low.c (win32_get_thread_context)
13072 (win32_set_thread_context): New functions.
13073 (thread_rec): Use win32_get_thread_context.
13074 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13075 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13076 field.
13077
4d5d1aaa
PA
130782007-12-03 Leo Zayas
13079 Pedro Alves <pedro_alves@portugalmail.pt>
13080
13081 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13082 global variables.
13083 (child_add_thread): Minor cleanup.
13084 (child_continue): Resume artificially suspended threads before
13085 calling ContinueDebugEvent.
13086 (suspend_one_thread): New.
13087 (fake_breakpoint_event): New.
13088 (get_child_debug_event): Change return type to int. Check here if
13089 gdb sent an interrupt request. If a soft interrupt was requested,
13090 fake a breakpoint event. Return 0 if there is no event to handle,
13091 and 1 otherwise.
13092 (win32_wait): Don't check here if gdb sent an interrupt request.
13093 Ensure there is a valid event to handle.
13094 (win32_request_interrupt): Add soft interruption method as last
13095 resort.
13096
c436e841
PA
130972007-12-03 Leo Zayas
13098 Pedro Alves <pedro_alves@portugalmail.pt>
13099
13100 * win32-low.h (win32_thread_info): Add descriptions to the
13101 structure members. Replace `suspend_count' counter by a
13102 `suspended' flag.
13103 * win32-low.c (thread_rec): Update condition of when to get the
13104 context from the inferior. Rely on ContextFlags being set if it
13105 has already been retrieved. Only suspend the inferior thread if
13106 we haven't already. Warn if that fails.
13107 (continue_one_thread): s/suspend_count/suspended/. Only call
13108 ResumeThread once. Warn if that fails.
13109
e7b5fa67
PA
131102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13111
13112 * win32-low.c (win32_wait): Don't read from the inferior when it
13113 has already exited.
13114
a385171d
PA
131152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13116
13117 * Makefile.in (win32_low_h): New variable.
13118 (win32-low.o): Add dependency on $(win32_low_h).
13119 (win32-arm-low.o, win32-i386-low.o): New rules.
13120
f80c84b3
DJ
131212007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13122
13123 * hostio.c: Correct copyright year.
13124
a6b151f1
DJ
131252007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13126
13127 * Makefile.in (OBS): Add hostio.o.
13128 (hostio.o): New rule.
13129 * server.h (handle_vFile): Declare.
13130 * hostio.c: New file.
13131 * server.c (handle_v_requests): Take packet_len and new_packet_len
13132 for binary packets. Call handle_vFile.
13133 (main): Update call to handle_v_requests.
13134
f9387fc3
DJ
131352007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13136
13137 * linux-low.c: Include <sched.h>.
13138
51c2684e
DJ
131392007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13140
13141 * linux-low.c (linux_tracefork_grandchild): New.
13142 (linux_tracefork_child): Use clone.
13143 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13144
75f83163
JB
131452007-10-31 Joel Brobecker <brobecker@adacore.com>
13146
13147 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13148
da5898ce
DJ
131492007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13150
13151 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13152
24a09b5f
DJ
131532007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13154
13155 * inferiors.c (change_inferior_id): Delete.
13156 (add_pid_to_list, pull_pid_from_list): New.
13157 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13158 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13159 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13160 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13161 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13162 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13163 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13164 (using_threads): Always set to 1.
13165 (handle_extended_wait): New.
13166 (add_process): Do not set TID.
13167 (linux_create_inferior): Set must_set_ptrace_flags.
13168 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13169 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13170 (linux_thread_alive): Rename TID argument to LWPID.
13171 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13172 (linux_wait_for_event): Do not use TID or check using_threads. Update
13173 call to dead_thread_notify. Call handle_extended_wait.
13174 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13175 (send_sigstop): Delete sigstop_sent.
13176 (wait_for_sigstop): Avoid TID.
13177 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13178 (linux_test_for_tracefork): New.
13179 (linux_lookup_signals): Use thread_db_active and
13180 linux_supports_tracefork_flag.
13181 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13182 * linux-low.h (get_process_thread): Avoid TID.
13183 (struct process_ifo): Move thread_known and tid to the end. Remove
13184 sigstop_sent.
13185 (linux_attach_lwp, thread_db_init): Update prototypes.
13186 * server.h (change_inferior_id): Delete prototype.
13187 (add_pid_to_list, pull_pid_from_list): New prototypes.
13188 * thread-db.c (thread_db_use_events): New.
13189 (find_first_thread): Rename to...
13190 (find_one_thread): ...this. Update callers and messages. Do not
13191 call fatal. Check thread_db_use_events. Do not call
13192 change_inferior_id or new_thread_notify.
13193 (maybe_attach_thread): Update. Do not call new_thread_notify.
13194 (thread_db_init): Set thread_db_use_events. Check use_events.
13195 * utils.c (fatal, warning): Correct message prefix.
13196
30ed0a8f
DJ
131972007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13198
13199 * Makefile.in (clean): Remove new files.
13200 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13201 (powerpc-64.o, powerpc-64.c): New rules.
13202 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13203 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13204 with SPE.
13205 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13206 SPE targets.
13207 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13208 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13209 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13210 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13211 (target_regsets): Add AltiVec and SPE register sets.
13212 * configure.ac: Check for AltiVec and SPE.
13213 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13214 (ppc_fill_vrregset, ppc_store_vrregset): New.
13215 (target_regsets): Add AltiVec register set.
13216 * configure: Regenerated.
13217
fd462a61
DJ
132182007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
13219
13220 * linux-low.c (O_LARGEFILE): Define.
13221 (linux_read_memory): Use /proc/PID/mem.
13222 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
13223 * configure, config.in: Regenerated.
13224
69f223ed
DJ
132252007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13226
13227 * linux-low.c (linux_wait_for_event): Do not pass signals while
13228 single-stepping.
13229
aec18585
PA
132302007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13231
13232 * win32-low.c (create_process): New.
13233 (win32_create_inferior): Use create_process instead of
13234 CreateProcess. If create_process failed retry appending an ".exe"
13235 suffix. Store the GetLastError result immediatelly after
13236 create_process calls and use it on the call to error.
13237
34d86ddd
PA
132382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
13239
13240 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13241
5a0e3bd0
JB
132422007-08-23 Joel Brobecker <brobecker@adacore.com>
13243
13244 * configure.ac: Switch license to GPLv3.
13245
f88c79e6
MS
132462007-08-01 Michael Snyder <msnyder@access-company.com>
13247
13248 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13249
6b3d9b83
PA
132502007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
13251
13252 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13253 typedef.
13254 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13255 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
13256 CloseToolhelp32Snapshot.
13257 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13258 CloseToolhelp32Snapshot.
13259
c588c53c
MS
132602007-07-27 Michael Snyder <michael.snyder@access-company.com>
13261
13262 * server.c (main): Check for inferior exit before main loop.
13263
aa0403d9
PA
132642007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
13265
13266 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13267 instead of on tmp_desc.
13268
255e7678
DJ
132692007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
13270 Daniel Jacobowitz <dan@codesourcery.com>
13271
13272 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13273 (add_thread): Minor cleanups.
13274 (clear_inferiors): Move lower in the file. Clear the DLL
13275 list.
13276 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13277 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13278 (xml_escape_text): New.
13279 * server.c (handle_query): Handle qXfer:libraries:read. Report it
13280 for qSupported.
13281 (handle_v_cont): Report errors.
13282 (gdbserver_version): Update.
13283 (main): Correct size of own_buf. Do not report initial DLL events.
13284 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13285 (unloaded_dll, xml_escape_text): New.
13286 * win32-low.c (enum target_waitkind): Update comments.
13287 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13288 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13289 (win32_EnumProcessModules, win32_GetModuleInformation)
13290 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13291 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13292 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13293 (win32_Module32First, win32_Module32Next, load_toolhelp)
13294 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13295 (get_child_debug_event): Handle DLL events.
13296 (win32_wait): Likewise.
13297
0d37add9
DJ
132982007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13299
13300 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13301 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13302
45e2715e
PA
133032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13304
13305 * win32-low.c (handle_output_debug_string): Ignore event if not
13306 waiting.
13307
c5674cf1
PA
133082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
13309
13310 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13311
2bbe3cc1
DJ
133122007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
13313
13314 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13315
ae13219e
DJ
133162007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
13317
13318 * inferiors.c (change_inferior_id): Add comment.
13319 * linux-low.c (check_removed_breakpoint): Add an early
13320 prototype. Improve debug output.
13321 (linux_attach): Doc update.
13322 (linux_detach_one_process, linux_detach): Clean up before releasing
13323 each process.
13324 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13325 * linux-low.h (struct process_info): Doc improvement.
13326 * mem-break.c (delete_all_breakpoints): New.
13327 * mem-break.h (delete_all_breakpoints): New prototype.
13328 * thread-db.c (find_first_thread): New.
13329 (thread_db_create_event): Call it instead of
13330 thread_db_find_new_threads. Clean up unused variables.
13331 (maybe_attach_thread): Remove first thread handling.
13332 (thread_db_find_new_threads): Use find_first_thread.
13333 (thread_db_get_tls_address): Likewise.
13334
4105de34
DJ
133352007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13336
13337 * thread-db.c (thread_db_find_new_threads): Add prototype.
13338 (thread_db_create_event): Check for the main thread before adding
13339 a new thread.
13340 (maybe_attach_thread): Only enable event reporting if TID == 0.
13341 (thread_db_get_tls_address): Check for new threads.
13342
2b876972
DJ
133432007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13344
13345 * linux-low.c (linux_create_inferior): Try execv before execvp.
13346 * spu-low.c (spu_create_inferior): Likewise.
13347
7a245884
DJ
133482007-06-13 Mike Frysinger <vapier@gentoo.org>
13349
13350 * linux-low.c (linux_create_inferior): Change execv to execvp.
13351 * spu-low.c (spu_create_inferior): Likewies.
13352
117ce543
DJ
133532007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13354
13355 * Makefile.in (clean): Clean new files instead of deleted ones.
13356 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13357 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13358 rules.
13359 * configure.srv: Specify XML files and new regformats for MIPS and
13360 MIPS64 GNU/Linux.
13361 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13362 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13363 an entry for the restart register.
13364 (mips_cannot_fetch_register, mips_cannot_store_register)
13365 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13366 register names to match the XML descriptions.
13367 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13368 restart register instead of $0.
13369
0e7f50da
UW
133702007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13371 Markus Deuling <deuling@de.ibm.com>
13372
13373 * remote-utils.c (decode_xfer_write): New function.
13374 * server.h (decode_xfer_write): Add prototype.
13375 * server.c (handle_query): Add PACKET_LEN argument. Support
13376 qXfer:spu:read and qXfer:spu:write packets.
13377 (main): Pass packet_len to handle_query.
13378 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13379 * target.h (target_ops): Add qxfer_spu.
13380
374c1d38
UW
133812007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13382
13383 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13384 accessing non-seekable spufs files.
13385
bb63802a
UW
133862007-05-16 Markus Deuling <deuling@de.ibm.com>
13387
889bf7c5 13388 * server.c (handle_query): Add reply for qC packet.
bb63802a 13389
7390519e
PA
133902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13391 Leo Zayas <lerele@champenstudios@com>
13392
13393 * server.h (check_remote_input_interrupt_request): New function.
13394 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13395 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13396 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13397 (check_remote_input_interrupt_request): New function.
13398 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13399 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13400 winapi_GenerateConsoleCtrlEvent): New typedefs.
13401 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13402 to 250 ms.
13403 (win32_wait): Check for remote interrupt request
13404 with check_remote_input_interrupt_request.
13405 (win32_request_interrupt): New function.
13406 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13407
34b34921
PA
134082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13409
13410 * win32-low.c (debug_registers_changed,
13411 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13412 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13413 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13414 (thread_rec): Get context using the low target.
13415 (child_add_thread): Call thread_added on the low target,
13416 which does the same thing.
13417 (regptr): Delete.
13418 (do_initial_child_stuff): Remove debug registers references.
13419 Set context using the low target. Resume threads after
13420 setting the contexts.
13421 (child_continue): Remove dead variable. Remove debug
13422 registers references.
13423 (child_fetch_inferior_registers): Go through the low target.
13424 (do_child_store_inferior_registers): Remove.
13425 (child_store_inferior_registers): Go through the low target.
13426 (win32_resume): Remove debug registers references.
13427 Set context using the low target.
13428 (handle_exception): Change return type to void. Don't record
13429 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13430 first chance exception.
889bf7c5 13431 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13432 goto loop. Always return after waiting for debug event.
13433 (win32_wait): Convert to switch statement. Handle spurious
13434 events.
13435
13436 * win32-i386-low.c (debug_registers_changed,
13437 debug_registers_used): New.
13438 (initial_stuff): Rename to ...
13439 (i386_initial_stuff): ... this. Clear debug registers
13440 state variables.
13441 (store_debug_registers): Delete.
13442 (i386_get_thread_context): New.
13443 (load_debug_registers): Delete.
13444 (i386_set_thread_context): New.
13445 (i386_thread_added): New.
13446 (single_step): Rename to ...
13447 (i386_single_step): ... this.
13448 (do_fetch_inferior_registers): Rename to ...
13449 (i386_fetch_inferior_register): ... this.
13450 (i386_store_inferior_register): New.
13451 (the_low_target): Adapt to new interface.
13452
13453 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13454 (arm_get_thread_context): New.
13455 (arm_set_thread_context): New.
13456 (regptr): New.
13457 (do_fetch_inferior_registers): Rename to ...
13458 (arm_fetch_inferior_register): ... this.
13459 (arm_store_inferior_register): New.
13460 (arm_wince_breakpoint): Reimplement as unsigned long.
13461 (arm_wince_breakpoint_len): Define.
13462 (the_low_target): Adapt to new interface.
13463
13464 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13465 load_debug_registers. Add get_thread_context, set_thread_context,
13466 thread_added and store_inferior_register. Rename
13467 fetch_inferior_registers to fetch_inferior_register.
13468 (regptr): Remove declaration.
13469
dd6953e1
PA
134702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13471
13472 * linux-low.c (linux_detach): Change return type to int. Return 0.
13473 * spu-low.c (spu_detach): Likewise.
13474
444d6139
PA
134752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13476
13477 * target.h (target_ops): Change return type of detach to int.
13478 Add join.
13479 (join_inferior): New.
13480 * server.c (main): Don't skip detach support on mingw32.
13481 If the inferior doesn't support detaching return error.
13482 Call join_inferior instead of using waitpid.
13483 * linux-low.c (linux_join): New.
13484 (linux_target_op): Add linux_join.
13485 * spu-low.c (spu_join): New.
13486 (spu_target_ops): Add spu_join.
13487 * win32-low.c (win32_detach): Adapt to new interface.
13488 Reopen current_process_handle before detaching. Issue a child
13489 resume before detaching.
13490 (win32_join): New.
13491 (win32_target_op): Add win32_join.
13492
1d5315fe
PA
134932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13494
13495 * win32-low.c (win32-attach): Fix return value.
13496 * target.h (target_ops): Describe ATTACH return values.
13497
bf914831
PA
134982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13499
13500 * win32-low.c (GETPROCADDRESS): Define.
13501 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13502 (winapi_DebugSetProcessKillOnExit): Likewise.
13503 (win32_create_inferior): Force usage of ansi CreateProcessA.
13504 (win32_attach): Use GETPROCADDRESS.
13505 (win32_detach): Likewise.
13506
f72f3e60
PA
135072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13508
13509 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13510
ed50f18f
PA
135112007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13512
13513 * win32-low.c: Commit leftover changes from 2007-03-29.
13514
0c2ead7e
DJ
135152007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13516
13517 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13518 fields short instead of int. Add explicit padding.
13519 (i387_cache_to_fsave): Remove unnecessary casts.
13520 (i387_fsave_to_cache): Doc fix.
13521 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13522
73725ff3
DJ
135232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13524
13525 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13526 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13527
d99f33d8
PA
135282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13529
13530 * configure.srv (arm*-*-mingw32ce*): Move near the other
13531 arm targets.
13532
68070c10
PA
135332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13534
2482afc6 13535 * configure.ac: Add errno checking.
68070c10
PA
13536 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13537 sys/file.h and malloc.h.
13538 (AC_CHECK_DECLS): Add perror.
13539 (srv_mingwce): Handle.
2482afc6 13540 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13541 win32-i386-low.o to srv_tgtobj.
13542 (i[34567]86-*-mingw*): Likewise.
13543 (arm*-*-mingw32ce*): Add case.
13544 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13545 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13546 [__MINGW32CE__] (strerror): New function.
13547 [__MINGW32CE__] (errno): Define to GetLastError.
13548 [__MINGW32CE__] (COUNTOF): New macro.
13549 (remote_open): Remove extra close call.
13550 * mem-break.c (delete_breakpoint_at): New function.
13551 * mem-break.h (delete_breakpoint_at): Declare.
13552 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13553 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13554 [USE_WIN32API] (read, write): Add char* casts.
13555 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13556 * server.h: Include wincecompat.h on Windows CE.
13557 [HAVE_ERRNO_H]: Check.
13558 (perror): Declare if not declared.
13559 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13560 (perror_with_name): Remove errno declaration.
13561 * wincecompat.h: New.
13562 * wincecompat.c: New.
13563 * win32-low.h: New.
13564 * win32-arm-low.c: New.
13565 * win32-i386-low.c: New.
13566 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13567 (OUTMSG2): Make it safe.
13568 (_T): New macro.
13569 (COUNTOF): New macro.
13570 (NUM_REGS): Get it from the low target.
13571 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13572 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13573 (thread_rec): Let low target handle debug registers.
13574 (child_add_thread): Likewise.
13575 (child_init_thread_list): Likewise.
13576 (continue_one_thread): Likewise.
13577 (regptr): New.
13578 (do_child_fetch_inferior_registers): Move to ...
13579 * win32-i386-low.c: ... here, and rename to ...
13580 (do_fetch_inferior_registers): ... this.
889bf7c5 13581 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13582 Go through the low target.
13583 (do_child_store_inferior_registers): Use regptr.
13584 (strwinerror): New function.
13585 (win32_create_inferior): Handle Windows CE.
13586 Use strwinerror instead of strerror on Windows error
13587 codes. Add program to the error output.
13588 Don't close the main thread handle on Windows CE.
13589 (win32_attach): Use coredll.dll on Windows CE.
13590 (win32_kill): Close current process and current
13591 thread handles.
13592 (win32_detach): Use coredll.dll on Windows CE.
13593 (win32_resume): Let low target handle debug registers, and
13594 step request.
13595 (handle_exception): Add/Remove initial breakpoint. Avoid
13596 non-existant WSTOPSIG on Windows CE.
13597 (win32_read_inferior_memory): Cast to remove warning.
13598 (win32_arch_string): Go through the low target.
13599 (initialize_low): Call set_breakpoint_data with the low
13600 target's breakpoint.
13601 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13602 FOP_REGNUM, mappings): Move to ...
13603 * win32-i386-low.c: ... here.
13604 * win32-low.c (win32_thread_info): Move to ...
13605 * win32-low.h: ... here.
13606 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13607 win32-arm-low.c and wincecompat.c.
13608 (all:): Add $EXEEXT.
13609 (install-only:): Likewise.
13610 (gdbserver:): Likewise.
13611 (gdbreplay:): Likewise.
13612 * config.in: Regenerate.
13613 * configure: Regenerate.
13614
41093d81
PA
136152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13616
13617 * win32-low.c: Rename typedef thread_info to
13618 win32_thread_info throughout.
13619
544afa54
PA
136202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13621
13622 * win32-i386-low.c: Rename to ...
13623 * win32-low.c: ... this.
13624 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13625 * Makefile.in: Likewise.
13626
bce7165d
PA
136272007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13628
13629 * remote-utils.c (monitor_output): Constify msg parameter.
13630 * server.h (monitor_output): Likewise.
13631 * win32-i386-low.c (handle_output_debug_string): New.
13632 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13633 handle_output_debug_string.
13634 (get_child_debug_event): Likewise.
13635
506c7aa0
DJ
136362007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13637
13638 * server.c (main): Correct strtoul check.
13639
42c81e2a
DJ
136402007-03-27 Jon Ringle <jon@ringle.org>
13641
13642 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13643
9453113a
DJ
136442007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13645
13646 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13647
64a69107
DJ
136482007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13649
13650 * terminal.h: Check HAVE_SGTTY_H.
13651
136522007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13653
13654 * remote-utils.c (remote_open): Print out the assigned port number.
13655
c74d0ad8
DJ
136562007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13657
13658 * remote-utils.c (monitor_output): New function.
13659 * server.c (debug_threads): Define here.
13660 (monitor_show_help): New function.
13661 (handle_query): Handle qRcmd.
13662 (main): Do not handle 'd' packet.
13663 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13664 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13665 of debug_threads.
13666
de7c3b4a
PA
136672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13668
13669 * Makefile.in (EXEEXT): New.
13670 (clean): Use $(EXEEXT).
13671
ef57601b
PA
136722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13673
13674 * target.h (target_ops): Rename send_signal to request_interrupt,
13675 and remove enum target_signal parameter.
13676 * linux-low.c (linux_request_interrupt): Rename from
13677 linux_send_signal, and always send SIGINT.
13678 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13679 and always send SIGINT.
13680 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13681 of send_signal.
13682 (input_interrupt): Likewise.
13683
820f2bda
PA
136842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13685
13686 * server.c (get_features_xml): Check if target implemented
13687 arch_string.
13688 * win32-i386-low.c (win32_arch_string): New.
13689 (win32_target_ops): Add win32_arch_string as arch_string member.
13690
ab39bf24
UW
136912007-02-22 Markus Deuling <deuling@de.ibm.com>
13692
13693 * spu-low.c (spu_arch_string): New.
13694 (spu_target_ops): Add spu_arch_string.
13695
61ff6e04
DJ
136962007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13697
13698 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13699 * configure.ac: Do not check for terminal.h.
13700 * configure, config.in: Regenerated.
13701
fb1e4ffc
DJ
137022007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13703
13704 * Makefile.in (OBS): Add $(XML_BUILTIN).
13705 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13706 (clean): Update.
13707 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13708 (arm-with-iwmmxt.c): New.
13709 * config.in, configure: Regenerate.
13710 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13711 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13712 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13713 (arm*-*-linux*): Add iWMMXt and regset support.
13714 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13715 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13716 (arm_store_wmmxregset, target_regsets): New.
13717 * server.c (get_features_xml): Take annex argument. Check builtin
13718 XML documents.
13719 (handle_query): Handle multiple annexes.
13720
0f48aa01
DJ
137212007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13722
13723 * remote-utils.c [USE_WIN32API] (read, write): Define.
13724 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13725 write.
13726
23181151
DJ
137272007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13728
13729 * linux-i386-low.c (the_low_target): Set arch_string.
13730 * linux-x86-64-low.c (the_low_target): Likewise.
13731 * linux-low.c (linux_arch_string): New.
13732 (linux_target_ops): Add it.
13733 * linux-low.h (struct linux_target_ops): Add arch_string.
13734 * server.c (write_qxfer_response): Use const void * for DATA.
13735 (get_features_xml): New.
13736 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13737 * target.h (struct target_ops): Add arch_string method.
13738
9d606399
DJ
137392007-01-03 Denis Pilat <denis.pilat@st.com>
13740 Daniel Jacobowitz <dan@codesourcery.com>
13741
13742 * linux-low.c (linux_kill): Handle being called with no threads.
13743 * win32-i386-low.c (win32_kill): Likewise.
13744 (get_child_debug_event): Clear current_process_handle.
13745
137462006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13747 Daniel Jacobowitz <dan@codesourcery.com>
13748
13749 * remote-utils.c (remote_open): Check the type of specified
13750 serial port devices before opening them.
13751 * server.c (main): Kill the inferior if an error occurs during
13752 the first remote_open.
13753
a5e13d24
DJ
137542006-12-05 Markus Deuling <deuling@de.ibm.com>
13755
13756 * README: Update supported targets.
13757
186947f7
DJ
137582006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13759
13760 * Makefile.in (clean): Remove reg-mips64.c.
13761 (reg-mips64.c, reg-mips64.o): New rules.
13762 * configure.srv: Handle mips64. Include regset support for mips.
13763 * linux-mips-low.c (union mips_register): New.
13764 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13765 (mips_breakpoint, mips_breakpoint_at): Use int.
13766 (mips_collect_register, mips_supply_register)
13767 (mips_collect_register_32bit, mips_supply_register_32bit)
13768 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13769 (mips_store_fpregset, target_regsets): New.
13770 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13771
a13e2c95
UW
137722006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13773
13774 * configure.srv: Add target "spu*-*-*".
13775 * Makefile.in (clean): Remove reg-spu.c.
13776 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13777 * spu-low.c: New file.
13778
cb7283db
DJ
137792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13780
13781 * configure.ac: Correct td_thr_tls_get_addr test.
13782 * configure: Regenerated.
13783
89be2091
DJ
137842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13785
13786 * linux-low.c (linux_wait_for_event): Reformat. Use the
13787 pass_signals array.
13788 * remote-utils.c (decode_address_to_semicolon): New.
13789 * server.c (pass_signals, handle_general_set): New.
13790 (handle_query): Mention QPassSignals for qSupported.
13791 (main): Call handle_general_set.
13792 * server.h (pass_signals, decode_address_to_semicolon): New.
13793
000ef4f0
DJ
137942006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13795
13796 * server.c (handle_query): Correct error handling for read_auxv.
13797
b7149293
UW
137982005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13799
13800 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13801 and srv_linux_thread_db to yes.
13802 * linux-s390-low.c (s390_fill_gregset): New function.
13803 (target_regsets): Define data structure.
13804
dae5f5cf
DJ
138052006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13806
13807 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13808 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13809 * config.in, configure: Regenerated.
13810 * inferiors.c (gdb_id_to_thread): New function.
13811 (gdb_id_to_thread_id): Use it.
13812 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13813 * linux-low.h (struct process_info): Add th member.
13814 (thread_db_get_tls_address): New prototype.
13815 * remote-utils.c (decode_address): Make non-static.
13816 * server.c (handle_query): Handle qGetTLSAddr.
13817 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13818 * target.h (struct target_ops): Add get_tls_address.
13819 * thread-db.c (maybe_attach_thread): Save the thread handle.
13820 (thread_db_get_tls_address): New.
13821
32ca6d61
DJ
138222006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13823
13824 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13825 (linux_resume_one_process): Take a siginfo_t *. Update all
13826 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13827 (struct pending_signals): Add a siginfo_t.
13828 (linux_wait_for_process): Always set last_status.
13829 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13830 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13831 * linux-low.h (struct process_info): Add last_status.
13832
5ffff7c1
DJ
138332006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13834
13835 * remote-utils.c (try_rle): New function.
13836 (putpkt_binary): Use it.
13837
8695c747
DJ
138382006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13839
13840 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13841 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13842 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13843 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13844 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13845 point registers.
13846
290fadea
RS
138472006-08-08 Richard Sandiford <richard@codesourcery.com>
13848
13849 * server.c (terminal_fd): New variable.
13850 (old_foreground_pgrp): Likewise.
13851 (restore_old_foreground_pgrp): New function.
13852 (start_inferior): Record the terminal file descriptor in terminal_fd
13853 and its original foreground group in old_foreground_pgrp. Register
13854 restore_old_foreground_pgrp with atexit().
13855
9f2e1e63
DJ
138562006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13857
13858 * server.c (handle_query): Correct qPart to qXfer.
13859
b80864fb
DJ
138602006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13861
13862 * configure.ac: Check for more headers which are missing on
13863 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13864 * configure.srv: Add Cygwin and mingw32.
13865 * remote-utils.c: Don't include headers unconditionally which
13866 are missing on mingw32. Include <winsock.h> for mingw32.
13867 (remote_open): Adjust for mingw32 support. Flush
13868 standard error after writing to it.
13869 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13870 (unblock_async_io, enable_async_io, disable_async_io)
13871 (readchar, getpkt): Update for Winsock support.
13872 (prepare_resume_reply): Expect a protocol signal number.
13873 * server.c: Disable <sys/wait.h> on mingw32.
13874 (start_inferior): Adjust for mingw32 support. Flush
13875 standard error after writing to it.
13876 (attach_inferior): Likewise. Use protocol signal
13877 numbers.
13878 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13879 and names.
13880 * win32-i386-low.c: New file.
13881 * Makefile.in (XM_CLIBS): Set.
13882 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13883 (win32-i386-low.o): New dependency rule.
13884 * linux-low.c (linux_wait): Use target signal numbers.
13885 * target.h (struct target_ops): Doc fix.
13886 * server.h (target_signal_to_name): New prototype.
13887 * gdbreplay.c: Don't include headers unconditionally which
13888 are missing on mingw32. Include <winsock.h> for mingw32.
13889 (remote_close, remote_open): Adjust for Winsock support.
13890 * configure, config.in: Regenerated.
13891
0876f84a
DJ
138922006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13893
13894 * server.c (decode_xfer_read, write_qxfer_response): New.
13895 (handle_query): Take a packet length argument. Handle
13896 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13897 the qSupported response.
13898 (main): Update call to handle_query.
13899
01f9e8fa
DJ
139002006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13901
13902 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13903 (putpkt_binary): Renamed from putpkt and adjusted for binary
13904 data.
13905 (putpkt): New wrapper for putpkt_binary.
13906 (readchar): Don't mask off the high bit.
13907 (decode_X_packet): New function.
13908 * server.c (main): Call putpkt_binary if a handler sets the packet
13909 length. Save the length of the incoming packet. Handle 'X'.
13910 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13911
be2a5f71
DJ
139122006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13913
13914 * server.c (handle_query): Handle qSupported.
13915
ea025f5f
DJ
139162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13917
13918 * remote-utils.c (all_symbols_looked_up): New variable.
13919 (look_up_one_symbol): Check it.
13920 * server.h (look_up_one_symbol): New declaration.
13921 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13922
9308fc88
DJ
139232006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13924
13925 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13926 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13927 (PTRACE_GET_THREAD_AREA): Define.
13928 (ps_get_thread_area): New function.
13929
52fb6437
NS
139302006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13931
13932 * configure.srv (m68k*-*-uclinux*): New target.
13933 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13934 (linux_resume_one_process): Remove extraneous cast.
13935 (linux_read_offsets): New.
13936 (linux_target_op): Add linux_read_offsets on mmuless systems.
13937 * server.c (handle_query): Add qOffsets logic.
13938 * target.h (struct target_ops): Add read_offsets.
13939
21b0f40c
DJ
139402006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13941
13942 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13943 (PTRACE_GET_THREAD_AREA): Define.
13944 (ps_get_thread_area): New function.
13945 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13946 (linux-x86-64-low.o): Update.
13947
0050a760
DJ
139482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13949
13950 * configure.ac: Remove checks for prfpregset_t.
13951 * gdb_proc_service.h: New file.
13952 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13953 new "gdb_proc_service.h".
13954 * proc-service.c: Likewise.
13955 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13956 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13957 * Makefile.in (gdb_proc_service_h): Updated.
13958 * configure, config.in: Regenerated.
13959
b92a518e
DJ
139602006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13961
13962 * remote-utils.c (prepare_resume_reply): Move declaration
13963 of gdb_id_from_wait to the top of the block.
13964
545587ee
DJ
139652006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13966
13967 * linux-low.c (regsets_store_inferior_registers): Read the regset
13968 from the target before filling it.
13969
9db87ebd
DJ
139702006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13971
13972 * server.c (attach_inferior): Return SIGTRAP for a successful
13973 attach.
13974
dd24457d
DJ
139752006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13976
13977 * Makefile.in (OBS): Add version.o.
13978 (STAGESTUFF): Delete.
13979 (version.o): Add dependencies.
13980 (version.c): Replace rule.
13981 (clean): Remove version.c.
13982 * server.c (gdbserver_version): New.
13983 (gdbserver_usage): Use printf.
13984 (main): Handle --version and --help.
13985 * server.h (version, host_name): Add declarations.
13986
6f0f660e
EZ
139872005-12-23 Eli Zaretskii <eliz@gnu.org>
13988
889bf7c5
PA
13989 * linux-arm-low.c:
13990 * linux-arm-low.c:
13991 * inferiors.c:
13992 * i387-fp.h:
13993 * i387-fp.c:
13994 * gdbreplay.c:
13995 * regcache.c:
13996 * proc-service.c:
13997 * mem-break.h:
13998 * mem-break.c:
13999 * linux-x86-64-low.c:
14000 * linux-sh-low.c:
14001 * linux-s390-low.c:
14002 * linux-ppc64-low.c:
14003 * linux-ppc-low.c:
14004 * linux-mips-low.c:
14005 * linux-m68k-low.c:
14006 * linux-m32r-low.c:
14007 * linux-low.h:
14008 * linux-low.c:
14009 * linux-ia64-low.c:
14010 * linux-i386-low.c:
14011 * linux-crisv32-low.c:
14012 * thread-db.c:
14013 * terminal.h:
14014 * target.h:
14015 * target.c:
14016 * server.h:
14017 * server.c:
14018 * remote-utils.c:
14019 * regcache.h:
14020 * utils.c:
14021 * Makefile.in:
14022 * configure.ac:
6f0f660e
EZ
14023 * gdbserver.1: Add (C) after Copyright. Update the FSF
14024 address.
14025
9d1fb177
DJ
140262005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14027
14028 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14029 (arm_breakpoint_at): Recognize both breakpoints.
14030 (the_low_target): Use the correct breakpoint instruction.
14031
011a70c2
DJ
140322005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14033
14034 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14035 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14036 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14037 (the_low_target): Update.
14038
7fb85e41
AS
140392005-10-25 Andreas Schwab <schwab@suse.de>
14040
14041 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14042
14043 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14044 (ia64_num_regs): Reduce to 462.
14045
3db0444b
DJ
140462005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14047
14048 * acinclude.m4: Correct quoting.
14049 * aclocal.m4: Regenerated.
14050
14051 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14052 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14053 (thread_db_init): Call thread_db_err_str.
14054 * configure.ac: Check for TD_VERSION.
14055 * config.in, configure: Regenerated.
14056
bee0189a
DJ
140572005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14058
14059 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14060
e9d25b98
DJ
140612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14062
14063 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14064 is not available. Define HAVE_PTRACE_GETREGS if it is.
14065 * config.in, configure: Regenerated.
14066 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14067 * linux-i386-low.c, linux-m68k-low.c: Update to use
14068 HAVE_PTRACE_GETREGS.
14069 * linux-low.c (regsets_fetch_inferior_registers)
14070 (regsets_store_inferior_registers): Only return 0 if we processed
14071 GENERAL_REGS.
14072 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14073 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14074
a06660f7
DJ
140752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14076
14077 * inferiors.c (struct thread_info): Add gdb_id.
14078 (add_thread): Add gdb_id argument.
14079 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14080 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14081 calls to add_thread.
14082 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14083 * server.c (handle_query): Use thread_to_gdb_id.
14084 (handle_v_cont, main): Use gdb_id_to_thread_id.
14085 * server.h (add_thread): Update prototype.
14086 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14087 prototypes.
14088
5a1f5858
DJ
140892005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14090
14091 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14092 left-padded registers.
14093 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14094 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14095
e122f1f5
SE
140962005-07-01 Steve Ellcey <sje@cup.hp.com>
14097
14098 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14099 * configure: Regenerate.
14100 * config.in: Regenerate.
14101 * server.h (NEED_DECLARATION_STRERROR):
14102 Replace with !HAVE_DECL_STRERROR.
14103
d592fa2f
DJ
141042005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14105
14106 * linux-low.c (linux_wait, linux_send_signal): Don't test
14107 an unsigned long variable for > 0 if it could be MAX_ULONG.
14108 * server.c (myresume): Likewise.
14109 * target.c (set_desired_inferior): Likewise.
14110
ccbd4912
MK
141112005-06-13 Mark Kettenis <kettenis@gnu.org>
14112
14113 * configure.ac: Simplify and improve check for socklen_t.
14114 * configure, config.in: Regenerate.
14115
f450004a
DJ
141162005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14117
14118 * acconfig.h: Remove.
14119 * configure.ac: Add a test for socklen_t. Use three-argument
14120 AC_DEFINE throughout.
14121 * config.in: Regenerated using autoheader 2.59.
14122 * configure: Regenerated.
14123
14124 * gdbreplay.c (socklen_t): Provide a default.
14125 (remote_open): Use socklen_t.
14126 * remote-utils.c (socklen_t): Provide a default.
14127 (remote_open): Use socklen_t.
14128 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14129 unsigned char.
14130
14131 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14132 char for buffers.
14133 * linux-low.c (linux_read_memory, linux_write_memory)
14134 (linux_read_auxv): Likewise.
14135 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14136 (check_mem_write): Likewise.
14137 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14138 Likewise.
14139 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14140 (registers_from_string, register_data): Likewise.
14141 * server.c (handle_query, main): Likewise.
14142 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14143 (decode_M_packet): Likewise.
14144 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14145 * target.h (struct target_ops): Update read_memory, write_memory,
14146 and read_auxv.
14147 (read_inferior_memory, write_inferior_memory): Update.
14148 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14149 to unsigned char *.
14150 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14151 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14152 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14153 linux-s390-low.c, linux-sh-low.c: Update for changes in
14154 read_inferior_memory and the_low_target->breakpoint.
14155
eee84df1
DJ
141562005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14157
14158 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14159 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14160 * configure.srv: Add powerpc64-*-linux*.
14161 * linux-ppc64-low.c: New file.
14162
45b134e5
OF
141632005-05-23 Orjan Friberg <orjanf@axis.com>
14164
14165 * linux-cris-low.c: New file with support for CRIS.
14166 * linux-crisv32-low.c: Ditto for CRISv32.
14167 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14168 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 14169 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
14170 reg-crisv32.o, and reg-crisv32.c to make rules.
14171 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14172 recognized targets.
14173
48d93c75
UW
141742005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14175
14176 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14177 of sizeof (PTRACE_XFER_TYPE).
14178 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14179
e013ee27
OF
141802005-05-12 Orjan Friberg <orjanf@axis.com>
14181
889bf7c5 14182 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
14183 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14184 pointers for hardware watchpoint support.
14185 * linux-low.h (struct linux_target_ops): Ditto.
14186 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14187 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14188 to linux_target_ops.
14189 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14190 reply packet.
14191 * server.c (main): Recognize 'Z' and 'z' packets.
14192
b0ded00b
UW
141932005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14194
14195 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14196 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14197 (the_low_target): Add new members.
14198
8643e2ad
DJ
141992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14200
14201 * proc-service.c (ps_lgetregs): Search all_processes instead of
14202 all_threads.
14203
fc620387
DJ
142042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14205
14206 * server.c (start_inferior): Change return type to int.
14207 (attach_inferior): Change sigptr to int *.
14208 (handle_v_cont, handle_v_requests): Change signal to int *.
14209 (main): Change signal to int.
14210
142112005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
14212
14213 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14214 * configure.srv: Add m32r*-*-linux*.
14215 * linux-m32r-low.c: New file.
14216
e0e76420
DJ
142172005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
14218
14219 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14220
a1928bad
DJ
142212005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14222
14223 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14224 Take unsigned long arguments for PIDs.
14225 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14226 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14227 (wait_for_sigstop, linux_resume_one_process)
14228 (regsets_fetch_inferior_registers, linux_send_signal)
14229 (linux_read_auxv): Likewise. Update the types of variables holding
14230 PIDs. Update format string specifiers.
14231 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14232 * remote-utils.c (prepare_resume_reply): Likewise.
14233 * server.c (cont_thread, general_thread, step_thread)
14234 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14235 unsigned long.
14236 (handle_query): Update format specifiers.
14237 (handle_v_cont, main): Use strtoul for thread IDs.
14238 * server.h (struct inferior_list_entry): Use unsigned long for ID.
14239 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14240 (general_thread, step_thread, thread_from_wait)
14241 (old_thread_from_wait): Update.
14242 * target.h (struct thread_resume): Use unsigned long for THREAD.
14243 (struct target_ops): Use unsigned long for arguments to attach and
14244 thread_alive.
14245
dcdb98d2
DJ
142462005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
14247
14248 * acinclude.m4: Include bfd/bfd.m4 directly.
14249 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
14250 <agriffis@toolchain.org>.
14251 * aclocal.m4, configure: Regenerated.
14252
bec39cab
AC
142532005-01-07 Andrew Cagney <cagney@gnu.org>
14254
14255 * configure.ac: Rename configure.in, require autoconf 2.59.
14256 * configure: Re-generate.
14257
434c4c77
DJ
142582004-12-08 Daniel Jacobowitz <dan@debian.org>
14259
14260 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
14261 LIBS when finished.
14262 * aclocal.m4: Regenerated.
14263 * configure: Regenerated.
14264
db1d3e1b
AS
142652004-11-21 Andreas Schwab <schwab@suse.de>
14266
14267 * linux-m68k-low.c (m68k_num_gregs): Define.
14268 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14269 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14270 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14271 (m68k_breakpoint_at): New. Add to the_low_target.
14272
14273 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14274 srv_linux_thread_db to yes.
14275
43360365
JB
142762004-10-20 Joel Brobecker <brobecker@gnat.com>
14277
14278 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14279 (ARCH_SET_FS): Likewise.
14280 (ARCH_GET_FS): Likewise.
14281 (ARCH_GET_GS): Likewise.
14282
fd500816
DJ
142832004-10-16 Daniel Jacobowitz <dan@debian.org>
14284
14285 * linux-i386-low.c (ps_get_thread_area): New.
14286 * linux-x86-64-low.c (ps_get_thread_area): New.
14287 * linux-low.c: Include <sys/syscall.h>.
14288 (linux_kill_one_process): Don't kill the first thread here.
14289 (linux_kill): Kill the first thread here.
14290 (kill_lwp): New function.
14291 (send_sigstop, linux_send_signal): Use it.
14292 * proc-service.c: Clean up #ifdefs.
14293 (fpregset_info): Delete.
14294 (ps_lgetregs): Update and enable implementation.
14295 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14296 implementations.
14297 * remote-utils.c (struct sym_cache, symbol_cache): New.
14298 (input_interrupt): Print a clearer message.
14299 (async_io_enabled): New variable.
14300 (enable_async_io, disable_async_io): Use it. Update comments.
14301 (look_up_one_symbol): Use the symbol cache.
14302 * thread-db.c (thread_db_look_up_symbols): New function.
14303 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
14304
f6de3c42
DJ
143052004-10-16 Daniel Jacobowitz <dan@debian.org>
14306
14307 * configure.in: Test for -rdynamic.
14308 * configure: Regenerated.
14309 * Makefile (INTERNAL_LDFLAGS): New.
14310 (gdbserver, gdbreplay): Use it.
14311
2c0fc042
AC
143122004-09-02 Andrew Cagney <cagney@gnu.org>
14313
14314 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14315
075b3282
DJ
143162004-03-23 Daniel Jacobowitz <drow@mvista.com>
14317
14318 * linux-low.c (linux_wait): Clear all_processes list also.
14319
fa6a77dc
DJ
143202004-03-12 Daniel Jacobowitz <drow@mvista.com>
14321
14322 * linux-low.c: Include <errno.h>. Remove extern declaration of
14323 errno.
14324
6d782a97
DJ
143252004-03-12 Daniel Jacobowitz <drow@mvista.com>
14326
14327 * gdbreplay.c, server.h, utils.c: Update copyright years.
14328
3a7fb99b
DJ
143292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14330
14331 * server.c (main): Print child status or termination signal from
14332 variable 'signal', not 'sig'.
14333
c3e735a6
DJ
143342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14335
14336 * linux-low.c (linux_read_memory): Change return type to
14337 int. Check for and return error from ptrace().
14338 * target.c (read_inferior_memory): Change return type to int. Pass
14339 back return status from the_target->read_memory().
14340 * target.h (struct target_ops): Adapt *read_memory() prototype.
14341 Update comment.
14342 (read_inferior_memory): Adapt prototype.
14343 * server.c (main): Return an error packet if
14344 read_inferior_memory() returns an error.
14345
a59d1c82
DJ
143462004-03-04 Daniel Jacobowitz <drow@mvista.com>
14347
14348 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14349 Unify with other clean targets.
14350
dc3f8883
DJ
143512004-02-29 Daniel Jacobowitz <drow@mvista.com>
14352
14353 * server.c (handle_v_cont): Call set_desired_inferior.
14354
89a208da
DJ
143552004-02-29 Daniel Jacobowitz <drow@mvista.com>
14356
14357 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14358
62ea82f5
DJ
143592004-02-29 Daniel Jacobowitz <drow@mvista.com>
14360
14361 * linux-low.c (linux_wait): Unblock async I/O.
14362 (linux_resume): Block and enable async I/O.
14363 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14364 * server.h (block_async_io, unblock_async_io): Add prototypes.
14365
6910d122
DJ
143662004-02-29 Daniel Jacobowitz <drow@mvista.com>
14367
14368 * remote-utils.c (remote_open): Print a status notice after
14369 opening a TCP port.
14370 * server.c (attach_inferior): Print a status notice after
14371 attaching.
14372
143732004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14374
14375 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14376
c89dc5d4
DJ
143772004-02-26 Daniel Jacobowitz <drow@mvista.com>
14378
14379 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14380 error packet.
14381 * server.c, target.h: Update copyright years.
14382
4b8dad4a
RM
143832004-02-25 Roland McGrath <roland@redhat.com>
14384
14385 * target.h (struct target_ops): New member `read_auxv'.
14386 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14387 * linux-low.c (linux_read_auxv): New function.
14388 (linux_target_ops): Initialize `read_auxv' member to that.
14389
d7446758
JB
143902004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14391
14392 Committed by Jim Blandy <jimb@redhat.com>.
14393
14394 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14395 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14396 instead of GPR_SIZE to distiguish s390 and s390x targets.
14397
5544ad89
DJ
143982004-01-31 Daniel Jacobowitz <drow@mvista.com>
14399
14400 * linux-low.c: Update copyright year.
14401 (check_removed_breakpoint): Clear pending_is_breakpoint.
14402 (linux_set_resume_request, linux_queue_one_thread)
14403 (resume_status_pending_p): New functions.
14404 (linux_continue_one_thread): Use process->resume.
14405 (linux_resume): Only resume threads if there are no pending events.
14406 * linux-low.h (struct process_info): Add resume request
14407 pointer.
14408
2a68b70e
DJ
144092004-01-30 Daniel Jacobowitz <drow@mvista.com>
14410
14411 * regcache.c (new_register_cache): Clear the allocated register
14412 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14413
64386c31
DJ
144142003-10-13 Daniel Jacobowitz <drow@mvista.com>
14415
14416 * linux-low.c (linux_resume): Take a struct thread_resume *
14417 argument.
14418 (linux_wait): Update call.
14419 (resume_ptr): New static variable.
14420 (linux_continue_one_thread): Renamed from
14421 linux_continue_one_process. Use resume_ptr.
14422 (linux_resume): Use linux_continue_one_thread.
14423 * server.c (handle_v_cont, handle_v_requests): New functions.
14424 (myresume): New function.
14425 (main): Handle 'v' case.
14426 * target.h (struct thread_resume): New type.
14427 (struct target_ops): Change argument of "resume" to struct
14428 thread_resume *.
14429 (myresume): Delete macro.
14430
c938e9b0
L
144312003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14432
14433 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14434 (uninstall): Support DESTDIR.
14435
7f313d07
BC
14436Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14437
14438 * configure.srv: Add xscale*linux copy of arm*linux entry.
14439
3b2fc2ea
DJ
144402003-07-24 Daniel Jacobowitz <drow@mvista.com>
14441
14442 * linux-arm-low.c (arm_reinsert_addr): New function.
14443 (the_low_target): Add arm_reinsert_addr.
14444
1c0a559e
MK
144452003-07-08 Mark Kettenis <kettenis@gnu.org>
14446
14447 * mem-break.c: Remove whitespace at end of file.
14448
43d5792c
DJ
144492003-06-28 Daniel Jacobowitz <drow@mvista.com>
14450
14451 * configure.in: Check whether we need to prototype strerror.
14452 * server.h: Optionally prototype strerror.
14453 * gdbreplay.c (perror_with_name): Use strerror.
14454 * linux-low.c (linux_attach_lwp): Use strerror.
14455 * utils.c (perror_with_name): Use strerror.
14456 * config.in, configure: Regenerated.
14457
c8a86edf
DJ
144582003-06-28 Daniel Jacobowitz <drow@mvista.com>
14459
14460 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14461 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14462
73d37363
DJ
144632003-06-20 Daniel Jacobowitz <drow@mvista.com>
14464
14465 * Makefile.in (SFILES): Update.
14466 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14467 low-sun3.c: Remove files.
14468
6ad8ae5c
DJ
144692003-06-17 Daniel Jacobowitz <drow@mvista.com>
14470
14471 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14472 (linux_detach_one_process, linux_detach): New functions.
14473 (linux_target_ops): Add linux_detach.
14474 * server.c (main): Handle 'D' packet.
14475 * target.h (struct target_ops): Add "detach" member.
14476 (detach_inferior): Define.
14477
1581182a
MK
144782003-06-13 Mark Kettenis <kettenis@gnu.org>
14479
14480 From Kelley Cook <kelleycook@wideopenwest.com>:
14481 * configure.srv: Accept i[34567]86 variants.
14482
e5379b03
DJ
144832003-06-05 Daniel Jacobowitz <drow@mvista.com>
14484
14485 * linux-low.c (linux_wait_for_event): Correct comment typos.
14486 (linux_resume_one_process): Call check_removed_breakpoint.
14487 (linux_send_signal): New function.
14488 (linux_target_ops): Add linux_send_signal.
14489 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14490 of kill.
14491 * target.h (struct target_ops): Add send_signal.
14492
2ff29de4
JB
144932003-05-29 Jim Blandy <jimb@redhat.com>
14494
14495 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14496 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14497 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14498 away part of the register's value.
14499
254787d4
DJ
145002003-03-26 Daniel Jacobowitz <drow@mvista.com>
14501
14502 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14503 (linux_wait_for_event, linux_init_signals): Likewise.
14504
94e10508
DJ
145052003-03-17 Daniel Jacobowitz <drow@mvista.com>
14506
14507 * configure.in: Check for stdlib.h.
14508 * configure: Regenerated.
14509 * config.in: Regenerated.
14510
4c0711e0
DJ
145112003-01-04 Andreas Schwab <schwab@suse.de>
14512
14513 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14514
ef66e766
AC
145152003-01-02 Andrew Cagney <ac131313@redhat.com>
14516
14517 * Makefile.in: Remove obsolete code.
14518
a1358604
DJ
145192002-11-20 Daniel Jacobowitz <drow@mvista.com>
14520
14521 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14522 defined(PT_FPR0_HI).
14523
23ce3b1c
DJ
145242002-11-17 Stuart Hughes <seh@zee2.com>
14525
14526 * linux-arm-low.c (arm_num_regs): Increase.
14527 (arm_regmap): Include status register.
14528
145292002-11-17 Daniel Jacobowitz <drow@mvista.com>
14530
14531 * linux-low.c (register_addr): Remove incorrect -1 check.
14532
a9fa9f7d
DJ
145332002-08-29 Daniel Jacobowitz <drow@mvista.com>
14534
14535 * linux-low.c (linux_create_inferior): Call setpgid. Return
14536 the new PID.
14537 (unstopped_p, linux_signal_pid): Remove.
14538 (linux_target_ops): Remove linux_signal_pid.
14539 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14540 global instead of target method.
14541 * target.h (struct target_ops): Remove signal_pid. Update comment
14542 for create_inferior.
14543 * server.c (signal_pid): New variable.
14544 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14545 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14546 (attach_inferior): Set signal_pid.
14547
17574093
DJ
145482002-08-23 Daniel Jacobowitz <drow@mvista.com>
14549
14550 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14551
145522002-08-20 Jim Blandy <jimb@redhat.com>
14553
14554 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14555 default for this.
14556
145572002-08-01 Andrew Cagney <cagney@redhat.com>
14558
14559 * Makefile.in: Make chill references obsolete.
14560
145612002-07-24 Kevin Buettner <kevinb@redhat.com>
14562
14563 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14564 * configure: Regenerate.
14565 * config.in: Regenerate.
14566
145672002-07-09 David O'Brien <obrien@FreeBSD.org>
14568
14569 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14570 (perror_with_name, remote_close, remote_open, expect, play): Static.
14571
145722002-07-04 Michal Ludvig <mludvig@suse.cz>
14573
4b8dad4a 14574 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14575 byte offsets instead of an array of indexes.
14576 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14577
145782002-06-13 Daniel Jacobowitz <drow@mvista.com>
14579
14580 * regcache.c: Add comment.
14581
145822002-06-11 Daniel Jacobowitz <drow@mvista.com>
14583
14584 * thread-db.c: New file.
14585 * proc-service.c: New file.
14586 * acinclude.m4: New file.
14587 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14588 proc-service.o, and thread-db.o.
14589 (linux-low.o): Add USE_THREAD_DB.
14590 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14591 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14592 * aclocal.m4: Regenerated.
14593 * config.in: Regenerated.
14594 * configure: Regenerated.
14595 * configure.in: Check for proc_service.h, sys/procfs.h,
14596 thread_db.h, and linux/elf.h headrs.
14597 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14598 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14599 Check for -lthread_db and thread support.
14600 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14601 PowerPC, and SuperH.
14602 * i387-fp.c: Constify arguments.
14603 * i387-fp.h: Likewise.
14604 * inferiors.c: (struct thread_info): Renamed from
14605 `struct inferior_info'. Remove PID member. Use generic inferior
14606 list header. All uses updated.
14607 (inferiors, signal_pid): Removed.
14608 (all_threads): New variable.
14609 (get_thread): Define.
14610 (add_inferior_to_list): New function.
14611 (for_each_inferior): New function.
14612 (change_inferior_id): New function.
14613 (add_inferior): Removed.
14614 (remove_inferior): New function.
14615 (add_thread): New function.
14616 (free_one_thread): New function.
14617 (remove_thread): New function.
14618 (clear_inferiors): Use for_each_inferior and free_one_thread.
14619 (find_inferior): New function.
14620 (find_inferior_id): New function.
14621 (inferior_target_data): Update argument type.
14622 (set_inferior_target_data): Likewise.
14623 (inferior_regcache_data): Likewise.
14624 (set_inferior_regcache_data): Likewise.
14625 * linux-low.c (linux_bp_reinsert): Remove.
14626 (all_processes, stopping_threads, using_thrads)
14627 (struct pending_signals, debug_threads, pid_of): New.
14628 (inferior_pid): Replace with macro.
14629 (struct inferior_linux_data): Remove.
14630 (get_stop_pc, add_process): New functions.
14631 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14632 Use add_process and add_thread.
14633 (linux_attach_lwp): New function, based on old linux_attach. Use
14634 add_process and add_thread. Set stop_expected for new threads.
14635 (linux_attach): New function.
14636 (linux_kill_one_process): New function.
14637 (linux_kill): Kill all LWPs.
14638 (linux_thread_alive): Use find_inferior_id.
14639 (check_removed_breakpoints, status_pending_p): New functions.
14640 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14641 Update. Use WNOHANG. Wait for cloned processes also. Update process
14642 struct for the found process.
14643 (linux_wait_for_event): New function.
14644 (linux_wait): Use it. Support LWPs.
14645 (send_sigstop, wait_for_sigstop, stop_all_processes)
14646 (linux_resume_one_process, linux_continue_one_process): New functions.
14647 (linux_resume): Support LWPs.
14648 (REGISTER_RAW_SIZE): Remove.
14649 (fetch_register): Use register_size instead. Call supply_register.
14650 (usr_store_inferior_registers): Likewise. Call collect_register.
14651 Fix recursive case.
14652 (regsets_fetch_inferior_registers): Improve error message.
14653 (regsets_store_inferior_registers): Add debugging.
14654 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14655 (unstopped_p, linux_signal_pid): New functions.
14656 (linux_target_ops): Add linux_signal_pid.
14657 (linux_init_signals): New function.
14658 (initialize_low): Call it. Initialize using_threads.
14659 * regcache.c (inferior_regcache_data): Add valid
14660 flag.
14661 (get_regcache): Fetch registers lazily. Add fetch argument
14662 and update all callers.
14663 (regcache_invalidate_one, regcache_invalidate): New
14664 functions.
14665 (new_register_cache): Renamed from create_register_cache.
14666 Return the new regcache.
14667 (free_register_cache): Change argument to a void *.
14668 (registers_to_string, registers_from_string): Call get_regcache
14669 with fetch flag set.
14670 (register_data): Make static. Pass fetch flag to get_regcache.
14671 (supply_register): Call get_regcache with fetch flag clear.
14672 (collect_register): Call get_regcache with fetch flag set.
14673 (collect_register_as_string): New function.
14674 * regcache.h: Update.
14675 * remote-utils.c (putpkt): Flush after debug output and use
14676 stderr.
14677 Handle input interrupts while waiting for an ACK.
14678 (input_interrupt): Use signal_pid method.
14679 (getpkt): Flush after debug output and use stderr.
14680 (outreg): Use collect_register_as_string.
14681 (new_thread_notify, dead_thread_notify): New functions.
14682 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14683 and general_thread.
14684 (look_up_one_symbol): Flush after debug output.
14685 * server.c (step_thread, server_waiting): New variables.
14686 (start_inferior): Don't use signal_pid. Update call to mywait.
14687 (attach_inferior): Update call to mywait.
14688 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14689 (main): Don't fetch/store registers explicitly. Use
14690 set_desired_inferior. Support proposed ``Hs'' packet. Update
14691 calls to mywait.
14692 * server.h: Update.
14693 (struct inferior_list, struct_inferior_list_entry): New.
14694 * target.c (set_desired_inferior): New.
14695 (write_inferior_memory): Constify.
14696 (mywait): New function.
14697 * target.h: Update.
14698 (struct target_ops): New signal_pid method.
14699 (mywait): Removed macro, added prototype.
14700
14701 * linux-low.h (regset_func): Removed.
14702 (regset_fill_func, regset_store_func): New.
14703 (enum regset_type): New.
14704 (struct regset_info): Add type field. Use new operation types.
14705 (struct linux_target_ops): stop_pc renamed to get_pc.
14706 Add decr_pc_after_break and breakpoint_at.
14707 (get_process, get_thread_proess, get_process_thread)
14708 (strut process_info, all_processes, linux_attach_lwp)
14709 (thread_db_init): New.
14710
14711 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14712 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14713 (the_low_target): Add new members.
14714 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14715 (i386_store_fpxregset): Constify.
14716 (target_regsets): Add new kind identifier.
14717 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14718 (i386_set_pc): Add debugging.
14719 (i386_breakpoint_at): New function.
14720 (the_low_target): Add new members.
14721 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14722 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14723 (mips_breakpoint_at): New.
14724 (the_low_target): Add new members.
14725 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14726 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14727 (the_low_target): Add new members.
14728 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14729 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14730 (the_low_target): Add new members.
14731 * linux-x86-64-low.c (target_regsets): Add new kind
14732 identifier.
14733
147342002-05-15 Daniel Jacobowitz <drow@mvista.com>
14735
14736 From Martin Pool <mbp@samba.org>:
14737 * server.c (gdbserver_usage): New function.
14738 (main): Call it.
14739
147402002-05-14 Daniel Jacobowitz <drow@mvista.com>
14741
14742 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14743 stop_at -> stop_pc.
14744
147452002-05-04 Andrew Cagney <ac131313@redhat.com>
14746
14747 * Makefile.in: Remove obsolete code.
14748
147492002-04-24 Michal Ludvig <mludvig@suse.cz>
14750
14751 * linux-low.c (regsets_fetch_inferior_registers),
14752 (regsets_store_inferior_registers): Removed cast to int from
14753 ptrace() calls.
14754 * regcache.h: Added declaration of struct inferior_info.
14755
147562002-04-20 Daniel Jacobowitz <drow@mvista.com>
14757
14758 * inferiors.c (struct inferior_info): Add regcache_data.
14759 (add_inferior): Call create_register_cache.
14760 (clear_inferiors): Call free_register_cache.
14761 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14762 * regcache.c (struct inferior_regcache_data): New.
14763 (registers): Remove.
14764 (get_regcache): New function.
14765 (create_register_cache, free_register_cache): New functions.
14766 (set_register_cache): Don't initialize the register cache here.
14767 (registers_to_string, registers_from_string, register_data): Call
14768 get_regcache.
14769 * regcache.h: Add prototypes.
14770 * server.h: Likewise.
14771
147722002-04-20 Daniel Jacobowitz <drow@mvista.com>
14773
14774 * mem-break.c: New file.
14775 * mem-break.h: New file.
14776 * Makefile.in: Add mem-break.o rule; update server.h
14777 dependencies.
14778 * inferiors.c (struct inferior_info): Add target_data
14779 member.
14780 (clear_inferiors): Free target_data member if set.
14781 (inferior_target_data, set_inferior_target_data): New functions.
14782 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14783 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14784 * linux-low.c (linux_bp_reinsert): New variable.
14785 (struct inferior_linux_data): New.
14786 (linux_create_inferior): Use set_inferior_target_data.
14787 (linux_attach): Likewise. Call add_inferior.
14788 (linux_wait_for_one_inferior): New function.
14789 (linux_wait): Call it.
14790 (linux_write_memory): Add const.
14791 (initialize_low): Call set_breakpoint_data.
14792 * linux-low.h (struct linux_target_ops): Add breakpoint
14793 handling members.
14794 * server.c (attach_inferior): Remove extra add_inferior
14795 call.
14796 * server.h: Include mem-break.h. Update inferior.c
14797 prototypes.
14798 * target.c (read_inferior_memory)
14799 (write_inferior_memory): New functions.
14800 * target.h (read_inferior_memory)
14801 (write_inferior_memory): Change macros to prototypes.
14802 (struct target_ops): Update comments. Add const to write_memory
14803 definition.
14804
148052002-04-11 Daniel Jacobowitz <drow@mvista.com>
14806
14807 * linux-low.c (usr_store_inferior_registers): Support
14808 registers which are allowed to fail to store.
14809 * linux-low.h (linux_target_ops): Likewise.
14810 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14811 (ppc_cannot_store_register): FPSCR may not be storable.
14812
148132002-04-09 Daniel Jacobowitz <drow@mvista.com>
14814
14815 * server.h: Include <string.h> if HAVE_STRING_H.
14816 * ChangeLog: Correct paths in last ChangeLog entry.
14817
148182002-04-09 Daniel Jacobowitz <drow@mvista.com>
14819
14820 * linux-low.h: Remove obsolete prototypes.
14821 (struct linux_target_ops): New.
14822 (extern the_low_target): New.
14823 * linux-low.c (num_regs, regmap): Remove declarations.
14824 (register_addr): Use the_low_target explicitly.
14825 (fetch_register): Likewise.
14826 (usr_fetch_inferior_registers): Likewise.
14827 (usr_store_inferior_registers): Likewise.
14828 * linux-arm-low.c (num_regs): Remove.
14829 (arm_num_regs): Define.
14830 (arm_regmap): Renamed from regmap, made static.
14831 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14832 made static.
14833 (arm_cannot_store_register): Renamed from cannot_store_register,
14834 made static.
14835 (the_low_target): New.
14836 * linux-i386-low.c (num_regs): Remove.
14837 (i386_num_regs): Define.
14838 (i386_regmap): Renamed from regmap, made static.
14839 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14840 made static.
14841 (i386_cannot_store_register): Renamed from cannot_store_register,
14842 made static.
14843 (the_low_target): New.
14844 * linux-ia64-low.c (num_regs): Remove.
14845 (ia64_num_regs): Define.
14846 (ia64_regmap): Renamed from regmap, made static.
14847 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14848 made static.
14849 (ia64_cannot_store_register): Renamed from cannot_store_register,
14850 made static.
14851 (the_low_target): New.
14852 * linux-m68k-low.c (num_regs): Remove.
14853 (m68k_num_regs): Define.
14854 (m68k_regmap): Renamed from regmap, made static.
14855 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14856 made static.
14857 (m68k_cannot_store_register): Renamed from cannot_store_register,
14858 made static.
14859 (the_low_target): New.
14860 * linux-mips-low.c (num_regs): Remove.
14861 (mips_num_regs): Define.
14862 (mips_regmap): Renamed from regmap, made static.
14863 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14864 made static.
14865 (mips_cannot_store_register): Renamed from cannot_store_register,
14866 made static.
14867 (the_low_target): New.
14868 * linux-ppc-low.c (num_regs): Remove.
14869 (ppc_num_regs): Define.
14870 (ppc_regmap): Renamed from regmap, made static.
14871 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14872 made static.
14873 (ppc_cannot_store_register): Renamed from cannot_store_register,
14874 made static.
14875 (the_low_target): New.
14876 * linux-s390-low.c (num_regs): Remove.
14877 (s390_num_regs): Define.
14878 (s390_regmap): Renamed from regmap, made static.
14879 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14880 made static.
14881 (s390_cannot_store_register): Renamed from cannot_store_register,
14882 made static.
14883 (the_low_target): New.
14884 * linux-sh-low.c (num_regs): Remove.
14885 (sh_num_regs): Define.
14886 (sh_regmap): Renamed from regmap, made static.
14887 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14888 made static.
14889 (sh_cannot_store_register): Renamed from cannot_store_register,
14890 made static.
14891 (the_low_target): New.
14892 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14893 (the_low_target): New.
14894
148952002-04-09 Daniel Jacobowitz <drow@mvista.com>
14896
14897 * Makefile.in: Add stamp-h target.
14898 * configure.in: Create stamp-h.
14899 * configure: Regenerated.
14900
149012002-04-09 Daniel Jacobowitz <drow@mvista.com>
14902
14903 * inferiors.c: New file.
14904 * target.c: New file.
14905 * target.h: New file.
14906 * Makefile.in: Add target.o and inferiors.o. Update
14907 dependencies.
14908 * linux-low.c (inferior_pid): New static variable,
14909 moved from server.c.
14910 (linux_create_inferior): Renamed from create_inferior.
14911 Call add_inferior. Return 0 on success instead of a PID.
14912 (linux_attach): Renamed from myattach.
14913 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14914 (linux_thread_alive): Renamed from mythread_alive.
14915 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14916 child dies.
14917 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14918 (regsets_store_inferior_registers): Correct error message.
14919 Add missing ``return 0''.
14920 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14921 (linux_store_registers): Renamed from store_inferior_registers.
14922 (linux_read_memory): Renamed from read_inferior_memory.
14923 (linux_write_memory): Renamed from write_inferior_memory.
14924 (linux_target_ops): New structure.
14925 (initialize_low): Call set_target_ops ().
14926 * remote-utils.c (unhexify): New function.
14927 (hexify): New function.
14928 (input_interrupt): Send signals to ``signal_pid''.
14929 * server.c (inferior_pid): Remove.
14930 (start_inferior): Update create_inferior call.
14931 (attach_inferior): Call add_inferior.
14932 (handle_query): New function.
14933 (main): Call handle_query for `q' packets.
14934 * server.h: Include "target.h". Remove obsolete prototypes.
14935 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14936
149372002-04-09 Daniel Jacobowitz <drow@mvista.com>
14938
14939 * Makefile.in: Add WARN_CFLAGS. Update configury
14940 dependencies.
14941 * configure.in: Check for <string.h>
14942 * configure: Regenerate.
14943 * config.in: Regenerate.
14944 * gdbreplay.c: Include needed system headers.
14945 (remote_open): Remove strchr prototype.
14946 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14947 * regcache.c (supply_register): Change buf argument to const void *.
14948 (supply_register_by_name): Likewise.
14949 (collect_register): Change buf argument to void *.
14950 (collect_register_by_name): Likewise.
14951 * regcache.h: Add missing prototypes.
14952 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14953 * server.c (handle_query): New function.
14954 (attached): New static variable, moved out of main.
14955 (main): Quiet longjmp clobber warnings.
14956 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14957 * utils.c (error): Remove NORETURN.
14958 (fatal): Likewise.